CN111711756A - Image anti-shake method, electronic equipment and storage medium - Google Patents
Image anti-shake method, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111711756A CN111711756A CN202010600320.6A CN202010600320A CN111711756A CN 111711756 A CN111711756 A CN 111711756A CN 202010600320 A CN202010600320 A CN 202010600320A CN 111711756 A CN111711756 A CN 111711756A
- Authority
- CN
- China
- Prior art keywords
- offset
- lens
- shake
- image
- center
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/68—Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
- H04N23/682—Vibration or motion blur correction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/68—Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
- H04N23/681—Motion detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/68—Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
- H04N23/682—Vibration or motion blur correction
- H04N23/683—Vibration or motion blur correction performed by a processor, e.g. controlling the readout of an image memory
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
The application discloses an image anti-shake method, an electronic device and a storage medium, wherein the electronic device is provided with an optical anti-shake mode and an electronic anti-shake mode, and the method comprises the following steps: when the shooting module is controlled to shoot in the optical anti-shake mode, measuring the measurement offset of the center of the lens of the shooting module and the current working temperature of the shooting module; correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the center of the lens; and performing electronic anti-shake processing on the shot image by adopting an electronic anti-shake mode based on the real offset of the lens center. Therefore, when the EIS + OIS anti-shake mode is used, the real offset is obtained by correcting the measurement offset of the lens center position, and the EIS anti-shake processing is performed on the shot image based on the real offset, so that the electronic anti-shake effect can be improved, and the electronic equipment has the advantages of eliminating motion blur by OIS anti-shake and increasing the compensation range by EIS anti-shake.
Description
Technical Field
The present disclosure relates to image processing technologies, and in particular, to an image anti-shake method, an electronic device, and a storage medium.
Background
Optical Image Stabilization (OIS) is a technology frequently used in Image Stabilization of current mobile terminals, and actively moves a lens in horizontal and vertical directions to compensate for rotational motions of the mobile terminal around an X-axis rotation (pitch) and a Y-axis rotation (yaw) by detecting a real-time motion attitude of the mobile terminal, so as to ensure a stable imaging picture effect of an Image sensor.
When a user uses a mobile terminal to shoot, the mobile terminal frequently moves, and the anti-shake requirement of the mobile terminal cannot be met by simply using the OIS, so that the anti-shake is performed by combining the OIS with an Electronic Image Stabilization (EIS), which is called EIS + OIS anti-shake for short.
In the existing EIS + OIS scheme, a lens moves due to the fact that an OIS mechanism can generate movement, the actual position of the lens needs to be accurately known when the EIS is used for anti-shaking, but errors exist in the measured actual position of the lens, and accordingly the EIS anti-shaking effect is poor.
Disclosure of Invention
To solve the foregoing technical problem, embodiments of the present application are directed to providing an image anti-shake method, an electronic device, and a storage medium.
The technical scheme of the application is realized as follows:
in a first aspect, an image anti-shake method is provided, which is applied to an electronic device having an optical anti-shake mode and an electronic anti-shake mode, and includes:
when the shooting module is controlled to shoot in an optical anti-shake mode, measuring to obtain the measurement offset of the center of a lens of the shooting module and the current working temperature of the shooting module;
correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the lens center;
and performing electronic anti-shake processing on the shot image by adopting an electronic anti-shake mode based on the real offset of the lens center.
In a second aspect, an electronic device having an optical anti-shake mode and an electronic anti-shake mode is provided, the electronic device including:
the control unit is used for measuring and obtaining the measurement offset of the center of the lens of the shooting module and the current working temperature of the shooting module when the shooting module is controlled to shoot by adopting an optical anti-shake mode;
the correction unit is used for correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the lens center;
and the processing unit is used for carrying out electronic anti-shake processing on the shot image by adopting an electronic anti-shake mode based on the real offset of the lens center.
In a third aspect, a computer storage medium is also provided, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the aforementioned method.
An embodiment of the present application further provides an image anti-shake method, an electronic device, and a storage medium, where the electronic device has an optical anti-shake mode and an electronic anti-shake mode, and the method includes: when the shooting module is controlled to shoot in an optical anti-shake mode, measuring to obtain the measurement offset of the center of a lens of the shooting module and the current working temperature of the shooting module; correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the lens center; and performing electronic anti-shake processing on the shot image by adopting an electronic anti-shake mode based on the real offset of the lens center. Therefore, when the EIS + OIS anti-shake mode is used, the real offset is obtained by correcting the measurement offset of the lens center position, and the EIS anti-shake processing is performed on the shot image based on the real offset, so that the electronic anti-shake effect can be improved, and the electronic equipment has the advantages of eliminating motion blur by OIS anti-shake and increasing the compensation range by EIS anti-shake.
Drawings
FIG. 1 is a flowchart illustrating an image anti-shake method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an imaging optical path in an optical anti-shake mode;
FIG. 3 is a schematic view of a first assembly structure of the camera module;
FIG. 4 is a schematic diagram of a second structure of the camera module;
FIG. 5 is a schematic view of a camera aperture imaging model;
fig. 6 is a schematic flow chart of a corresponding relationship determination method in the embodiment of the present application;
FIG. 7 is a schematic diagram of a component structure of an image acquisition system in an embodiment of the present application;
FIG. 8 is a graph of the effect of temperature on measurement offset;
FIG. 9 is a graph comparing measured offset and true offset;
FIG. 10 is a schematic diagram of a first component structure of an electronic device in an embodiment of the present application;
FIG. 11 is a diagram illustrating a second component structure of an electronic device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a chip in the embodiment of the present application.
Detailed Description
So that the manner in which the features and elements of the present embodiments can be understood in detail, a more particular description of the embodiments, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
An embodiment of the present application provides an image anti-shake method, which is applied to an electronic device, where the electronic device has an optical anti-shake mode and an electronic anti-shake mode, and as shown in fig. 1, the method may specifically include:
step 101: when the shooting module is controlled to shoot in an optical anti-shake mode, measuring to obtain the measurement offset of the center of a lens of the shooting module and the current working temperature of the shooting module;
the OIS is to avoid or reduce the electronic device shake phenomenon occurring in the process of capturing an optical signal by adjusting the position of an optical device (such as a lens) in the shooting process of the electronic device, thereby improving the imaging quality.
The imaging optical path diagram in the OIS mode is shown in fig. 2, and when the rotation angle θ of the electronic device is detected, the lens X is translated in the direction perpendicular to the optical axis according to the arrow direction to compensate the change of the angle of view caused by the movement of the mobile terminal, so as to ensure that the imaging before the movement and the imaging after the movement are consistent. In fig. 2, since the motion of the mobile terminal is rotated by θ, in order to ensure that the same object point is imaged at the same position of the image sensor, the lens needs to be moved up by X, and a simplified model of X is calculated as follows:
X=2 f sin(θ/2)
where f is the distance between the lens and the imaging plane, i.e., the focal length.
In some embodiments, the shooting module comprises M displacement sensors for measuring the lens center offset; wherein M is 2 or 4;
when M is 2, the M displacement sensors are respectively arranged on one side of the lens in the first direction and one side of the lens in the second direction;
when M is 4, the M displacement sensors are respectively arranged on two sides of the lens in a first direction and two sides of the lens in a second direction, wherein the first direction is orthogonal to the second direction.
That is, measurement of the lens shift position is achieved by displacement sensors provided in two orthogonal directions. In practical application, the displacement sensor can be a hall sensor, and when the first direction is a vertical direction, the second direction is a horizontal direction.
In the embodiment of the present application, the basic structure in the shooting module is as shown in fig. 3, and the shooting module at least includes: the camera comprises a motor, a lens, a spring and Hall sensors, wherein the motor drives the lens to move up, down, left and right through the spring, the Hall sensors are respectively arranged in the up, down, left and right directions, and measure the current position of the lens to perform closed-loop control. The utility model discloses a camera lens, including the camera lens, the camera lens is equipped with two hall sensors, and the camera lens is equipped with displacement sensor, and the camera lens is equipped with two hall sensors, and the camera lens is equipped with the displacement sensor, and the camera lens is equipped with the sensor, and the sensor is equipped with the sensor and is used for detecting the offset of camera lens.
The photographing module with the OIS mode can resist small-amplitude mobile phone shaking and can perform optical anti-shaking before imaging of the image sensor, so that motion blur can be effectively eliminated, and much anti-shaking is applied to the photographing process. However, in the existing shooting process, video shooting has become a shooting mode commonly used by users, but the shake amplitude of the handheld device is large when the handheld device performs video shooting, so that the EIS anti-shake is introduced in the video shooting process to increase the compensation range.
In the EIS + OIS scheme, the lens moves due to the OIS mechanism, so that the lens moves, the actual position of the lens needs to be accurately known when the EIS mode is used for electronic anti-shake, and the actual position of the lens is measured by a displacement sensor in the shooting module. However, in actual use, the offset measured by the displacement sensor is affected by noise, and under the condition of long-time operation, the measurement error is increased along with the temperature rise of the shooting module, so that the measured value is not credible. In such cases, EIS anti-shake based on measurements taken by the displacement sensor by EIS has been unreliable. Therefore, considering that the influence of temperature, measurement device null drift and the like causes errors between the measurement offset and the real offset, and directly using the measurement offset to carry out electronic anti-shake can influence the anti-shake effect.
In practical application, also can only set up a displacement sensor in camera lens top or below, set up a displacement sensor on camera lens left side or right side, detect the offset in two vertical and horizontal directions respectively through two sensors that set up, compare and to set up four sensors and can reduce and shoot the inside device of module.
In some embodiments, the camera module comprises a temperature sensor for measuring the current operating temperature; wherein the temperature sensor is disposed on the displacement sensor. As shown in fig. 4, the temperature sensor is located above the lens on the hall sensor.
Step 102: correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the lens center;
in order to solve the problem that the measured value (i.e., the measured offset of the lens center) is inaccurate, the embodiment of the present application corrects the measured value by using an offset correction strategy after obtaining the measured value, so as to obtain a true value (i.e., a true offset of the lens center).
In some embodiments, the offset correction strategy includes a predetermined correspondence between operating temperature, measured offset, and true offset; the correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the lens center comprises the following steps: and determining the real offset corresponding to the measured offset at the current working temperature based on the corresponding relation.
In practical application, curve fitting can be performed on different working temperatures, measured offset and real offset, a curve fitting formula is obtained to represent the corresponding relation between the three, and the corresponding relation between the three can also be directly represented through a mapping relation table.
Specifically, the offset includes a lateral offset along the x-axis and a longitudinal offset along the y-axis of the lens center in the image pixel coordinate system. Namely, based on the corresponding relation, the real transverse offset and the real longitudinal offset corresponding to the measured offset at the current working temperature are determined.
Step 103: and performing electronic anti-shake processing on the shot image by adopting an electronic anti-shake mode based on the real offset of the lens center.
In the EIS anti-shake, attitude information of three-axis angles and three-axis translations of the electronic device needs to be acquired according to a gyroscope (gyro) and an accelerometer (accelerometer), and an image shot by the electronic device is re-projected according to the attitude information to form an image in a specific virtual attitude, and if the virtual attitude is a series of stable attitudes, a stable video can be obtained.
In the re-projection process, a pinhole imaging model is adopted, fig. 5 is a schematic diagram of a camera pinhole imaging model, which contains a pinhole imaging optical path structure and related parameters, and a three-dimensional space object point p is imaged on an image plane through a lens group to obtain an image point p'. Assuming that the imaging model of the camera is pinhole imaging, the three-dimensional space object point p is imaged from the camera coordinate system (X)C,YC,ZC) To the image coordinate system (X)i,Yi) The mapping relation of the middle coordinate point p' is as follows:
wherein f is the focal length of the camera, cxAnd cyThe offset of the center of the lens of the camera represents the offset of the optical axis of the camera in an image pixel coordinate system, and K is the unit of pixel and comprises f and cxAnd cyThe (x, y, z) is the coordinate of a three-dimensional space point p in a world coordinate system, the (u, v) is the pixel coordinate of the point p', and the R and the T are the rotation matrix and the translation matrix of the camera in the world coordinate system, which represent the posture of the camera. The gyroscope can measure the current three-axis angular velocity of the mobile phone in real time, and the current three-axis angular velocity can be converted into the current three-dimensional rotation angle of the mobile phone in a world coordinate system through integration in a time domain. The acceleration of the mobile phone in the directions of three axes can be obtained through the accelerometer, and the acceleration can be converted into the translation amount of the three-dimensional coordinate of the mobile phone in the world coordinate system through the quadratic integration in the time domain. And ZCFor three-dimensional space point p in the camera coordinate system (X)C,YC,ZC) And (4) object distance. The camera coordinate system changes under different camera poses, ZCVariations will also occur.
If the image needs to be stabilized, it is equivalent to reproject the current image to poses with camera poses R 'and T', and calculate the corresponding Z 'according to the pose'CThen the process of re-projection can be described as:
therefore, the camera internal parameter matrix K is very important for the operation process of the EIS anti-shake. In EIS + OIS technologyThe lens moves due to the OIS mechanism, resulting in the lens center moving, so c in the internal reference matrix KxAnd cyA change will occur. True offset (o) obtained by step 102x,oy) To update the K matrix, the K matrix is updated as:
and carrying out re-projection on the current image by using the updated K to realize the purpose of stabilizing the image.
Here, the execution subject of steps 101 to 103 may be a processor of the electronic device. The electronic device described in this application is a device with a shooting function, and may include a mobile phone, a tablet computer, a notebook computer, a palm computer, a smart watch, a motion camera, an unmanned aerial vehicle, and the like.
By adopting the technical scheme, when the EIS + OIS anti-shake mode is used, the real offset is obtained by correcting the measurement offset of the lens center position, and the EIS anti-shake processing is performed on the shot image based on the real offset, so that the electronic anti-shake effect can be improved, and the electronic equipment has the advantages of eliminating motion blur by OIS anti-shake and increasing the compensation range by EIS anti-shake.
On the basis of the above embodiments, a method for determining the correspondence among the operating temperature, the measurement offset amount, and the true offset amount is exemplified. As shown in fig. 6, the method for determining the corresponding relationship may specifically include:
step 601: acquiring a plurality of sample images acquired by an image acquisition system, and acquiring the measurement offset of the center of a lens and the working temperature of the shooting module while acquiring each sample image;
in some embodiments, the image acquisition system comprises: the electronic equipment, the connecting support and the shooting object are arranged, the electronic equipment is fixed to one end of the connecting support, the shooting object is fixed to the other end of the connecting support, and the connecting support is used for fixing the relative position between the electronic equipment and the shooting object.
Fig. 7 is a schematic structural diagram of a composition of an image capturing system in an embodiment of the present application, and as shown in fig. 7, the image capturing system includes: an electronic device 71, a connection bracket 72, and a photographic subject 73.
Here, the electronic device 71 is a mobile phone, the photographic subject 73 is a square, the first end of the connecting bracket 72 is provided with a mobile phone fastening device, the fastening device is adjustable according to the size of the mobile phone, the square is fixed at the second end of the connecting bracket 72, and the distance between the first end and the second end of the connecting bracket 72 is adjustable.
In the curve fitting process, in order to ensure that the movement of a picture shot by electronic equipment (such as a mobile phone) is only influenced by the movement of a lens and is irrelevant to the rotation of the mobile phone, the image acquisition system is required to be used for acquiring a sample image, and a fixed block is used as a mobile phone shooting object, so that the detection of characteristic points is convenient, and the image matching process is simplified.
When a sample image is collected, a tester can hold the image collection system for shooting, when the image collection system shakes, the OIS can sense the motion of the mobile phone and move the lens to compensate the motion, so that the position of the shot square in an imaging picture can slightly change due to the movement of the lens, and the background part can not change theoretically (if the motion of the mobile phone is within the compensation range of the OIS).
If the center of the lens is locked and the mobile phone is fixed on the tripod for shooting, as shown in fig. 8, the abscissa is shooting time, and the ordinate is offset, as the shooting time increases, the coordinates of the center of the image in the x direction and the y direction both generate certain offset, and the coordinate change in the y direction is more obvious. It can be seen that the longer the shot time, i.e. the more images are shot, the more the image content has shifted significantly, in which case it is said that the lens center is not really locked and the hall value in the feedback system is not really reliable.
In some embodiments, the image acquisition system further comprises: the shooting object is positioned in the center of the background plate, and the background plate and the shooting object can completely cover the shooting field angle of the electronic equipment. For example, the background board is a white board, the shooting object is a red square, the red square is located at the center of the white board, the shooting field angle of the electronic equipment is completely covered by the white board in the shooting process, and the situation that other red objects enter the field of view when the image acquisition system is shaken to cause deviation in image position detection of the red square can be avoided.
In some embodiments, the image capturing system further includes a light supplement device, and the light supplement device is used for compensating the photographic subject.
For example, the light filling device can be flash light, the light filling device fix with electronic equipment homonymy carries out the light filling through the light filling device to the shooting object, can improve by shooting object luminance, reduces the time that the module exposure needs of shooing to reduce and rock the motion blur of image when the cell-phone shoots, improve the detection precision and the detection speed of block diagram image position.
Step 602: calculating the real offset of each sample image based on an image matching algorithm;
through image feature detection and image matching algorithms, the center or edge of a square block is identified, and then the transverse and longitudinal variation of the square block between each image is calculated according to the center or edge of the square block, so that the real offset of the center of the image is obtained. In the embodiment of the present application, the center of the lens is a pixel point of the lens optical axis mapped in the image pixel coordinate system, which is also called as the image center.
Step 603: and performing curve fitting by using the measurement offset and the real offset of each sample image and the working temperature of the shooting module to obtain the corresponding relation among the working temperature, the measurement offset and the real offset.
In an embodiment of the application, the offset comprises a lateral offset of the lens center along the x-axis and a longitudinal offset along the y-axis in the image pixel coordinate system.
In some embodiments, the corresponding relationship may be a fitting formula representing the relationship among the operating temperature, the measured offset and the true offset.
The measurement offset can be represented by a hall value, including (hall x, hall), which reflects the up-down and left-right offsets of the lens, which would bring about a shift of the image center. Under normal conditions, after a certain mathematical fitting, the converted measurement offset and the real offset (i.e. the offset of the image center) can be completely overlapped, as shown in fig. 9, the horizontal axis represents the photographed image frame, the vertical axis represents the offset pixel number of the image center along the x axis, and after the handheld mobile phone is shaken for a certain time, the hall value reported by the OIS module is compared with the real offset calculated by image matching to obtain the offset curve of the two. The converted hall value in fig. 9 obtains a first curve, and the real offset calculated by image matching obtains a second curve, and it can be seen that the first curve and the second curve do not coincide between the 110 th frame image and the 175 th frame image, i.e. the thin solid line and the thick solid line do not coincide, under the influence of temperature drift, null drift, and the like.
In practical application, it is assumed that there is the following relationship between a hall value measured by a hall sensor and a true offset of an image center:
wherein A is a 2x2 matrix for hallxAnd hallyPerforming a rotation operation, B being a 2x1 matrix representing a translation operation, a and B being predetermined, f being a polynomial fit and a temperature compensation on the variables, in the specific form:
wherein, tbaseAnd f (x) is the calculated transverse true offset.
f(y)=anyn+an-1yn-1+an-2yn-2+...a1y+a0+bn(t-tbase)n+bn-1(t-tbase)n-1+...+b1(t-tbase)+b0
Similarly, y is the longitudinal measured offset, and f (y) is the calculated longitudinal true offset.
Here, a fitting formula is given only by way of example, and in practical applications, other fitting formulas may be used to fit the correspondence between the hall value, the temperature, and the true value, and the present application is not limited specifically.
In practical application, the movement amount of the OIS module to the lens is determined by the posture of the mobile phone, the lens movement amounts are different in different postures of the mobile phone, and the temperatures of the shooting modules are different due to different shooting durations. Therefore, sample images shot by the mobile phone at different moments, different mobile phone postures and different temperatures need to be collected, the real offset of the image center is calculated through an image matching algorithm, and then polynomial fitting is carried out according to the hall value and the temperature value at the contract moment to obtain a fitting formula; and further programming by using the obtained fitting formula to generate a computer program with a correction function, wherein the computer program is executed by a processor of the electronic equipment to correct the measured offset to obtain a real offset.
In some embodiments, the correspondence relationship may be a mapping relationship table representing the relationship among the operating temperature, the measured offset and the actual offset.
In practical application, after the fitting formula is determined, measuring offsets corresponding to sample images at different temperatures are obtained, a real offset corresponding to the measuring offsets is calculated by using the fitting formula, and a mapping relation table is established by using the corresponding relation of the three; or directly utilizing the measured working temperature, the measured offset and the real offset calculated by the image matching algorithm to establish a mapping relation table.
In practical application, the mapping relationship table may include a first mapping relationship table and a second mapping relationship table, where the first mapping relationship table includes a working temperature, two measurement offsets, and a horizontal true offset, and the second mapping relationship table includes a working temperature, two measurement offsets, and a vertical true offset.
Table 1 is a first mapping relation table
Temperature of | hallx | hally | Lateral true offset |
20 | -100 | -100 | -100 |
21 | -80 | -70 | -85 |
22 | -60 | -60 | -69 |
23 | -50 | -45 | -60 |
… | … | … | … |
Table 2 is a second mapping table
Temperature of | hallx | hally | Lateral true offset |
20 | -100 | -100 | -100 |
21 | -80 | -70 | -85 |
22 | -60 | -60 | -69 |
23 | -50 | -45 | -60 |
… | … | … | … |
According to the embodiment of the application, when the measurement offset and the current working temperature of the shooting module are obtained, the real offset is obtained through calculation by substituting a fitting formula, or the real offset is obtained through table look-up.
By adopting the offset correction strategy, when the electronic equipment uses the EIS + OIS anti-shake mode, the problem of inaccurate measured value caused by temperature drift and null drift of the displacement sensor can be solved, and the advantages of eliminating motion blur by OIS anti-shake and increasing compensation range by EIS anti-shake can be taken into account by using the EIS algorithm on the OIS imaging result, so that the clear and stable image shooting effect is achieved.
To implement the method of the embodiment of the present application, based on the same inventive concept, an embodiment of the present application further provides an electronic device, where the electronic device has an optical anti-shake mode and an electronic anti-shake mode, and as shown in fig. 10, the electronic device specifically includes:
the control unit 1001 is used for measuring and obtaining the measurement offset of the center of the lens of the shooting module and the current working temperature of the shooting module when the shooting module is controlled to shoot by adopting an optical anti-shake mode;
a correcting unit 1002, configured to correct the measured offset based on a preset offset correction policy and the current operating temperature, so as to obtain a real offset of the lens center;
and the processing unit 1003 is configured to perform electronic anti-shake processing on the captured image in an electronic anti-shake mode based on the real offset of the lens center.
In some embodiments, the offset correction strategy includes a predetermined correspondence between operating temperature, measured offset, and true offset;
the correcting unit 1002 is specifically configured to determine, based on the correspondence, a true offset corresponding to the measured offset at the current operating temperature.
In some embodiments, the correcting unit 1002 is further configured to obtain a plurality of sample images collected by the image collecting system, and obtain a measurement offset of the lens center and a working temperature of the shooting module while collecting each sample image; calculating the real offset of each sample image based on an image matching algorithm; and performing curve fitting by using the measurement offset and the real offset of each sample image and the working temperature of the shooting module to obtain the corresponding relation among the working temperature, the measurement offset and the real offset.
In some embodiments, the corresponding relationship is a fitting formula representing the relationship among the working temperature, the measured offset and the real offset;
or the corresponding relation is a mapping relation table representing the relation among the working temperature, the measured offset and the real offset.
In some embodiments, the image acquisition system comprises: the electronic equipment, the connecting support and the shooting object are arranged, the electronic equipment is fixed to one end of the connecting support, the shooting object is fixed to the other end of the connecting support, and the connecting support is used for fixing the relative position between the electronic equipment and the shooting object.
In some embodiments, the image acquisition system further comprises: the shooting object is a square block, and the square block is positioned in the center of the pure color background plate.
In some embodiments, the shooting module comprises M displacement sensors for measuring the lens center offset; wherein M is 2 or 4;
when M is 2, the M displacement sensors are respectively arranged on one side of the lens in the first direction and one side of the lens in the second direction;
when M is 4, the M displacement sensors are respectively arranged on two sides of the lens in the first direction and two sides of the lens in the second direction,
wherein the first and second directions are orthogonal.
In some embodiments, the camera module comprises a temperature sensor for measuring the current operating temperature;
wherein the temperature sensor is disposed on the displacement sensor.
Based on the hardware implementation of each unit in the electronic device, an embodiment of the present application further provides another electronic device, as shown in fig. 11, where the electronic device includes: a processor 1101 and a memory 1102 configured to store a computer program operable on the processor;
wherein the processor 1101 is configured to execute the method steps in the previous embodiments when running the computer program.
Of course, in practice, as shown in FIG. 11, the various components of the electronic device are coupled together by a bus system 1103. It is understood that the bus system 1103 is used to enable communications among the components connected. The bus system 1103 includes a power bus, a control bus, and a status signal bus, in addition to the data bus. For clarity of illustration, however, the various buses are designated as the bus system 1103 in FIG. 11.
The embodiment of the present application further provides a chip, and fig. 12 is a schematic structural diagram of the chip in the embodiment of the present application. The chip 1200 shown in fig. 12 includes a processor 1210, and the processor 1210 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
The memory 1220 may be a separate device from the processor 1210, or may be integrated into the processor 1210.
Optionally, the chip 1200 may further include an input interface 1230. The processor 1210 may control the input interface 1230 to communicate with other devices or chips, and in particular, may obtain information or data transmitted by other devices or chips.
Optionally, the chip 1200 may further include an output interface 1240. The processor 1210 may control the output interface 1240 to communicate with other devices or chips, and in particular, may output information or data to the other devices or chips.
Optionally, the chip may be applied to the network device in the embodiment of the present application, and the chip may implement the corresponding process implemented by the network device in each method in the embodiment of the present application, and for brevity, details are not described here again.
Optionally, the chip may be applied to the terminal device in the embodiment of the present application, and the chip may implement the corresponding process implemented by the terminal device in each method in the embodiment of the present application, and for brevity, details are not described here again.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip or a system-on-chip, etc.
In practical applications, the processor of the embodiment of the present application may be an integrated circuit chip having data processing capability. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, and a microprocessor. It is understood that the electronic devices for implementing the above processor functions may be other devices, and the embodiments of the present application are not limited in particular.
The Memory may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD), or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the processor.
In an exemplary embodiment, the present application further provides a computer readable storage medium, such as a memory including a computer program, which is executable by a processor of an electronic device to perform the steps of the foregoing method.
The technical solutions described in the embodiments of the present application can be arbitrarily combined without conflict.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus, and device may be implemented in other ways. The above-described embodiments are merely illustrative, and for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.
Claims (10)
1. An image anti-shake method applied to an electronic device, wherein the electronic device has an optical anti-shake mode and an electronic anti-shake mode, the method comprising:
when the shooting module is controlled to shoot in an optical anti-shake mode, measuring to obtain the measurement offset of the center of a lens of the shooting module and the current working temperature of the shooting module;
correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the lens center;
and performing electronic anti-shake processing on the shot image by adopting an electronic anti-shake mode based on the real offset of the lens center.
2. The method of claim 1, wherein the offset correction strategy comprises a predetermined correspondence between operating temperature, measured offset, and true offset;
the correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the lens center comprises the following steps:
and determining the real offset corresponding to the measured offset at the current working temperature based on the corresponding relation.
3. The method of claim 2, further comprising:
acquiring a plurality of sample images acquired by an image acquisition system, and acquiring the measurement offset of the center of a lens and the working temperature of the shooting module while acquiring each sample image;
calculating the real offset of each sample image based on an image matching algorithm;
and performing curve fitting by using the measurement offset and the real offset of each sample image and the working temperature of the shooting module to obtain the corresponding relation among the working temperature, the measurement offset and the real offset.
4. The method of claim 3, wherein the corresponding relationship is a fitting formula representing the relationship among the operating temperature, the measured offset and the true offset;
or the corresponding relation is a mapping relation table representing the relation among the working temperature, the measured offset and the real offset.
5. The method of claim 3, wherein the image acquisition system comprises: the electronic equipment, the connecting support and the shooting object are arranged, the electronic equipment is fixed to one end of the connecting support, the shooting object is fixed to the other end of the connecting support, and the connecting support is used for fixing the relative position between the electronic equipment and the shooting object.
6. The method of claim 5, wherein the image acquisition system further comprises: the shooting object is a square block, and the square block is positioned in the center of the pure color background plate.
7. The method according to claim 1, wherein the shooting module comprises M displacement sensors for measuring the lens center displacement; wherein M is 2 or 4;
when M is 2, the M displacement sensors are respectively arranged on one side of the lens in the first direction and one side of the lens in the second direction;
when M is 4, the M displacement sensors are respectively arranged on two sides of the lens in the first direction and two sides of the lens in the second direction,
wherein the first and second directions are orthogonal.
8. The method of claim 7, wherein the camera module comprises a temperature sensor for measuring the current operating temperature;
wherein the temperature sensor is disposed on the displacement sensor.
9. An electronic device having an optical anti-shake mode and an electronic anti-shake mode, comprising:
the control unit is used for measuring and obtaining the measurement offset of the center of the lens of the shooting module and the current working temperature of the shooting module when the shooting module is controlled to shoot by adopting an optical anti-shake mode;
the correction unit is used for correcting the measured offset based on a preset offset correction strategy and the current working temperature to obtain the real offset of the lens center;
and the processing unit is used for carrying out electronic anti-shake processing on the shot image by adopting an electronic anti-shake mode based on the real offset of the lens center.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010600320.6A CN111711756A (en) | 2020-06-28 | 2020-06-28 | Image anti-shake method, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010600320.6A CN111711756A (en) | 2020-06-28 | 2020-06-28 | Image anti-shake method, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111711756A true CN111711756A (en) | 2020-09-25 |
Family
ID=72544512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010600320.6A Pending CN111711756A (en) | 2020-06-28 | 2020-06-28 | Image anti-shake method, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111711756A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112616021A (en) * | 2020-12-18 | 2021-04-06 | 昆山丘钛光电科技有限公司 | Anti-shake holder, anti-shake method and camera module |
CN113452919A (en) * | 2021-07-21 | 2021-09-28 | 杭州海康威视数字技术股份有限公司 | Camera for realizing cooperative anti-shake by using optical anti-shake and electronic anti-shake |
CN113596322A (en) * | 2021-07-09 | 2021-11-02 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
CN114500838A (en) * | 2022-01-25 | 2022-05-13 | 维沃移动通信有限公司 | Anti-shake shooting method and device |
CN115361502A (en) * | 2022-08-26 | 2022-11-18 | 维沃移动通信有限公司 | Shooting method, shooting device, electronic equipment and storage medium |
WO2023005355A1 (en) * | 2021-07-30 | 2023-02-02 | 荣耀终端有限公司 | Image anti-shake method and electronic device |
CN115701125A (en) * | 2021-07-30 | 2023-02-07 | 荣耀终端有限公司 | Image anti-shake method and electronic equipment |
WO2023179440A1 (en) * | 2022-03-21 | 2023-09-28 | 维沃移动通信有限公司 | Shooting apparatus control method and apparatus, shooting apparatus and electronic device |
CN117135456A (en) * | 2023-04-07 | 2023-11-28 | 荣耀终端有限公司 | Image anti-shake method and electronic equipment |
CN117135459A (en) * | 2023-04-07 | 2023-11-28 | 荣耀终端有限公司 | Image anti-shake method and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018072353A1 (en) * | 2016-10-17 | 2018-04-26 | 华为技术有限公司 | Image acquiring method and terminal device |
JP2018533756A (en) * | 2015-09-30 | 2018-11-15 | ハッチンソン テクノロジー インコーポレイテッドHutchinson Technology Incorporated | Thermo-mechanical stabilization of nitinol wire in optical image stabilized suspension |
CN110754079A (en) * | 2017-05-19 | 2020-02-04 | 动运科学技术有限公司 | Camera module actuator motion sensing element and camera module flexible circuit board including the same |
-
2020
- 2020-06-28 CN CN202010600320.6A patent/CN111711756A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018533756A (en) * | 2015-09-30 | 2018-11-15 | ハッチンソン テクノロジー インコーポレイテッドHutchinson Technology Incorporated | Thermo-mechanical stabilization of nitinol wire in optical image stabilized suspension |
WO2018072353A1 (en) * | 2016-10-17 | 2018-04-26 | 华为技术有限公司 | Image acquiring method and terminal device |
CN110754079A (en) * | 2017-05-19 | 2020-02-04 | 动运科学技术有限公司 | Camera module actuator motion sensing element and camera module flexible circuit board including the same |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112616021A (en) * | 2020-12-18 | 2021-04-06 | 昆山丘钛光电科技有限公司 | Anti-shake holder, anti-shake method and camera module |
CN113596322A (en) * | 2021-07-09 | 2021-11-02 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
WO2023001036A1 (en) * | 2021-07-21 | 2023-01-26 | 杭州海康威视数字技术股份有限公司 | Camera |
CN113452919B (en) * | 2021-07-21 | 2022-04-19 | 杭州海康威视数字技术股份有限公司 | Camera for realizing cooperative anti-shake by using optical anti-shake and electronic anti-shake |
CN113452919A (en) * | 2021-07-21 | 2021-09-28 | 杭州海康威视数字技术股份有限公司 | Camera for realizing cooperative anti-shake by using optical anti-shake and electronic anti-shake |
WO2023005355A1 (en) * | 2021-07-30 | 2023-02-02 | 荣耀终端有限公司 | Image anti-shake method and electronic device |
CN115701125A (en) * | 2021-07-30 | 2023-02-07 | 荣耀终端有限公司 | Image anti-shake method and electronic equipment |
CN115701125B (en) * | 2021-07-30 | 2023-11-07 | 荣耀终端有限公司 | Image anti-shake method and electronic equipment |
CN114500838A (en) * | 2022-01-25 | 2022-05-13 | 维沃移动通信有限公司 | Anti-shake shooting method and device |
WO2023179440A1 (en) * | 2022-03-21 | 2023-09-28 | 维沃移动通信有限公司 | Shooting apparatus control method and apparatus, shooting apparatus and electronic device |
CN115361502A (en) * | 2022-08-26 | 2022-11-18 | 维沃移动通信有限公司 | Shooting method, shooting device, electronic equipment and storage medium |
CN117135456A (en) * | 2023-04-07 | 2023-11-28 | 荣耀终端有限公司 | Image anti-shake method and electronic equipment |
CN117135459A (en) * | 2023-04-07 | 2023-11-28 | 荣耀终端有限公司 | Image anti-shake method and electronic equipment |
CN117135456B (en) * | 2023-04-07 | 2024-05-31 | 荣耀终端有限公司 | Image anti-shake method and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111711756A (en) | Image anti-shake method, electronic equipment and storage medium | |
CN111147741B (en) | Focusing processing-based anti-shake method and device, electronic equipment and storage medium | |
WO2020259106A1 (en) | Calibration method and device for relative attitudes of camera and inertial measurement unit | |
CN107223330B (en) | Depth information acquisition method and device and image acquisition equipment | |
US20110109755A1 (en) | Hardware assisted image deblurring | |
WO2017020150A1 (en) | Image processing method, device and camera | |
CN111800589B (en) | Image processing method, device and system and robot | |
TWI757387B (en) | Method for calibrating driving amount of actuator configured to correct blurring of image taken by camera | |
CN109598764B (en) | Camera calibration method and device, electronic equipment and computer-readable storage medium | |
US11412142B2 (en) | Translation correction for optical image stabilization | |
US12046007B2 (en) | Method for processing event data flow and computing device | |
CN108805938B (en) | Detection method of optical anti-shake module, mobile terminal and storage medium | |
CN111489288B (en) | Image splicing method and device | |
CN109660718B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
WO2020181409A1 (en) | Capture device parameter calibration method, apparatus, and storage medium | |
CN113875219A (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN108260360B (en) | Scene depth calculation method and device and terminal | |
CN113436267B (en) | Visual inertial navigation calibration method, device, computer equipment and storage medium | |
CN109671028A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
US20220174217A1 (en) | Image processing method and device, electronic device, and computer-readable storage medium | |
CN109685854B (en) | Camera calibration method and device, electronic equipment and computer readable storage medium | |
CN111416943B (en) | Camera anti-shake method, camera anti-shake apparatus, aerial survey camera, and computer-readable storage medium | |
CN111750850B (en) | Angle information acquisition method, device and system | |
CN113689492B (en) | Sea surface distance measurement method and system based on monocular camera | |
CN104704804A (en) | Imaging Apparatus And Detecting Apparatus |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200925 |