CN102710896B - The method and apparatus drawing frame to amplify is carried out for dynamic object - Google Patents
The method and apparatus drawing frame to amplify is carried out for dynamic object Download PDFInfo
- Publication number
- CN102710896B CN102710896B CN201210138921.5A CN201210138921A CN102710896B CN 102710896 B CN102710896 B CN 102710896B CN 201210138921 A CN201210138921 A CN 201210138921A CN 102710896 B CN102710896 B CN 102710896B
- Authority
- CN
- China
- Prior art keywords
- target image
- value
- frame
- pixels
- positive
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 230000003321 amplification Effects 0.000 claims description 26
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 26
- 238000004364 calculation method Methods 0.000 claims description 19
- 239000013598 vector Substances 0.000 claims description 11
- 238000012986 modification Methods 0.000 claims description 2
- 230000004048 modification Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
The invention provides and carry out for dynamic object the method and apparatus that draws frame to amplify.Wherein, the method comprises: A, calculates the direction of motion and the speed of drawing target image in frame region; B, determine to described draw frame region draw frame amplify required for time T; C, the direction of motion utilizing steps A to calculate and speed, and the time T that B determines, described frame region of drawing is revised, to make: to revised draw frame region carry out described in draw frame to amplify time capture described target image.
Description
Technical Field
The invention relates to the technical field of videos, in particular to a method and a device for performing frame-pulling amplification on a dynamic target.
Background
The field of view of the fixed camera is fixed, and in some places with a large range, a plurality of cameras are needed to be compatible. In order to solve the problem, an alternative scheme is to use a pan-tilt camera, the camera can realize angle changes such as up-down, left-right and the like by combining with control of a pan-tilt, and zoom can be adjusted, so that a distant object can be displayed more clearly after being amplified.
The zoom-in of the pull frame is a special function of the pan-tilt camera, and currently, many manufacturers realize zoom-in of the pull frame in the pan-tilt camera or at the rear end of the pan-tilt camera. The frame-pulling amplification means that an object to be amplified is pulled up from a frame on a multimedia image displayed on an image display page, then a background controls a pan-tilt camera through a certain protocol to move the object in the frame to the center of a picture of the image display page through operations of up, down, left, right and the like, and then the object is amplified in a variable magnification mode.
At present, the frame-pulling amplification of the pan-tilt camera is limited to a static target, but the frame-pulling amplification of a dynamic target cannot be performed, because: because the dynamic target is moving all the time, after the pan-tilt finishes the frame-pulling and amplifying instructions such as adjusting the angles of up, down, left and right and zooming, the dynamic target moves out of the visual field of the camera.
Disclosure of Invention
The invention provides a method and a device for carrying out frame-pulling amplification on a dynamic target, which are used for realizing the frame-pulling amplification on the dynamic target.
The technical scheme provided by the invention comprises the following steps:
a method of frame-pulling for a dynamic target, comprising:
a, calculating the movement direction and speed of a target image in a frame pulling area;
b, determining the time T required for carrying out frame pulling amplification on the frame pulling area;
c, correcting the frame pulling area by using the movement direction and speed calculated in the step A and the time T determined by the step B, so that: and capturing the target image when the corrected frame pulling area is subjected to frame pulling amplification.
An apparatus for performing a frame-pulling zoom on a dynamic target, the apparatus comprising:
the motion direction and speed calculation module is used for calculating the motion direction and speed of the target image in the frame pulling area;
the time determining module is used for determining the time T required for carrying out frame pulling amplification on the frame pulling area;
a correction module, configured to correct the frame-pulling area by using the moving direction and speed calculated by the moving direction and speed calculation module and the time T determined by the time determination module, so that: and capturing the target image when the corrected frame pulling area is subjected to frame pulling amplification.
According to the technical scheme, the position of the target image after the frame pulling amplification action is completed in the frame pulling area is predicted by calculating the moving direction and the speed of the target image in the frame pulling area, and the frame pulling area is corrected according to the prediction result so as to enable the target image in the frame of the corrected frame pulling area to be in the frame pulling area.
Drawings
FIG. 1 is a flow chart of a method provided by an embodiment of the present invention;
fig. 2 shows a schematic diagram of macroblock MV information;
FIG. 3 illustrates a pop-up area where an image display page and a box are selected;
FIG. 4 is a flow chart of calculating the moving direction and speed of a target image in the horizontal direction according to an embodiment of the present invention;
FIG. 5 is a flowchart of calculating the moving direction and speed of a target image in the vertical direction according to an embodiment of the present invention;
fig. 6 is a diagram illustrating an apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The technical scheme provided by the invention comprises the flow shown in figure 1:
referring to fig. 1, fig. 1 is a flowchart of a method provided by an embodiment of the present invention. As shown in fig. 1, the process may include the following steps:
step 101, recording the Motion Vector (MV) information of each macro block in the decoding process.
Generally, the motion of the object has continuity, and this step 101 predicts the subsequent motion trend of the object by recording the MV information of each macro block in the decoding process, so as to implement the frame-pulling enlargement of the moving object according to the predicted motion trend, specifically see steps 103 to 106.
One frame of image is divided into I frame coding and P frame coding in the coding process, I frame is intra-frame prediction coding frame, the coding of which is independent of the information of other frames, and P frame coding is inter-frame prediction coding frame, which is coded by referring to the information of the previous coded frame (marked as reference frame). If the current frame is I frame coding, the MV information of each macro block in the current frame is 0, and if the current frame is P frame coding, aiming at the macro block in the P frame coding, if the macro block can find a matched macro block in a reference frame, the macro block can be coded into an inter macro block, correspondingly, an MV information can be generated, if the macro block can not find a matched macro block in the reference frame, the MV information can be coded into an intra macro block, and the corresponding MV information is 0.
Fig. 2 shows a schematic diagram of macroblock MV information. In fig. 2, S1 indicates an image in the current frame, occupying 4 macroblocks, S2 indicates the position of S1 in the reference frame, which can be understood as the position before the movement of the object, and accordingly, S1 is understood as the position after the movement of the object, and the straight line with an arrow in fig. 2 represents MV information. Where MBn (MVx, MVy) in fig. 2 denotes a motion vector MVx in the horizontal direction and a motion vector MVy in the vertical direction for the nth macroblock.
Based on the above description, in the decoding process, if the decoded current frame is a P frame, then for an intra macroblock of the current frame, the MV information of the intra macroblock is recorded as 0, if the current frame is an inter macroblock, the MV information of the inter macroblock is recorded as MV information generated by the inter macroblock during encoding, and if the current frame is an I frame, the MV information of each macroblock in the previous P frame is recorded.
Step 102, a user selects an area (for short, a frame-pulling area) needing frame-pulling amplification in an image display page through a client.
FIG. 3 illustrates a selected tab area of an image display page and frame. The frame-pulling area frames the target image which is selected by the user and needs to be subjected to frame-pulling amplification. The target image occupies MB 0-MBn macroblocks.
And 103, calculating the motion direction and the motion speed of the target image by using the MV information of each macro block in the target image recorded in the step 101.
The moving direction and speed of the target image mainly comprise the moving direction and speed of the target image in the horizontal direction and the moving direction and speed in the vertical direction. In the following, the flow shown in fig. 4 describes how to calculate the moving direction and speed of the target image in the horizontal direction, and the flow shown in fig. 5 describes how to calculate the moving direction and speed of the target image in the vertical direction.
And 104, determining the time T required for carrying out frame pulling amplification on the frame pulling area.
In the invention, the frame-pulling amplification of the frame-pulling area is realized by adjusting the up-down and left-right movement of the holder and the zooming of the holder. Based on this, the time T may include: the time T1 taken for the pan/tilt head to move in the horizontal direction, the time T2 taken for the pan/tilt head to move in the vertical direction, and the time T3 taken for the magnification change to be completed.
Wherein the time T1 may be determined by: calculating a horizontal distance between a center point O1 of the draw frame region shown in fig. 3 to a center point O2 of the image display page; the quotient obtained by dividing the calculated horizontal distance by the set horizontal movement speed of the pan/tilt head is the time T1.
The time T2 may calculate the vertical distance between the center point O1 of the draw frame region shown in fig. 3 to the center point O2 of the image display page by the following steps; the quotient obtained by dividing the calculated vertical distance by the set vertical movement speed of the pan/tilt head is the time T2.
Time T3 may be determined by: and calculating the time T0 required by the zoom of the pan-tilt from the set minimum multiple to the set maximum multiple by using the speed of controlling the pan-tilt to zoom by using the motor, and calculating the time T3 according to the T0, the speed of controlling the pan-tilt to zoom by using the motor and the proportional relation between the drawing frame local area and the image display page.
And 105, correcting the frame pulling area by using the movement direction and speed calculated in the step 103 and the time T determined by the step 104.
The purpose of the correction in this step 105 is to ensure that the corrected frame-pulling area always frames out the target image which is moving. As to how step 105 is modified, it includes the following steps:
if the target image has only one moving direction in the horizontal direction, assuming that the moving speed is Sx, shifting the center point of the frame-pulling region by Sx × T pixels, such as O1 shown in fig. 3, where Sx × T has a positive value and a negative value, taking a positive value indicates shifting Sx × T pixels to the right in the horizontal direction on the premise that a positive value indicates that a horizontal negative value indicates that a horizontal left is horizontal, taking a negative value indicates shifting | Sx × T | pixels to the left in the horizontal direction, and if the target image has two moving directions in the horizontal direction, one of which is Sx0, which is a negative value, and the other is Sx1, which is a positive value, shifting the left boundary of the frame-pulling region by | Sx0 × T | pixels to the left, and shifting the right boundary of the frame-pulling region by Sx 1T pixels to the right;
if the target image has only one motion direction in the vertical direction, assuming that the motion speed is Sy, shifting the center point of the frame-pulling region, such as O1 shown in fig. 3, by Sy × T pixels, where Sy × T has a positive negative value, taking a positive value to indicate that Sy × T pixels are shifted downward in the vertical direction on the premise that a positive value indicates that a vertical downward negative value indicates that the vertical upward direction, taking a negative value to indicate that | Sy × T | pixels are shifted upward in the vertical direction, and if the target image has two motion directions in the vertical direction, one of Sy0 being a negative value and the other being Sy1 being a positive value, shifting the upper boundary of the frame-pulling region upward by | Sy0 × T | pixels, and shifting the lower boundary of the frame-pulling region downward by Sy1 | T pixels.
And 106, carrying out the frame pulling amplification on the corrected frame pulling area.
Since the step 105 corrects the position and size of the frame-pulling area depending on the moving direction and speed of the target image and the time required for frame-pulling area enlargement, it is ensured that the corrected frame-pulling area can capture the moving target image when frame-pulling enlargement is performed.
Thus, the flow shown in fig. 1 is completed.
The flows shown in fig. 4 and 5 are described below:
referring to fig. 4, fig. 4 is a flowchart for calculating the moving direction and the speed of the target image in the horizontal direction according to the embodiment of the present invention. As shown in fig. 4, the process may include:
step 401, counting the number N1 taking a positive value and the number N2 taking a negative value from the horizontal direction motion vectors (MVx) of the macroblocks MB 0-MBn occupied by the target image.
That is, the value of MVx is 0 and is not counted in.
Step 402, comparing whether the ratio of N1 to N2 is within a first set range, if yes, executing step 403, otherwise, executing step 404.
When the ratio of N1 to N2 is within the first set range, it indicates that there are several macro blocks in the target image moving in the opposite direction in the horizontal direction, step 403 is performed, and when the ratio of N1 to N2 is not within the first set range, it indicates that the target image has a tendency to move in the same direction in the horizontal direction, step 404 is performed.
Wherein, the first setting range can be determined according to the actual situation, and the invention preferably can be: between 35% and 1.
Step 403, calculating the above-counted average value of N1 positive values and the average value of N2 negative values. Step 405 is then performed.
After step 403 is performed, two average values are obtained.
In step 404, the average value of only the larger number of the plurality of the samples is calculated. Step 405 is then performed.
After step 404 is performed, an average value is obtained.
Step 405, for each calculated average value, calculating a horizontal direction speed of the target image in units of pixels according to the average value and the set current frame rate.
If this step 405 is performed after step 403, two horizontal velocities are obtained after this step 405 is performed, and if it is performed after step 404, one horizontal velocity is obtained.
The calculating the horizontal direction speed of the target image by taking the pixel as a unit according to the average value and the set current frame rate specifically comprises the following steps:
assuming that the current frame rate is F (representing F subframes per second), determining that the time interval between the current frame and the corresponding reference frame is 1/F, and the unit is second;
the average value is divided by the determined time interval, which is the horizontal direction velocity of the target image in units of pixels.
In step 406, the moving direction of the target image in the horizontal direction is determined by using each horizontal direction velocity calculated in step 405.
The motion trend of the target image in the horizontal direction is just opposite to the positive and negative of the velocity of the target image in the horizontal direction, so this step 406 specifically includes: negating each horizontal direction velocity calculated in step 405 to obtain a value, and on the premise that a positive value represents that a horizontal right negative value represents that a horizontal left is obtained, if the obtained value is a positive value, indicating that the movement direction of the target image in the horizontal direction is right, otherwise, indicating that the movement direction of the target image in the horizontal direction is left; or, on the premise that a positive value represents that the horizontal direction is left and a negative value represents that the horizontal direction is right, if the obtained value is a positive value, the moving direction of the target image in the horizontal direction is left, otherwise, the moving direction of the target image in the horizontal direction is right.
If two horizontal velocities are obtained by the calculation in step 405, then after the step 406 is executed, two moving directions of the target image in the horizontal direction can be obtained, and if one horizontal velocity is obtained by the calculation in step 405, then after the step 406 is executed, then one moving direction of the target image in the horizontal direction can be obtained.
Up to this point, the calculation of the moving direction and speed of the target image in the horizontal direction is completed by fig. 4.
As for the moving direction and speed of the calculation target image in the vertical direction, which are similar to the moving direction and speed of the calculation target image in the horizontal direction shown in fig. 4, the process shown in fig. 5 may be specifically included:
referring to fig. 5, fig. 5 is a flowchart for calculating a moving direction and a moving speed of a target image in a vertical direction according to an embodiment of the present invention. As shown in fig. 5, the process may include:
in step 501, the number N3 of positive values and the number N4 of negative values are counted from the vertical motion vectors (MVy) of the macroblocks MB0 to MBn occupied by the target image.
Step 502, comparing whether the ratio of N3 to N4 is within a second set range, if yes, executing step 503, otherwise, executing step 504.
When the ratio of N3 to N4 is within the second predetermined range, it indicates that there are a plurality of macroblocks in the target image moving in the opposite direction in the vertical direction, step 503 is performed, and when the ratio of N3 to N4 is not within the second predetermined range, it indicates that the target image has a tendency to move in the same direction in the vertical direction, step 504 is performed.
The second setting range may be determined according to actual conditions, and may be, for example, between 35% and 1.
In step 503, the above-counted average values of the N3 positive values and the N4 negative values are calculated. Step 505 is then performed.
In step 504, the average value of only the larger number of the samples is calculated. Step 505 is then performed.
And 505, for each calculated average value, calculating the vertical speed of the target image in pixel unit according to the average value and the set current frame rate.
The calculation method of the vertical velocity in step 505 is similar to the calculation method of the horizontal velocity in step 405, and is not described again.
In step 506, the moving direction of the target image in the vertical direction is determined by using each vertical direction speed calculated in step 505.
This step 506 is similar to the implementation of the step 406, and specifically includes: negating each vertical direction velocity calculated in step 505 to obtain a value, wherein if the obtained value is a positive value indicating that the moving direction of the target image in the vertical direction is downward, if not, indicating that the moving direction of the target image in the vertical direction is upward, on the premise that a positive value indicates that a vertical downward negative value indicates that the vertical direction is upward; or, on the premise that a positive value represents that a vertical upward negative value represents that a vertical downward is performed, if the obtained value is a positive value, the moving direction of the target image in the vertical direction is indicated as an upward direction, otherwise, the moving direction of the target image in the vertical direction is indicated as a downward direction.
If two vertical direction speeds are obtained by the calculation in the step 505, after the step 506 is executed, two moving directions of the target image in the vertical direction can be obtained, and if one vertical direction speed is obtained by the calculation in the step 505, after the step 506 is executed, one moving direction of the target image in the vertical direction can be obtained.
Up to this point, the calculation of the moving direction and speed of the target image in the vertical direction is completed by fig. 5.
The method provided by the invention is described above, and the device provided by the invention is described below:
referring to fig. 6, fig. 6 is a structural diagram of an apparatus according to an embodiment of the present invention. As shown in fig. 6, the apparatus includes:
the motion direction and speed calculation module is used for calculating the motion direction and speed of the target image in the frame pulling area;
the time determining module is used for determining the time T required for carrying out frame pulling amplification on the frame pulling area;
a correction module, configured to correct the frame-pulling area by using the moving direction and speed calculated by the moving direction and speed calculation module and the time T determined by the time determination module, so that: and capturing the target image when the corrected frame pulling area is subjected to frame pulling amplification.
Wherein the moving direction and speed of the target image comprise: the direction and speed of movement of the target image in the horizontal direction, and the direction and speed of movement of the target image in the vertical direction. Based on this, the moving direction and speed calculation module determines the moving direction and speed of the target image in the horizontal direction by:
a1, counting the number N1 of positive values and the number N2 of negative values in the horizontal motion vectors MVx of the macro blocks MB 0-MBn occupied by the target image;
a2, if the ratio of N1 to N2 is in the first setting range, calculating the average value of the N1 positive values and the average value of the N2 negative values respectively, otherwise, only calculating the average value of the one with a larger number;
a3, calculating the horizontal direction speed of the target image by taking the pixel as the unit according to the average value and the set current frame rate for each calculated average value;
a4, determining the moving direction of the target image in the horizontal direction by using each horizontal direction speed calculated in the step A3.
Wherein, a4 may specifically include: negating each horizontal direction velocity calculated in step a3 to obtain a value, wherein if the obtained value is a positive value on the premise that a positive value represents a horizontal right and a negative value represents a horizontal left, the obtained value indicates that the movement direction of the target image in the horizontal direction is to the right, otherwise, the obtained value indicates that the movement direction of the target image in the horizontal direction is to the left; or, on the premise that a positive value represents that the horizontal direction is left and a negative value represents that the horizontal direction is right, if the obtained value is a positive value, the moving direction of the target image in the horizontal direction is left, otherwise, the moving direction of the target image in the horizontal direction is right.
As for the moving direction and speed of the target image in the vertical direction, it is calculated by the moving direction and speed calculation module by the following steps:
a5, counting the number N3 of positive values and the number N4 of negative values in the vertical motion vectors MVy of the macro blocks MB 0-MBn occupied by the target image;
a6, if the ratio of N3 to N4 is in the second setting range, calculating the average value of the N3 positive values and the average value of the N4 negative values respectively, otherwise, only calculating the average value of the one with a larger number;
a7, for each average value, calculating the vertical direction speed of the target image in pixel unit according to the average value and the set current frame rate;
a8, determining the moving direction of the target image in the vertical direction by using each vertical direction speed calculated in the step A7.
Wherein, the determination in the step A8 may include: negating each vertical direction velocity calculated in step a7 to obtain a value, wherein if the obtained value is positive, it means that the moving direction of the target image in the vertical direction is downward, and otherwise, it means that the moving direction of the target image in the vertical direction is upward, on the premise that a positive value means that a vertical downward negative value means that the vertical upward direction is; or, on the premise that a positive value represents that a vertical upward negative value represents that a vertical downward is performed, if the obtained value is a positive value, the moving direction of the target image in the vertical direction is indicated as an upward direction, otherwise, the moving direction of the target image in the vertical direction is indicated as a downward direction.
In the present invention, the correction unit corrects the tab area by:
if the target image only has one moving direction in the horizontal direction, and the movement speed is assumed to be Sx, shifting the central point O of the frame pulling area by Sx T pixels, wherein the Sx T has a positive value and a negative value, the positive value represents that the target image is shifted by Sx T pixels to the right in the horizontal direction, and the negative value represents that the target image is shifted by | Sx T | pixels to the left in the horizontal direction; if the target image has two moving directions in the horizontal direction, one of which is Sx0 and is a negative value and the other of which is Sx1 and is a positive value, shifting the left boundary of the tab area to the left by | Sx 0T | pixels and shifting the right boundary of the tab area to the right by Sx 1T pixels;
if the target image only has one moving direction in the vertical direction, and the movement speed is assumed to be Sy, shifting the central point O of the frame pulling area by SyT pixels, wherein SyT has a positive value and a negative value, taking a positive value indicates that the central point O is shifted downwards by SyT pixels in the vertical direction, and taking a negative value indicates that the central point O is shifted upwards by | SyT | pixels in the vertical direction; if the target image has two directions of motion in the vertical direction, one of which is Sy0, negative, and the other is Sy1, positive, the upper boundary of the bezel area is shifted up by | Sy0 × T | pixels, and the lower boundary of the bezel area is shifted down by Sy1 × T pixels.
Thus, the description of the apparatus shown in fig. 6 is completed.
According to the technical scheme, the position of the target image after the frame pulling amplification action is completed in the frame pulling area is predicted by calculating the moving direction and the speed of the target image in the frame pulling area, and the frame pulling area is corrected according to the prediction result so as to enable the target image in the frame of the corrected frame pulling area to be in the frame pulling area.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (8)
1. A method for performing frame-pulling amplification on a dynamic target, the method comprising:
a1, counting the number N1 of positive values and the number N2 of negative values in the horizontal motion vectors MVx of the macro blocks MB 0-MBn occupied by the target image;
a2, if the ratio of N1 to N2 is in the first setting range, calculating the average value of the N1 positive values and the average value of the N2 negative values respectively, otherwise, only calculating the average value of the one with a larger number;
a3, calculating the horizontal direction speed of the target image by taking the pixel as the unit according to the average value and the set current frame rate for each calculated average value;
a4, determining the moving direction of the target image in the horizontal direction by using each horizontal direction speed calculated in the step A3;
a', determining the moving direction and speed of the target image in the vertical direction;
b, determining the time T required for carrying out frame pulling amplification on the frame pulling area;
c, correcting the frame pulling area by using the calculated moving direction and speed and the time T determined by the B, so that: and capturing the target image when the corrected frame pulling area is subjected to frame pulling amplification.
2. The method of claim 1, wherein the determining of step a4 comprises:
negating each horizontal direction velocity calculated in step a3 to obtain a value;
on the premise that a positive value represents that a horizontal right negative value represents that a horizontal left value represents that the movement direction of the target image in the horizontal direction is right if the obtained numerical value is the positive value, otherwise, the movement direction of the target image in the horizontal direction is left; or,
on the premise that a positive value represents that a horizontal leftward negative value represents that a horizontal rightward value, if the obtained value is a positive value, it indicates that the moving direction of the target image in the horizontal direction is leftward, otherwise, it indicates that the moving direction of the target image in the horizontal direction is rightward.
3. The method of claim 1, wherein the determining of step a' comprises:
a5, counting the number N3 of positive values and the number N4 of negative values in the vertical motion vectors MVy of the macro blocks MB 0-MBn occupied by the target image;
a6, if the ratio of N3 to N4 is in the second setting range, calculating the average value of the N3 positive values and the average value of the N4 negative values respectively, otherwise, only calculating the average value of the one with a larger number;
a7, for each average value, calculating the vertical direction speed of the target image in pixel unit according to the average value and the set current frame rate;
a8, determining the moving direction of the target image in the vertical direction by using each vertical direction speed calculated in the step A7.
4. The method of claim 3, wherein the determining in step A8 includes:
negating each vertical direction velocity calculated in step a7 to obtain a value;
on the premise that a positive value represents that a vertical downward negative value represents that a vertical upward value exists, if the obtained numerical value is the positive value, the moving direction of the target image in the vertical direction is downward, and if not, the moving direction of the target image in the vertical direction is upward; or,
on the premise that a positive value represents that a vertical upward negative value represents that a vertical downward is performed, if the obtained value is a positive value, it means that the moving direction of the target image in the vertical direction is upward, otherwise, it means that the moving direction of the target image in the vertical direction is downward.
5. The method according to any one of claims 1 to 4, wherein the modification in step C comprises:
c1, if the target image has only one moving direction in the horizontal direction, assuming the moving speed is Sx, shifting the center point O of the frame-pulling area by Sx × T pixels, wherein Sx × T has a positive value and a negative value, taking a positive value indicates shifting Sx × T pixels to the right in the horizontal direction, and taking a negative value indicates shifting | Sx × T | pixels to the left in the horizontal direction;
if the target image has two moving directions in the horizontal direction, one of which is Sx0 and is a negative value and the other of which is Sx1 and is a positive value, shifting the left boundary of the tab area to the left by | Sx 0T | pixels and shifting the right boundary of the tab area to the right by Sx 1T pixels;
c2, if the target image has only one moving direction in the vertical direction, assuming that the moving speed is Sy, shifting the center point O of the frame-pulling region by Sy x T pixels, wherein Sy x T has a positive value and a negative value, and taking a positive value indicates shifting Sy x T pixels downward in the vertical direction and taking a negative value indicates shifting | Sy x T | pixels upward in the vertical direction;
if the target image has two directions of motion in the vertical direction, one of which is Sy0, negative, and the other is Sy1, positive, the upper boundary of the bezel area is shifted up by | Sy0 × T | pixels, and the lower boundary of the bezel area is shifted down by Sy1 × T pixels.
6. An apparatus for performing frame-pulling amplification on a dynamic target, the apparatus comprising:
the motion direction and speed calculation module is used for counting the number N1 with a positive value and the number N2 with a negative value in the horizontal motion vectors MVx of the macro blocks MB 0-MBn occupied by the target image; if the ratio of N1 to N2 is in a first set range, respectively calculating the average value of the N1 positive values and the average value of the N2 negative values, otherwise, only calculating the average value of the one with a larger number; calculating the horizontal direction speed of the target image in pixel unit according to the average value and the set current frame rate aiming at each calculated average value; determining a moving direction of the target image in a horizontal direction using each calculated horizontal direction velocity; determining the moving direction and speed of the target image in the vertical direction;
the time determining module is used for determining the time T required for carrying out frame pulling amplification on the frame pulling area;
a correction module, configured to correct the frame-pulling area by using the moving direction and speed calculated by the moving direction and speed calculation module and the time T determined by the time determination module, so that: and capturing the target image when the corrected frame pulling area is subjected to frame pulling amplification.
7. The apparatus of claim 6, wherein the motion direction and velocity calculation module determines the motion direction and velocity of the target image in the vertical direction by:
counting the number N3 of positive values and the number N4 of negative values in the motion vectors MVy in the vertical direction of the macro blocks MB 0-MBn occupied by the target image;
if the ratio of N3 to N4 is in a second set range, respectively calculating the average value of the N3 positive values and the average value of the N4 negative values, otherwise, only calculating the average value of the one with a larger number;
for each average value, calculating the vertical direction speed of the target image by taking the pixel as a unit according to the average value and the set current frame rate;
and determining the motion direction of the target image in the vertical direction by utilizing each calculated vertical direction speed.
8. The apparatus according to claim 6 or 7, wherein the correction unit corrects the tab area by:
if the target image only has one moving direction in the horizontal direction, and the movement speed is assumed to be Sx, shifting the central point O of the frame pulling area by Sx T pixels, wherein the Sx T has a positive value and a negative value, the positive value represents that the target image is shifted by Sx T pixels to the right in the horizontal direction, and the negative value represents that the target image is shifted by | Sx T | pixels to the left in the horizontal direction; if the target image has two moving directions in the horizontal direction, one of which is Sx0 and is a negative value and the other of which is Sx1 and is a positive value, shifting the left boundary of the tab area to the left by | Sx 0T | pixels and shifting the right boundary of the tab area to the right by Sx 1T pixels;
if the target image only has one moving direction in the vertical direction, and the movement speed is assumed to be Sy, shifting the central point O of the frame pulling area by SyT pixels, wherein SyT has a positive value and a negative value, taking a positive value indicates that the central point O is shifted downwards by SyT pixels in the vertical direction, and taking a negative value indicates that the central point O is shifted upwards by | SyT | pixels in the vertical direction; if the target image has two directions of motion in the vertical direction, one of which is Sy0, negative, and the other is Sy1, positive, the upper boundary of the bezel area is shifted up by | Sy0 × T | pixels, and the lower boundary of the bezel area is shifted down by Sy1 × T pixels.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210138921.5A CN102710896B (en) | 2012-05-07 | 2012-05-07 | The method and apparatus drawing frame to amplify is carried out for dynamic object |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210138921.5A CN102710896B (en) | 2012-05-07 | 2012-05-07 | The method and apparatus drawing frame to amplify is carried out for dynamic object |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102710896A CN102710896A (en) | 2012-10-03 |
CN102710896B true CN102710896B (en) | 2015-10-14 |
Family
ID=46903437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210138921.5A Active CN102710896B (en) | 2012-05-07 | 2012-05-07 | The method and apparatus drawing frame to amplify is carried out for dynamic object |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102710896B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104268863B (en) * | 2014-09-18 | 2017-05-17 | 浙江宇视科技有限公司 | Zooming correcting method and device |
CN111273837A (en) * | 2018-12-04 | 2020-06-12 | 浙江宇视科技有限公司 | Image processing method and device |
CN110072064B (en) | 2019-06-12 | 2020-07-03 | 睿魔智能科技(深圳)有限公司 | Image shooting method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1430415A (en) * | 2001-12-29 | 2003-07-16 | Lg电子株式会社 | Method for tracking moving image amplification area |
CN102291571A (en) * | 2011-08-11 | 2011-12-21 | 杭州华三通信技术有限公司 | Method and device for realizing frame-pulling scaling in monitoring system |
CN102316267A (en) * | 2010-06-30 | 2012-01-11 | 亚洲大学校产学协力团 | The apparatus and method of using rig camera initiatively to follow the tracks of a plurality of moving targets |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7542588B2 (en) * | 2004-04-30 | 2009-06-02 | International Business Machines Corporation | System and method for assuring high resolution imaging of distinctive characteristics of a moving object |
AU2010201740B2 (en) * | 2010-04-30 | 2013-03-07 | Canon Kabushiki Kaisha | Method, apparatus and system for performing a zoom operation |
-
2012
- 2012-05-07 CN CN201210138921.5A patent/CN102710896B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1430415A (en) * | 2001-12-29 | 2003-07-16 | Lg电子株式会社 | Method for tracking moving image amplification area |
CN102316267A (en) * | 2010-06-30 | 2012-01-11 | 亚洲大学校产学协力团 | The apparatus and method of using rig camera initiatively to follow the tracks of a plurality of moving targets |
CN102291571A (en) * | 2011-08-11 | 2011-12-21 | 杭州华三通信技术有限公司 | Method and device for realizing frame-pulling scaling in monitoring system |
Also Published As
Publication number | Publication date |
---|---|
CN102710896A (en) | 2012-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9781350B2 (en) | Systems and methods for performing automatic zoom | |
US9019387B2 (en) | Imaging device and method of obtaining image | |
US8810709B2 (en) | Image capturing apparatus and control method thereof | |
US9319587B2 (en) | Image pickup apparatus, image pickup method, and computer program product | |
US8274570B2 (en) | Image processing apparatus, image processing method, hand shake blur area estimation device, hand shake blur area estimation method, and program | |
JP2016535552A (en) | Method and apparatus for obtaining a photograph | |
EP2487900A3 (en) | Image displaying device and method, and image processing device and method | |
JP2013257686A5 (en) | ||
WO2013121082A1 (en) | Video image stabilization | |
CN103024263B (en) | Image processing apparatus and image processing method | |
US20130278754A1 (en) | Method and system for compensating for image blur by moving image sensor | |
CN102710896B (en) | The method and apparatus drawing frame to amplify is carried out for dynamic object | |
JP2014039223A5 (en) | Image processing apparatus, control method thereof, and control program | |
CN104869310A (en) | Video shooting anti-shaking method based on mobile apparatus GPU and angular velocity sensor | |
JP2017045326A (en) | Display device and control method thereof, program, and storage medium | |
US9204059B2 (en) | Image processing apparatus having function of reading captured image, control method thereof, and imaging apparatus | |
JP5393877B2 (en) | Imaging device and integrated circuit | |
JP2015041819A (en) | Imaging apparatus and its control method, program, and storage medium | |
KR20150003649A (en) | Apparatus for compensating shaking of video camera angle using accelerometers and method thereof, and portable terminal comprising the same apparatus | |
JP5537390B2 (en) | Video signal processing apparatus and camera apparatus | |
JP6759039B2 (en) | Image processing equipment, image processing methods, and programs | |
JP2019216398A (en) | Imaging apparatus and control method therefor, and program | |
JP2015173388A (en) | Imaging apparatus and control method therefor | |
JP2015148965A (en) | Image processing apparatus, imaging apparatus, and image processing method | |
JP2012191672A (en) | Imaging apparatus and movement control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |