CN111669499B - Video anti-shake method and device and video acquisition equipment - Google Patents

Video anti-shake method and device and video acquisition equipment Download PDF

Info

Publication number
CN111669499B
CN111669499B CN202010537573.3A CN202010537573A CN111669499B CN 111669499 B CN111669499 B CN 111669499B CN 202010537573 A CN202010537573 A CN 202010537573A CN 111669499 B CN111669499 B CN 111669499B
Authority
CN
China
Prior art keywords
current
original image
image
display image
inclination angle
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
Application number
CN202010537573.3A
Other languages
Chinese (zh)
Other versions
CN111669499A (en
Inventor
张国欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikrobot Co Ltd
Original Assignee
Hangzhou Hikrobot Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikrobot Technology Co Ltd filed Critical Hangzhou Hikrobot Technology Co Ltd
Priority to CN202010537573.3A priority Critical patent/CN111669499B/en
Publication of CN111669499A publication Critical patent/CN111669499A/en
Application granted granted Critical
Publication of CN111669499B publication Critical patent/CN111669499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6812Motion detection based on additional sensors, e.g. acceleration sensors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/254Analysis of motion involving subtraction of images
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • H04N23/683Vibration or motion blur correction performed by a processor, e.g. controlling the readout of an image memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Abstract

The embodiment of the invention provides a video anti-shake method, a video anti-shake device and video acquisition equipment, and relates to the technical field of video processing, wherein the video acquisition equipment acquires a current original image and acquires an inclination angle of the current direction relative to an initial direction, the initial direction is the direction of the video acquisition equipment when acquiring the initial image, and the initial image is the original image with the same world coordinate of a central area as that of a previous frame of display image; intercepting a picture area on the current original image according to the inclination angle to be used as a current display image, wherein the world coordinate of the intercepted picture area is the same as the world coordinate of the last frame of display image, or the intercepted picture area is the central area of the current original image, and the angle of view corresponding to the current display image is smaller than the angle of view corresponding to the current original image; and outputting the current display image. By applying the technical scheme provided by the embodiment of the invention, the problem that the image can not be greatly jittered can be solved while the loss of picture information is reduced.

Description

Video anti-shake method and device and video acquisition equipment
Technical Field
The invention relates to the technical field of video processing, in particular to a video anti-shake method and device and video acquisition equipment.
Background
In the actual use process of the video recorder, the video recorder is usually held by a photographer in hand or worn on the clothes of the photographer, and in this case, when the photographer performs a series of body movements such as turning, walking, running and the like, the image shot by the video recorder is shaken, and even the image may be blurred, and information in the image is lost.
In the related video anti-shake processing technology, the loss of picture information is caused. In order to minimize the loss of picture information, the related video anti-shake processing technology can only cope with the shake of small amplitude of the image.
Disclosure of Invention
An embodiment of the present invention provides a video anti-shake method, an apparatus and a video capture device, so as to reduce the loss of picture information and solve the problem that the video anti-shake method cannot cope with the large-scale shake of an image. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a video anti-shake method, which is applied to a video capture device, and the method includes:
acquiring a current original image acquired by the video acquisition equipment;
acquiring an inclination angle of a current direction of the video acquisition equipment relative to an initial direction when acquiring the current original image, wherein the initial direction is the direction of the video acquisition equipment when acquiring the initial image, and the initial image is an original image with the same world coordinates of a central area as those of a previous frame of display image;
according to the inclination angle, a picture area on the current original image is intercepted to be used as a current display image, the world coordinate of the intercepted picture area is the same as the world coordinate of the last frame of display image, or the intercepted picture area is the central area of the current original image, and the field angle corresponding to the current display image is smaller than the field angle corresponding to the current original image;
and outputting the current display image.
Optionally, the method further includes:
if the current original image is the first image acquired by the video acquisition equipment, taking the current direction of the video acquisition equipment as an initial direction, and intercepting the central area of the current original image as a current display image;
and if the original image is a non-first image acquired by the video acquisition equipment, executing the step of acquiring the inclination angle of the current direction relative to the initial direction when the current original image is acquired by the video acquisition equipment.
Optionally, the step of capturing a picture area on the current original image as a current display image according to the inclination angle includes:
if the inclination angle is larger than a first preset angle threshold value, intercepting a central area on the current original image as a current display image, and updating the current direction to the initial direction; or
If the inclination angle is smaller than a second preset angle threshold value, intercepting a central area on the current original image to serve as a current display image, and keeping the value of the initial direction unchanged; or
If the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, determining a picture area with the world coordinate on the current original image being the same as the world coordinate of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
Optionally, if the inclination angle is greater than a first preset angle threshold, intercepting a central area on the current original image as a current display image, including:
if the inclination angle is larger than a first preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on the current original image as a current display image based on the offset distance with the value of zero;
if the inclination angle is smaller than a second preset angle threshold, intercepting a central area on the current original image as a current display image, wherein the step comprises the following steps of:
if the inclination angle is smaller than a second preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on the current original image as a current display image based on the offset distance with the value of zero;
if the inclination angle is smaller than or equal to the first preset angle threshold and the inclination angle is larger than or equal to the second preset angle threshold, determining a picture area on the current original image, which is the same as the world coordinate of the previous frame of display image, including:
if the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, calculating the offset distance of the picture of the current display image relative to the central area of the current original image based on the inclination angle; and taking the picture area matched with the calculated offset distance on the current original image as the picture area with the same world coordinates as the previous frame of display image.
Optionally, the step of capturing a picture area on the current original image as a current display image according to the inclination angle includes:
counting the variation amplitude of the inclination angle of the direction of the video acquisition equipment relative to the initial direction in a preset time period, wherein the termination time of the preset time period is the current moment, and the duration of the preset time period is the preset duration;
and if the change amplitude within the preset time period is smaller than a preset amplitude threshold value after statistics, updating the current direction to the initial direction, and intercepting a central area on the current original image as a current display image.
In a second aspect, an embodiment of the present invention provides a video anti-shake apparatus, which is applied to a video capture device, and the apparatus includes:
the first acquisition unit is used for acquiring a current original image acquired by the video acquisition equipment;
a second obtaining unit, configured to obtain an inclination angle of a current direction of the video capture device when capturing the current original image relative to an initial direction, where the initial direction is a direction of the video capture device when capturing an initial image, and the initial image is an original image in which a world coordinate of a central area is the same as a world coordinate of a previous frame of display image;
the intercepting unit is used for intercepting a picture area on the current original image according to the inclination angle to serve as a current display image, the world coordinate of the intercepted picture area is the same as that of the last frame of display image, or the intercepted picture area is a central area of the current original image, and the field angle corresponding to the current display image is smaller than that corresponding to the current original image;
and the output unit is used for outputting the current display image.
Optionally, the intercepting unit is further configured to, if the current original image is a first image acquired by the video acquisition device, take a current direction of the video acquisition device as an initial direction, and intercept a central area of the current original image as a current display image;
the second obtaining unit is further configured to execute the step of obtaining an inclination angle of the current direction when the current original image is collected by the video collecting device with respect to the initial direction if the original image is a non-first image collected by the video collecting device.
Optionally, the intercepting unit is specifically configured to:
if the inclination angle is larger than a first preset angle threshold value, intercepting a central area on the current original image as a current display image, and updating the current direction to the initial direction;
if the inclination angle is smaller than a second preset angle threshold value, intercepting a central area on the current original image to serve as a current display image, and keeping the value of the initial direction unchanged;
if the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, determining a picture area with the world coordinate on the current original image being the same as the world coordinate of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
Optionally, the intercepting unit is specifically configured to:
if the inclination angle is larger than a first preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on the current original image as a current display image based on an offset distance having a value of zero, and updating the current direction to the initial direction;
if the inclination angle is smaller than a second preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; based on the offset distance with the value of zero, intercepting a central area on the current original image as a current display image, and keeping the value of the initial direction unchanged;
if the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, calculating the offset distance of the picture of the current display image relative to the central area of the current original image based on the inclination angle; taking a picture area matched with the calculated offset distance on the current original image as a picture area with the same world coordinates as the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
Optionally, the intercepting unit is specifically configured to:
counting the variation amplitude of the inclination angle of the direction of the video acquisition equipment relative to the initial direction in a preset time period, wherein the termination time of the preset time period is the current moment, and the duration of the preset time period is the preset duration;
and if the change amplitude within the preset time period is smaller than a preset amplitude threshold value after statistics, updating the current direction to the initial direction, and intercepting a central area on the current original image as a current display image.
In a third aspect, an embodiment of the present invention provides a video capture device, where the video capture device includes a wide-angle lens, an image sensor, an image processing unit, and an inclination sensor;
the image sensor is used for generating and collecting a current original image according to light rays entering from the wide-angle lens;
the tilt angle sensor is used for acquiring tilt data of the video acquisition equipment;
the image processor is used for acquiring an inclination angle of the current direction of the video acquisition equipment when acquiring the current original image relative to an initial direction according to the inclination data, wherein the initial direction is the direction of the video acquisition equipment when acquiring the initial image, and the initial image is an original image with the same world coordinate of a central area as that of a previous frame of display image; according to the inclination angle, a picture area on the current original image is intercepted to be used as a current display image, the world coordinate of the intercepted picture area is the same as the world coordinate of the last frame of display image, or the intercepted picture area is the central area of the current original image, and the field angle corresponding to the current display image is smaller than the field angle corresponding to the current original image; and outputting the current display image.
In the scheme provided by the embodiment of the invention, the field angle corresponding to the original image acquired by the video acquisition equipment is larger than the field angle corresponding to the display image, so that the field angle redundancy exists between the original image and the display image. Even if the video acquisition equipment has large-amplitude shake, the picture area occupied by the required object can be intercepted on the original image based on the inclination angle of the current direction of the video acquisition equipment relative to the initial direction to obtain the display image, and the display image is output without losing the picture information of the required object, and the display image containing the required object is ensured to be output all the time. Of course, not all of the above advantages need be achieved in the practice of any one product or method of the present invention.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1a is a diagram illustrating a related art anti-shaking process for video without tilt;
FIG. 1b is a diagram illustrating an anti-shake process for video under a tilt condition in the related art;
FIG. 1c is a diagram illustrating an anti-shake process for video under an excessive tilt in the related art;
fig. 2 is a first flowchart of a video anti-shake method according to an embodiment of the present invention;
FIG. 3a is a schematic diagram of a frame region in an original image under an untilted condition according to an embodiment of the present invention;
FIG. 3b is a diagram illustrating a frame region in an original image under a tilt condition according to an embodiment of the present invention;
FIG. 3c is another schematic diagram of a frame region in an original image under a tilt condition according to an embodiment of the present invention;
fig. 4 is a second flowchart of a video anti-shake method according to an embodiment of the present invention;
fig. 5 is a third flowchart illustrating a video anti-shaking method according to an embodiment of the invention;
fig. 6 is a fourth flowchart illustrating a video anti-shaking method according to an embodiment of the present invention;
fig. 7 is a fifth flowchart illustrating a video anti-shaking method according to an embodiment of the present invention;
fig. 8 is a sixth flowchart illustrating a video anti-shake method according to an embodiment of the present invention;
fig. 9 is a seventh flowchart illustrating a video anti-shaking method according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a video anti-shake apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a video capture device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of another video capture device according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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 the related art, in order to solve the problems of image blur and information loss in an image due to jitter of an image shot by a video recorder, video anti-jitter processing is required. As shown in fig. 1a and 1b, the video anti-shake processing flow specifically includes: acquiring an image 1 acquired by a video recorder for the first time, intercepting a user attention area 1 at the center of the image 1, performing interpolation amplification processing on the user attention area 1 to obtain an image 2 with the same field angle as that of the image 1, and outputting the image 2; then, an image 3 acquired by the video recorder not for the first time is acquired, the position of the user attention area 1 in the image 3 is predicted, the user attention area 1 is cut out from the position of the image 3, interpolation and amplification processing are carried out on the user attention area 1, an image 4 with the same field angle as that of the image 1 is obtained, and the image 4 is output. Thus, an image including the content of the user attention area 1 can be always output, and the purpose of video anti-shake can be achieved.
However, the picture information of the whole image 1 in fig. 1a is the picture information of the demand object, and for the purpose of video anti-shake, a partial area of the image 1, such as the shaded portion in fig. 1a, is cut out, so that the finally output images 2 and 4 do not include the picture information of the area of the shaded portion, i.e., the finally output images lose the partial picture of the demand object. In the related art, the purpose of video anti-shake is achieved at the cost of losing the picture information of the demand object.
In order to reduce the loss of picture information as much as possible and ensure the definition of images, the area for cutting out the images collected by the video recorder is generally small, and the proportion of the images collected by the video recorder in the attention area of the user is generally large. However, in the case that the proportion of the image captured by the video recorder is large, if the image has a large shaking amplitude, it is easy to cause a part of the user-concerned area to be located outside the image, and as shown in fig. 1c, the sub-area 11 of the user-concerned area 1 is located outside the image 5 captured by the video recorder, which may result in that the complete user-concerned area cannot be captured, and the purpose of video anti-shaking cannot be achieved.
In order to solve the technical problem, embodiments of the present invention provide a video anti-shake method, an apparatus, and a video capture device. The following generally describes a video anti-shake method provided by an embodiment of the present invention, where the video anti-shake method is applied to a video capture device, and the video capture device may be a video recorder, a motion camera, a vehicle-mounted camera, and the like.
In the video anti-shake method provided by the embodiment of the invention, the current original image acquired by video acquisition equipment is acquired; acquiring an inclination angle of a current direction of a video acquisition device when acquiring a current original image relative to an initial direction, wherein the initial direction is the direction of the video acquisition device when acquiring the initial image, and the initial image is an original image with the same world coordinates of a central area and the world coordinates of a previous frame of display image; according to the inclination angle, a picture area on the current original image is captured to be used as a current display image, the world coordinate of the captured picture area is the same as that of the previous frame of display image, or the captured picture area is the central area of the current original image, and the angle of view corresponding to the current display image is smaller than that of the current original image; and outputting the current display image.
In the scheme provided by the embodiment of the invention, the field angle corresponding to the original image acquired by the video acquisition equipment is larger than the field angle corresponding to the display image, so that the field angle redundancy exists between the original image and the display image. Even if the video acquisition equipment has large-amplitude shake, the picture area occupied by the required object can be intercepted on the original image based on the inclination angle of the current direction of the video acquisition equipment relative to the initial direction to obtain the display image, and the display image is output without losing the picture information of the required object, and the display image containing the required object is ensured to be output all the time.
As shown in fig. 2, fig. 2 is a schematic flowchart of a video anti-shake method according to an embodiment of the present invention. The video anti-shaking method is applied to video acquisition equipment and comprises the following steps.
S21: and acquiring a current original image acquired by video acquisition equipment.
The original image is an image acquired by video acquisition equipment. The video acquisition equipment acquires an original image in real time, and the original image acquired at the current moment is the current original image.
S22: and acquiring an inclination angle of the current direction of the video acquisition equipment when acquiring the current original image relative to the initial direction, wherein the initial direction is the direction of the video acquisition equipment when acquiring the initial image, and the initial image is the original image with the same world coordinates of the central area and the world coordinates of the previous frame of display image.
In the embodiment of the invention, the previous frame of display image is the last frame of display image output before the current moment. The size of the central area is the same as the size of the display image. The central area is a picture area of the original image, the world coordinates of the picture area may be world coordinates of a point in the picture area that meets a specified condition, and the world coordinates of the display image may be world coordinates of a point in the display image that meets the specified condition. The specified condition may be set according to actual requirements, for example, the specified condition may include a point located at the center of the screen area or the display image, and the specified condition may further include a point located at the upper left corner of the screen area or the display image. The world coordinates of the frame area are the same as the world coordinates of the display image, which means that the object displayed in the frame area is the same as the object displayed in the display image, for example, the frame area and the display image both display the person a.
There are two cases for the determination of the initial direction by the video capture device, as follows.
In the first case, the world coordinate of the previous frame of display image is the same as the world coordinate of the central area of the previous frame of original image, that is, the area occupied by the object displayed in the previous frame of display image is located in the central area of the previous frame of original image, so that the video capture device may use the previous frame of original image captured by the video capture device as the initial image, and use the direction in which the previous frame of original image was captured by the video capture device as the initial direction. And the previous frame of original image is the last frame of original image acquired by the video acquisition equipment before the current moment.
In the second case, the world coordinate of the previous frame of display image is different from the world coordinate of the central area of the previous frame of original image, that is, the area occupied by the object displayed in the previous frame of display image is located in the non-central area of the previous frame of original image, the video capture device may determine, as the initial image, the original image whose world coordinate of the central area is the same as the world coordinate of the previous frame of display image before the current time, and use the direction in which the video capture device captures the initial image as the initial direction.
Further, the tilt angle is a vector, including an angle value and a tilt direction. The video acquisition equipment can acquire the inclination angle of the current direction relative to the initial direction when the video acquisition equipment acquires the current original image in real time. For example, if the initial direction is a north direction, the current direction when the video capture device captures the current original image is a west direction, and the tilt angle of the video capture device is 90 degrees to the left (i.e., 90 degrees counterclockwise).
In the embodiment of the invention, the inclination angle can be acquired from other components configured in the video acquisition equipment. In one implementation, a video capture device is configured with a tilt sensor. The tilt angle sensor collects tilt data of the video collecting device in real time. And analyzing the inclination data by the video acquisition equipment processor to obtain the inclination angle of the video acquisition equipment under the equipment coordinate system and/or the world coordinate system. The tilt sensor may be a mems gyroscope or the like.
S23: and according to the inclination angle, intercepting a picture area on the current original image to be used as a current display image, wherein the world coordinate of the intercepted picture area is the same as that of the display image of the previous frame, or the intercepted picture area is the central area of the current original image, and the angle of view corresponding to the current display image is smaller than that of the current original image.
In the embodiment of the invention, after the video acquisition equipment determines the inclination angle, the picture area which is the same as the world coordinate of the previous frame of display image on the current original image is determined according to the inclination angle, the determined picture area is intercepted, and the intercepted picture area is taken as the current display image. Or after the video acquisition equipment determines the inclination angle, intercepting the central area of the current original image according to the inclination angle, and taking the intercepted central area as the current display image.
When the video acquisition equipment tilts by a certain angle, the image obtained by the video acquisition equipment also deflects in space. In the embodiment of the invention, the angle of view corresponding to the display image is smaller than the angle of view corresponding to the current original image, so that the original image has angle of view redundancy relative to the display image, namely pixel redundancy. Even if the video capture device has large amplitude shake, the position of the picture area occupied by the demand object on the original image is changed, namely, the picture area occupied by the demand object can be cut out on the original image based on the inclination angle of the current direction of the video capture device relative to the initial direction to obtain the display image.
For example, in the case that the video capture device is not tilted, as shown in fig. 3a, the screen area occupied by the demand object on the original image is area 1, and area 1 is located at the center of the original image, and area 1 can be directly intercepted as the display image. When the video capture device is tilted downward, as shown in fig. 3b, the picture area occupied by the demand object on the original image is area 2, the area 2 is shifted upward relative to the center position of the original image, and the area 2 can be directly intercepted as the display image. When the video capture device is tilted to the left, as shown in fig. 3c, the picture area occupied by the demand object on the original image is area 3, the area 3 is shifted to the right relative to the center position of the original image, and the area 3 can be directly intercepted as the display image.
S24: and outputting the current display image.
The video capture device outputs a current display image. The user can then view the currently displayed image.
In the embodiment of the invention, the display images are obtained by intercepting the picture area occupied by the demand object from the original image, so that the demand object contained in the output display image is ensured to be unchanged, and the aim of video anti-shake is fulfilled. In addition, in the embodiment of the invention, the picture area occupied by the required object is directly captured to obtain the display image, and the picture information of the required object in the original image is not clipped, so that the loss of the picture information is reduced. The video acquisition equipment has large jitter due to the fact that the original image has the visual field angle redundancy relative to the display image, and the picture area containing the picture information of the required object can be captured from the original image, so that the loss of the picture information is reduced, and the problem that the large jitter of the image cannot be handled in the related technology is solved.
In an embodiment of the present invention, based on the embodiment shown in fig. 2, an embodiment of the present invention further provides a video anti-shake method. As shown in fig. 4, fig. 4 is a second flowchart of a video anti-shake method according to an embodiment of the present invention. The method can also comprise the following steps.
S41: and acquiring a current original image acquired by video acquisition equipment. Step S41 is the same as step S21.
S42: and detecting whether the current original image is the first image acquired by the video acquisition equipment. If yes, go to step S43; if not, step S44 is executed.
In the embodiment of the invention, the first image acquired after the video acquisition equipment is started is the first image. After the current original image is obtained, the video acquisition equipment detects whether the current original image is the first image. If the video acquisition equipment determines that the current original image is the first image, the central area of the current original image is defaulted to contain the picture information of the required object, and the step S43 is executed; if not, step S44 is executed.
S43: and taking the current direction of the video acquisition equipment as an initial direction, and intercepting the central area of the current original image as a current display image. Step S46 is then performed.
If the video acquisition device determines that the current original image is the first image, the video acquisition device may default that the central area of the current original image contains the picture information of the demand object, and use the current direction of the video acquisition device as the initial direction, so as to determine the position of the demand object in the original image acquired each time based on the initial direction. In addition, the video acquisition equipment directly intercepts the central area of the current original image as the current display image.
S44: and acquiring an inclination angle of the current direction of the video acquisition equipment when acquiring the current original image relative to the initial direction, wherein the initial direction is the direction of the video acquisition equipment when acquiring the initial image, and the initial image is the original image with the same world coordinates of the central area and the world coordinates of the previous frame of display image. Step S44 is the same as step S22.
S45: and according to the inclination angle, intercepting a picture area on the current original image to be used as a current display image, wherein the world coordinate of the intercepted picture area is the same as that of the display image of the previous frame, or the intercepted picture area is the central area of the current original image, and the angle of view corresponding to the current display image is smaller than that of the current original image. S45 is the same as step S23.
S46: and outputting the current display image. S46 is the same as step S24.
By applying the embodiment of the invention, the initial direction can be quickly and accurately positioned, so that the display image containing the picture information of the required object is accurately output, and the accuracy of video anti-shake processing is improved.
In another embodiment of the present invention, the user may set the initial orientation in the video capture device based on experience. For example, a user generally captures an image in a horizontal west-plus direction by using a video capture device, and then the video capture device points to the video anti-shake method shown in fig. 2 according to the set initial direction.
In an embodiment of the present invention, in order to further improve the quality of a displayed image, based on the video anti-shake method shown in fig. 2, an embodiment of the present invention further provides a video anti-shake method. Referring to fig. 5, fig. 5 is a third flowchart illustrating a video anti-shake method according to an embodiment of the invention. In the video anti-shake method, step S23 can be subdivided into steps S231, S232, and S233, as follows.
S21: and acquiring a current original image acquired by video acquisition equipment.
S22: and acquiring the inclination angle of the current direction of the video acquisition equipment relative to the initial direction when the video acquisition equipment acquires the current original image. The initial direction is the direction when the video acquisition equipment acquires the initial image, and the initial image is an original image with the same world coordinates of the central area and the world coordinates of the previous frame of display image.
S231: whether the inclination angle is larger than a first preset angle threshold value is detected. If yes, go to step S232, otherwise go to step S233.
The first preset angle threshold is used for indicating the maximum inclination angle of the video acquisition equipment in the up, down, left and right directions. The first preset angle threshold may be determined based on a field angle redundancy of the original image with respect to the displayed image. For example, if the original image corresponds to a wide angle of view of 180 °, and the displayed image corresponds to a view angle of 90 °, it is determined that the first preset angle threshold is (180 ° -90 °)/2 is 45 °. The first preset angle threshold value is 45 degrees, and the maximum inclination angle of the video acquisition equipment in the up, down, left and right directions is 45 degrees.
After the video acquisition device determines the inclination angle, it detects whether the inclination angle is greater than a first preset angle threshold, that is, whether the area occupied by the demand object is on the acquired current original image. If the tilt angle is greater than the first preset angle threshold, it is determined that the demand object is changed, resulting in an excessively large tilt angle, and step S232 is performed. If the tilt angle is less than or equal to the first preset angle threshold, it may be determined that the demand object is not changed, and the tilt of the current video capture device is caused by the non-suppressible shake, and step S233 is performed.
S232: and intercepting a central area on the current original image as a current display image, and updating the current direction to be the initial direction.
If the inclination angle is larger than the first preset angle threshold, the video acquisition equipment determines that the required object is changed, the central area on the current original image contains the picture information of the changed required object, and the current direction is updated to the initial direction, so that the position of the changed required object in the original image acquired each time is determined based on the updated initial direction. In addition, the video acquisition equipment intercepts the central area of the current original image as the current display image.
S233: determining a picture area with the same world coordinates on the current original image as the world coordinates of the previous frame of display image, intercepting the determined picture area on the current original image as the current display image, and maintaining the value of the initial direction unchanged.
If the inclination angle is smaller than or equal to the first preset angle threshold, it can be determined that the demand object is not changed, the area containing the changed picture information of the demand object on the current original image is a non-central area, and the value of the initial direction is maintained unchanged, so as to avoid the position where the demand object cannot be located in the acquired original image subsequently. In addition, the video acquisition equipment can convert the image coordinates of the pixel points of the current original image into world coordinates, further determine a picture area of the current original image, the world coordinates of which are the same as the world coordinates of the previous frame of display image, and intercept the determined picture area of the current original image to serve as the current display image.
S24: and outputting the current display image.
In the embodiment of the invention, when the inclination angle is larger than the first preset angle threshold, the initial direction is updated, and the picture area on the current original image is intercepted based on the updated initial direction to obtain the current display image. Therefore, the problem of image quality loss caused by the fact that the area occupied by the original demand object exceeds the original image and is still intercepted is solved, and the quality of the displayed image is improved. In addition, by adopting the embodiment of the invention, the initial direction is properly adjusted when the demand object is changed, so that the subsequently output display image is adjusted, and the accuracy of video anti-shake is improved.
In an embodiment of the present invention, in order to reduce the amount of computation and save computational resources, based on the video anti-shake method shown in fig. 2, an embodiment of the present invention further provides a video anti-shake method. Referring to fig. 6, fig. 6 is a fourth flowchart illustrating a video anti-shake method according to an embodiment of the present invention. In the video anti-shake method, step S23 can be detailed as steps S234, S235 and S236, which are described below.
S21: and acquiring a current original image acquired by video acquisition equipment.
S22: and acquiring the inclination angle of the current direction of the video acquisition equipment relative to the initial direction when the video acquisition equipment acquires the current original image. The initial direction is the direction when the video acquisition equipment acquires the initial image, and the initial image is an original image with the same world coordinates of the central area and the world coordinates of the previous frame of display image.
S234: and detecting whether the inclination angle is smaller than a second preset angle threshold value. If yes, go to step S235, otherwise go to step S236.
The size of the second preset angle threshold can be set according to actual requirements. For example, the second preset angle threshold is 1 °, 2 °, 3 °, etc. The second preset angle threshold is smaller than the first preset angle threshold.
In the embodiment of the present invention, after the video capture device obtains the tilt angle of the video capture device, it is detected whether the tilt angle of the video capture device is smaller than a second preset angle threshold, if the tilt angle of the video capture device is smaller than the second preset angle threshold, the video capture device may determine that the tilt angle of the video capture device is small, and the image jitter at this time is negligible, and step S235 is executed. If the inclination angle is greater than or equal to the second preset angle threshold, the video capture device may determine that the image jitter is not negligible, and step S236 is executed.
And S235, intercepting a central area on the current original image to be used as the current display image, and keeping the value of the initial direction unchanged.
If the inclination angle of the video capture device is smaller than the second preset angle threshold, the video capture device may determine that the image shaking of this time is negligible, that is, the central area on the current original image contains the changed picture information of the demand object, maintain the value of the initial direction unchanged, and intercept the central area on the current original image as the current display image.
S236, determining a picture area with the world coordinates of the current original image being the same as the world coordinates of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
If the inclination angle is larger than or equal to a second preset angle threshold, the video acquisition equipment can determine that the image jitter at this time cannot be ignored, namely, the area containing the image information of the required object on the current original image is a non-central area, and the image area with the world coordinate same as that of the previous frame of display image on the current original image is determined; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
S24: and outputting the current display image.
In the embodiment of the invention, if the inclination angle is smaller than the second preset angle threshold, the central area on the current original image can be directly intercepted, and the picture area with the world coordinate same with that of the last frame of display image on the current original image does not need to be determined, so that the calculation amount is reduced, and the calculation resources are saved.
In an embodiment of the present invention, in order to reduce the amount of computation, save the computation resources, improve the image quality, and improve the accuracy of video anti-shake, the video anti-shake processing may be performed in combination with the embodiments shown in fig. 5 and fig. 6, as follows.
After the inclination angle is determined, if the inclination angle is larger than a first preset angle threshold value, intercepting a central area on a current original image to serve as a current display image, and updating the current direction to be an initial direction; if the inclination angle is smaller than a second preset angle threshold value, intercepting a central area on the current original image as a current display image, and keeping the value of the initial direction unchanged; if the inclination angle is smaller than or equal to a first preset angle threshold value and the inclination angle is larger than or equal to a second preset angle threshold value, determining a picture area with the world coordinate of the current original image being the same as the world coordinate of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
In an embodiment of the present invention, based on the video anti-shake method shown in fig. 2, an embodiment of the present invention further provides a video anti-shake method. Referring to fig. 7, fig. 7 is a fifth flowchart illustrating a video anti-shake method according to an embodiment of the present invention. In the video anti-shake method, step S23 can be subdivided into steps S237 and S238, which are as follows
S237: and determining the offset distance of the picture of the current display image on the current original image relative to the central area of the current original image according to the inclination angle.
In the embodiment of the invention, the offset distance is a vector and comprises an offset distance value and an offset direction. After determining the tilt angle, the video capture device may determine an offset distance value and an offset direction of a picture of the currently displayed image on the current original image relative to a center region of the current original image based on the tilt angle.
S238: and intercepting the picture area matched with the offset distance as a current display image.
In the embodiment of the present invention, the picture area on the current original image that matches the offset distance refers to a picture area determined after the current original image is offset by the determined offset distance value along the determined offset direction from the center position of the current original image. Here, the picture area matching the offset distance is a picture area having the same world coordinates as those of the previous frame of display image, or the picture area matching the offset distance is a central area of the current original image. After the offset distance is determined, the video acquisition equipment can determine a picture area matched with the offset distance on the current original image, and intercept the determined picture area as a current display image.
Based on the embodiment shown in fig. 7, in order to reduce the amount of calculation, save the calculation resources, improve the image quality, and improve the accuracy of video anti-shake, a first preset angle threshold and a second preset angle threshold may be set in the video capture device. In this case, the following scheme is available.
If the inclination angle is larger than a first preset angle threshold value, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on the current original image as a current display image based on the offset distance with the value of zero, and updating the current direction to be the initial direction;
if the inclination angle is smaller than a second preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on the current original image as a current display image based on the offset distance with the value of zero, and maintaining the value of the initial direction unchanged;
if the inclination angle is smaller than or equal to a first preset angle threshold value and is larger than or equal to a second preset angle threshold value, refusing to update the initial direction, and calculating the offset distance of the picture of the current display image relative to the central area of the current original image based on the inclination angle; and taking the picture area matched with the calculated offset distance on the current original image as the picture area with the same world coordinates as the previous frame of display image, intercepting the determined picture area on the current original image as the current display image, and keeping the value of the initial direction unchanged.
In an embodiment of the present invention, in order to accurately acquire a required display image, based on the video anti-shake method shown in fig. 2, an embodiment of the present invention further provides a video anti-shake method. Referring to fig. 8, fig. 8 is a sixth flowchart illustrating a video anti-shake method according to an embodiment of the present invention. In the video anti-shake method, step S23 may be subdivided into steps S239 and S2310.
S21: and acquiring a current original image acquired by video acquisition equipment.
S22: and acquiring the inclination angle of the current direction relative to the initial direction when the video acquisition equipment acquires the current original image. The initial direction is the direction when the video acquisition equipment acquires the initial image, and the initial image is an original image with the same world coordinates of the central area and the world coordinates of the previous frame of display image.
S239: counting the change amplitude of the inclination angle of the direction of the video acquisition equipment relative to the initial direction in a preset time period, wherein the termination time of the preset time period is the current moment, and the duration of the preset time period is the preset duration.
The preset duration can be set according to actual requirements. For example, the preset time period may be 1 second, 2 seconds, or the like. Take the preset time as 1 second as an example. If the current time is used as the termination time, and the inclination angles of the video acquisition equipment are all changed between 44 degrees and 44.5 degrees to the left in a time period of 1 second before the current time, the change range of the inclination angles in the time period of 1 second before the current time is determined to be 44.5-44-0.5 by taking the current time as the termination time.
S2310: and if the change amplitude within the preset time period is smaller than the preset amplitude threshold value after statistics, updating the current direction to the initial direction, and intercepting the central area on the current original image to be used as the current display image.
In the embodiment of the invention, after the video acquisition equipment acquires the change amplitude of the inclination angle, whether the change amplitude of the inclination angle is smaller than a preset amplitude threshold value is detected. If the current direction is smaller than the preset amplitude threshold value, the video acquisition equipment can determine that the required object is changed, the required object is located in the current front direction, the video acquisition equipment is in a static state, the current direction is updated to be the initial direction, and a central area on the current original image is intercepted and used as the current display image. Thus, accurate acquisition of the display image is realized, and the calculation amount is reduced.
The size of the preset amplitude threshold value can be set according to actual requirements. For example, the preset amplitude threshold may be 1, 2, 3, etc. Still by way of example in step S2310, if the preset amplitude threshold is 1 and the change amplitude of the tilt angle within the time period of 1 second before the current time is 0.5, since 0.5<1, the video capture device may update the current direction to the initial direction and intercept the central area on the current original image as the current display image.
In an optional embodiment, if the variation amplitude of the inclination angle is greater than or equal to the preset amplitude threshold, it may be determined that the video capture device is in a jittering state, and the video capture device may determine, according to the inclination angle, a picture area in which the world coordinate of the current original image is the same as the world coordinate of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and updating the current direction to be the initial direction.
S24: and outputting the current display image.
In the embodiment of the invention, the video acquisition equipment sets the preset time period and the preset amplitude threshold. Under the condition that the change amplitude of the inclination angle in the preset time period is smaller than the preset amplitude threshold value, the current direction is updated to be the initial direction, and the central area on the current original image is intercepted and used as the current display image, so that the accuracy of obtaining the display image is improved, and the calculation amount is reduced.
In one embodiment of the present invention, before capturing the original image, the video capture device may obtain a maximum tilt angle of the direction of the video capture device with respect to the initial direction, and adjust the field angle of the original pixel according to the maximum tilt angle. Thus, when smaller amplitude dithering needs to be used, the original field angle with less redundant field angle is adopted, and the cost of the video acquisition equipment is further saved.
The following describes a video anti-shake method according to an embodiment of the present invention with reference to fig. 9. The video anti-shake method may include the following steps.
S91: the method comprises the steps that a video acquisition device acquires a current original image, and inclination data of a current direction relative to an initial direction when the video acquisition device acquires the current original image is determined.
S92: and the video acquisition equipment calculates the inclination angles of the video acquisition equipment under the equipment coordinate system and the world coordinate system according to the inclination data of the video acquisition equipment.
S93: if the video acquisition equipment determines that the equipment is in a shaking state based on the inclination angle, determining a picture area with the world coordinates on the current original image being the same as the world coordinates of the previous frame of display image according to the inclination angle of the video acquisition equipment, and then capturing the picture area as the current display image.
S94: and if the video acquisition equipment determines that the equipment is in a static state based on the inclination angle, intercepting the central area of the current original image as the current display image.
The above descriptions of steps S91-S94 are relatively simple, and refer specifically to the above descriptions of FIGS. 1-8.
Corresponding to the video anti-shake method, the embodiment of the invention also provides a video anti-shake device. Referring to fig. 10, fig. 10 is a schematic structural diagram of a video anti-shake apparatus according to an embodiment of the present invention. The video anti-shake device is applied to video acquisition equipment and comprises a first acquisition unit 101, a second acquisition unit 102, an interception unit 103 and an output unit 104.
The first acquiring unit 101 is used for acquiring a current original image acquired by video acquisition equipment;
a second obtaining unit 102, configured to obtain an inclination angle of a current direction of the video capture device when capturing a current original image relative to an initial direction, where the initial direction is a direction of the video capture device when capturing the initial image, and the initial image is an original image in which a world coordinate of a central area is the same as a world coordinate of a previous frame of display image;
the intercepting unit 103 is configured to intercept, according to the inclination angle, a picture area on the current original image as a current display image, where a world coordinate of the intercepted picture area is the same as a world coordinate of a previous frame of display image, or the intercepted picture area is a central area of the current original image, and a field angle corresponding to the current display image is smaller than a field angle corresponding to the current original image;
and an output unit 104 for outputting the current display image.
In an optional embodiment, the intercepting unit 103 may be further configured to, if the current original image is a first image acquired by the video acquisition device, take the current direction of the video acquisition device as an initial direction, and intercept a central area of the current original image as a current display image;
the second obtaining unit 102 may be further configured to, if the original image is a non-first image collected by the video capture device, perform a step of obtaining an inclination angle of the current direction when the video capture device collects the current original image with respect to the initial direction.
In an optional embodiment, the intercepting unit 103 may be specifically configured to:
if the inclination angle is larger than a first preset angle threshold value, intercepting a central area on the current original image as a current display image, and updating the current direction to be the initial direction;
if the inclination angle is smaller than a second preset angle threshold value, intercepting a central area on the current original image as a current display image, and keeping the value of the initial direction unchanged;
if the inclination angle is smaller than or equal to a first preset angle threshold value and the inclination angle is larger than or equal to a second preset angle threshold value, determining a picture area with the world coordinate of the current original image being the same as the world coordinate of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
In an optional embodiment, the intercepting unit 103 may be specifically configured to:
if the inclination angle is larger than a first preset angle threshold value, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on a current original image as a current display image based on an offset distance with a value of zero, and updating the current direction to the initial direction;
if the inclination angle is smaller than a second preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; based on the offset distance with the value of zero, intercepting a central area on the current original image as a current display image, and maintaining the value of the initial direction unchanged;
if the inclination angle is smaller than or equal to a first preset angle threshold value and is larger than or equal to a second preset angle threshold value, calculating the offset distance of the picture of the current display image relative to the central area of the current original image based on the inclination angle; taking a picture area matched with the calculated offset distance on the current original image as a picture area with the same world coordinates as the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
In an optional embodiment, the intercepting unit 103 may be specifically configured to:
counting the change amplitude of the inclination angle of the direction of the video acquisition equipment relative to the initial direction in a preset time period, wherein the termination time of the preset time period is the current moment, and the duration of the preset time period is the preset duration;
and if the change amplitude within the preset time period is smaller than the preset amplitude threshold value after statistics, updating the current direction to the initial direction, and intercepting the central area on the current original image to be used as the current display image.
In the scheme provided by the embodiment of the invention, the field angle corresponding to the original image acquired by the video acquisition equipment is larger than the field angle corresponding to the display image, so that the field angle redundancy exists between the original image and the display image. Even if the video acquisition equipment has large-amplitude shake, the picture area occupied by the required object can be intercepted on the original image based on the inclination angle of the current direction of the video acquisition equipment relative to the initial direction to obtain the display image, and the display image is output without losing the picture information of the required object, and the display image containing the required object is ensured to be output all the time.
Corresponding to the video anti-shake method, the embodiment of the invention also provides video acquisition equipment. Referring to fig. 11, fig. 11 is a schematic structural diagram of a video capture device according to an embodiment of the present invention. The video capture device includes: a wide-angle lens 111, an image sensor 112, an image processing unit 113, and a tilt sensor 114.
The image sensor 112 is used for generating a collected original image according to the light entering from the wide-angle lens 111;
the tilt sensor 114 is used for acquiring tilt data of the video acquisition equipment;
the image processor 113 is configured to obtain, according to the inclination data, an inclination angle of a current direction of the video capture device when capturing the current original image relative to an initial direction, where the initial direction is a direction of the video capture device when capturing the initial image, and the initial image is an original image in which a world coordinate of a central area is the same as a world coordinate of a previous frame of display image; according to the inclination angle, a picture area on the current original image is captured to be used as a current display image, the world coordinate of the captured picture area is the same as that of the previous frame of display image, or the captured picture area is the central area of the current original image, and the angle of view corresponding to the current display image is smaller than that of the current original image; and outputting the current display image.
In the scheme provided by the embodiment of the invention, the field angle corresponding to the original image acquired by the video acquisition equipment is larger than the field angle corresponding to the display image, so that the field angle redundancy exists between the original image and the display image. Even if the video acquisition equipment has large-amplitude shake, the picture area occupied by the required object can be intercepted on the original image based on the inclination angle of the current direction of the video acquisition equipment relative to the initial direction to obtain the display image, and the display image is output without losing the picture information of the required object, and the display image containing the required object is ensured to be output all the time.
In an alternative embodiment, in order to ensure that the original image has the redundant field angle and the redundant pixels, the wide-angle lens 111 may use a fisheye lens, and the actual field angle of the wide-angle lens 111 is larger than the target field angle. The target field angle is a field angle required for collecting a display image output by the video acquisition equipment. Thus, the image sensor 112 may output pixels much larger than the target pixels. The target pixel is a pixel of the display image.
For example, the target angle of view is 90 degrees, the target pixels are 200 ten thousand pixels, a fisheye lens with a wide angle of 180 degrees may be used, and an image sensor with 800 ten thousand pixels may be used. At this time, the maximum inclination angle of the video capture device is ± 45 degrees.
In the embodiment of the present invention, the wide-angle lens 111 is used to obtain a large scene image with a certain value exceeding the target field angle by the image sensor 112, as shown in fig. 3a, it is ensured that the display image can be captured from the original image generated by the image sensor 112 within a certain jitter range.
In an alternative embodiment, when dithering processing suitable for a smaller amplitude is required, the field angle redundancy of the wide-angle lens 111 and the pixel redundancy of the image sensor 112 can be reduced.
In an alternative embodiment, the video capture device may determine whether the video capture device is stationary based on the magnitude of the change in the tilt angle determined by the video capture device. And when the video acquisition equipment is determined to stop shaking and be in a static state, the video acquisition equipment projects the central area of the original image into a display image. Therefore, the video can be ensured to be collected to rotate along with the target position of the user.
In one embodiment of the present invention, as shown in fig. 12, the video capture device may further include a display screen 115, a storage unit 116, and other functional modules 117. Among them, the image sensor 112, the image processing unit 113, the tilt sensor 114, the storage unit 116, and other functional modules 117 are mounted on the main board.
The display screen 115 is used to display the display image determined by the image processor 113 in real time.
The storage unit 11 is used for storing the original image and the display image.
The other functional modules 117 include, but are not limited to, a color processing module, a resolution adjusting module, and the like, which are not limited in this embodiment of the present invention.
In the embodiment of the invention, the video acquisition equipment can also comprise a battery, a shell, a clamp and the like.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the video anti-shake apparatus and the video capture device, since they are substantially similar to the embodiments of the video anti-shake method, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiments of the video anti-shake method.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (9)

1. A video anti-shake method is applied to a video acquisition device, and comprises the following steps:
acquiring a current original image acquired by the video acquisition equipment;
acquiring an inclination angle of a current direction of the video acquisition equipment relative to an initial direction when acquiring the current original image, wherein the initial direction is the direction of the video acquisition equipment when acquiring the initial image, and the initial image is an original image with the same world coordinates of a central area as those of a previous frame of display image;
according to the inclination angle, a picture area on the current original image is intercepted to be used as a current display image, the world coordinate of the intercepted picture area is the same as the world coordinate of the last frame of display image, or the intercepted picture area is the central area of the current original image, and the field angle corresponding to the current display image is smaller than the field angle corresponding to the current original image;
outputting the current display image;
wherein, the step of intercepting the picture area on the current original image as the current display image according to the inclination angle comprises:
if the inclination angle is larger than a first preset angle threshold value, intercepting a central area on the current original image as a current display image, and updating the current direction to the initial direction; or
If the inclination angle is smaller than a second preset angle threshold value, intercepting a central area on the current original image to serve as a current display image, and keeping the value of the initial direction unchanged; or
If the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, determining a picture area with the world coordinate on the current original image being the same as the world coordinate of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
2. The method of claim 1, further comprising:
if the current original image is the first image acquired by the video acquisition equipment, taking the current direction of the video acquisition equipment as an initial direction, and intercepting the central area of the current original image as a current display image;
and if the original image is a non-first image acquired by the video acquisition equipment, executing the step of acquiring the inclination angle of the current direction relative to the initial direction when the current original image is acquired by the video acquisition equipment.
3. The method according to claim 1, wherein the step of intercepting the central area on the current original image as the current display image if the tilt angle is greater than a first preset angle threshold comprises:
if the inclination angle is larger than a first preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on the current original image as a current display image based on the offset distance with the value of zero;
if the inclination angle is smaller than a second preset angle threshold, intercepting a central area on the current original image as a current display image, wherein the step comprises the following steps of:
if the inclination angle is smaller than a second preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on the current original image as a current display image based on the offset distance with the value of zero;
if the inclination angle is smaller than or equal to the first preset angle threshold and the inclination angle is larger than or equal to the second preset angle threshold, determining a picture area on the current original image, which is the same as the world coordinate of the previous frame of display image, including:
if the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, calculating the offset distance of the picture of the current display image relative to the central area of the current original image based on the inclination angle; and taking the picture area matched with the calculated offset distance on the current original image as the picture area with the same world coordinates as the previous frame of display image.
4. The method according to claim 1, wherein the step of intercepting the frame area on the current original image as the current display image according to the tilt angle comprises:
counting the variation amplitude of the inclination angle of the direction of the video acquisition equipment relative to the initial direction in a preset time period, wherein the termination time of the preset time period is the current moment, and the duration of the preset time period is the preset duration;
and if the change amplitude within the preset time period is smaller than a preset amplitude threshold value after statistics, updating the current direction to the initial direction, and intercepting a central area on the current original image as a current display image.
5. A video anti-shake apparatus, applied to a video capture device, the apparatus comprising:
the first acquisition unit is used for acquiring a current original image acquired by the video acquisition equipment;
a second obtaining unit, configured to obtain an inclination angle of a current direction of the video capture device when capturing the current original image relative to an initial direction, where the initial direction is a direction of the video capture device when capturing an initial image, and the initial image is an original image in which a world coordinate of a central area is the same as a world coordinate of a previous frame of display image;
the intercepting unit is used for intercepting a picture area on the current original image according to the inclination angle to serve as a current display image, the world coordinate of the intercepted picture area is the same as that of the last frame of display image, or the intercepted picture area is a central area of the current original image, and the field angle corresponding to the current display image is smaller than that corresponding to the current original image;
an output unit configured to output the current display image;
wherein, the intercepting unit is specifically configured to:
if the inclination angle is larger than a first preset angle threshold value, intercepting a central area on the current original image as a current display image, and updating the current direction to the initial direction;
if the inclination angle is smaller than a second preset angle threshold value, intercepting a central area on the current original image to serve as a current display image, and keeping the value of the initial direction unchanged;
if the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, determining a picture area with the world coordinate on the current original image being the same as the world coordinate of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
6. The apparatus of claim 5,
the intercepting unit is further configured to, if the current original image is a first image acquired by the video acquisition device, take a current direction of the video acquisition device as an initial direction, and intercept a central area of the current original image as a current display image;
the second obtaining unit is further configured to execute the step of obtaining an inclination angle of the current direction when the current original image is collected by the video collecting device with respect to the initial direction if the original image is a non-first image collected by the video collecting device.
7. The apparatus according to claim 5, wherein the intercepting unit is specifically configured to:
if the inclination angle is larger than a first preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; intercepting a central area on the current original image as a current display image based on an offset distance having a value of zero, and updating the current direction to the initial direction;
if the inclination angle is smaller than a second preset angle threshold, determining that the offset distance of a picture of a current display image on the current original image relative to the central area of the current original image is zero; based on the offset distance with the value of zero, intercepting a central area on the current original image as a current display image, and keeping the value of the initial direction unchanged;
if the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, calculating the offset distance of the picture of the current display image relative to the central area of the current original image based on the inclination angle; taking a picture area matched with the calculated offset distance on the current original image as a picture area with the same world coordinates as the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
8. The apparatus according to claim 5, wherein the intercepting unit is specifically configured to:
counting the variation amplitude of the inclination angle of the direction of the video acquisition equipment relative to the initial direction in a preset time period, wherein the termination time of the preset time period is the current moment, and the duration of the preset time period is the preset duration;
and if the change amplitude within the preset time period is smaller than a preset amplitude threshold value after statistics, updating the current direction to the initial direction, and intercepting a central area on the current original image as a current display image.
9. The video acquisition equipment is characterized by comprising a wide-angle lens, an image sensor, an image processing unit and an inclination angle sensor;
the image sensor is used for generating and collecting a current original image according to light rays entering from the wide-angle lens;
the tilt angle sensor is used for acquiring tilt data of the video acquisition equipment;
the image processor is used for acquiring an inclination angle of the current direction of the video acquisition equipment when acquiring the current original image relative to an initial direction according to the inclination data, wherein the initial direction is the direction of the video acquisition equipment when acquiring the initial image, and the initial image is an original image with the same world coordinate of a central area as that of a previous frame of display image; according to the inclination angle, a picture area on the current original image is intercepted to be used as a current display image, the world coordinate of the intercepted picture area is the same as the world coordinate of the last frame of display image, or the intercepted picture area is the central area of the current original image, and the field angle corresponding to the current display image is smaller than the field angle corresponding to the current original image; outputting the current display image;
the image processor is specifically configured to intercept a central area on the current original image as a current display image and update the current direction to the initial direction if the inclination angle is greater than a first preset angle threshold; if the inclination angle is smaller than a second preset angle threshold value, intercepting a central area on the current original image to serve as a current display image, and keeping the value of the initial direction unchanged; if the inclination angle is smaller than or equal to the first preset angle threshold value and the inclination angle is larger than or equal to the second preset angle threshold value, determining a picture area with the world coordinate on the current original image being the same as the world coordinate of the previous frame of display image; and intercepting the determined picture area on the current original image as a current display image, and keeping the value of the initial direction unchanged.
CN202010537573.3A 2020-06-12 2020-06-12 Video anti-shake method and device and video acquisition equipment Active CN111669499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010537573.3A CN111669499B (en) 2020-06-12 2020-06-12 Video anti-shake method and device and video acquisition equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010537573.3A CN111669499B (en) 2020-06-12 2020-06-12 Video anti-shake method and device and video acquisition equipment

Publications (2)

Publication Number Publication Date
CN111669499A CN111669499A (en) 2020-09-15
CN111669499B true CN111669499B (en) 2021-11-19

Family

ID=72387442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010537573.3A Active CN111669499B (en) 2020-06-12 2020-06-12 Video anti-shake method and device and video acquisition equipment

Country Status (1)

Country Link
CN (1) CN111669499B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112672058B (en) * 2020-12-26 2022-05-03 维沃移动通信有限公司 Shooting method and device
CN113029089A (en) * 2021-03-17 2021-06-25 国网安徽省电力有限公司铜陵供电公司 Video image inner target distance estimation method based on electric power field auxiliary information
CN113329054B (en) * 2021-04-27 2022-07-12 杭州壹悟科技有限公司 Equipment monitoring animation display optimization method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103314570A (en) * 2010-11-12 2013-09-18 三星电子株式会社 Method and apparatus for video stabilization by compensating for view direction of camera
CN103685866A (en) * 2012-09-05 2014-03-26 杭州海康威视数字技术股份有限公司 Video image stabilization method and device
CN105100479A (en) * 2015-07-30 2015-11-25 努比亚技术有限公司 Mobile terminal and image shooting method thereof
JP2017005563A (en) * 2015-06-12 2017-01-05 リコーイメージング株式会社 Imaging device
CN106603915A (en) * 2016-12-14 2017-04-26 广东欧珀移动通信有限公司 Control method, control device and electronic device
CN108156362A (en) * 2016-12-02 2018-06-12 杭州海康威视数字技术股份有限公司 The anti-fluttering method and video camera of a kind of video camera
CN109314744A (en) * 2017-12-29 2019-02-05 深圳市大疆创新科技有限公司 Image processing method, capture apparatus and the moveable platform of capture apparatus
CN109618103A (en) * 2019-01-28 2019-04-12 深圳慧源创新科技有限公司 The anti-fluttering method and unmanned plane of unmanned plane figure biography video
CN107113376B (en) * 2015-07-31 2019-07-19 深圳市大疆创新科技有限公司 A kind of image processing method, device and video camera

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007077614A1 (en) * 2005-12-28 2007-07-12 Fujitsu Limited Apparatus for switching picked-up image processings of tv telephone function
JP7185992B2 (en) * 2018-09-26 2022-12-08 株式会社Subaru Vehicle occupant monitoring device and occupant protection system
CN109963106B (en) * 2019-03-29 2020-01-10 宇龙计算机通信科技(深圳)有限公司 Video image processing method and device, storage medium and terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103314570A (en) * 2010-11-12 2013-09-18 三星电子株式会社 Method and apparatus for video stabilization by compensating for view direction of camera
CN103685866A (en) * 2012-09-05 2014-03-26 杭州海康威视数字技术股份有限公司 Video image stabilization method and device
JP2017005563A (en) * 2015-06-12 2017-01-05 リコーイメージング株式会社 Imaging device
CN105100479A (en) * 2015-07-30 2015-11-25 努比亚技术有限公司 Mobile terminal and image shooting method thereof
CN107113376B (en) * 2015-07-31 2019-07-19 深圳市大疆创新科技有限公司 A kind of image processing method, device and video camera
CN108156362A (en) * 2016-12-02 2018-06-12 杭州海康威视数字技术股份有限公司 The anti-fluttering method and video camera of a kind of video camera
CN106603915A (en) * 2016-12-14 2017-04-26 广东欧珀移动通信有限公司 Control method, control device and electronic device
CN109314744A (en) * 2017-12-29 2019-02-05 深圳市大疆创新科技有限公司 Image processing method, capture apparatus and the moveable platform of capture apparatus
CN109618103A (en) * 2019-01-28 2019-04-12 深圳慧源创新科技有限公司 The anti-fluttering method and unmanned plane of unmanned plane figure biography video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于特征提取与匹配的车载电子稳像方法研究》;熊晶莹;《中国博士学位论文全文数据库 信息科技辑》;20170830;第I138-69页 *

Also Published As

Publication number Publication date
CN111669499A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN111669499B (en) Video anti-shake method and device and video acquisition equipment
WO2021227359A1 (en) Unmanned aerial vehicle-based projection method and apparatus, device, and storage medium
US9479709B2 (en) Method and apparatus for long term image exposure with image stabilization on a mobile device
CN108932051B (en) Augmented reality image processing method, apparatus and storage medium
US9159169B2 (en) Image display apparatus, imaging apparatus, image display method, control method for imaging apparatus, and program
WO2018223381A1 (en) Video shake-prevention method and mobile device
WO2017020150A1 (en) Image processing method, device and camera
CN107690673B (en) Image processing method and device and server
CN113454982A (en) Electronic device for stabilizing image and operation method thereof
CN110784651B (en) Anti-shake method and electronic equipment
CN113824876B (en) Picture stability processing method and device under digital zooming, mobile terminal and medium
CN112040126A (en) Shooting method, shooting device, electronic equipment and readable storage medium
WO2019127512A1 (en) Image processing method for photography device, photography device and movable platform
WO2021035485A1 (en) Shooting anti-shake method and apparatus, terminal and storage medium
JP6098873B2 (en) Imaging apparatus and image processing apparatus
US10911677B1 (en) Multi-camera video stabilization techniques
CN113875219A (en) Image processing method and device, electronic equipment and computer readable storage medium
CN111212222A (en) Image processing method, image processing apparatus, electronic apparatus, and storage medium
CN114390186B (en) Video shooting method and electronic equipment
CN114401362A (en) Image display method and device and electronic equipment
US10547785B2 (en) Photographing method including image registration based on reference image, shake information, and a motion vector table
US10715725B2 (en) Method and system for handling 360 degree image content
JP2016111561A (en) Information processing device, system, information processing method, and program
JP6714819B2 (en) Image display system, information processing device, image display method, and image display program
CN114449130A (en) Multi-camera video fusion method and system

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Hikvision Robot Co.,Ltd.

Address before: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd.