CN109743495A - Video image electronic stability augmentation method and device - Google Patents
Video image electronic stability augmentation method and device Download PDFInfo
- Publication number
- CN109743495A CN109743495A CN201811434787.7A CN201811434787A CN109743495A CN 109743495 A CN109743495 A CN 109743495A CN 201811434787 A CN201811434787 A CN 201811434787A CN 109743495 A CN109743495 A CN 109743495A
- Authority
- CN
- China
- Prior art keywords
- frame image
- motion vector
- current frame
- reference frame
- correlation curve
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000003416 augmentation Effects 0.000 title claims abstract description 21
- 239000013598 vector Substances 0.000 claims abstract description 119
- 230000009466 transformation Effects 0.000 claims abstract description 13
- 230000006641 stabilisation Effects 0.000 claims description 39
- 238000011105 stabilization Methods 0.000 claims description 39
- 238000012937 correction Methods 0.000 claims description 29
- 238000004364 calculation method Methods 0.000 claims description 20
- 238000005070 sampling Methods 0.000 claims description 8
- 230000001133 acceleration Effects 0.000 claims description 7
- 238000007781 pre-processing Methods 0.000 claims description 5
- 230000001788 irregular Effects 0.000 abstract description 7
- 238000012545 processing Methods 0.000 abstract description 7
- 238000003702 image correction Methods 0.000 abstract 2
- 230000000007 visual effect Effects 0.000 description 10
- 238000005259 measurement Methods 0.000 description 4
- 238000013519 translation Methods 0.000 description 4
- 238000001914 filtration Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000011049 filling Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000002156 mixing Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Landscapes
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the present invention provides a kind of video image electronic stability augmentation method and device, which comprises according to the current frame image and reference frame image of target video, obtains global motion vector of the current frame image relative to the reference frame image;Intended motion vector of the equipment at current time of the target video is shot based on Kalman filter estimation;According to the global motion vector and the intended motion vector, electronic steady image correction amount is obtained, transformation is carried out to the current frame image according to the electronic steady image correction amount and edge is cut, obtains stable current frame image.The embodiment of the present invention can effectively solve the problem that the sequence of video images irregular chatterin problem of UAV Intelligent Vision Table acquisition, and processing speed is fast, real-time is high, precision is good, is easy to realize on embeded processor.
Description
Technical Field
The embodiment of the invention belongs to the technical field of image processing, and particularly relates to an electronic stability augmentation method and device for video images.
Background
The video image electronic stability augmentation technology is always the key research content of a video image acquisition system, and particularly when a camera mounting platform such as an airborne camera, a vehicular camera or a ship-borne camera is in a motion state, a video sequence obtained in an imaging process has small irregular jitter due to the jitter of the platform or the jitter of the camera caused by external reasons such as air flow, road surface, water flow and the like, so that the result of scene observation is influenced, and the result of other subsequent visual tasks is possibly influenced. Therefore, obtaining a stable video image sequence before completing a high-level visual processing task is a very important part of visual processing under a motion platform.
The video image stability augmentation method applied to the intelligent visual holder of the unmanned aerial vehicle has many limitations and difficulties, for example, airborne computing and storage resources are limited and real-time requirements are high, and most computing resources are required to be used for high-level visual processing tasks such as target identification and tracking, so that many algorithms with large computing quantity or high storage space requirements cannot be applied, for example, a method based on feature point extraction and matching, and an image block matching method cannot be applied to electronic stability augmentation of video images of the intelligent visual holder of the unmanned aerial vehicle.
In conclusion, the conventional electronic video image stability augmentation method is large in calculation amount and high in storage requirement, cannot meet the real-time performance, and cannot be applied to an unmanned aerial vehicle intelligent visual platform.
Disclosure of Invention
In order to overcome the problems that the conventional video image electronic stability augmentation method is large in calculation amount and high in storage requirement and cannot meet the real-time performance or at least partially solve the problems, embodiments of the present invention provide a video image electronic stability augmentation method and apparatus.
According to a first aspect of the embodiments of the present invention, there is provided a video image electronic stabilization method, including:
acquiring a global motion vector of a current frame image relative to a reference frame image according to the current frame image and the reference frame image of a target video;
estimating an intentional motion vector of a device for shooting the target video at the current moment based on a Kalman filter;
and acquiring an electronic image stabilization correction amount according to the global motion vector and the intentional motion vector, and performing transformation and edge cutting on the current frame image according to the electronic image stabilization correction amount to acquire a stable current frame image.
According to a second aspect of the embodiments of the present invention, there is provided an electronic video image stabilization device, including:
the first acquisition module is used for acquiring a global motion vector of a current frame image relative to a reference frame image according to the current frame image and the reference frame image of a target video;
the second acquisition module is used for estimating an intentional motion vector of the equipment for shooting the target video at the current moment based on the Kalman filter;
and the stability augmentation module is used for acquiring an electronic image stabilization correction amount according to the global motion vector and the intentional motion vector, and performing transformation and edge cutting on the current frame image according to the electronic image stabilization correction amount to acquire a stable current frame image.
According to a third aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the video image electronic stabilization method provided by any one of the various possible implementations of the first aspect.
According to a fourth aspect of the embodiments of the present invention, there is also provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the electronic video image stabilization method provided in any one of the various possible implementations of the first aspect.
The embodiment of the invention provides a video image electronic stability augmentation method and a video image electronic stability augmentation device, the method comprises the steps of firstly estimating a global motion vector of a current frame image relative to a reference frame image, having small calculated amount and high precision, then using a Kalman filter to separate the intentional motion and irregular jitter of equipment for shooting a target video at the current moment, determining an electronic image stabilization correction amount according to the global motion vector of the current frame image and the intentional motion vector of the equipment, and transforming and edge cutting the current frame image according to the electronic image stabilization correction amount to obtain a stable current frame image.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic overall flow chart of a video image electronic stability augmentation method according to an embodiment of the present invention;
fig. 2 is a schematic view of an overall structure of an electronic video image stabilization device according to an embodiment of the present invention;
fig. 3 is a schematic view of an overall structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment of the present invention, a video image electronic stability augmentation method is provided, and fig. 1 is a schematic overall flow chart of the video image electronic stability augmentation method provided in the embodiment of the present invention, where the method includes: s101, acquiring a global motion vector of a current frame image relative to a reference frame image according to the current frame image and the reference frame image of a target video;
the target video is a video which needs to be stabilized, and can be shot by the unmanned aerial vehicle intelligent visual holder, but not limited to the application equipment and the application scene. Unmanned aerial vehicle intelligence vision cloud platform comprises high definition motion camera, triaxial stabilized cloud platform and image processing module. The unmanned aerial vehicle intelligent visual cloud deck integrates a high-resolution visible camera, such as 1920 x 1080 resolution. When this camera mount was on unmanned aerial vehicle, because the influence of external factors such as engine vibrations or air current, the video sequence of unmanned aerial vehicle intelligence vision cloud platform collection can appear random shake. And taking a certain frame image in the sequence of the target video as a reference frame image, and taking a subsequent frame image of the reference frame image as a current frame image. During initialization, a first frame image of the target video can be used as a reference frame image, and a subsequently acquired image is used as a current frame image. The global motion vector is a change vector of the whole image of the current frame image relative to the reference frame. The global motion vector of the current frame image relative to the reference frame image is determined according to the difference between the current frame image and the reference frame image, and the embodiment is not limited to the method for acquiring the global motion vector.
S102, estimating an intentional motion vector of the equipment for shooting the target video at the current moment based on a Kalman filter;
a Kalman filter, i.e. a Kalman filter, is a recursive filter proposed by Kalman for time-varying linear systems, which can be described by a differential equation model containing orthogonal state variables, the principle of such a filter being to incorporate past measurement estimation errors into new measurement errors to estimate future errors. The intentional motion vector of the device for shooting the target video refers to a motion vector of the device itself, and the motion of the device itself can be approximated by a uniform motion model. The Kalman filter is used to separate the intentional motion vector of the device at the current time from the irregular jitter of the device.
S103, obtaining an electronic image stabilization correction amount according to the global motion vector and the intentional motion vector, and performing transformation and edge cutting on the current frame image according to the electronic image stabilization correction amount to obtain a stable current frame image.
The electronic image stabilization correction quantity is a motion vector needing to be compensated between the current frame image and the reference frame image. Obtaining global motion vector d of current frame image relative to reference frame imagewAnd an intentional motion vector d of a device photographing a target video at a current timekThen, get the electronic image stabilization correction d ═ dk-dw. And carrying out translation transformation on the current frame image according to the electronic image stabilization correction quantity, cutting off the edge out-of-bounds part after the translation transformation, filling zero in the vacant part to obtain a stable current frame image, and sequentially carrying out stabilization on each frame image of the target video by using the method of the embodiment so as to obtain a stabilized video sequence image.
The method comprises the steps of firstly estimating a global motion vector of a current frame image relative to a reference frame image, wherein the calculation amount is small, the precision is high, then a Kalman filter is used for separating the intentional motion and the irregular jitter of the device for shooting the target video at the current moment, the electronic image stabilization correction quantity is determined according to the global motion vector of the current frame image and the intentional motion vector of the device, the current frame image is transformed and subjected to edge cutting according to the electronic image stabilization correction quantity, and the stable current frame image is obtained.
On the basis of the foregoing embodiment, in this embodiment, the step of acquiring, according to the current frame image and the reference frame image of the target video, the global motion vector of the current frame image relative to the reference frame image specifically includes: performing row projection and column projection on the current frame image to acquire a row projection gray value and a column projection gray value of the current frame image; performing row projection and column projection on the reference frame image to acquire a row projection gray value and a column projection gray value of the reference frame image; performing cross-correlation calculation on the line projection gray value of the current frame image and the line projection gray value of the reference frame image to obtain a first correlation curve; performing cross-correlation calculation on the column projection gray value of the current frame image and the column projection gray value of the reference frame image to obtain a second correlation curve; determining the position of a minimum value in the first correlation curve and the second correlation curve based on a three-point acceleration method; determining a line motion vector of the current frame image relative to the reference frame image according to the minimum value position of the first correlation curve; determining a column motion vector of the current frame image relative to the reference frame image according to the minimum value position of the second correlation curve; and determining a global motion vector of the current frame image relative to the reference frame image according to the line motion vector and the column motion vector.
Specifically, the line projection of the current frame image is to project each line in the current frame image, that is, to project vertically. The column projection of the current frame image is to perform projection, i.e. horizontal projection, on each column in the current frame image. And acquiring two one-dimensional gray projection sequences of the current frame image, namely a row projection gray value and a column projection gray value of the current frame image. Likewise, the row projected grayscale value and the column projected grayscale value of the reference frame image are acquired. And performing cross-correlation calculation on the line projection gray value of the current frame image and the line projection gray value of the reference frame image to obtain a first correlation curve. The position of the minimum of the first correlation curve is determined using a three-point acceleration method. And performing cross-correlation calculation on the column projection gray value of the current frame image and the column projection gray value of the reference frame image to obtain a second correlation curve. The position of the minimum of the second correlation curve is determined using a three-point acceleration method. The two correlation calculation methods are the same, and the minimum Mean-Square Error (MSE) is used as the correlation matching operation criterion of the cross-correlation calculation. Comparing the current frame image at the position of the minimum value of the first correlation curve with respect to the current frame imageOffset X of reference frame image0As a line motion vector of the current frame picture relative to the reference frame picture. The offset Y of the current frame image relative to the reference frame image at the position of the minimum value of the second correlation curve0As column motion vectors for the current frame picture relative to the reference frame picture. And the minimum value Error X of the first correlation curve and the minimum value Error Y of the second correlation curve are recorded. According to X0And Y0A global motion vector of the current frame picture relative to the reference frame picture is determined. Can directly react (X)0,Y0) As a global motion vector.
On the basis of the foregoing embodiment, in this embodiment, before the step of performing row projection and column projection on the current frame image, the step of performing row projection and column projection on the reference frame image further includes: down-sampling the current frame image and the reference frame image; and preprocessing the current frame image after down-sampling and the reference frame image after down-sampling by using a histogram equalization method.
Specifically, in order to improve the operation efficiency, the current frame image and the reference frame image are down-sampled, for example, the current frame image and the reference frame image with the resolution of 1920 × 1080 are down-sampled to the image with the resolution of 960 × 540. And then preprocessing the down-sampled current frame image and reference frame image by using a histogram equalization method. And respectively performing row projection and column projection on the processed current frame image and the processed reference frame image.
On the basis of the foregoing embodiment, in this embodiment, the step of determining the global motion vector of the current frame image relative to the reference frame image according to the row motion vector and the column motion vector specifically includes: adding and subtracting the running motion vector and a first preset variable to obtain a first operation result; fitting a quadratic parabolic equation by using a first correlation curve value corresponding to the row motion vector and a first correlation curve value corresponding to the first operation result to obtain the offset of the minimum value position in the first correlation curve; adding and subtracting the column motion vector and a second preset variable to obtain a second operation result; fitting a quadratic parabolic equation by using a second correlation curve value corresponding to the column of motion vectors and a second correlation curve value corresponding to the second operation result to obtain the offset of the minimum value position in the second correlation curve; and performing upsampling on the offset of the minimum value position in the first correlation curve and the offset of the minimum value position in the second correlation curve, and taking the upsampling result as a global motion vector of the current frame image relative to the reference frame image.
Specifically, the global motion vector is further accurately determined by quadratic parabolic interpolation. For example, if the first preset variable is 1, the first operation result is X0-1 and X0+1, using X0-1、X0And X0Fitting a quadratic parabolic equation to the first correlation curve values corresponding to the +1 three offsets, and taking the minimum value of the fitted quadratic parabolic equation as the sub-pixel level offset X of the position of the minimum value in the row projection first correlation curve1. Similarly, a sub-pixel level offset Y at which the minimum position in the column projection second correlation curve is located is obtained1. Mixing X1And Y1Upsampling by 2 times to obtain a global motion vector d of the original 1920 x 1080 resolution imageW={dX,dYIn which d isX、dYRespectively representing row and column motion vectors.
On the basis of the foregoing embodiments, in this embodiment, the step of estimating, based on the kalman filter, an intentional motion vector of the device that captures the target video at the current time specifically includes: and taking the global motion vector as an observed value in the Kalman filter, and estimating an intentional motion vector of a device for shooting the target video at the current moment by using the Kalman filter.
Specifically, d isXAnd dYAs an observed value. The state equation of the kalman filter may be expressed as:
then there are system parametersWherein x iskIndicates the state at the k-th time, d indicates displacement, v indicates velocity, and k indicates time.
The observation equation can be expressed as:
then the system parameter H ═ 10]。
The prediction and correction equations for the kalman filter can be written as follows:
xk,p=Axk-1,
Pk,p=APk-1AT+Q,
Kk=Pk,pHT(HPk,pHT+R)-1,
xk=xk,p+Kk(zk-Hxk,p),
Pk=(1-KkH)Pk,p,
where Q and R are the prediction and observation state covariance matrices, respectively, and can generally be considered as independent of each other between the system state dimensions, then Q and R can be set as quantity matrices. The factor influencing the smoothness of the filtering result is cR/cQ, and the value reflects the trust degree of the predicted value and the observed value, wherein the cR and the cQ are values of elements on diagonals of quantity matrixes R and Q respectively; the larger the value is, the more believable the prediction result is, and the smoothness of the filtering result is good; otherwise, the more confident the observation is, the more biased the filtering is toward the observation. The Kalman filter is generally used to smooth the fluctuation of data, so that the cR should be guaranteed as much as possiblethe/cQ is more than 10000. For example, cR is 0.1 and cQ is 0.00001. The P matrix may be initialized to 0. Using the measured value z at time 00To initiate x0The prediction starts with k 1. The iteration can be performed by the following formula:
thereby obtaining the intentional motion vector d of the device for shooting the target video at the current momentk。
On the basis of the foregoing embodiment, in this embodiment, the step of determining the position of the minimum value in the first correlation curve and the second correlation curve based on a three-point acceleration method further includes: if the sum of the minimum value in the first correlation curve and the minimum value in the second correlation curve is larger than a preset threshold value, updating the reference frame image into the current frame image, and resetting all parameters in the Kalman filter.
Specifically, when the sum of the minimum value Error _ X of the first correlation curve and the minimum value Error _ Y of the second correlation curve is greater than the preset threshold, if (Error _ X + Error _ Y)/2>10, the reference frame image is updated to the current frame image, and all the parameters in the kalman filter are reset.
In another embodiment of the present invention, an electronic video image stabilization device is provided, which is used for implementing the method in the foregoing embodiments. Therefore, the descriptions and definitions in the embodiments of the foregoing electronic video image stabilization method may be used for understanding the execution modules in the embodiments of the present invention. Fig. 2 is a schematic diagram of an overall structure of an electronic stability augmentation device for video images according to an embodiment of the present invention, where the device includes a first obtaining module 201, a second obtaining module 202, and a stability augmentation module 203; wherein:
the first obtaining module 201 is configured to obtain a global motion vector of a current frame image relative to a reference frame image according to the current frame image and the reference frame image of a target video;
the target video is a video which needs to be stabilized, and can be shot by the unmanned aerial vehicle intelligent visual holder, but not limited to the application equipment and the application scene. Unmanned aerial vehicle intelligence vision cloud platform comprises high definition motion camera, triaxial stabilized cloud platform and image processing module. Unmanned aerial vehicle intelligence vision cloud platform has integrateed high resolution visible light camera, and when this camera mount on unmanned aerial vehicle, because the influence of external factors such as engine vibrations or air current, the video sequence that unmanned aerial vehicle intelligence vision cloud platform gathered can appear random shake. And taking a certain frame image in the sequence of the target video as a reference frame image, and taking a subsequent frame image of the reference frame image as a current frame image. During initialization, a first frame image of the target video can be used as a reference frame image, and a subsequently acquired image is used as a current frame image. The global motion vector is a change vector of the whole image of the current frame image relative to the reference frame. The first obtaining module 201 determines a global motion vector of the current frame image relative to the reference frame image according to a difference between the current frame image and the reference frame image, and the embodiment is not limited to the method for obtaining the global motion vector.
The second obtaining module 202 is configured to estimate, based on a kalman filter, an intentional motion vector of a device that captures the target video at a current time;
a Kalman filter, i.e. a Kalman filter, is a recursive filter proposed by Kalman for time-varying linear systems, which can be described by a differential equation model containing orthogonal state variables, the principle of such a filter being to incorporate past measurement estimation errors into new measurement errors to estimate future errors. The intentional motion vector of the device for shooting the target video refers to a motion vector of the device itself, and the motion of the device itself can be approximated by a uniform motion model. The second acquisition module 202 uses a Kalman filter to separate the intentional motion vector of the device at the current time from the irregular jitter of the device.
The stability augmentation module 203 is configured to obtain an electronic image stabilization correction amount according to the global motion vector and the intentional motion vector, and perform transformation and edge clipping on the current frame image according to the electronic image stabilization correction amount to obtain a stable current frame image.
The electronic image stabilization correction quantity is a motion vector needing to be compensated between the current frame image and the reference frame image. The stability augmentation module 203 acquires the global motion vector d of the current frame image relative to the reference frame imagewAnd an intentional motion vector d of a device photographing a target video at a current timekThen, get the electronic image stabilization correction d ═ dk-dw. And carrying out translation transformation on the current frame image according to the electronic image stabilization correction quantity, cutting off the edge out-of-bounds part after the translation transformation, filling zero in the vacant part to obtain a stable current frame image, and sequentially carrying out stabilization on each frame image of the target video by using the method of the embodiment so as to obtain a stabilized video sequence image.
The method comprises the steps of firstly estimating a global motion vector of a current frame image relative to a reference frame image, wherein the calculation amount is small, the precision is high, then a Kalman filter is used for separating the intentional motion and the irregular jitter of the device for shooting the target video at the current moment, the electronic image stabilization correction quantity is determined according to the global motion vector of the current frame image and the intentional motion vector of the device, the current frame image is transformed and subjected to edge cutting according to the electronic image stabilization correction quantity, and the stable current frame image is obtained.
On the basis of the foregoing embodiment, in this embodiment, the first obtaining module is specifically configured to: performing row projection and column projection on the current frame image to acquire a row projection gray value and a column projection gray value of the current frame image; performing row projection and column projection on the reference frame image to acquire a row projection gray value and a column projection gray value of the reference frame image; performing cross-correlation calculation on the line projection gray value of the current frame image and the line projection gray value of the reference frame image to obtain a first correlation curve; performing cross-correlation calculation on the column projection gray value of the current frame image and the column projection gray value of the reference frame image to obtain a second correlation curve; determining the position of a minimum value in the first correlation curve and the second correlation curve based on a three-point acceleration method; determining a line motion vector of the current frame image relative to the reference frame image according to the minimum value position of the first correlation curve; determining a column motion vector of the current frame image relative to the reference frame image according to the minimum value position of the second correlation curve; and determining a global motion vector of the current frame image relative to the reference frame image according to the line motion vector and the column motion vector.
On the basis of the above embodiment, the present embodiment further includes a preprocessing module, configured to down-sample the current frame image and the reference frame image; and preprocessing the current frame image after down-sampling and the reference frame image after down-sampling by using a histogram equalization method.
On the basis of the above embodiment, in this embodiment, the minimum mean square error is used as the correlation matching operation criterion of the cross-correlation calculation; and the method for performing cross-correlation calculation on the row projection gray value of the current frame image and the row projection gray value of the reference frame image is the same as the method for performing cross-correlation calculation on the column projection gray value of the current frame image and the column projection gray value of the reference frame image.
On the basis of the foregoing embodiment, in this embodiment, the first obtaining module is further configured to: adding and subtracting the running motion vector and a first preset variable to obtain a first operation result; fitting a quadratic parabolic equation by using a first correlation curve value corresponding to the row motion vector and a first correlation curve value corresponding to the first operation result to obtain the offset of the minimum value position in the first correlation curve; adding and subtracting the column motion vector and a second preset variable to obtain a second operation result; fitting a quadratic parabolic equation by using a second correlation curve value corresponding to the column of motion vectors and a second correlation curve value corresponding to the second operation result to obtain the offset of the minimum value position in the second correlation curve; and performing upsampling on the offset of the minimum value position in the first correlation curve and the offset of the minimum value position in the second correlation curve, and taking the upsampling result as a global motion vector of the current frame image relative to the reference frame image.
On the basis of the foregoing embodiments, the second obtaining module in this embodiment is specifically configured to: and taking the global motion vector as an observed value in the Kalman filter, and estimating an intentional motion vector of a device for shooting the target video at the current moment by using the Kalman filter.
On the basis of the foregoing embodiment, in this embodiment, the method further includes an updating module, configured to update the reference frame image to the current frame image and reset all parameters in the kalman filter if a sum of a minimum value in the first correlation curve and a minimum value in the second correlation curve is greater than a preset threshold.
The embodiment provides an electronic device, and fig. 3 is a schematic view of an overall structure of the electronic device according to the embodiment of the present invention, where the electronic device includes: at least one processor 301, at least one memory 302, and a bus 303; wherein,
the processor 301 and the memory 302 are communicated with each other through a bus 303;
the memory 302 stores program instructions executable by the processor 301, and the processor calls the program instructions to perform the methods provided by the above method embodiments, for example, the method includes: acquiring a global motion vector of a current frame image relative to a reference frame image according to the current frame image and the reference frame image of a target video; estimating an intentional motion vector of a device for shooting the target video at the current moment based on a Kalman filter; and acquiring an electronic image stabilization correction amount according to the global motion vector and the intentional motion vector, and performing transformation and edge cutting on the current frame image according to the electronic image stabilization correction amount to acquire a stable current frame image.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the methods provided by the above method embodiments, for example, including: acquiring a global motion vector of a current frame image relative to a reference frame image according to the current frame image and the reference frame image of a target video; estimating an intentional motion vector of a device for shooting the target video at the current moment based on a Kalman filter; and acquiring an electronic image stabilization correction amount according to the global motion vector and the intentional motion vector, and performing transformation and edge cutting on the current frame image according to the electronic image stabilization correction amount to acquire a stable current frame image.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. An electronic stabilization method for video images, comprising:
acquiring a global motion vector of a current frame image relative to a reference frame image according to the current frame image and the reference frame image of a target video;
estimating an intentional motion vector of a device for shooting the target video at the current moment based on a Kalman filter;
and acquiring an electronic image stabilization correction amount according to the global motion vector and the intentional motion vector, and performing transformation and edge cutting on the current frame image according to the electronic image stabilization correction amount to acquire a stable current frame image.
2. The method according to claim 1, wherein the step of obtaining the global motion vector of the current frame image relative to the reference frame image according to the current frame image and the reference frame image of the target video specifically comprises:
performing row projection and column projection on the current frame image to acquire a row projection gray value and a column projection gray value of the current frame image;
performing row projection and column projection on the reference frame image to acquire a row projection gray value and a column projection gray value of the reference frame image;
performing cross-correlation calculation on the line projection gray value of the current frame image and the line projection gray value of the reference frame image to obtain a first correlation curve;
performing cross-correlation calculation on the column projection gray value of the current frame image and the column projection gray value of the reference frame image to obtain a second correlation curve;
determining the position of a minimum value in the first correlation curve and the second correlation curve based on a three-point acceleration method;
determining a line motion vector of the current frame image relative to the reference frame image according to the minimum value position of the first correlation curve;
determining a column motion vector of the current frame image relative to the reference frame image according to the minimum value position of the second correlation curve;
and determining a global motion vector of the current frame image relative to the reference frame image according to the line motion vector and the column motion vector.
3. The method of claim 2, wherein the step of row-projecting and column-projecting the current frame image and the reference frame image is preceded by the step of row-projecting and column-projecting the current frame image, and further comprising:
down-sampling the current frame image and the reference frame image;
and preprocessing the current frame image after down-sampling and the reference frame image after down-sampling by using a histogram equalization method.
4. The method of claim 2, wherein a minimum mean square error is used as a correlation matching operation criterion for the cross-correlation calculation; and the method for performing cross-correlation calculation on the row projection gray value of the current frame image and the row projection gray value of the reference frame image is the same as the method for performing cross-correlation calculation on the column projection gray value of the current frame image and the column projection gray value of the reference frame image.
5. The method according to claim 2, wherein the step of determining a global motion vector of the current frame picture relative to the reference frame picture based on the row motion vector and the column motion vector comprises:
adding and subtracting the running motion vector and a first preset variable to obtain a first operation result;
fitting a quadratic parabolic equation by using a first correlation curve value corresponding to the row motion vector and a first correlation curve value corresponding to the first operation result to obtain the offset of the minimum value position in the first correlation curve;
adding and subtracting the column motion vector and a second preset variable to obtain a second operation result;
fitting a quadratic parabolic equation by using a second correlation curve value corresponding to the column of motion vectors and a second correlation curve value corresponding to the second operation result to obtain the offset of the minimum value position in the second correlation curve;
and performing upsampling on the offset of the minimum value position in the first correlation curve and the offset of the minimum value position in the second correlation curve, and taking the upsampling result as a global motion vector of the current frame image relative to the reference frame image.
6. The method according to any one of claims 1 to 5, wherein the step of estimating, based on a Kalman filter, an intentional motion vector of the device that captured the target video at the current moment comprises:
and taking the global motion vector as an observed value in the Kalman filter, and estimating an intentional motion vector of a device for shooting the target video at the current moment by using the Kalman filter.
7. The method of claim 2, wherein the step of determining the location of the minimum in the first correlation curve and the second correlation curve based on a three-point acceleration method is further followed by:
if the sum of the minimum value in the first correlation curve and the minimum value in the second correlation curve is larger than a preset threshold value, updating the reference frame image into the current frame image, and resetting all parameters in the Kalman filter.
8. An electronic video image stabilization device, comprising:
the first acquisition module is used for acquiring a global motion vector of a current frame image relative to a reference frame image according to the current frame image and the reference frame image of a target video;
the second acquisition module is used for estimating an intentional motion vector of the equipment for shooting the target video at the current moment based on the Kalman filter;
and the stability augmentation module is used for acquiring an electronic image stabilization correction amount according to the global motion vector and the intentional motion vector, and performing transformation and edge cutting on the current frame image according to the electronic image stabilization correction amount to acquire a stable current frame image.
9. An electronic device, comprising:
at least one processor, at least one memory, and a bus; wherein,
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811434787.7A CN109743495B (en) | 2018-11-28 | 2018-11-28 | Electronic stability augmentation method and device for video image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811434787.7A CN109743495B (en) | 2018-11-28 | 2018-11-28 | Electronic stability augmentation method and device for video image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109743495A true CN109743495A (en) | 2019-05-10 |
CN109743495B CN109743495B (en) | 2021-02-09 |
Family
ID=66358211
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811434787.7A Active CN109743495B (en) | 2018-11-28 | 2018-11-28 | Electronic stability augmentation method and device for video image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109743495B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112204956A (en) * | 2019-10-10 | 2021-01-08 | 深圳市大疆创新科技有限公司 | Shooting device, control method thereof and movable platform |
CN112929562A (en) * | 2021-01-20 | 2021-06-08 | 北京百度网讯科技有限公司 | Video jitter processing method, device, equipment and storage medium |
WO2021223127A1 (en) * | 2020-05-06 | 2021-11-11 | 深圳市大疆创新科技有限公司 | Global motion estimation-based time-domain filtering method and device, and storage medium |
CN114205521A (en) * | 2021-11-12 | 2022-03-18 | 国网通用航空有限公司 | Image stabilizing method, device, equipment and storage medium for motion video image |
CN114303364A (en) * | 2019-06-21 | 2022-04-08 | 高途乐公司 | System and method for stabilizing video |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090174782A1 (en) * | 2008-01-07 | 2009-07-09 | Philippe Kahn | Method and Apparatus for Improving Photo Image Quality |
CN102231792A (en) * | 2011-06-29 | 2011-11-02 | 南京大学 | Electronic image stabilization method based on characteristic coupling |
CN103402045A (en) * | 2013-08-20 | 2013-11-20 | 长沙超创电子科技有限公司 | Image de-spin and stabilization method based on subarea matching and affine model |
CN103475802A (en) * | 2013-09-26 | 2013-12-25 | 中国矿业大学 | Electronic image stabilization method |
CN103955930A (en) * | 2014-04-28 | 2014-07-30 | 中国人民解放军理工大学 | Motion parameter estimation method based on gray integral projection cross-correlation function characteristics |
CN106375659A (en) * | 2016-06-06 | 2017-02-01 | 中国矿业大学 | Electronic image stabilization method based on multi-resolution gray projection |
CN107222662A (en) * | 2017-07-12 | 2017-09-29 | 中国科学院上海技术物理研究所 | A kind of electronic image stabilization method based on improved KLT and Kalman filtering |
US20180070089A1 (en) * | 2016-09-08 | 2018-03-08 | Qualcomm Incorporated | Systems and methods for digital image stabilization |
CN108259736A (en) * | 2016-12-29 | 2018-07-06 | 昊翔电能运动科技(昆山)有限公司 | Holder stability augmentation system and holder increase steady method |
CN108805832A (en) * | 2018-05-29 | 2018-11-13 | 重庆大学 | Improvement Gray Projection digital image stabilization method suitable for tunnel environment characteristic |
-
2018
- 2018-11-28 CN CN201811434787.7A patent/CN109743495B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090174782A1 (en) * | 2008-01-07 | 2009-07-09 | Philippe Kahn | Method and Apparatus for Improving Photo Image Quality |
CN102231792A (en) * | 2011-06-29 | 2011-11-02 | 南京大学 | Electronic image stabilization method based on characteristic coupling |
CN103402045A (en) * | 2013-08-20 | 2013-11-20 | 长沙超创电子科技有限公司 | Image de-spin and stabilization method based on subarea matching and affine model |
CN103475802A (en) * | 2013-09-26 | 2013-12-25 | 中国矿业大学 | Electronic image stabilization method |
CN103955930A (en) * | 2014-04-28 | 2014-07-30 | 中国人民解放军理工大学 | Motion parameter estimation method based on gray integral projection cross-correlation function characteristics |
CN106375659A (en) * | 2016-06-06 | 2017-02-01 | 中国矿业大学 | Electronic image stabilization method based on multi-resolution gray projection |
US20180070089A1 (en) * | 2016-09-08 | 2018-03-08 | Qualcomm Incorporated | Systems and methods for digital image stabilization |
CN108259736A (en) * | 2016-12-29 | 2018-07-06 | 昊翔电能运动科技(昆山)有限公司 | Holder stability augmentation system and holder increase steady method |
CN107222662A (en) * | 2017-07-12 | 2017-09-29 | 中国科学院上海技术物理研究所 | A kind of electronic image stabilization method based on improved KLT and Kalman filtering |
CN108805832A (en) * | 2018-05-29 | 2018-11-13 | 重庆大学 | Improvement Gray Projection digital image stabilization method suitable for tunnel environment characteristic |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114303364A (en) * | 2019-06-21 | 2022-04-08 | 高途乐公司 | System and method for stabilizing video |
CN114303364B (en) * | 2019-06-21 | 2024-02-23 | 高途乐公司 | System and method for stabilizing video |
CN112204956A (en) * | 2019-10-10 | 2021-01-08 | 深圳市大疆创新科技有限公司 | Shooting device, control method thereof and movable platform |
CN112204956B (en) * | 2019-10-10 | 2023-01-10 | 深圳市大疆创新科技有限公司 | Shooting device, control method thereof and movable platform |
WO2021223127A1 (en) * | 2020-05-06 | 2021-11-11 | 深圳市大疆创新科技有限公司 | Global motion estimation-based time-domain filtering method and device, and storage medium |
CN112929562A (en) * | 2021-01-20 | 2021-06-08 | 北京百度网讯科技有限公司 | Video jitter processing method, device, equipment and storage medium |
CN112929562B (en) * | 2021-01-20 | 2023-04-07 | 北京百度网讯科技有限公司 | Video jitter processing method, device, equipment and storage medium |
CN114205521A (en) * | 2021-11-12 | 2022-03-18 | 国网通用航空有限公司 | Image stabilizing method, device, equipment and storage medium for motion video image |
Also Published As
Publication number | Publication date |
---|---|
CN109743495B (en) | 2021-02-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109743495B (en) | Electronic stability augmentation method and device for video image | |
CN107705333B (en) | Space positioning method and device based on binocular camera | |
JP7078139B2 (en) | Video stabilization methods and equipment, as well as non-temporary computer-readable media | |
CN110163818B (en) | Low-illumination video image enhancement method for maritime unmanned aerial vehicle | |
CN111476116A (en) | Rotor unmanned aerial vehicle system for vehicle detection and tracking and detection and tracking method | |
EP3798975B1 (en) | Method and apparatus for detecting subject, electronic device, and computer readable storage medium | |
CN109618103B (en) | Anti-shake method for unmanned aerial vehicle image transmission video and unmanned aerial vehicle | |
JP5499050B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
KR101839617B1 (en) | Method and apparatus for removing non-uniform motion blur using multiframe | |
CN104282003B (en) | Digital blurred image blind restoration method based on gradient screening | |
CN113905147B (en) | Method and device for removing tremble of marine monitoring video picture and storage medium | |
CN113391644B (en) | Unmanned aerial vehicle shooting distance semi-automatic optimization method based on image information entropy | |
US9008453B2 (en) | Blur-kernel estimation from spectral irregularities | |
CN107360377B (en) | Vehicle-mounted video image stabilization method | |
CN114998773B (en) | Characteristic mismatching elimination method and system suitable for aerial image of unmanned aerial vehicle system | |
CN106846250B (en) | Super-resolution reconstruction method based on multi-scale filtering | |
CN116503566A (en) | Three-dimensional modeling method and device, electronic equipment and storage medium | |
CN114429191A (en) | Electronic anti-shake method, system and storage medium based on deep learning | |
CN114239736A (en) | Method and device for training optical flow estimation model | |
CN116597168B (en) | Matching method, device, equipment and medium of vehicle-mounted laser point cloud and panoramic image | |
KR101806453B1 (en) | Moving object detecting apparatus for unmanned aerial vehicle collision avoidance and method thereof | |
US10721419B2 (en) | Ortho-selfie distortion correction using multiple image sensors to synthesize a virtual image | |
Vlahović et al. | Deep learning in video stabilization homography estimation | |
CN111369592B (en) | Newton interpolation-based rapid global motion estimation method | |
CN107516300B (en) | Hybrid jitter correction method for unmanned aerial vehicle video acquisition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 311100 room 153, building 1, 1818-2, Wenyi West Road, Yuhang street, Yuhang District, Hangzhou City, Zhejiang Province Patentee after: Hangzhou Shiyu Intelligent Vision System Technology Co.,Ltd. Address before: 518072 Room 201, building 4, Zhuguang innovation and Technology Park, 52 Zhuguang Road, Taoyuan Street, Nanshan District, Shenzhen City, Guangdong Province Patentee before: SHENZHEN ZHONGKESHIXUN INTELLIGENT SYSTEM TECHNOLOGY Co.,Ltd. |