WO2023279849A1 - Image processing method and apparatus, electronic device, and storage medium - Google Patents

Image processing method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2023279849A1
WO2023279849A1 PCT/CN2022/092755 CN2022092755W WO2023279849A1 WO 2023279849 A1 WO2023279849 A1 WO 2023279849A1 CN 2022092755 W CN2022092755 W CN 2022092755W WO 2023279849 A1 WO2023279849 A1 WO 2023279849A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
shake
rotation
translation
data
Prior art date
Application number
PCT/CN2022/092755
Other languages
French (fr)
Chinese (zh)
Inventor
周阳
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023279849A1 publication Critical patent/WO2023279849A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/55Optical parts specially adapted for electronic image sensors; Mounting thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/54Mounting of pick-up tubes, electronic image sensors, deviation or focusing coils
    • 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/685Vibration or motion blur correction performed by mechanical compensation
    • H04N23/687Vibration or motion blur correction performed by mechanical compensation by shifting the lens or sensor position

Definitions

  • the present application relates to the technical field of image processing, and in particular to an image processing method, device, electronic equipment and storage medium.
  • electronic devices such as mobile phones and tablet computers are usually equipped with cameras, so as to provide users with a camera function, so that users can record what is happening around them, the scenery they see, etc. anytime and anywhere through these electronic devices.
  • the user usually holds the electronic device for shooting, and the electronic device held by the user will introduce different degrees of shaking and affect the stability of the shooting of the electronic device, resulting in poor quality of the captured image.
  • Embodiments of the present application provide an image processing method, device, electronic equipment, and storage medium.
  • the present application discloses an image processing method applied to an electronic device, the electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component, and the image processing method includes:
  • Acquire motion data of the electronic device and according to the motion data, control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component, and control the image sensor in the performing compensation translation in the X-axis direction and the Y-axis direction of the image sensor, and controlling the compensation rotation of the image sensor around the Z-axis of the image sensor;
  • electronic anti-shake processing is performed on the corrected image through the electronic anti-shake component to obtain an electronic anti-shake image.
  • the present application also discloses an image processing device, which is applied to an electronic device, and the electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component, and the image processing device includes:
  • an optical anti-shake module configured to acquire motion data of the electronic device, and control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component according to the motion data, controlling the image sensor to perform compensation translation in the X-axis direction and the Y-axis direction of the image sensor, and controlling the image sensor to perform compensation rotation around the Z-axis of the image sensor;
  • an attitude acquisition module configured to acquire the optical image stabilization image corresponding to the movement data collected by the image sensor, and acquire the first position attitude data of the lens, the second position and attitude data of the image sensor from the optical image stabilization component Position attitude data and first rotation attitude data;
  • a pose correction module configured to restore and correct the pose of the optical image stabilization image according to the first position and pose data, the second position and pose data, and the first rotation pose data, to obtain a corrected image
  • the electronic anti-shake module is configured to perform electronic anti-shake processing on the corrected image through the electronic anti-shake component according to the motion data, so as to obtain an electronic anti-shake image.
  • the present application also discloses an electronic device, including a lens, an image sensor, an optical anti-shake component, an electronic anti-shake component, a processor, and a memory. Steps in the provided image processing method.
  • the present application also discloses a storage medium on which a computer program is stored, and when the computer program is loaded by a processor, the steps in the image processing method provided in the present application are executed.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 3 is an example diagram of the degrees of freedom of movement of the camera module in the embodiment of the present application.
  • FIG. 4 is an example diagram of correcting an optical image stabilization image in an embodiment of the present application to obtain a corrected image.
  • FIG. 5 is a partial schematic diagram of a preset calibration tool provided by an embodiment of the present application.
  • Fig. 6 is an example diagram of a rectangular calibration plate provided in the embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another hardware structure of an electronic device provided by an embodiment of the present application.
  • An embodiment of the present application provides an image processing method, an image processing device, a computer-readable storage medium, and an electronic device, wherein the execution subject of the image processing method may be the image processing device provided in the embodiment of the present application, or integrate the image processing An electronic device of a device, wherein the image processing device may be implemented in a hardware or software manner.
  • the electronic device may be a device equipped with a processor and capable of data processing, such as a smart phone, a tablet computer, a palmtop computer, and a notebook computer.
  • This embodiment provides an image processing method, which is applied to an electronic device.
  • the electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component.
  • the image processing method includes:
  • electronic anti-shake processing is performed on the corrected image through the electronic anti-shake component to obtain an electronic anti-shake image.
  • the posture of the optical image stabilization image is restored and corrected according to the first position and posture data, the second position and posture data, and the first rotation posture data to obtain a corrected image, including:
  • a first correction translation vector for performing translation correction on the optical image stabilization image is obtained;
  • translation correction and rotation correction are respectively performed on the pose of the optical image stabilization image to obtain a correction image.
  • obtaining a first correction translation vector for translation correction of the optical image stabilization image includes:
  • the fused translation vector is used as the first corrected translation vector.
  • the electronic device is fixed to the preset calibration tool, so that the position of the electronic device and the rectangular calibration plate in the preset calibration tool is relatively fixed, the rectangular calibration plate includes a center mark, and the first functional relationship is pre-generated according to the following steps :
  • optical anti-shake processing is performed through the optical anti-shake component, and the first image sequence of the rectangular calibration plate collected by the image sensor during the translation process is obtained;
  • the first functional relationship is obtained by fitting.
  • the electronic device is fixed to the preset calibration tool, so that the position of the electronic device and the rectangular calibration plate in the preset calibration tool is relatively fixed, the rectangular calibration plate includes a center mark, and the second functional relationship is pre-generated according to the following steps :
  • optical anti-shake processing is performed through the optical anti-shake component, and a second image sequence of the rectangular calibration plate collected by the image sensor during the translation process is acquired;
  • the electronic device is fixed to the preset calibration tool, so that the position of the electronic device and the rectangular calibration plate in the preset calibration tool is relatively fixed, the rectangular calibration plate includes a center mark, a first fusion parameter and a second fusion parameter
  • optical anti-shake processing is performed through the optical anti-shake component, and a third image sequence of the rectangular calibration plate collected by the image sensor during the translation process is acquired;
  • obtaining a first correction rotation matrix for performing rotation correction on the optical image stabilization image includes:
  • the rotation angle corresponding to the first rotation attitude data is obtained
  • obtaining the first corrected rotation matrix according to the coordinates of the rotation center and the rotation angle includes:
  • the first correction rotation matrix is obtained according to the following formula:
  • R represents the first correction rotation matrix
  • C represents cos( ⁇ )
  • represents the rotation angle
  • S represents sin( ⁇ )
  • Cx represents the abscissa in the rotation center coordinates
  • Cy represents the ordinate in the rotation center coordinates.
  • the electronic device is fixed to the preset calibration tool, so that the position of the electronic device and the rectangular calibration plate in the preset calibration tool is relatively fixed, the rectangular calibration plate includes four corner marks, and the coordinates of the rotation center and the third functional relationship are according to Generated as follows:
  • optical anti-shake processing is performed through the optical anti-shake component, and a fourth image sequence of the rectangular calibration plate collected by the image sensor during the rotation process is acquired;
  • the coordinates of the rotation center and the third functional relationship are obtained by fitting.
  • the third functional relationship includes a polynomial function, and according to the second rotation attitude data and the fourth position coordinates corresponding to each fourth image, the coordinates of the rotation center and the third functional relationship are obtained by fitting, including:
  • P i represents the fourth position coordinates of the i-th four-corner mark
  • h 2 ' represents the second rotation attitude data
  • f() represents a polynomial function
  • r represents a preset search radius
  • represents the polynomial coefficient of the polynomial function
  • imW represents The width of the fourth image
  • imH represents the height of the fourth image.
  • optical anti-shake processing is performed through the optical anti-shake component, and the fifth image sequence of the rectangular calibration plate collected by the image sensor during the rotation and translation process is acquired;
  • acquiring an optical image stabilization image corresponding to motion data collected by an image sensor includes:
  • the optical image stabilization image corresponding to the motion data collected by the image sensor is acquired.
  • the first delay parameter is pre-generated according to the following steps:
  • the first time delay parameter is obtained by searching.
  • the first time delay parameter is obtained by searching, including
  • the preset search conditions include:
  • the stabilization quality score of any stabilized image sequence is greater than or equal to the scoring threshold; or
  • the updated preset search step size is smaller than the step size threshold.
  • acquiring the first position and posture data of the lens, the second position and posture data and the first rotation posture data of the image sensor from the optical anti-shake component includes:
  • the first position and posture data of the lens, the second position and posture data and the first rotation posture data of the image sensor are acquired from the optical anti-shake component.
  • the motion data includes acceleration data and angular velocity data.
  • FIG. 1 shows a schematic diagram of a hardware structure of an electronic device 100 .
  • the electronic device 100 includes a motion sensor 110 , a camera module 120 , an optical anti-shake component 130 and an electronic anti-shake component 140 .
  • the installation positions of the motion sensor 110, the camera module 120, the optical anti-shake component 130 and the electronic anti-shake component 140 in the electronic device can be set by those skilled in the art according to actual needs.
  • the structure shown in FIG. 1 does not constitute a limitation on the electronic device 100, and the electronic device 100 may include more or less components than those shown in the illustration, or combine certain components, Or a different arrangement of components, etc.
  • the motion sensor 110 is configured to sense the motion state of the electronic device 100 in real time, and correspondingly obtain motion data used to describe the motion state of the electronic device 100 .
  • the type and quantity of the motion sensors 110 are not specifically limited here, and can be set by those skilled in the art according to actual needs.
  • the motion sensor 110 can only sense the motion state of the electronic device 100 in a single dimension, and correspondingly obtain motion data in a single dimension (for example, the motion sensor 110 can only sense the acceleration of the electronic device 100), or can sense the electronic device 100 In the multi-dimensional motion state, correspondingly obtain multi-dimensional motion data (for example, the motion sensor 110 can sense the acceleration and angular velocity of the electronic device 100 ).
  • the motion sensor 110 can be arranged at any position of the electronic device 100 as constrained by the rigid connection between the motion sensor 110 and the body of the electronic device 100 .
  • the camera module 120 is configured to collect images, including at least a lens 1210 and an image sensor 1220, wherein the lens 1210 is used to project external light signals to the image sensor 1220, and the image sensor 1220 is used to perform photoelectric conversion on the light signals projected by the lens 1210 , convert the optical signal into a usable electrical signal, and obtain a digitized image.
  • the lens 1210 and the image sensor 1220 may be arranged in parallel or non-parallel.
  • the camera module 120 After the camera module 120 is enabled, it can shoot the shooting scene in real time.
  • the shooting scene can be understood as the real area where the camera module 120 is aimed after being enabled, that is, the area where the camera module 120 can convert light signals into corresponding images.
  • the electronic device 100 enables the camera module 120 according to the user operation, if the user controls the camera module 120 of the electronic device 100 to aim at an area including a certain object, then the area including the object is the area of the camera module 120.
  • the area including the object is the area of the camera module 120.
  • the camera module 120 is configured to be movable relative to the electronic device 100, that is, the camera module 120 has a certain degree of freedom of movement relative to the electronic device 100 (the lens 1210 and the image sensor 1220 both have a degree of freedom of movement, or One of the lens 1210 and the image sensor 1220 has a degree of freedom of movement), so that when the electronic device 100 moves, the camera module 120 can be driven to perform compensatory movement, so as to offset the movement of the electronic device 100 as much as possible, so that the imaging The light path is stable.
  • this embodiment does not specifically limit the installation position of the camera module 120 in the electronic device 100 , and can be configured by those skilled in the art according to actual needs.
  • the camera module 120 can be installed on the side where the screen of the mobile phone is located, or the camera module 120 can be installed on the opposite side of the screen of the mobile phone, and the camera module 120 can also be installed on both the side where the screen of the mobile phone is located and the opposite surface. .
  • the optical anti-shake component 130 is configured to perform optical anti-shake processing on the camera module 120 according to the movement of the electronic device. For example, when the lens 1210 has a translation degree of freedom in its X-axis direction and Y-axis direction, the optical anti-shake component can control the lens 1210 to perform compensation translation in its X-axis direction and Y-axis direction according to the movement of the electronic device 100 . To counteract the movement of the electronic device 100, so that the imaging optical path of the camera module 120 is stabilized.
  • the electronic anti-shake component 140 is configured to stabilize the image through electronic anti-shake.
  • Electronic anti-shake is an algorithm operation, such as calculating the motion between the image and other images through the motion data corresponding to the image. And the movement inside the image, and after aligning the image according to the movement and performing appropriate cropping, stretching and deformation processing, a relatively stable image is obtained.
  • FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • the image processing method is applied to the electronic device 100 shown in FIG. 1.
  • the electronic device 100 includes a lens 1210, an image sensor 1220, an optical anti-shake component 130, and an electronic anti-shake component 140.
  • the embodiment of the present application provides The flow of the image processing method can be as follows:
  • the motion data of the electronic device 100 is obtained, and according to the motion data, the optical image stabilization component 130 controls the lens 1210 to perform compensation translation in the X-axis direction and the Y-axis direction of the lens 1210, and controls the image sensor 1220 to move in the direction of the image sensor 1220.
  • the compensation translation is performed in the X-axis direction and the Y-axis direction, and the compensation rotation of the image sensor 1220 is controlled around the Z-axis of the image sensor 1220 .
  • the camera module 120 has 5-dimensional freedom of movement, including the 2-dimensional translation freedom of the lens 1210 in its X-axis direction and Y-axis direction, and the image sensor 1220 in its X-axis direction and Y-axis direction.
  • the optical anti-shake component 130 is configured as an optical anti-shake in the aforementioned 5-dimensional freedom of movement.
  • the structural layout of the electronic device 100, the lens 1210 and the image sensor 1220 is not limited, and can be configured by those skilled in the art according to actual needs, for example, the electronic device 100, the lens 1210 and the The X axes of the three image sensors 1220 are parallel to each other, the Y axes are parallel to each other, and the Z axes are parallel to each other.
  • motion data of the electronic device 100 is acquired through the motion sensor 110 provided on the electronic device 100 .
  • the type and quantity of the motion sensors 110 are not specifically limited here, and can be set by those skilled in the art according to actual needs.
  • the three-axis acceleration of the electronic device 100 may be obtained through a three-axis acceleration sensor, and the three-axis angular velocity of the electronic device 100 may also be obtained through a three-axis gyroscope.
  • the motion data of the electronic device 100 is input to the optical image stabilization component 130, and the optical image stabilization component 130 drives the lens 1210 and the image sensor 1220 according to the motion data of the electronic device 100 to perform optical image stabilization. shake.
  • the optical anti-shake component 130 controls the lens 1210 to perform compensation translation in the X-axis direction and the Y-axis direction of the lens 1210, and controls the image sensor 1220 to perform compensation translation in the X-axis direction and the Y-axis direction of the image sensor 1220.
  • the translation is compensated, and the image sensor 1220 is controlled to perform compensation rotation around the Z-axis of the image sensor 1220 , so as to offset the movement of the electronic device 100 and stabilize the imaging optical path.
  • the lens 1210 can be controlled by the optical anti-shake component 130 to produce actual displacement in its X-axis direction and Y-axis direction at the same time (for example, the lens 1210 in its X-axis direction and Y-axis direction produce the same magnitude of displacement, then the displacement produced by the lens 1210 can be regarded as a displacement along the 45-degree direction), and can also be controlled by the optical anti-shake component 130 to only occur in one of the X-axis direction and the Y-axis direction Actual displacement (such as lens 1210 only produces actual displacement in the X-axis direction, or only produces actual displacement in its Y-axis direction), similarly, the image sensor 1220 can be controlled by the optical anti-shake component 130 while simultaneously in its X-axis direction and Y-axis direction Axis direction produces actual displacement, also can be controlled by optical anti-shake assembly 130 and only produce actual displacement in one of its X-axis direction and Y-axis
  • the present application controls the lens 1210 and the image sensor 1220 through the optical anti-shake component 130 to perform optical anti-shake, so that the imaging optical path of the image sensor 1220 is stabilized.
  • the image captured by the image sensor 1220 at this time is obtained, and recorded as the optical image stabilization image corresponding to the aforementioned motion data.
  • the optical anti-shake component 130 is also provided with a first position and attitude sensor for sensing the position and attitude of the lens 1210 in real time, a second position and attitude sensor for sensing the position and attitude of the image sensor 1220 in real time, and a second position and attitude sensor for real-time sensing of the position and attitude of the image sensor 1220.
  • a rotational attitude sensor that senses the rotational attitude of the image sensor 1220 .
  • the types of the first position and attitude sensor, the second position and attitude sensor and the rotation attitude sensor are not specifically limited here, and can be selected by those skilled in the art according to needs.
  • the first position and attitude sensor, the second position and attitude sensor, and the rotation and attitude sensor are all realized by Hall sensors.
  • the optical anti-shake component 130 senses the position and posture of the lens 1210 through the first position and posture sensor to obtain the first position and posture data of the lens 1210, and senses the position and posture of the image sensor 1220 through the second position and posture sensor to obtain the image
  • the second position and posture data of the sensor 1220 is sensed by the rotation posture sensor to the rotation posture of the image sensor 1220 to obtain the first rotation posture data of the image sensor 1220, and the first position and posture data, the second position and posture data and the first
  • the combination of rotation attitude data is output as attitude data set.
  • the aforementioned first position and attitude data, the aforementioned second position and attitude data, and the aforementioned first rotation attitude data can be obtained from the attitude data set output by the optical anti-shake component 130 .
  • the restoration and correction of posture can be commonly understood as “reverting" the optical image stabilization image to the posture that the optical image stabilization component 130 does not perform optical stabilization, that is, “reverting” the optical image stabilization image to the point where the lens 1210 does not move, and The corresponding attitude of the image sensor 1220 when it does not move and rotate.
  • the electronic anti-shake component 140 performs electronic anti-shake processing on the corrected image to obtain an electronic anti-shake image.
  • the aforementioned motion data and the corrected image are further input into the electronic anti-shake component 140, and the electronic anti-shake component 140 processes the corrected image according to the aforementioned motion data.
  • Electronic anti-shake processing to obtain electronic anti-shake images.
  • the electronic device 100 includes a lens 1210, an image sensor 1220, an optical anti-shake component 130, and an electronic anti-shake component 140.
  • the image sensor 1220 performs five-dimensional optical image stabilization to obtain an optical image stabilization image; then, based on the optical image stabilization image, according to the first position and posture data of the lens 1210, the second position and posture data of the image sensor 1220 and The first rotation attitude data is to restore and correct the attitude of the optical image stabilization image to obtain the corrected image after the attitude restoration; finally, according to the motion data, the electronic anti-shake component 140 is used to perform electronic anti-shake processing on the corrected image to obtain the electronic anti-shake image.
  • the present application uses the optical image stabilization component 130 to provide an optical image stabilization image, and after restoring the posture change caused by the optical image stabilization component, the electronic image stabilization component 140 performs electronic image stabilization processing to obtain a high-quality electronic image stabilization image.
  • the posture of the optical image stabilization image is restored and corrected according to the first position and posture data, the second position and posture data, and the first rotation posture data to obtain a corrected image, including:
  • the optical image stabilization in this embodiment includes 5-dimensional degrees of freedom, which are respectively 2-dimensional degrees of freedom of the lens 1210 on the X-axis and Y-axis, and 2-dimensional degrees of freedom of the image sensor 1220 on the X-axis, Y-axis and Z-axis. 3D degrees of freedom.
  • the anti-shake compensation of the aforementioned 5-dimensional freedom will lead to the translation and rotation of the image content.
  • the restorative correction of the posture of the optical anti-shake image in this embodiment will include two parts, respectively translation correction and rotation correction .
  • the translation of the image content is caused by the respective translations of the lens 1210 and the image sensor 1220
  • the rotation of the image content is caused by the rotation of the image sensor 1220 . Therefore, in this embodiment, on the one hand, according to the first position and posture data of the lens 1210 and the second position and posture data of the image sensor 1220, the first correction translation vector used for translation correction of the optical image stabilization image is obtained; on the other hand, according to the image
  • the first rotation posture data of the sensor 1220 is used to obtain a first correction rotation matrix for performing rotation correction on the optical image stabilization image.
  • translation correction and rotation correction are respectively performed on the posture of the optical image stabilization image to obtain a correction image, as shown in FIG. 4 .
  • translation correction and rotation correction are respectively performed on the attitude of the optical image stabilization image, which can be expressed as:
  • P represents the position of a pixel in the OIS image
  • R represents the first corrected rotation matrix
  • t represents the first corrected translation vector
  • P' represents the position of the pixel in the corrected image after correction.
  • obtaining a first correction translation vector for translation correction of the optical image stabilization image includes:
  • this embodiment presets a first functional relationship between the position and attitude data and the translation vector, and the first functional relationship describes the corresponding relationship between the position and attitude changes of the image content caused by the changes in the position and attitude of the lens 1210 .
  • this embodiment also presets a second functional relationship between the position and attitude data and the translation vector, and the second functional relationship describes the corresponding relationship between the position and attitude changes of the image content caused by the position and attitude changes of the image sensor 1220 .
  • the first translation vector corresponding to the first position and attitude data is obtained, and the second translation vector corresponding to the second position and attitude data is obtained according to the second functional relationship between the position and attitude data and the translation vector.
  • a first fusion parameter corresponding to the first translation vector and a second fusion parameter corresponding to the second translation vector are pre-configured.
  • t' a ⁇ t 1 +b ⁇ t 2 ;
  • t' denotes the fused translation vector
  • t 1 denotes the first translation vector
  • t 2 denotes the second translation vector
  • a denotes the first fusion parameter
  • b denotes the second fusion parameter.
  • the sum of the first fusion parameter and the second fusion parameter is constrained to be 1, and those skilled in the art can select the value according to actual needs.
  • this embodiment will use the fused translation vector as the first corrected translation vector.
  • the electronic device 100 is fixed to the preset calibration tool, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed, the rectangular calibration plate includes a center mark, and the first function Relationships are pre-generated as follows:
  • the first functional relationship is obtained by fitting.
  • the first functional relationship is obtained through pre-calibration by using a preset calibration tool.
  • the electronic device 100 is fixed on the preset calibration tool, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed. It should be noted that there is no specific limitation on the structure of the preset calibration tool here, and it can be set by those skilled in the art according to actual needs.
  • the preset calibration tool is composed of four parts: a target backplane, an equipment carrier, a slide rail and a driving mechanism (not shown in FIG. 5), wherein the target backplane is used to fix a rectangular calibration plate , the device carrier is used to fix the electronic device 100, the target backplane and the device carrier can slide along the tracks of their respective slide rails, and the driving mechanism is used to drive the target backplane, the device carrier, and the slide rail to move synchronously.
  • the electronic device 100 is fixed on the device carrier, and the positions of the device carrier and the target backplane are adjusted along their respective tracks, so that the rectangular calibration plate is positioned on the image sensor 1220
  • the imaging size of is consistent with the size of the imaging area of the image sensor 1220. In layman's terms, the imaging image of the rectangular calibration plate covers the imaging area of the image sensor 1220.
  • the device carrier and the target backboard are locked in their respective current positions, so that the positions of the electronic device 100 and the rectangular calibration plate are relatively fixed.
  • the target backplane In order to ensure that the positions of the electronic device 100 and the rectangular calibration plate are relatively fixed, thereby ensuring the parallel relationship between the rectangular calibration plate and the camera module 120 (lens 1210 and image sensor 1220) of the electronic device 100, the target backplane Use a rigid sheet, such as a rigid metal sheet. In addition, it is also necessary to ensure that the equipment carrier and the target backplane are rigidly connected to the slide rails where they are located, so as to avoid disturbance errors.
  • the first functional relationship can be calibrated by using the preset calibration tool.
  • the translation anti-shake function of the lens 1210 of the optical anti-shake assembly 130 is correspondingly turned on, and the translation anti-shake function of the image sensor 1220 and the rotation anti-shake function of the image sensor 1220 are turned off, so that the optical anti-shake
  • the anti-shake component 130 only compensates for the translation of the lens 1210 according to the motion of the electronic device 100 .
  • the first translation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 , as shown in FIG. 5 .
  • the first translation control instruction enables the preset calibration tool to drive the electronic device 100 to alternately translate in the X-axis direction and the Y-axis direction, wherein the distance of translation and the frequency of the alternation can be determined by those skilled in the art according to actual needs. There are no specific restrictions.
  • the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 .
  • the optical anti-shake assembly 130 will only compensate for the translation of the lens 1210 during the movement of the electronic device 100 .
  • the image sequence of the rectangular calibration plate captured by the image sensor 1220 during the translation process is acquired, which is denoted as the first image sequence.
  • the image sensor 1220 collects a one-minute image sequence of the rectangular calibration plate during the translation process to obtain the first image sequence.
  • the rectangular calibration plate includes a center mark and four corner marks (respectively upper left corner mark, right upper corner mark, right lower corner mark and left lower corner mark), due to the position of the rectangular calibration plate in the electronic device 100 and the preset calibration tool Relatively fixed, the optical anti-shake processing performed by the optical anti-shake component 130 due to the translation of the electronic device 100 will cause the position of the center mark in the first image obtained by imaging to deviate from the center of the first image.
  • the position and posture data of the lens 1210 corresponding to each first image in the first image sequence is further obtained from the optical anti-shake component 130, that is, the position of the lens 1210 when the image sensor 1220 captures each first image
  • the attitude data is recorded as the third position attitude data.
  • the position coordinates of the center mark in each first image are also obtained, which are recorded as the first position coordinates.
  • the first position coordinates of the aforementioned center mark in the first image are equal to the translation vector from the center of the first image to the center mark. Therefore, the first functional relationship can be obtained by performing function fitting according to the third position posture data corresponding to each first image and the first position coordinates.
  • function fitting There is no specific limitation on the method of function fitting here, including but not limited to least square method, random sampling consistent method, and polynomial fitting method.
  • the least square method is used to fit to obtain the first functional relationship.
  • the fitting error of the first functional relationship is also evaluated (the evaluation method can be selected by those skilled in the art according to actual needs, and no specific limitation is made here, for example, it can be used mean square error) to obtain the fitting error of the first functional relationship, if the fitting error of the first functional relationship is greater than the first error threshold (experienced values can be obtained by those skilled in the art according to actual needs), then identify and eliminate obviously abnormal
  • the third position attitude data and the first position coordinates are fitted again, if the fitting error of the newly fitted first functional relationship is still greater than the first error threshold, a new first image sequence and a new third image sequence are reacquired. The position and attitude data are fitted until a first functional relationship with a fitting error less than or equal to a first error threshold is obtained.
  • the second functional relationship is pre-generated according to the following steps:
  • the second functional relationship is obtained by pre-calibrating with a preset calibration tool.
  • the electronic device 100 is fixed to the preset calibration tool according to the above method, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed.
  • the second functional relationship can be calibrated by using the preset calibration tool.
  • the image sensor 1220 translation anti-shake function of the optical image stabilization component 130 is correspondingly turned on, and the lens 1210 translation anti-shake function and the image sensor 1220 rotation anti-shake function are turned off, so that the optical image stabilization
  • the shaking component 130 only compensates for the translation of the image sensor 1220 according to the motion of the electronic device 100 .
  • the second translation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 , as shown in FIG. 5 .
  • the second translation control instruction enables the preset calibration tool to drive the electronic device 100 to alternately translate in the X-axis direction and the Y-axis direction, wherein the distance of translation and the frequency of the alternation can be determined by those skilled in the art according to actual needs. There are no specific restrictions.
  • the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 .
  • the optical anti-shake component 130 will only compensate for the translation of the image sensor 1220 during the movement of the electronic device 100 .
  • an image sequence of the rectangular calibration plate captured by the image sensor 1220 during the translation process is acquired, which is denoted as a second image sequence.
  • the image sensor 1220 collects a one-minute image sequence of the rectangular calibration plate during the translation process to obtain the second image sequence.
  • the image sensor 1220 also acquires the position and attitude data of each second image in the second image sequence from the optical anti-shake component 130, which is recorded as the fourth position and attitude data.
  • the position coordinates of the center mark in each second image are also obtained, which are recorded as the second position coordinates.
  • the second position coordinates of the aforementioned center mark in the second image are equal to the translation vector from the center of the second image to the center mark. Therefore, the second functional relationship can be obtained by performing function fitting according to the fourth position and posture data corresponding to each second image and the second position coordinates.
  • function fitting There is no specific limitation on the method of function fitting here, including but not limited to least square method, random sampling consistent method, and polynomial fitting method.
  • the least square method is used to fit to obtain the second functional relationship.
  • the fitting error of the second functional relationship is also evaluated (the evaluation method can be selected by those skilled in the art according to actual needs, and no specific limitation is made here, for example, mean square error) to obtain the fitting error of the second functional relationship, if the fitting error of the second functional relationship is greater than the second error threshold (experienced values can be obtained by those skilled in the art according to actual needs), then identify and remove obviously abnormal
  • the fourth position attitude data and the second position coordinates are fitted again, if the fitting error of the newly fitted second functional relationship is still greater than the second error threshold, a new second image sequence and a new fourth image sequence are reacquired.
  • the position and attitude data are fitted with the second position coordinates until a second functional relationship is obtained in which the fitting error is less than or equal to the second error threshold.
  • the first fusion parameter and the second fusion parameter are predetermined according to the following steps:
  • the first fusion parameter and the second fusion parameter for fusing the first translation vector and the second translation vector are obtained through pre-calibration by using a preset calibration tool.
  • the electronic device 100 is fixed to the preset calibration tool according to the above method, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed.
  • the first fusion parameter and the second fusion parameter can be obtained by calibration with the preset calibration tool. parameter.
  • the translation anti-shake function of the lens 1210 and the translation anti-shake function of the image sensor 1220 of the optical anti-shake component 130 are correspondingly turned on, And turn off the rotation anti-shake function of the image sensor 1220 , so that when the electronic device 100 moves, the optical anti-shake component 130 compensates and shifts the lens 1210 and the image sensor 1220 simultaneously according to the movement of the electronic device 100 .
  • the third translation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 , as shown in FIG.
  • the third translation control command enables the preset calibration tool to drive the electronic device 100 to alternately translate in the X-axis direction and the Y-axis direction, wherein the distance of translation and the frequency of the alternation can be determined by those skilled in the art according to actual needs. There are no specific restrictions.
  • the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 .
  • the optical anti-shake component 130 will simultaneously scan the lens during the movement of the electronic device 100. 1210 and image sensor 1220 for compensating translation.
  • an image sequence of the rectangular calibration plate captured by the image sensor 1220 during the translation process is obtained, which is denoted as a third image sequence.
  • the image sensor 1220 captures a one-minute image sequence of the rectangular calibration plate during the translation process to obtain a third image sequence.
  • the position and posture data of the lens 1210 corresponding to each third image in the third image sequence is also obtained from the optical anti-shake component 130, that is, the position and posture data of the lens 1210 when the image sensor 1220 captures each third image, Recorded as the fifth position and attitude data.
  • the position and posture data when the image sensor 1220 captures each third image is also obtained from the optical anti-shake component 130, which is recorded as the sixth position and posture data.
  • the position coordinates of the center mark in each third image are also obtained, which are denoted as the third position coordinates.
  • the translation vector corresponding to each fifth position and attitude data is obtained, which is recorded as the third translation vector
  • the translation vector corresponding to each The translation vector of the sixth position and attitude data is recorded as the fourth translation vector.
  • the third position coordinates of the aforementioned center mark in the third image are equivalent to the translation vector from the center to the center mark of the third image, and the translation vector should be determined by the third image
  • the corresponding third translation vector and the fourth translation vector are fused to obtain. Therefore, fitting is performed according to the third position coordinates, the third translation vector and the fourth translation vector corresponding to each third image to obtain the first fusion parameter and the second fusion parameter.
  • fitting is performed according to the third position coordinates, the third translation vector and the fourth translation vector corresponding to each third image to obtain the first fusion parameter and the second fusion parameter.
  • a linear regression method is used for fitting to obtain the first fusion parameter and the second fusion parameter.
  • the fitting error of the first fusion parameter and the second fusion parameter is also evaluated (the evaluation method can be selected by those skilled in the art according to actual needs , not specifically limited here, for example, the mean square error can be used to obtain the fitting error of the first fusion parameter and the second fusion parameter, if the fitting error of the first fusion parameter and the second fusion parameter is greater than the third error threshold ( According to actual needs, those skilled in the art can take empirical values), then identify and eliminate the obviously abnormal fifth position and attitude data, the sixth position and attitude data and the third position coordinates and then perform fitting again, if the first fusion of the new fit If the fitting error of the parameter and the second fusion parameter is still greater than the third error threshold, then reacquire the new third image sequence and the new fifth position and attitude data, the sixth position and attitude data and the third position coordinates for fitting until The first fusion parameter and the second fusion parameter whose fitting error is less than or equal to the third error threshold are obtained.
  • the evaluation method can be selected by those skilled in the art according to actual needs
  • obtaining a first correction rotation matrix for performing rotation correction on the optical image stabilization image includes:
  • this embodiment presets a third functional relationship between the rotation attitude data and the rotation angle, and the third functional relationship describes the correspondence between the changes in the rotation attitude of the image content caused by the change in the rotation attitude of the image sensor 1220 .
  • this embodiment also pre-fits the rotation center coordinates of the images collected by the image sensor 1220 .
  • a suitable fitting method can be selected by those skilled in the art according to actual needs.
  • the corresponding first rotation matrix is obtained.
  • the rotation angle of the posture data in addition, the rotation center coordinates of the optical image stabilization image, that is, the rotation center coordinates of the images collected by the image sensor 1220 obtained through pre-fitting.
  • the first correction rotation matrix is further obtained according to the rotation angle and the rotation center coordinates.
  • obtaining the first corrected rotation matrix according to the coordinates of the rotation center and the rotation angle includes:
  • the first correction rotation matrix is obtained according to the following formula:
  • R represents the first correction rotation matrix
  • C represents cos( ⁇ )
  • represents the rotation angle
  • S represents sin( ⁇ )
  • Cx represents the abscissa in the rotation center coordinates
  • Cy represents the ordinate in the rotation center coordinates.
  • the rectangular calibration plate further includes four-corner marks, and the coordinates of the rotation center and the third functional relationship are generated according to the following steps:
  • the coordinates of the rotation center and the third functional relationship are obtained through pre-calibration using a preset calibration tool.
  • the electronic device 100 is fixed to the preset calibration tool according to the above method, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed.
  • the coordinates of the center of rotation and the third functional relationship can be obtained by calibration with the preset calibration tool .
  • the image sensor 1220 rotation anti-shake function of the optical anti-shake component 130 is correspondingly turned on, and the translation anti-shake function of the lens 1210 and the translation anti-shake function of the image sensor 1220 are turned off, thereby , when the electronic device 100 moves, the optical anti-shake component 130 only performs compensation rotation on the image sensor 1220 according to the movement of the electronic device 100 .
  • a rotation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to rotate around the Z-axis of the image sensor 1220 .
  • the rotation control command enables the preset calibration tool to drive the electronic device 100 to alternately rotate around the Z-axis of the image sensor 1220, wherein the rotation speed and the alternating frequency can be determined by those skilled in the art according to actual needs, and no specific limitation is made here. .
  • the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 .
  • the optical anti-shake component 130 will only compensate for the rotation of the image sensor 1220 during the movement of the electronic device 100 .
  • an image sequence of the rectangular calibration plate captured by the image sensor 1220 during the rotation process is obtained, which is denoted as a fourth image sequence.
  • the image sensor 1220 captures a one-minute image sequence of the rectangular calibration plate during the rotation process to obtain a fourth image sequence.
  • the image sensor 1220 also acquires the rotation attitude data of each fourth image in the fourth image sequence collected from the optical anti-shake component 130, which is recorded as the second rotation attitude data.
  • the position coordinates of the four-corner markers (upper-left marker, upper-right marker, lower-right marker, and lower-left marker) in each fourth image are also obtained, which are recorded as fourth position coordinates.
  • the corrected four-corner marks should be located at the corresponding four-corner positions of the corrected fourth image. Therefore, by performing fitting according to the second rotation posture data and the fourth position coordinates corresponding to each fourth image, the rotation center coordinates and the third functional relationship can be obtained by fitting.
  • the fitting error between the rotation center coordinates and the third functional relationship is also evaluated (evaluation methods can be selected by those skilled in the art according to actual needs, here There is no specific limitation, for example, reprojection error can be used to obtain the fitting error between the rotation center coordinates and the third function relationship, if the fitting error between the rotation center coordinates and the third function relationship is greater than the fourth error threshold (which can be determined by those skilled in the art personnel according to actual needs), then identify and eliminate the obviously abnormal second rotation attitude data and fourth position coordinates, and then perform fitting again.
  • the fourth error threshold which can be determined by those skilled in the art personnel according to actual needs
  • the third functional relationship includes a polynomial function, and according to the second rotation posture data and the fourth position coordinates corresponding to each fourth image, the coordinates of the rotation center and the third functional relationship are obtained by fitting, including :
  • Pi represents the fourth position coordinates of the i-th four-corner marker
  • h 2 ' represents the second rotation attitude data
  • f() represents a polynomial function
  • r represents a preset search radius
  • represents the polynomial coefficient of the polynomial function
  • imW represents the first The width of the four images
  • imH represents the height of the fourth image.
  • a suitable loss function can be constructed by those skilled in the art according to actual needs, for example, it can be constructed by those skilled in the art according to the actual geometric relationship, including but not limited to the chord length relationship or rotation relations etc.
  • the value of the preset search radius r in this embodiment there is no specific limitation on the value of the preset search radius r in this embodiment, and it can be selected by those skilled in the art according to actual needs.
  • the order of the polynomial function is not specifically limited in this embodiment, and can be selected by those skilled in the art according to actual needs.
  • a polynomial function of degree 3 is used.
  • the image processing method provided by the present application further includes:
  • the first functional relationship, the second functional relationship and the third functional relationship are jointly corrected by using a preset calibration tool.
  • the electronic device 100 is fixed to the preset calibration tool according to the above method, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed.
  • the first functional relationship and the second functional relationship can be determined using the preset calibration tool. and the third functional relationship for joint correction.
  • all the anti-shake functions of the optical anti-shake component 130 are correspondingly turned on, that is, the translational anti-shake function of the image sensor 1220 and the translational anti-shake function of the lens 1210 and the image sensor 1220 rotation anti-shake function, so that when the electronic device 100 moves, the optical anti-shake component 130 performs compensation translation for the lens 1210 according to the movement of the electronic device 100 , and performs compensation translation and compensation rotation for the image sensor 1220 .
  • the rotation and translation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to rotate around the Z-axis of the image sensor 1220, and at the same time drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 .
  • the rotation and translation control command makes the preset calibration tool drive the electronic device 100 to alternately translate in its X-axis direction and Y-axis direction, and at the same time alternately rotate around the Z-axis of the image sensor 1220, wherein the distance of translation, the frequency of alternate translation, the rotation
  • the speed and the alternating rotation frequency can be selected by those skilled in the art according to actual needs, and no specific limitation is made here.
  • the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 .
  • the optical anti-shake component 130 will compensate the translation of the lens 1210 and compensate the image sensor 1220 during the movement of the electronic device 100 .
  • the image sequence of the rectangular calibration plate captured by the image sensor 1220 during the rotation and translation is acquired, which is denoted as the fifth image sequence.
  • the image sensor 1220 collects a one-minute image sequence of the rectangular calibration plate during the rotation and translation process to obtain a fifth image sequence.
  • the position and posture data of the lens 1210 corresponding to each fifth image in the fifth image sequence is obtained from the optical anti-shake component 130, that is, the position and posture data of the lens 1210 when the image sensor 1220 captures each fifth image , recorded as the seventh position and posture data, in addition, the position and posture data when the image sensor 1220 captures every fifth image is also obtained, which is recorded as the eighth position and posture data, and the rotation when the image sensor 1220 captures every fifth image Attitude data, denoted as the third rotation attitude data.
  • the eighth position and posture data and the third rotation posture data corresponding to each fifth image further according to the seventh position and posture data, the eighth position and posture data corresponding to each fifth image,
  • the data and the first functional relationship and the second functional relationship are used to obtain a correction translation vector for translation correction of each fifth image, which is denoted as a second correction translation vector.
  • a second correction translation vector it may be implemented correspondingly with reference to the manner of obtaining the first correction translation vector in the above embodiments, which will not be repeated here.
  • a corrected rotation matrix for performing rotation correction on each fifth image is obtained, which is denoted as the second corrected rotation matrix .
  • the second corrected rotation matrix it can be implemented correspondingly with reference to the manner of obtaining the first correction rotation matrix in the above embodiments, and details are not repeated here.
  • the second correction translation vector for translation correction of each fifth image and the second correction rotation matrix for rotation correction of each fifth image that is, according to the second correction translation vector and The second correction rotation matrix respectively performs translation correction and rotation correction on the central pixel of each fifth image to obtain corrected coordinates of the central pixel of each fifth image.
  • the position coordinates of the center mark in each fifth image are also obtained, which are denoted as fifth position coordinates. It can be understood that, for a fifth image, the closer the corrected coordinates of the fifth image pair are to the fifth position coordinates, the more general simulations of the first functional relationship, the second functional relationship and the third functional relationship in this embodiment are described. The smaller the combined error. Therefore, in this embodiment, according to the difference between the correction coordinates corresponding to each fifth image and the fifth position coordinates, with the goal of eliminating the difference as much as possible, the first functional relationship, the second functional relationship, and the third functional relationship are calculated. Joint revision.
  • corrections are made in descending order.
  • acquiring an optical image stabilization image corresponding to motion data collected by the image sensor 1220 includes:
  • the acquisition time stamp of the movement data is first acquired, which is recorded as the first acquisition time stamp, and the first acquisition time stamp is used to describe the acquired The acquisition time of motion data.
  • the motion sensor 110 collecting motion data and outputting the motion data.
  • the first acquisition timestamp is corrected according to the first delay parameter of the corresponding motion data, and the corrected first acquisition timestamp is marked as the first modified timestamp, which describes the The collection time of the aforementioned motion data.
  • the optical image stabilization image collected by the image sensor 1220 and corresponding to the aforementioned motion data can be acquired.
  • the first delay parameter is pre-generated according to the following steps:
  • This embodiment provides an optional calibration manner of the first delay parameter.
  • the image sequence without electronic anti-shake processing is first obtained as a sample, which is recorded as a sample shake image sequence.
  • the anti-shake functions of the optical anti-shake component 130 and the electronic anti-shake component 140 are turned off, and an image sequence of a certain duration is captured by the electronic device 100 as a sample shake image sequence.
  • sample motion data corresponding to each sample shake image is acquired according to the second acquisition time stamp (used to describe the output moment when the image sensor 1220 outputs the corresponding sample shake image) of each sample shake image in the sample shake image sequence, A sample motion data sequence corresponding to the sample shaken image sequence is obtained.
  • the preset search strategy After obtaining the sample shaking image sequence and its corresponding sample motion data sequence, according to the preset search strategy, according to the preset time delay parameter, preset search step size, sample shaking image sequence and its corresponding sample motion data sequence , to obtain the first delay parameter.
  • the preset search strategy the preset delay parameter, and the preset search step size, which can be configured by those skilled in the art according to actual needs.
  • the first delay parameter is obtained by searching, including
  • This embodiment provides a search strategy for optionally searching the first delay parameter.
  • a preset number of candidate delay parameters are acquired according to a preset delay parameter and a preset search step.
  • the value of the preset number there is no specific limitation on the value of the preset number.
  • the preset delay parameter D 0 is the center, and the preset search step size ⁇ d is used to generate [D 0 - ⁇ d,D 0 , D 0 + ⁇ d] 3 candidate delay parameters.
  • the sample motion data sequence is respectively corrected according to each candidate time delay parameter, that is, the corresponding relationship between the sample motion data in the sample motion data sequence and the sample shake image in the sample shake image sequence is updated according to each candidate time delay parameter , correspondingly obtain a preset number of corrected sample motion data sequences;
  • each corrected sample motion data sequence electronic anti-shake processing is performed on the sample shake image sequence through the electronic anti-shake component 140 to obtain a preset number of anti-shake image sequences, wherein, for a corrected sample motion data sequence, the In the corrected sample motion data sequence, each corrected sample motion data and sample dithered image sequence corresponding to the sample dithered image is input to the sample dithered image for anti-shake processing, and an anti-shake image sequence corresponding to the corrected sample motion data sequence is correspondingly obtained.
  • the anti-shake quality of each anti-shake image sequence is quantified and scored according to the preset quantitative scoring strategy, and the anti-shake quality score of each anti-shake image sequence is obtained.
  • the configuration of the quantitative scoring strategy is not specifically limited this time, and can be configured by those skilled in the art according to actual needs.
  • the method of frame-by-frame feature matching and average feature distance statistics is used to quantify and score the anti-shake quality of the anti-shake image sequence, which can be expressed as:
  • s represents the anti-shake quality score (the larger the value, the higher the anti-shake quality)
  • p represents the feature matching point set
  • i represents the frame number of the anti-shake image sequence
  • N represents the number of anti-shake images in the anti-shake image sequence total frames.
  • the feature matching algorithm and its descriptor can be selected by those skilled in the art according to actual needs, including but not limited to SIFT, FAST, Harris, ORB and so on.
  • the preset delay parameter is updated to correspond to the anti-shake image sequence with the highest anti-shake quality score
  • the candidate time delay parameters, and according to the preset update parameters, the preset search step is updated according to the preset update strategy.
  • the preset update strategy can be configured by those skilled in the art according to actual needs with the restriction of reducing the preset search step size.
  • the default update policy configured in this embodiment can be expressed as:
  • ⁇ d' represents a preset search step after update
  • ⁇ d represents a preset search step before update
  • M represents a preset update parameter
  • the configuration of the preset search conditions is not specifically limited here, and can be configured by those skilled in the art according to actual needs.
  • the preset search conditions include:
  • the stabilization quality score of any stabilized image sequence is greater than or equal to the scoring threshold; or
  • the updated preset search step size is smaller than the step size threshold;
  • the number of searches has reached the number threshold.
  • this embodiment does not specifically limit the scoring threshold, the step threshold, and the number of times threshold, and those skilled in the art can obtain empirical values according to actual needs.
  • acquiring the first position and posture data of the lens 1210, the second position and posture data and the first rotation posture data of the image sensor 1220 from the optical anti-shake component 130 includes:
  • the optical anti-shake component 130 there is a certain delay in the optical anti-shake component 130 from collecting the position and attitude data of the lens 1210, the position and attitude data and the rotation attitude data of the image sensor 1220 to outputting these attitude data.
  • the first position and attitude data, the second position and attitude data and the first rotation attitude data accurately corresponding to the optical image stabilization image are obtained, and the second time delay parameter corresponding to the optical anti-shake component 130 is pre-calibrated.
  • the delay parameter is used to describe the delay from when the optical image stabilization component 130 collects the aforementioned attitude data until it outputs the aforementioned attitude data.
  • the second delay parameter corrects the first corrected time stamp to obtain the second corrected time stamp; then according to the second corrected time stamp, the first position and attitude data of the lens 1210 and the second position and attitude data of the image sensor 1220 are obtained from the optical anti-shake component 130.
  • the position and attitude data and the first rotation attitude data that is, the position and attitude data of the lens 1210 whose output time stamp matches the second modified time stamp are obtained from the optical anti-shake component 130 as the first position and attitude data, obtained from the optical anti-shake component 130
  • this embodiment does not specifically limit the calibration manner of the second delay parameter, which can be selected by those skilled in the art according to actual needs.
  • this embodiment adopts the same calibration strategy as that of the first delay parameter (for details, please refer to the relevant description in the above embodiments, which will not be repeated here), and after the calibration of the first delay parameter is completed, the The second delay parameter is calibrated.
  • the motion data includes acceleration data and angular velocity data.
  • An embodiment of the present application also provides an image processing device, which is applied to an electronic device, and the electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component.
  • the image processing device includes:
  • the optical anti-shake module is used to obtain the motion data of the electronic device, and according to the motion data, control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component, and control the image sensor to move in the X-axis direction of the image sensor Perform compensation translation with the Y axis direction, and control the image sensor to perform compensation rotation around the Z axis of the image sensor;
  • the attitude acquisition module is used to acquire the optical image stabilization image corresponding to the motion data collected by the image sensor, and acquire the first position attitude data of the lens, the second position attitude data and the first rotation attitude data of the image sensor from the optical anti-shake component;
  • the attitude correction module is used to restore and correct the attitude of the optical image stabilization image according to the first position attitude data, the second position attitude data and the first rotation attitude data, so as to obtain the corrected image;
  • the electronic anti-shake module is used to perform electronic anti-shake processing on the corrected image through the electronic anti-shake component according to the motion data to obtain an electronic anti-shake image.
  • this embodiment also provides an image processing device 300.
  • the image processing device 300 includes an optical image stabilization module 310, a gesture Acquisition module 320, posture correction module 330 and electronic anti-shake module 340, the image processing device 300 is configured to execute the steps in any image processing method provided in this application, such as:
  • the optical anti-shake module 310 is used to obtain motion data of the electronic device, and according to the motion data, control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component, and control the image sensor to move in the X-axis direction of the image sensor direction and Y-axis direction to perform compensation translation, and control the image sensor to perform compensation rotation around the Z-axis of the image sensor;
  • the attitude acquisition module 320 is configured to acquire the optical image stabilization image corresponding to the motion data collected by the image sensor, and acquire the first position attitude data of the lens, the second position attitude data and the first rotation attitude data of the image sensor from the optical image stabilization component ;
  • a pose correction module 330 configured to restore and correct the pose of the optical image stabilization image according to the first position and pose data, the second position and pose data, and the first rotation pose data, to obtain a corrected image;
  • the electronic anti-shake module 340 is configured to perform electronic anti-shake processing on the corrected image through the electronic anti-shake component according to the motion data to obtain an electronic anti-shake image.
  • the image processing device 300 provided in the embodiment of the present application belongs to the same idea as the image processing method in the above embodiment, and its specific implementation process refers to the above related embodiments, and details are not repeated here.
  • the embodiment of the present application also provides an electronic device, the electronic device includes a lens, an image sensor, an optical anti-shake component, an electronic anti-shake component, a processor and a memory, the memory stores a computer program, and the processor executes the above-mentioned The method mentioned in the examples.
  • the electronic device 100 provided in this application may further include a memory 150 and a processor 160 .
  • a memory 150 may further include a processor 160 .
  • the memory 150 can be used to store computer programs and data.
  • the computer programs stored in the memory 150 include executable codes.
  • a computer program can be divided into various functional modules.
  • the processor 160 is the control center of the electronic device 100. It uses various interfaces and lines to connect various parts of the entire electronic device 100. By running or executing the computer program stored in the memory 150 and calling the data stored in the memory 150, the processor 160 executes Various functions and processing data of the electronic device 100 , so as to control the electronic device 100 as a whole.
  • the processor 160 in the electronic device 100 loads the executable code corresponding to one or more computer programs into the memory 150, and is executed by the processor 160 to execute any image provided by the application. Steps in the processing method, such as:
  • Obtain the motion data of the electronic device 100 and according to the motion data, control the lens 1210 to perform compensation translation in the X-axis direction and the Y-axis direction of the lens 1210 through the optical anti-shake component 130, and control the image sensor 1220 in the X-axis direction and the Y-axis direction of the image sensor 1220.
  • electronic anti-shake processing is performed on the corrected image through the electronic anti-shake component 140 to obtain an electronic anti-shake image.
  • the electronic device 100 provided in the embodiment of the present application is based on the same idea as the image processing method in the above embodiment, and its specific implementation process may refer to the above related embodiments, which will not be repeated here.
  • the embodiment of the present application also provides an electronic device, including a lens, an image sensor, an optical anti-shake component, an electronic anti-shake component, a processor, and a memory. Steps in an image processing method. .
  • the embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any image processing method provided in the embodiment of the present application.
  • the storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.
  • ROM Read Only Memory
  • RAM Random Access Memory
  • magnetic disk or an optical disk and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Adjustment Of Camera Lenses (AREA)

Abstract

The present application provides an image processing method, comprising a lens, an image sensor, an optical image stabilization assembly, and an electronic image stabilization assembly. Optical image stabilization of the lens and the image sensor is implemented by the optical image stabilization assembly to obtain an optically stabilized image; the attitude of the optically stabilized image is restored and corrected according to position and attitude data of the lens as well as position and attitude data and rotation attitude data of the image sensor to obtain a corrected image; and the corrected image is subjected to electronic image stabilization by the electronic image stabilization assembly.

Description

图像处理方法、装置、电子设备及存储介质Image processing method, device, electronic device and storage medium
本申请要求于2021年07月09日提交中国专利局、申请号为202110777734.0、申请名称为“图像处理方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110777734.0 and the application name "image processing method, device, electronic equipment and storage medium" submitted to the China Patent Office on July 09, 2021, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及图像处理技术领域,特别涉及一种图像处理方法、装置、电子设备及存储介质。The present application relates to the technical field of image processing, and in particular to an image processing method, device, electronic equipment and storage medium.
背景技术Background technique
目前,如手机、平板电脑等电子设备通常配置有摄像头,从而为用户提供拍照功能,使得用户能够通过这些电子设备随时随地的记录身边发生的事情,看到的景物等。然而,由于用户通常手持电子设备进行拍摄,而用户手持电子设备会引入不同程度的抖动而影响电子设备拍摄的稳定性,导致拍摄得到的图像的质量较差。At present, electronic devices such as mobile phones and tablet computers are usually equipped with cameras, so as to provide users with a camera function, so that users can record what is happening around them, the scenery they see, etc. anytime and anywhere through these electronic devices. However, because the user usually holds the electronic device for shooting, and the electronic device held by the user will introduce different degrees of shaking and affect the stability of the shooting of the electronic device, resulting in poor quality of the captured image.
发明内容Contents of the invention
本申请实施例提供一种图像处理方法、装置、电子设备及存储介质。Embodiments of the present application provide an image processing method, device, electronic equipment, and storage medium.
第一方面,本申请公开一种图像处理方法,应用于电子设备,所述电子设备包括镜头、图像传感器、光学防抖组件和电子防抖组件,所述图像处理方法包括:In a first aspect, the present application discloses an image processing method applied to an electronic device, the electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component, and the image processing method includes:
获取所述电子设备的运动数据,并根据所述运动数据,通过所述光学防抖组件控制所述镜头在所述镜头的X轴方向和Y轴方向进行补偿平移,控制所述图像传感器在所述图像传感器的X轴方向和Y轴方向进行补偿平移,以及控制所述图像传感器绕所述图像传感器的Z轴进行补偿旋转;Acquire motion data of the electronic device, and according to the motion data, control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component, and control the image sensor in the performing compensation translation in the X-axis direction and the Y-axis direction of the image sensor, and controlling the compensation rotation of the image sensor around the Z-axis of the image sensor;
获取所述图像传感器采集的对应所述运动数据的光学防抖图像,以及从所述光学防抖组件获取所述镜头的第一位置姿态数据、所述图像传感器的第二位置姿态数据和第一旋转姿态数据;Acquiring the optical image stabilization image corresponding to the motion data collected by the image sensor, and acquiring the first position and posture data of the lens, the second position and posture data of the image sensor and the first rotation attitude data;
根据所述第一位置姿态数据、所述第二位置姿态数据以及所述第一旋转姿态数据对所述光学防抖图像的姿态进行还原校正,得到校正图像;Restoring and correcting the posture of the optical image stabilization image according to the first position and posture data, the second position and posture data, and the first rotation posture data to obtain a corrected image;
根据所述运动数据,通过所述电子防抖组件对所述校正图像进行电子防抖处理,得到电子防抖图像。According to the motion data, electronic anti-shake processing is performed on the corrected image through the electronic anti-shake component to obtain an electronic anti-shake image.
第二方面,本申请还公开一种图像处理装置,应用于电子设备,所述电子设备包括镜头、图像传感器、光学防抖组件和电子防抖组件,所述图像处理装置包括:In a second aspect, the present application also discloses an image processing device, which is applied to an electronic device, and the electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component, and the image processing device includes:
光学防抖模块,用于获取所述电子设备的运动数据,并根据所述运动数据,通过所述光学防抖组件控制所述镜头在所述镜头的X轴方向和Y轴方向进行补偿平移,控制所述图像传感器在所述图像传感器的X轴方向和Y轴方向进行补偿平移,以及控制所述图像传感器绕所述图像传感器的Z轴进行补偿旋转;an optical anti-shake module, configured to acquire motion data of the electronic device, and control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component according to the motion data, controlling the image sensor to perform compensation translation in the X-axis direction and the Y-axis direction of the image sensor, and controlling the image sensor to perform compensation rotation around the Z-axis of the image sensor;
姿态获取模块,用于获取所述图像传感器采集的对应所述运动数据的光学防抖图像,以及从所述光学防抖组件获取所述镜头的第一位置姿态数据、所述图像传感器的第二位置姿态数据和第一旋转姿态数据;an attitude acquisition module, configured to acquire the optical image stabilization image corresponding to the movement data collected by the image sensor, and acquire the first position attitude data of the lens, the second position and attitude data of the image sensor from the optical image stabilization component Position attitude data and first rotation attitude data;
姿态校正模块,用于根据所述第一位置姿态数据、所述第二位置姿态数据以及所述第一旋转姿态数据对所述光学防抖图像的姿态进行还原校正,得到校正图像;A pose correction module, configured to restore and correct the pose of the optical image stabilization image according to the first position and pose data, the second position and pose data, and the first rotation pose data, to obtain a corrected image;
电子防抖模块,用于根据所述运动数据,通过所述电子防抖组件对所述校正图像进行电子防抖处理,得到电子防抖图像。The electronic anti-shake module is configured to perform electronic anti-shake processing on the corrected image through the electronic anti-shake component according to the motion data, so as to obtain an electronic anti-shake image.
第三方面,本申请还公开一种电子设备,包括镜头、图像传感器、光学防抖组件、电 子防抖组件、处理器和存储器,存储器存储有计算机程序,处理器通过加载计算机程序执行如本申请提供的图像处理方法中的步骤。In the third aspect, the present application also discloses an electronic device, including a lens, an image sensor, an optical anti-shake component, an electronic anti-shake component, a processor, and a memory. Steps in the provided image processing method.
第四方面,本申请还公开一种存储介质,其上存储有计算机程序,所述计算机程序被处理器加载时执行如本申请提供的图像处理方法中的步骤。In a fourth aspect, the present application also discloses a storage medium on which a computer program is stored, and when the computer program is loaded by a processor, the steps in the image processing method provided in the present application are executed.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings that need to be used in the description of the embodiments.
图1为本申请实施例提供的电子设备的一硬件结构示意图。FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
图2为本申请实施例提供的图像处理方法的一流程示意图。FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
图3为本申请实施例中摄像模组的移动自由度的示例图。FIG. 3 is an example diagram of the degrees of freedom of movement of the camera module in the embodiment of the present application.
图4为本申请实施例中对光学防抖图像进行校正,得到校正图像的示例图。FIG. 4 is an example diagram of correcting an optical image stabilization image in an embodiment of the present application to obtain a corrected image.
图5为本申请实施例提供的预设校准工具的局部示意图。FIG. 5 is a partial schematic diagram of a preset calibration tool provided by an embodiment of the present application.
图6为本申请实施例中提供的矩形校准板的示例图。Fig. 6 is an example diagram of a rectangular calibration plate provided in the embodiment of the present application.
图7为本申请实施例提供的图像处理装置的结构示意图。FIG. 7 is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
图8为本申请实施例提供的电子设备的另一硬件结构示意图。FIG. 8 is a schematic diagram of another hardware structure of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
应当说明的是,本申请中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是某些实施例还包括没有列出的步骤或模块,或某些实施例还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。It should be noted that the terms "first", "second" and "third" in this application are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but some embodiments also include steps or modules that are not listed, or some embodiments Other steps or modules inherent to these processes, methods, products or devices are also included.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
本申请实施例提供一种图像处理方法、图像处理装置、计算机可读的存储介质以及电子设备,其中图像处理方法的执行主体可以是本申请实施例提供的图像处理装置,或者集成了该图像处理装置的电子设备,其中该图像处理装置可以采用硬件或者软件的方式实现。其中,电子设备可以是智能手机、平板电脑、掌上电脑、笔记本电脑等配置有处理器而具有数据处理能力的设备。An embodiment of the present application provides an image processing method, an image processing device, a computer-readable storage medium, and an electronic device, wherein the execution subject of the image processing method may be the image processing device provided in the embodiment of the present application, or integrate the image processing An electronic device of a device, wherein the image processing device may be implemented in a hardware or software manner. Wherein, the electronic device may be a device equipped with a processor and capable of data processing, such as a smart phone, a tablet computer, a palmtop computer, and a notebook computer.
下面将结合附图对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.
本实施例提供一种图像处理方法,应用于电子设备,电子设备包括镜头、图像传感器、光学防抖组件和电子防抖组件,图像处理方法包括:This embodiment provides an image processing method, which is applied to an electronic device. The electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component. The image processing method includes:
获取电子设备的运动数据,并根据运动数据,通过光学防抖组件控制镜头在镜头的X轴方向和Y轴方向进行补偿平移,控制图像传感器在图像传感器的X轴方向和Y轴方向进行补偿平移,以及控制图像传感器绕图像传感器的Z轴进行补偿旋转;Obtain the motion data of the electronic device, and according to the motion data, control the lens to perform compensation translation in the X-axis direction and Y-axis direction of the lens through the optical anti-shake component, and control the image sensor to perform compensation translation in the X-axis direction and Y-axis direction of the image sensor , and controlling the image sensor to perform compensation rotation around the Z axis of the image sensor;
获取图像传感器采集的对应运动数据的光学防抖图像,以及从光学防抖组件获取镜头的第一位置姿态数据、图像传感器的第二位置姿态数据和第一旋转姿态数据;Obtaining the optical image stabilization image corresponding to the motion data collected by the image sensor, and acquiring the first position and attitude data of the lens, the second position and attitude data and the first rotation attitude data of the image sensor from the optical anti-shake component;
根据第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据对光学防抖图像的姿态进行还原校正,得到校正图像;Restoring and correcting the posture of the optical image stabilization image according to the first position and posture data, the second position and posture data and the first rotation posture data to obtain a corrected image;
根据运动数据,通过电子防抖组件对校正图像进行电子防抖处理,得到电子防抖图像。According to the motion data, electronic anti-shake processing is performed on the corrected image through the electronic anti-shake component to obtain an electronic anti-shake image.
在一些实施例中,根据第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据对光学防抖图像的姿态进行还原校正,得到校正图像,包括:In some embodiments, the posture of the optical image stabilization image is restored and corrected according to the first position and posture data, the second position and posture data, and the first rotation posture data to obtain a corrected image, including:
根据第一位置姿态数据和第二位置姿态数据,获取用于对光学防抖图像进行平移校正的第一校正平移向量;According to the first position and attitude data and the second position and attitude data, a first correction translation vector for performing translation correction on the optical image stabilization image is obtained;
根据第一旋转姿态数据,获取用于对光学防抖图像进行旋转校正的第一校正旋转矩阵;Acquiring a first correction rotation matrix for performing rotation correction on the optical image stabilization image according to the first rotation attitude data;
根据第一校正平移向量和第一校正旋转矩阵分别对光学防抖图像的姿态进行平移校正和旋转校正,得到校正图像。According to the first correction translation vector and the first correction rotation matrix, translation correction and rotation correction are respectively performed on the pose of the optical image stabilization image to obtain a correction image.
在一些实施例中,根据第一位置姿态数据和第二位置姿态数据,获取用于对光学防抖图像进行平移校正的第一校正平移向量,包括:In some embodiments, according to the first position and attitude data and the second position and attitude data, obtaining a first correction translation vector for translation correction of the optical image stabilization image includes:
根据位置姿态数据和平移向量的第一函数关系,获取对应第一位置姿态数据的第一平移向量;Acquiring a first translation vector corresponding to the first position and attitude data according to the first functional relationship between the position and attitude data and the translation vector;
根据位置姿态数据和平移向量的第二函数关系,获取对应第二位置姿态数据的第二平移向量;Acquiring a second translation vector corresponding to the second position and attitude data according to the second functional relationship between the position and attitude data and the translation vector;
根据第一平移向量、第一平移向量对应的第一融合参数、第二平移向量及其对应的第二融合参数,融合得到第一平移向量和第二平移向量的融合平移向量;According to the first translation vector, the first fusion parameter corresponding to the first translation vector, the second translation vector and its corresponding second fusion parameter, fused to obtain a fusion translation vector of the first translation vector and the second translation vector;
将融合平移向量作为第一校正平移向量。The fused translation vector is used as the first corrected translation vector.
在一些实施例中,将电子设备固定于预设校准工具,使得电子设备与预设校准工具中的矩形校准板的位置相对固定,矩形校准板包括中心标记,第一函数关系按照如下步骤预先生成:In some embodiments, the electronic device is fixed to the preset calibration tool, so that the position of the electronic device and the rectangular calibration plate in the preset calibration tool is relatively fixed, the rectangular calibration plate includes a center mark, and the first functional relationship is pre-generated according to the following steps :
开启光学防抖组件的镜头平移防抖功能,并关闭图像传感器平移防抖功能和图像传感器旋转防抖功能;Turn on the lens translation anti-shake function of the optical image stabilization component, and turn off the image sensor translation anti-shake function and the image sensor rotation anti-shake function;
发送第一平移控制指令至预设校准工具,使得预设校准工具驱动电子设备在电子设备的X轴方向和Y轴方向平移;sending the first translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to translate in the X-axis direction and the Y-axis direction of the electronic device;
在电子设备的平移过程中,通过光学防抖组件进行光学防抖处理,并获取图像传感器在平移过程中采集的矩形校准板的第一图像序列;During the translation process of the electronic device, optical anti-shake processing is performed through the optical anti-shake component, and the first image sequence of the rectangular calibration plate collected by the image sensor during the translation process is obtained;
从光学防抖组件获取镜头对应第一图像序列中每一第一图像的第三位置姿态数据,以及获取中心标记在每一第一图像中的第一位置坐标;Acquiring the third position and attitude data of the lens corresponding to each first image in the first image sequence from the optical anti-shake component, and acquiring the first position coordinates of the center mark in each first image;
根据每一第一图像对应的第三位置姿态数据和第一位置坐标,拟合得到第一函数关系。According to the third position and posture data corresponding to each first image and the first position coordinates, the first functional relationship is obtained by fitting.
在一些实施例中,将电子设备固定于预设校准工具,使得电子设备与预设校准工具中的矩形校准板的位置相对固定,矩形校准板包括中心标记,第二函数关系按照如下步骤预先生成:In some embodiments, the electronic device is fixed to the preset calibration tool, so that the position of the electronic device and the rectangular calibration plate in the preset calibration tool is relatively fixed, the rectangular calibration plate includes a center mark, and the second functional relationship is pre-generated according to the following steps :
开启光学防抖组件的图像传感器平移防抖功能,并关闭镜头平移防抖功能和图像传感器旋转防抖功能;Turn on the image sensor translation anti-shake function of the optical image stabilization component, and turn off the lens translation anti-shake function and the image sensor rotation anti-shake function;
发送第二平移控制指令至预设校准工具,使得预设校准工具驱动电子设备在电子设备的X轴方向和Y轴方向平移;sending the second translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to translate in the X-axis direction and the Y-axis direction of the electronic device;
在电子设备的平移过程中,通过光学防抖组件进行光学防抖处理,并获取图像传感器在平移过程中采集的矩形校准板的第二图像序列;During the translation process of the electronic device, optical anti-shake processing is performed through the optical anti-shake component, and a second image sequence of the rectangular calibration plate collected by the image sensor during the translation process is acquired;
从光学防抖组件获取图像传感器采集第二图像序列中每一第二图像时的第四位置姿态数据,以及获取中心标记在每一第二图像中的第二位置坐标;Obtaining the fourth position and posture data when the image sensor captures each second image in the second image sequence from the optical anti-shake component, and acquiring the second position coordinates of the center mark in each second image;
根据每一第二图像对应的第四位置姿态数据和第二位置坐标,拟合得到第二函数关系。According to the fourth position and posture data corresponding to each second image and the second position coordinates, a second functional relationship is obtained by fitting.
在一些实施例中,将电子设备固定于预设校准工具,使得电子设备与预设校准工具中的矩形校准板的位置相对固定,矩形校准板包括中心标记,第一融合参数和第二融合参数按照如下步骤预先确定:In some embodiments, the electronic device is fixed to the preset calibration tool, so that the position of the electronic device and the rectangular calibration plate in the preset calibration tool is relatively fixed, the rectangular calibration plate includes a center mark, a first fusion parameter and a second fusion parameter Follow the steps below to pre-determine:
开启光学防抖组件的镜头平移防抖功能和图像传感器平移防抖功能,并关闭图像传感器旋转防抖功能;Turn on the lens pan anti-shake function and the image sensor pan anti-shake function of the optical image stabilization component, and turn off the image sensor rotation anti-shake function;
发送第三平移控制指令至预设校准工具,使得预设校准工具驱动电子设备在电子设备的X轴方向和Y轴方向平移;sending the third translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to translate in the X-axis direction and the Y-axis direction of the electronic device;
在电子设备的平移过程中,通过光学防抖组件进行光学防抖处理,并获取图像传感器在平移过程中采集的矩形校准板的第三图像序列;During the translation process of the electronic device, optical anti-shake processing is performed through the optical anti-shake component, and a third image sequence of the rectangular calibration plate collected by the image sensor during the translation process is acquired;
从光学防抖组件获取镜头对应第三图像序列中每一第三图像的第五位置姿态数据,以及从光学防抖组件获取图像传感器采集第三图像序列中每一第三图像时的第六位置姿态数据;Acquire the fifth position and attitude data of the lens corresponding to each third image in the third image sequence from the optical anti-shake component, and obtain the sixth position when the image sensor captures each third image in the third image sequence from the optical anti-shake component attitude data;
根据第一函数关系,获取对应每一第五位置姿态数据的第三平移向量,以及根据第二函数关系,获取对应每一第六位置姿态数据的第四平移向量;Obtaining a third translation vector corresponding to each fifth position and attitude data according to the first functional relationship, and obtaining a fourth translation vector corresponding to each sixth position and attitude data according to the second functional relationship;
获取中心标记在每一第三图像中的第三位置坐标,并根据每一第三图像对应的第三位置坐标、第三平移向量以及第四平移向量,确定第一融合参数和第二融合参数。Obtain the third position coordinates of the center mark in each third image, and determine the first fusion parameter and the second fusion parameter according to the third position coordinates, the third translation vector and the fourth translation vector corresponding to each third image .
在一些实施例中,根据第一旋转姿态数据,获取用于对光学防抖图像进行旋转校正的第一校正旋转矩阵,包括:In some embodiments, according to the first rotation pose data, obtaining a first correction rotation matrix for performing rotation correction on the optical image stabilization image includes:
根据旋转姿态数据和旋转角度的第三函数关系,获取对应第一旋转姿态数据的旋转角度;According to the third functional relationship between the rotation attitude data and the rotation angle, the rotation angle corresponding to the first rotation attitude data is obtained;
获取光学防抖图像的旋转中心坐标,并根据旋转中心坐标和旋转角度获取第一校正旋转矩阵。Obtain the rotation center coordinates of the optical image stabilization image, and obtain a first correction rotation matrix according to the rotation center coordinates and the rotation angle.
在一些实施例中,根据旋转中心坐标和旋转角度获取第一校正旋转矩阵,包括:In some embodiments, obtaining the first corrected rotation matrix according to the coordinates of the rotation center and the rotation angle includes:
根据旋转中心坐标和旋转角度,按照如下公式获取第一校正旋转矩阵:According to the coordinates of the rotation center and the rotation angle, the first correction rotation matrix is obtained according to the following formula:
Figure PCTCN2022092755-appb-000001
Figure PCTCN2022092755-appb-000001
其中,R表示第一校正旋转矩阵,C表示cos(γ),γ表示旋转角度,S表示sin(γ),Cx表示旋转中心坐标中的横坐标,Cy表示旋转中心坐标中的纵坐标。Wherein, R represents the first correction rotation matrix, C represents cos(γ), γ represents the rotation angle, S represents sin(γ), Cx represents the abscissa in the rotation center coordinates, and Cy represents the ordinate in the rotation center coordinates.
在一些实施例中,将电子设备固定于预设校准工具,使得电子设备与预设校准工具中的矩形校准板的位置相对固定,矩形校准板包括四角标记,旋转中心坐标和第三函数关系按照如下步骤生成:In some embodiments, the electronic device is fixed to the preset calibration tool, so that the position of the electronic device and the rectangular calibration plate in the preset calibration tool is relatively fixed, the rectangular calibration plate includes four corner marks, and the coordinates of the rotation center and the third functional relationship are according to Generated as follows:
开启光学防抖组件的图像传感器旋转防抖功能,并关闭镜头平移防抖功能和图像传感器平移防抖功能;Turn on the image sensor rotation anti-shake function of the optical image stabilization component, and turn off the lens translation anti-shake function and the image sensor translation anti-shake function;
发送旋转控制指令至预设校准工具,使得预设校准工具驱动电子设备绕图像传感器的Z轴旋转;sending a rotation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to rotate around the Z axis of the image sensor;
在电子设备的旋转过程中,通过光学防抖组件进行光学防抖处理,并获取图像传感器在旋转过程中采集的矩形校准板的第四图像序列;During the rotation process of the electronic device, optical anti-shake processing is performed through the optical anti-shake component, and a fourth image sequence of the rectangular calibration plate collected by the image sensor during the rotation process is acquired;
从光学防抖组件获取图像传感器采集第四图像序列中每一第四图像时的第二旋转姿态数据,以及获取四角标记在每一第四图像中的第四位置坐标;Obtaining the second rotation attitude data when the image sensor captures each fourth image in the fourth image sequence from the optical anti-shake component, and obtaining the fourth position coordinates of the four corner marks in each fourth image;
根据每一第四图像对应的第二旋转姿态数据和第四位置坐标,拟合得到旋转中心坐标和第三函数关系。According to the second rotation attitude data and the fourth position coordinates corresponding to each fourth image, the coordinates of the rotation center and the third functional relationship are obtained by fitting.
在一些实施例中,第三函数关系包括多项式函数,根据每一第四图像对应的第二旋转姿态数据和第四位置坐标,拟合得到旋转中心坐标和第三函数关系,包括:In some embodiments, the third functional relationship includes a polynomial function, and according to the second rotation attitude data and the fourth position coordinates corresponding to each fourth image, the coordinates of the rotation center and the third functional relationship are obtained by fitting, including:
根据每一第四图像对应的第二旋转姿态数据和第四位置坐标,按照如下公式拟合得到 旋转中心坐标和第三函数关系:According to the second rotation attitude data and the fourth position coordinates corresponding to each fourth image, the relationship between the rotation center coordinates and the third function is obtained by fitting according to the following formula:
Figure PCTCN2022092755-appb-000002
Figure PCTCN2022092755-appb-000002
θ=[Cx,Cy,α];θ = [Cx, Cy, α];
Figure PCTCN2022092755-appb-000003
Figure PCTCN2022092755-appb-000003
其中,P i表示第i个四角标记的第四位置坐标,h 2'表示第二旋转姿态数据,f()表示多项式函数,r表示预设搜索半径,α表示多项式函数的多项式系数,imW表示第四图像的宽,imH表示第四图像的高。 Among them, P i represents the fourth position coordinates of the i-th four-corner mark, h 2 ' represents the second rotation attitude data, f() represents a polynomial function, r represents a preset search radius, α represents the polynomial coefficient of the polynomial function, and imW represents The width of the fourth image, imH represents the height of the fourth image.
在一些实施例中,还包括:In some embodiments, also include:
开启光学防抖组件的镜头平移防抖功能、图像传感器平移防抖功能以及图像传感器旋转防抖功能;Turn on the lens pan anti-shake function, the image sensor pan anti-shake function and the image sensor rotation anti-shake function of the optical image stabilization component;
发送旋转平移控制指令至预设校准工具,使得预设校准工具驱动电子设备绕图像传感器的Z轴旋转,以及驱动电子设备在电子设备的X轴方向和Y轴方向平移;sending a rotation and translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to rotate around the Z-axis of the image sensor, and drives the electronic device to translate in the X-axis direction and the Y-axis direction of the electronic device;
在电子设备的旋转平移过程中,通过光学防抖组件进行光学防抖处理,并获取图像传感器在旋转平移过程中采集的矩形校准板的第五图像序列;During the rotation and translation process of the electronic device, optical anti-shake processing is performed through the optical anti-shake component, and the fifth image sequence of the rectangular calibration plate collected by the image sensor during the rotation and translation process is acquired;
从光学防抖组件获取镜头对应第五图像序列中每一第五图像的第七位置姿态数据、图像传感器采集每一第五图像时的第八位置姿态数据和第三旋转姿态数据;Obtaining the seventh position and attitude data of the lens corresponding to each fifth image in the fifth image sequence, the eighth position and attitude data and the third rotation attitude data when the image sensor collects each fifth image from the optical anti-shake component;
根据每一第五图像对应的第七位置姿态数据、第八位置姿态数据以及第一函数关系、第二函数关系,获取用于对每一第五图像进行平移校正的第二校正平移向量;According to the seventh position and attitude data, the eighth position and attitude data and the first functional relationship and the second functional relationship corresponding to each fifth image, a second correction translation vector for translation correction of each fifth image is obtained;
根据每一第五图像对应的第三旋转姿态数据、第三函数关系以及旋转中心坐标,获取用于对每一第五图像进行旋转校正的第二校正旋转矩阵;Obtaining a second correction rotation matrix for performing rotation correction on each fifth image according to the third rotation posture data corresponding to each fifth image, the third functional relationship, and the coordinates of the rotation center;
根据第二校正平移向量和第二校正旋转矩阵分别对每一第五图像的中心像素进行平移校正和旋转校正,得到每一中心像素的校正坐标;respectively performing translation correction and rotation correction on the center pixel of each fifth image according to the second correction translation vector and the second correction rotation matrix, to obtain the correction coordinates of each center pixel;
获取中心标记在每一第五图像中的第五位置坐标,并根据每一第五图像对应的校正坐标和第五位置坐标的差异,对第一函数关系、第二函数关系以及第三函数关系进行联合修正。Acquiring the fifth position coordinates of the center mark in each fifth image, and according to the difference between the correction coordinates corresponding to each fifth image and the fifth position coordinates, the first functional relationship, the second functional relationship and the third functional relationship Make joint corrections.
在一些实施例中,获取图像传感器采集的对应运动数据的光学防抖图像,包括:In some embodiments, acquiring an optical image stabilization image corresponding to motion data collected by an image sensor includes:
根据对应运动数据的第一时延参数,对运动数据的第一获取时间戳进行修正,得到第一修正时间戳;Correcting the first acquired time stamp of the motion data according to the first time delay parameter corresponding to the motion data to obtain the first corrected time stamp;
按照第一修正时间戳,获取图像传感器采集的对应运动数据的光学防抖图像。According to the first corrected time stamp, the optical image stabilization image corresponding to the motion data collected by the image sensor is acquired.
在一些实施例中,第一时延参数按照如下步骤预先生成:In some embodiments, the first delay parameter is pre-generated according to the following steps:
获取样本抖动图像序列;Get a sequence of sample dithered images;
按照样本抖动图像序列中每一样本抖动图像的第二获取时间戳,获取对应每一样本抖动图像的样本运动数据,得到样本运动数据序列;Acquiring sample motion data corresponding to each sample shake image according to the second acquisition time stamp of each sample shake image in the sample shake image sequence to obtain a sample motion data sequence;
根据预设时延参数、预设搜索步长、样本抖动图像序列及其对应的样本运动数据序列,搜索得到第一时延参数。According to the preset time delay parameter, the preset search step size, the sample shaking image sequence and the corresponding sample motion data sequence, the first time delay parameter is obtained by searching.
在一些实施例中,根据预设时延参数、预设搜索步长、样本抖动图像序列及其对应的样本运动数据序列,搜索得到第一时延参数,包括In some embodiments, according to the preset time delay parameter, the preset search step size, the sample shaking image sequence and its corresponding sample motion data sequence, the first time delay parameter is obtained by searching, including
根据预设时延参数和预设搜索步长获取预设数量的候选时延参数;Acquiring a preset number of candidate delay parameters according to a preset delay parameter and a preset search step;
根据每一候选时延参数分别对样本运动数据序列进行修正,得到预设数量的修正样本运动数据序列;Correcting the sample motion data sequence according to each candidate delay parameter to obtain a preset number of corrected sample motion data sequences;
根据每一修正样本运动数据序列,通过电子防抖组件对样本抖动图像序列进行电子防抖处理,得到预设数量的防抖图像序列;According to each corrected sample motion data sequence, electronic anti-shake processing is performed on the sample shake image sequence through the electronic anti-shake component to obtain a preset number of anti-shake image sequences;
对每一防抖图像序列的防抖质量进行量化评分,得到每一防抖图像序列的防抖质量评分;Quantify and score the anti-shake quality of each anti-shake image sequence to obtain the anti-shake quality score of each anti-shake image sequence;
将预设时延参数更新为防抖质量评分最高的防抖图像序列所对应的候选时延参数,以及根据预设更新参数对预设搜索步长进行更新;Updating the preset delay parameter to the candidate delay parameter corresponding to the anti-shake image sequence with the highest anti-shake quality score, and updating the preset search step according to the preset update parameter;
重复以上步骤,直至满足预设搜索条件,将满足预设搜索条件时的预设时延参数作为第一时延参数。The above steps are repeated until the preset search condition is met, and the preset delay parameter when the preset search condition is met is used as the first delay parameter.
在一些实施例中,预设搜索条件包括:In some embodiments, the preset search conditions include:
任一防抖图像序列的防抖质量评分大于或等于评分阈值;或者The stabilization quality score of any stabilized image sequence is greater than or equal to the scoring threshold; or
更新后的预设搜索步长小于步长阈值。The updated preset search step size is smaller than the step size threshold.
在一些实施例中,从光学防抖组件获取镜头的第一位置姿态数据、图像传感器的第二位置姿态数据和第一旋转姿态数据,包括:In some embodiments, acquiring the first position and posture data of the lens, the second position and posture data and the first rotation posture data of the image sensor from the optical anti-shake component includes:
根据对应光学防抖组件的第二时延参数对第一修正时间戳进行修正,得到第二修正时间戳;Correcting the first modified time stamp according to the second delay parameter corresponding to the optical anti-shake component to obtain a second modified time stamp;
按照第二修正时间戳,从光学防抖组件获取镜头的第一位置姿态数据、图像传感器的第二位置姿态数据和第一旋转姿态数据。According to the second modified time stamp, the first position and posture data of the lens, the second position and posture data and the first rotation posture data of the image sensor are acquired from the optical anti-shake component.
在一些实施例中,运动数据包括加速度数据和角速度数据。In some embodiments, the motion data includes acceleration data and angular velocity data.
请参照图1,示出了电子设备100的一硬件结构示意图,如图1所示,该电子设备100包括运动传感器110、摄像模组120、光学防抖组件130以及电子防抖组件140。此处对运动传感器110、摄像模组120、光学防抖组件130以及电子防抖组件140在电子设备的设置位置不作具体限制,可由本领域技术人员根据实际需要进行设置。另外,本领域技术人员可以理解的是,图1中示出的结构并不构成对电子设备100的限定,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置等。Please refer to FIG. 1 , which shows a schematic diagram of a hardware structure of an electronic device 100 . As shown in FIG. 1 , the electronic device 100 includes a motion sensor 110 , a camera module 120 , an optical anti-shake component 130 and an electronic anti-shake component 140 . Here, there is no specific limitation on the installation positions of the motion sensor 110, the camera module 120, the optical anti-shake component 130 and the electronic anti-shake component 140 in the electronic device, which can be set by those skilled in the art according to actual needs. In addition, those skilled in the art can understand that the structure shown in FIG. 1 does not constitute a limitation on the electronic device 100, and the electronic device 100 may include more or less components than those shown in the illustration, or combine certain components, Or a different arrangement of components, etc.
其中,运动传感器110被配置为对电子设备100的运动状态进行实时感应,相应得到用于描述电子设备100的运动状态的运动数据。此处对运动传感器110的类型以及数量不作具体限制,可由本领域技术人员根据实际需要进行设置。示例性地,运动传感器110可以仅感应电子设备100在单一维度的运动状态,相应得到单一维度的运动数据(比如,运动传感器110可以仅感应得到电子设备100的加速度),也可以感应电子设备100在多维度的运动状态,相应得到多维度的运动数据(比如,运动传感器110可以感应得到电子设备100的加速度和角速度)。应当说明的是,以运动传感器110与电子设备100本体刚性连接为约束,可以将运动传感器110设置在电子设备100的任意位置。Wherein, the motion sensor 110 is configured to sense the motion state of the electronic device 100 in real time, and correspondingly obtain motion data used to describe the motion state of the electronic device 100 . The type and quantity of the motion sensors 110 are not specifically limited here, and can be set by those skilled in the art according to actual needs. Exemplarily, the motion sensor 110 can only sense the motion state of the electronic device 100 in a single dimension, and correspondingly obtain motion data in a single dimension (for example, the motion sensor 110 can only sense the acceleration of the electronic device 100), or can sense the electronic device 100 In the multi-dimensional motion state, correspondingly obtain multi-dimensional motion data (for example, the motion sensor 110 can sense the acceleration and angular velocity of the electronic device 100 ). It should be noted that the motion sensor 110 can be arranged at any position of the electronic device 100 as constrained by the rigid connection between the motion sensor 110 and the body of the electronic device 100 .
摄像模组120被配置为采集图像,至少包括镜头1210和图像传感器1220,其中镜头1210用于将外界的光信号投射至图像传感器1220,图像传感器1220用于将镜头1210投射的光信号进行光电转换,将光信号转换为可用的电信号,得到数字化的的图像。此处对镜头1210和图像传感器1220的设置方式不作具体限制,比如,镜头1210和图像传感器1220可以平行设置,也可以非平行设置。The camera module 120 is configured to collect images, including at least a lens 1210 and an image sensor 1220, wherein the lens 1210 is used to project external light signals to the image sensor 1220, and the image sensor 1220 is used to perform photoelectric conversion on the light signals projected by the lens 1210 , convert the optical signal into a usable electrical signal, and obtain a digitized image. Here, there is no specific limitation on how the lens 1210 and the image sensor 1220 are arranged. For example, the lens 1210 and the image sensor 1220 may be arranged in parallel or non-parallel.
摄像模组120被使能之后,可以实时地对拍摄场景进行拍摄。拍摄场景可以理解为摄像模组120在使能后所对准的现实区域,即摄像模组120能够将光信号转换为对应图像的区域。比如,电子设备100在根据用户操作使能摄像模组120之后,若用户控制电子设备100的摄像模组120对准一包括某对象的区域,则包括该对象的区域即为摄像模组120的拍摄场 景。其中,摄像模组120被配置为可相对于电子设备100移动,即摄像模组120相对于电子设备100具备一定的移动自由度(可以是镜头1210和图像传感器1220均具备移动自由度,也可以是镜头1210和图像传感器1220二者之一具备移动自由度),以此,当电子设备100发生运动时,可驱动摄像模组120进行补偿移动,以尽可能抵消电子设备100的运动,使得成像光路稳定。After the camera module 120 is enabled, it can shoot the shooting scene in real time. The shooting scene can be understood as the real area where the camera module 120 is aimed after being enabled, that is, the area where the camera module 120 can convert light signals into corresponding images. For example, after the electronic device 100 enables the camera module 120 according to the user operation, if the user controls the camera module 120 of the electronic device 100 to aim at an area including a certain object, then the area including the object is the area of the camera module 120. Shoot the scene. Wherein, the camera module 120 is configured to be movable relative to the electronic device 100, that is, the camera module 120 has a certain degree of freedom of movement relative to the electronic device 100 (the lens 1210 and the image sensor 1220 both have a degree of freedom of movement, or One of the lens 1210 and the image sensor 1220 has a degree of freedom of movement), so that when the electronic device 100 moves, the camera module 120 can be driven to perform compensatory movement, so as to offset the movement of the electronic device 100 as much as possible, so that the imaging The light path is stable.
应当说明的是,本实施例对摄像模组120在电子设备100的设置位置不作具体限制,可由本领域技术人员根据实际需要进行配置。以手机为例,可以在手机屏幕所在的一面设置摄像模组120,也可以在手机屏幕相对的一面设置摄像模组120,还可以同时在手机屏幕的所在面以及相对面均设置摄像模组120。It should be noted that this embodiment does not specifically limit the installation position of the camera module 120 in the electronic device 100 , and can be configured by those skilled in the art according to actual needs. Taking a mobile phone as an example, the camera module 120 can be installed on the side where the screen of the mobile phone is located, or the camera module 120 can be installed on the opposite side of the screen of the mobile phone, and the camera module 120 can also be installed on both the side where the screen of the mobile phone is located and the opposite surface. .
光学防抖组件130被配置为根据电子设备的运动对摄像模组120进行光学防抖处理。比如,当镜头1210具备在其X轴方向和Y轴方向的平移自由度时,光学防抖组件可以根据电子设备100的运动,相应控制镜头1210在其X轴方向和Y轴方向进行补偿平移,以抵消电子设备100的运动,使得摄像模组120的成像光路稳定。The optical anti-shake component 130 is configured to perform optical anti-shake processing on the camera module 120 according to the movement of the electronic device. For example, when the lens 1210 has a translation degree of freedom in its X-axis direction and Y-axis direction, the optical anti-shake component can control the lens 1210 to perform compensation translation in its X-axis direction and Y-axis direction according to the movement of the electronic device 100 . To counteract the movement of the electronic device 100, so that the imaging optical path of the camera module 120 is stabilized.
电子防抖组件140被配置为通过电子防抖的方式对图像进行防抖,电子防抖是一种演算法运算,比如通过图像对应的运动数据,计算出该图像与其它图像间的运动情况,以及该图像内部的运动情况,并根据运动情况对齐图像后进行适当的裁剪、拉伸和变形等处理后,得到相对稳定的图像。The electronic anti-shake component 140 is configured to stabilize the image through electronic anti-shake. Electronic anti-shake is an algorithm operation, such as calculating the motion between the image and other images through the motion data corresponding to the image. And the movement inside the image, and after aligning the image according to the movement and performing appropriate cropping, stretching and deformation processing, a relatively stable image is obtained.
请参照图2,图2为本申请实施例提供的图像处理方法的流程示意图。该图像处理方法应用于图1所示的电子设备100,该电子设备100包括镜头1210、图像传感器1220、光学防抖组件130和电子防抖组件140,如图2所示,本申请实施例提供的图像处理方法的流程可以如下:Please refer to FIG. 2 , which is a schematic flowchart of an image processing method provided by an embodiment of the present application. The image processing method is applied to the electronic device 100 shown in FIG. 1. The electronic device 100 includes a lens 1210, an image sensor 1220, an optical anti-shake component 130, and an electronic anti-shake component 140. As shown in FIG. 2, the embodiment of the present application provides The flow of the image processing method can be as follows:
在210中,获取电子设备100的运动数据,并根据运动数据,通过光学防抖组件130控制镜头1210在镜头1210的X轴方向和Y轴方向进行补偿平移,控制图像传感器1220在图像传感器1220的X轴方向和Y轴方向进行补偿平移,以及控制图像传感器1220绕图像传感器1220的Z轴进行补偿旋转。In 210, the motion data of the electronic device 100 is obtained, and according to the motion data, the optical image stabilization component 130 controls the lens 1210 to perform compensation translation in the X-axis direction and the Y-axis direction of the lens 1210, and controls the image sensor 1220 to move in the direction of the image sensor 1220. The compensation translation is performed in the X-axis direction and the Y-axis direction, and the compensation rotation of the image sensor 1220 is controlled around the Z-axis of the image sensor 1220 .
请参照图3,本实施例中,摄像模组120具备5维移动自由度,其中包括镜头1210在其X轴方向和Y轴方向的2维平移自由度,图像传感器1220在其X轴方向和Y轴方向的2维平移自由度,以及图像传感器1220在其Z轴的1维旋转自由度。相应的,光学防抖组件130被配置为在前述5维移动自由度的光学防抖。应当说明的是,本实施例中对于电子设备100、镜头1210以及图像传感器1220三者的结构布局并不限定,可由本领域技术人员根据实际需要进行配置,比如可以配置电子设备100、镜头1210以及图像传感器1220三者的X轴两两平行、Y轴两两平行、Z轴两两平行。Please refer to FIG. 3 , in this embodiment, the camera module 120 has 5-dimensional freedom of movement, including the 2-dimensional translation freedom of the lens 1210 in its X-axis direction and Y-axis direction, and the image sensor 1220 in its X-axis direction and Y-axis direction. A 2-dimensional translational degree of freedom in the Y-axis direction, and a 1-dimensional rotational degree of freedom for the image sensor 1220 in its Z-axis. Correspondingly, the optical anti-shake component 130 is configured as an optical anti-shake in the aforementioned 5-dimensional freedom of movement. It should be noted that in this embodiment, the structural layout of the electronic device 100, the lens 1210 and the image sensor 1220 is not limited, and can be configured by those skilled in the art according to actual needs, for example, the electronic device 100, the lens 1210 and the The X axes of the three image sensors 1220 are parallel to each other, the Y axes are parallel to each other, and the Z axes are parallel to each other.
基于以上光学防抖组件130,本实施例中,首先通过电子设备100设置的运动传感器110获取电子设备100的运动数据。此处对运动传感器110的类型以及数量不作具体限制,可由本领域技术人员根据实际需要进行设置。比如,可以通过三轴加速度传感器获取电子设备100的三轴加速度,还可以通过三轴陀螺仪获取电子设备100的三轴角速度等。Based on the above optical anti-shake component 130 , in this embodiment, firstly, motion data of the electronic device 100 is acquired through the motion sensor 110 provided on the electronic device 100 . The type and quantity of the motion sensors 110 are not specifically limited here, and can be set by those skilled in the art according to actual needs. For example, the three-axis acceleration of the electronic device 100 may be obtained through a three-axis acceleration sensor, and the three-axis angular velocity of the electronic device 100 may also be obtained through a three-axis gyroscope.
如上,在获取到电子设备100的运动数据之后,将电子设备100的运动数据输入光学防抖组件130,由光学防抖组件130根据电子设备100的运动数据驱动镜头1210和图像传感器1220进行光学防抖。其中,根据电子设备100的运动数据,光学防抖组件130控制镜头1210在镜头1210的X轴方向和Y轴方向进行补偿平移,控制图像传感器1220在图像传感器1220的X轴方向和Y轴方向进行补偿平移,以及控制图像传感器1220绕图像传感器1220的Z轴进行补偿旋转,以此来抵消电子设备100的运动,使得成像光路稳定。As above, after the motion data of the electronic device 100 is acquired, the motion data of the electronic device 100 is input to the optical image stabilization component 130, and the optical image stabilization component 130 drives the lens 1210 and the image sensor 1220 according to the motion data of the electronic device 100 to perform optical image stabilization. shake. Among them, according to the motion data of the electronic device 100, the optical anti-shake component 130 controls the lens 1210 to perform compensation translation in the X-axis direction and the Y-axis direction of the lens 1210, and controls the image sensor 1220 to perform compensation translation in the X-axis direction and the Y-axis direction of the image sensor 1220. The translation is compensated, and the image sensor 1220 is controlled to perform compensation rotation around the Z-axis of the image sensor 1220 , so as to offset the movement of the electronic device 100 and stabilize the imaging optical path.
应当说明的是,根据实际获取的电子设备100的运动数据,镜头1210可以被光学防抖组件130控制而同时在其X轴方向和Y轴方向产生实际位移(比如,镜头1210在其X轴方向和 Y轴方向产生相同大小的位移,则镜头1210产生的位移可以看做是沿45度方向的位移),也可以被光学防抖组件130控制而仅在X轴方向和Y轴方向之一产生实际位移(比如镜头1210仅在X轴方向产生实际位移,或者仅在其Y轴方向产生实际位移),同样的,图像传感器1220可以被光学防抖组件130控制而同时在其X轴方向和Y轴方向产生实际位移,也可以被光学防抖组件130控制而仅在其X轴方向和Y轴方向之一产生实际位移,此外,图像传感器1220被光学防抖组件130控制而绕其Z轴旋转的角度可以为零(即图像传感器1220未绕其Z轴发生实际旋转),也可以不为零(即图像传感器1220绕其Z轴发生实际旋转)。It should be noted that, according to the actually acquired motion data of the electronic device 100, the lens 1210 can be controlled by the optical anti-shake component 130 to produce actual displacement in its X-axis direction and Y-axis direction at the same time (for example, the lens 1210 in its X-axis direction and Y-axis direction produce the same magnitude of displacement, then the displacement produced by the lens 1210 can be regarded as a displacement along the 45-degree direction), and can also be controlled by the optical anti-shake component 130 to only occur in one of the X-axis direction and the Y-axis direction Actual displacement (such as lens 1210 only produces actual displacement in the X-axis direction, or only produces actual displacement in its Y-axis direction), similarly, the image sensor 1220 can be controlled by the optical anti-shake component 130 while simultaneously in its X-axis direction and Y-axis direction Axis direction produces actual displacement, also can be controlled by optical anti-shake assembly 130 and only produce actual displacement in one of its X-axis direction and Y-axis direction, in addition, image sensor 1220 is controlled by optical anti-shake assembly 130 and rotates around its Z-axis The angle of can be zero (ie, the image sensor 1220 is not actually rotated around its Z-axis), or non-zero (ie, the image sensor 1220 is actually rotated around its Z-axis).
在220中,获取图像传感器1220采集的对应运动数据的光学防抖图像,以及从光学防抖组件130获取镜头1210的第一位置姿态数据、图像传感器1220的第二位置姿态数据和第一旋转姿态数据。In 220, obtain the optical image stabilization image corresponding to the motion data collected by the image sensor 1220, and obtain the first position and posture data of the lens 1210, the second position and posture data and the first rotation posture of the image sensor 1220 from the optical stabilization component 130 data.
根据以上相关描述可知,本申请通过光学防抖组件130控制镜头1210和图像传感器1220进行光学防抖,使得图像传感器1220的成像光路稳定,相应的,本实施例在镜头1210完成补偿平移且图像传感器1220完成补偿平移和补偿旋转时,获取此时图像传感器1220采集的图像,记为对应前述运动数据的光学防抖图像。According to the above related descriptions, it can be seen that the present application controls the lens 1210 and the image sensor 1220 through the optical anti-shake component 130 to perform optical anti-shake, so that the imaging optical path of the image sensor 1220 is stabilized. 1220 When the translation compensation and rotation compensation are completed, the image captured by the image sensor 1220 at this time is obtained, and recorded as the optical image stabilization image corresponding to the aforementioned motion data.
应当说明的是,光学防抖组件130中还设置有用于实时感应镜头1210的位置姿态的第一位置姿态传感器,用于实时感应图像传感器1220的位置姿态的第二位置姿态传感器,以及用于实时感应图像传感器1220的旋转姿态的旋转姿态传感器。此处对第一位置姿态传感器、第二位置姿态传感器以及旋转姿态传感器的类型不作具体限制,可由本领域技术人员根据需要进行选取。比如,本实施例中,第一位置姿态传感器、第二位置姿态传感器以及旋转姿态传感器均采用霍尔传感器实现。It should be noted that the optical anti-shake component 130 is also provided with a first position and attitude sensor for sensing the position and attitude of the lens 1210 in real time, a second position and attitude sensor for sensing the position and attitude of the image sensor 1220 in real time, and a second position and attitude sensor for real-time sensing of the position and attitude of the image sensor 1220. A rotational attitude sensor that senses the rotational attitude of the image sensor 1220 . The types of the first position and attitude sensor, the second position and attitude sensor and the rotation attitude sensor are not specifically limited here, and can be selected by those skilled in the art according to needs. For example, in this embodiment, the first position and attitude sensor, the second position and attitude sensor, and the rotation and attitude sensor are all realized by Hall sensors.
本实施例中,除了获取图像传感器1220采集的对应运动数据的光学防抖图像之外,还从光学防抖组件130获取镜头1210的第一位置姿态数据和图像传感器1220的第二位置姿态数据和第一旋转姿态数据。比如,光学防抖组件130通过第一位置姿态传感器对镜头1210的位置姿态进行感应,得到镜头1210的第一位置姿态数据,通过第二位置姿态传感器对图像传感器1220的位置姿态进行感应,得到图像传感器1220的第二位置姿态数据,通过旋转姿态传感器对图像传感器1220的旋转姿态进行感应,得到图像传感器1220的第一旋转姿态数据,并将第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据组合为姿态数据组输出。相应的,可从光学防抖组件130输出的姿态数据组中获取得到前述第一位置姿态数据、前述第二位置姿态数据和前述第一旋转姿态数据。In this embodiment, in addition to obtaining the optical image stabilization image corresponding to the motion data collected by the image sensor 1220, the first position and posture data of the lens 1210 and the second position and posture data of the image sensor 1220 and The first rotation pose data. For example, the optical anti-shake component 130 senses the position and posture of the lens 1210 through the first position and posture sensor to obtain the first position and posture data of the lens 1210, and senses the position and posture of the image sensor 1220 through the second position and posture sensor to obtain the image The second position and posture data of the sensor 1220 is sensed by the rotation posture sensor to the rotation posture of the image sensor 1220 to obtain the first rotation posture data of the image sensor 1220, and the first position and posture data, the second position and posture data and the first The combination of rotation attitude data is output as attitude data set. Correspondingly, the aforementioned first position and attitude data, the aforementioned second position and attitude data, and the aforementioned first rotation attitude data can be obtained from the attitude data set output by the optical anti-shake component 130 .
示例性地,姿态数据组可以表示为H=[h 0|h 1|h 2],其中,h 0表示第一位置姿态数据,h 1表示第二位置姿态数据,h 2表示第一旋转姿态数据。 Exemplarily, the posture data set can be expressed as H=[h 0 |h 1 |h 2 ], wherein h 0 represents the first position and posture data, h 1 represents the second position and posture data, and h 2 represents the first rotation posture data.
在230中,根据第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据对光学防抖图像的姿态进行还原校正,得到校正图像。In 230, restore and correct the posture of the optical image stabilization image according to the first position and posture data, the second position and posture data, and the first rotation posture data to obtain a corrected image.
本实施例中,在获取到前述第一位置姿态数据、前述第二位置姿态数据以及前述第一旋转姿态数据之后,按照配置的校正策略,根据第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据对光学防抖图像的姿态进行还原校正,得到校正图像。此处对姿态的还原校正可以通俗的理解为将光学防抖图像“还原”至光学防抖组件130未进行光学防抖的姿态,也即将光学防抖图像“还原”至镜头1210未移动,且图像传感器1220未移动和旋转时所对应的姿态。In this embodiment, after the first position and attitude data, the second position and attitude data, and the first rotation attitude data are acquired, according to the configured correction strategy, according to the first position and attitude data, the second position and attitude data and the first rotation attitude data, Restoring and correcting the attitude of the optical image stabilization image based on the rotation attitude data to obtain the corrected image. Here, the restoration and correction of posture can be commonly understood as "reverting" the optical image stabilization image to the posture that the optical image stabilization component 130 does not perform optical stabilization, that is, "reverting" the optical image stabilization image to the point where the lens 1210 does not move, and The corresponding attitude of the image sensor 1220 when it does not move and rotate.
在240中,根据运动数据,通过电子防抖组件140对校正图像进行电子防抖处理,得到电子防抖图像。In 240, according to the motion data, the electronic anti-shake component 140 performs electronic anti-shake processing on the corrected image to obtain an electronic anti-shake image.
本实施例中,在完成对光学防抖图像的校正,并得到校正图像之后,进一步将前述运动数据和校正图像输入电子防抖组件140,由电子防抖组件140根据前述运动数据对校正图像进行电子防抖处理,得到电子防抖图像。In this embodiment, after the correction of the optical image stabilization image is completed and the corrected image is obtained, the aforementioned motion data and the corrected image are further input into the electronic anti-shake component 140, and the electronic anti-shake component 140 processes the corrected image according to the aforementioned motion data. Electronic anti-shake processing to obtain electronic anti-shake images.
由上可知,本申请中,电子设备100包括镜头1210、图像传感器1220、光学防抖组件130和电子防抖组件140,其中根据电子设备100的运动数据,通过光学防抖组件130对镜头1210和图像传感器1220进行五维自由度的光学防抖,得到光学防抖图像;然后,以该光学防抖图像为基础,根据镜头1210的第一位置姿态数据、图像传感器1220的第二位置姿态数据和第一旋转姿态数据,对光学防抖图像的姿态进行还原校正,得到姿态还原后的校正图像;最后,根据运动数据,通过电子防抖组件140对校正图像进行电子防抖处理,得到电子防抖图像。以此,本申请通过光学防抖组件130提供光学防抖图像,并还原光学防抖所导致的姿态变化后由电子防抖组件140进行电子防抖处理,得到高质量的电子防抖图像。As can be seen from the above, in this application, the electronic device 100 includes a lens 1210, an image sensor 1220, an optical anti-shake component 130, and an electronic anti-shake component 140. The image sensor 1220 performs five-dimensional optical image stabilization to obtain an optical image stabilization image; then, based on the optical image stabilization image, according to the first position and posture data of the lens 1210, the second position and posture data of the image sensor 1220 and The first rotation attitude data is to restore and correct the attitude of the optical image stabilization image to obtain the corrected image after the attitude restoration; finally, according to the motion data, the electronic anti-shake component 140 is used to perform electronic anti-shake processing on the corrected image to obtain the electronic anti-shake image. In this way, the present application uses the optical image stabilization component 130 to provide an optical image stabilization image, and after restoring the posture change caused by the optical image stabilization component, the electronic image stabilization component 140 performs electronic image stabilization processing to obtain a high-quality electronic image stabilization image.
可选地,在一实施例中,根据第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据对光学防抖图像的姿态进行还原校正,得到校正图像,包括:Optionally, in an embodiment, the posture of the optical image stabilization image is restored and corrected according to the first position and posture data, the second position and posture data, and the first rotation posture data to obtain a corrected image, including:
(1)根据第一位置姿态数据和第二位置姿态数据,获取用于对光学防抖图像进行平移校正的第一校正平移向量;(1) According to the first position and attitude data and the second position and attitude data, obtain a first correction translation vector for performing translation correction to the optical image stabilization image;
(2)根据第一旋转姿态数据,获取用于对光学防抖图像进行旋转校正的第一校正旋转矩阵;(2) Acquiring a first correction rotation matrix for performing rotation correction on the optical image stabilization image according to the first rotation attitude data;
(3)根据第一校正平移向量和第一校正旋转矩阵分别对光学防抖图像进行平移校正和旋转校正,得到校正图像。(3) Perform translation correction and rotation correction on the optical image stabilization image according to the first correction translation vector and the first correction rotation matrix, respectively, to obtain a correction image.
根据以上相关描述可知,本实施例中的光学防抖包括5维自由度,分别为镜头1210在X轴和Y轴的2维自由度,以及图像传感器1220在X轴、Y轴以及Z轴的3维自由度。可以理解的是,前述5维自由度的防抖补偿将导致图像内容的平移和旋转,相应的,本实施例对光学防抖图像姿态的还原校正将包括两部分,分别为平移校正和旋转校正。According to the relevant description above, it can be seen that the optical image stabilization in this embodiment includes 5-dimensional degrees of freedom, which are respectively 2-dimensional degrees of freedom of the lens 1210 on the X-axis and Y-axis, and 2-dimensional degrees of freedom of the image sensor 1220 on the X-axis, Y-axis and Z-axis. 3D degrees of freedom. It can be understood that the anti-shake compensation of the aforementioned 5-dimensional freedom will lead to the translation and rotation of the image content. Correspondingly, the restorative correction of the posture of the optical anti-shake image in this embodiment will include two parts, respectively translation correction and rotation correction .
可以理解的是,图像内容的平移是由镜头1210和图像传感器1220各自的平移所综合导致的,而图像内容的旋转是由图像传感器1220的旋转所导致的。因此,本实施例一方面根据镜头1210的第一位置姿态数据和图像传感器1220的第二位置姿态数据,获取用于对光学防抖图像进行平移校正的第一校正平移向量,另一方面根据图像传感器1220的第一旋转姿态数据,获取用于对光学防抖图像进行旋转校正的第一校正旋转矩阵。之后,根据获取到的第一校正平移向量和第一校正旋转矩阵,分别对光学防抖图像的姿态进行平移校正和旋转校正,得到校正图像,如图4所示。其中,根据获取到的第一校正平移向量和第一校正旋转矩阵,分别对光学防抖图像的姿态进行平移校正和旋转校正,可以表示为:It can be understood that the translation of the image content is caused by the respective translations of the lens 1210 and the image sensor 1220 , while the rotation of the image content is caused by the rotation of the image sensor 1220 . Therefore, in this embodiment, on the one hand, according to the first position and posture data of the lens 1210 and the second position and posture data of the image sensor 1220, the first correction translation vector used for translation correction of the optical image stabilization image is obtained; on the other hand, according to the image The first rotation posture data of the sensor 1220 is used to obtain a first correction rotation matrix for performing rotation correction on the optical image stabilization image. Afterwards, according to the acquired first correction translation vector and first correction rotation matrix, translation correction and rotation correction are respectively performed on the posture of the optical image stabilization image to obtain a correction image, as shown in FIG. 4 . Wherein, according to the acquired first correction translation vector and first correction rotation matrix, respectively perform translation correction and rotation correction on the attitude of the optical image stabilization image, which can be expressed as:
P'=R·P+t;P'=R·P+t;
其中,P表示光学防抖图像中一像素点的位置,R表示第一校正旋转矩阵,t表示第一校正平移向量,P'表示该像素点进行过校正后在校正图像中的位置。Wherein, P represents the position of a pixel in the OIS image, R represents the first corrected rotation matrix, t represents the first corrected translation vector, and P' represents the position of the pixel in the corrected image after correction.
可选地,在一实施例中,根据第一位置姿态数据和第二位置姿态数据,获取用于对光学防抖图像进行平移校正的第一校正平移向量,包括:Optionally, in an embodiment, according to the first position and attitude data and the second position and attitude data, obtaining a first correction translation vector for translation correction of the optical image stabilization image includes:
(1)根据位置姿态数据和平移向量的第一函数关系,获取对应第一位置姿态数据的第一平移向量;(1) According to the first functional relationship between the position and attitude data and the translation vector, obtain the first translation vector corresponding to the first position and attitude data;
(2)根据位置姿态数据和平移向量的第二函数关系,获取对应第二位置姿态数据的第二平移向量;(2) According to the second functional relationship between the position and attitude data and the translation vector, obtain the second translation vector corresponding to the second position and attitude data;
(3)根据第一平移向量、第一平移向量对应的第一融合参数、第二平移向量及其对应的第二融合参数,融合得到第一平移向量和第二平移向量的融合平移向量;(3) According to the first translation vector, the first fusion parameter corresponding to the first translation vector, the second translation vector and its corresponding second fusion parameter, fused to obtain a fusion translation vector of the first translation vector and the second translation vector;
(4)将融合平移向量作为第一校正平移向量。(4) Take the fused translation vector as the first corrected translation vector.
应当说明的是,本实施例预设有位置姿态数据和平移向量的第一函数关系,该第一函数关系描述了镜头1210的位置姿态变化导致的图像内容的位置姿态变化之间的对应关系。 此外,本实施例还预设有位置姿态数据和平移向量的第二函数关系,该第二函数关系描述了图像传感器1220的位置姿态变化导致的图像内容的位置姿态变化之间的对应关系。It should be noted that this embodiment presets a first functional relationship between the position and attitude data and the translation vector, and the first functional relationship describes the corresponding relationship between the position and attitude changes of the image content caused by the changes in the position and attitude of the lens 1210 . In addition, this embodiment also presets a second functional relationship between the position and attitude data and the translation vector, and the second functional relationship describes the corresponding relationship between the position and attitude changes of the image content caused by the position and attitude changes of the image sensor 1220 .
基于以上第一函数关系和第二函数关系,本实施例在根据第一位置姿态数据和第二位置姿态数据获取用于对光学防抖图像进行平移校正的第一校正平移向量时,根据位置姿态数据和平移向量的第一函数关系,获取对应第一位置姿态数据的第一平移向量,以及根据位置姿态数据和平移向量的第二函数关系,获取对应第二位置姿态数据的第二平移向量。Based on the first functional relationship and the second functional relationship above, in this embodiment, when obtaining the first correction translation vector for translation correction of the optical image stabilization image according to the first position and attitude data and the second position and attitude data, according to the position and attitude According to the first functional relationship between the data and the translation vector, the first translation vector corresponding to the first position and attitude data is obtained, and the second translation vector corresponding to the second position and attitude data is obtained according to the second functional relationship between the position and attitude data and the translation vector.
如上所述,图像内容的旋转是由镜头1210和图像传感器1220各自的平移所综合导致的,相应需要将前述第一平移向量和第二平移向量进行融合。为此,本实施例中预先配置有对应第一平移向量的第一融合参数、对应第二平移向量的第二融合参数。相应的,本实施例在获取到对应第一位置姿态数据的第一平移向量以及获取到对应第二位置姿态数据的第二平移向量之后,即根据第一平移向量、第一平移向量对应的第一融合参数、第二平移向量及其对应的第二融合参数,融合得到第一平移向量和第二平移向量的融合平移向量,表示为:As mentioned above, the rotation of the image content is caused by the respective translations of the lens 1210 and the image sensor 1220 , and correspondingly, the aforementioned first translation vector and the second translation vector need to be fused. To this end, in this embodiment, a first fusion parameter corresponding to the first translation vector and a second fusion parameter corresponding to the second translation vector are pre-configured. Correspondingly, in this embodiment, after the first translation vector corresponding to the first position and attitude data and the second translation vector corresponding to the second position and attitude data are acquired, that is, according to the first translation vector and the first translation vector corresponding to the first translation vector, A fusion parameter, a second translation vector and its corresponding second fusion parameter are fused to obtain a fusion translation vector of the first translation vector and the second translation vector, expressed as:
t'=a·t 1+b·t 2t'=a·t 1 +b·t 2 ;
其中,t'表示融合平移向量,t 1表示第一平移向量、t 2表示第二平移向量、a表示第一融合参数、b表示第二融合参数。 Among them, t' denotes the fused translation vector, t 1 denotes the first translation vector, t 2 denotes the second translation vector, a denotes the first fusion parameter, and b denotes the second fusion parameter.
应当说明的是,以第一融合参数和第二融合参数和值为1为约束,可由本领域技术人员根据实际需要进行取值。It should be noted that the sum of the first fusion parameter and the second fusion parameter is constrained to be 1, and those skilled in the art can select the value according to actual needs.
如上,在融合得到第一平移向量和第二平移向量的融合平移向量之后,本实施例即将该融合平移向量作为第一校正平移向量。As above, after the fused translation vector of the first translation vector and the second translation vector is obtained through fusion, this embodiment will use the fused translation vector as the first corrected translation vector.
可选地,在一实施例中,将电子设备100固定于预设校准工具,使得电子设备100与预设校准工具中的矩形校准板的位置相对固定,矩形校准板包括中心标记,第一函数关系按照如下步骤预先生成:Optionally, in an embodiment, the electronic device 100 is fixed to the preset calibration tool, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed, the rectangular calibration plate includes a center mark, and the first function Relationships are pre-generated as follows:
(1)开启光学防抖组件130的镜头1210平移防抖功能,并关闭图像传感器1220平移防抖功能和图像传感器1220旋转防抖功能;(1) Turn on the translation anti-shake function of the lens 1210 of the optical anti-shake component 130, and turn off the translation anti-shake function of the image sensor 1220 and the rotation anti-shake function of the image sensor 1220;
(2)发送第一平移控制指令至预设校准工具,使得预设校准工具驱动电子设备100在电子设备100的X轴方向和Y轴方向平移;(2) sending the first translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100;
(3)在电子设备100的平移过程中,通过光学防抖组件130进行光学防抖处理,并获取图像传感器1220在平移过程中采集的矩形校准板的第一图像序列;(3) During the translation process of the electronic device 100, perform optical anti-shake processing through the optical anti-shake component 130, and acquire the first image sequence of the rectangular calibration plate collected by the image sensor 1220 during the translation process;
(4)从光学防抖组件130获取镜头1210对应第一图像序列中每一第一图像的第三位置姿态数据,以及获取中心标记在每一第一图像中的第一位置坐标;(4) Obtain the third position and attitude data of the lens 1210 corresponding to each first image in the first image sequence from the optical anti-shake component 130, and acquire the first position coordinates of the center mark in each first image;
(5)根据每一第一图像对应的第三位置姿态数据和第一位置坐标,拟合得到第一函数关系。(5) According to the third position and posture data corresponding to each first image and the first position coordinates, the first functional relationship is obtained by fitting.
本实施例中,利用预设校准工具,预先校准得到第一函数关系。In this embodiment, the first functional relationship is obtained through pre-calibration by using a preset calibration tool.
其中,首先将电子设备100固定于预设校准工具,使得电子设备100与预设校准工具中的矩形校准板的位置相对固定。应当说明的是,此处对预设校准工具的结构不作具体限制,可由本领域技术人员根据实际需要进行设置。Wherein, firstly, the electronic device 100 is fixed on the preset calibration tool, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed. It should be noted that there is no specific limitation on the structure of the preset calibration tool here, and it can be set by those skilled in the art according to actual needs.
示例性地,请参照图5,该预设校准工具由目标背板、设备载具、滑轨以及驱动机构(图5中未示出)四部分组成,其中目标背板用于固定矩形校准板,设备载具用于固定电子设备100,目标背板和设备载具可沿各自所在滑轨的轨道滑动,驱动机构用于驱动目标背板、设备载具、滑轨同步运动。Exemplarily, referring to FIG. 5, the preset calibration tool is composed of four parts: a target backplane, an equipment carrier, a slide rail and a driving mechanism (not shown in FIG. 5), wherein the target backplane is used to fix a rectangular calibration plate , the device carrier is used to fix the electronic device 100, the target backplane and the device carrier can slide along the tracks of their respective slide rails, and the driving mechanism is used to drive the target backplane, the device carrier, and the slide rail to move synchronously.
基于图5所示的预设校准工具,本实施例将电子设备100固定于设备载具,并对设备载具和目标背板的位置沿各自所在轨道进行调整,使得矩形校准板在图像传感器1220的成像大小与图像传感器1220成像区域的大小一致,通俗的说,就是矩形校准板的成像图像铺满图像传感器1220的成像区域。Based on the preset calibration tool shown in FIG. 5 , in this embodiment, the electronic device 100 is fixed on the device carrier, and the positions of the device carrier and the target backplane are adjusted along their respective tracks, so that the rectangular calibration plate is positioned on the image sensor 1220 The imaging size of is consistent with the size of the imaging area of the image sensor 1220. In layman's terms, the imaging image of the rectangular calibration plate covers the imaging area of the image sensor 1220.
在完成对设备载具和目标背板的位置调整之后,将设备载具和目标背板锁定在二者各自的当前位置,从而使得电子设备100与矩形校准板的位置相对固定。After the position adjustment of the device carrier and the target backboard is completed, the device carrier and the target backboard are locked in their respective current positions, so that the positions of the electronic device 100 and the rectangular calibration plate are relatively fixed.
应当说明的是,为确保电子设备100与矩形校准板的位置相对固定,从而确保矩形校准板与电子设备100的摄像模组120(镜头1210和图像传感器1220)之间的平行关系,目标背板采用硬质板材,比如硬质金属板材。此外,还需确保设备载具和目标背板与各自所在滑轨刚性连接,从而避免扰动误差。It should be noted that in order to ensure that the positions of the electronic device 100 and the rectangular calibration plate are relatively fixed, thereby ensuring the parallel relationship between the rectangular calibration plate and the camera module 120 (lens 1210 and image sensor 1220) of the electronic device 100, the target backplane Use a rigid sheet, such as a rigid metal sheet. In addition, it is also necessary to ensure that the equipment carrier and the target backplane are rigidly connected to the slide rails where they are located, so as to avoid disturbance errors.
如上,在将电子设备100固定于预设校准工具,并使得电子设备100与预设校准工具中的矩形校准板的位置相对固定之后,即可利用预设校准工具校准得到第一函数关系。As above, after the electronic device 100 is fixed on the preset calibration tool, and the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed, the first functional relationship can be calibrated by using the preset calibration tool.
由于此时仅对第一函数关系进行校准,相应开启光学防抖组件130的镜头1210平移防抖功能,并关闭图像传感器1220平移防抖功能和图像传感器1220旋转防抖功能,以此,使得光学防抖组件130在电子设备100运动时,根据电子设备100的运动仅对镜头1210进行补偿平移。相应的,发送第一平移控制指令至预设校准工具,使得预设校准工具驱动电子设备100在电子设备100的X轴方向和Y轴方向平移,如图5所示。比如,该第一平移控制指令使得预设校准工具驱动电子设备100在其X轴方向和Y轴方向交替平移,其中平移的距离以及交替的频率可由本领域技术人员根据实际需要进行取值,此处不作具体限制。Since only the first functional relationship is calibrated at this time, the translation anti-shake function of the lens 1210 of the optical anti-shake assembly 130 is correspondingly turned on, and the translation anti-shake function of the image sensor 1220 and the rotation anti-shake function of the image sensor 1220 are turned off, so that the optical anti-shake When the electronic device 100 is in motion, the anti-shake component 130 only compensates for the translation of the lens 1210 according to the motion of the electronic device 100 . Correspondingly, the first translation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 , as shown in FIG. 5 . For example, the first translation control instruction enables the preset calibration tool to drive the electronic device 100 to alternately translate in the X-axis direction and the Y-axis direction, wherein the distance of translation and the frequency of the alternation can be determined by those skilled in the art according to actual needs. There are no specific restrictions.
在电子设备100的平移过程中,实时获取电子设备100的运动数据并提供给光学防抖组件130,从而通过光学防抖组件130进行光学防抖处理。可以理解的是,由于本实施例仅开启了光学防抖组件130的镜头1210平移防抖功能,光学防抖组件130在电子设备100的运动过程中将仅对镜头1210进行补偿平移。此外,获取图像传感器1220在平移过程中采集的矩形校准板的图像序列,记为第一图像序列。比如,通过图像传感器1220在平移过程中采集矩形校准板一分钟时长的图像序列,得到第一图像序列。During the translation process of the electronic device 100 , the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 . It can be understood that, since this embodiment only enables the lens 1210 translation anti-shake function of the optical anti-shake assembly 130 , the optical anti-shake assembly 130 will only compensate for the translation of the lens 1210 during the movement of the electronic device 100 . In addition, the image sequence of the rectangular calibration plate captured by the image sensor 1220 during the translation process is acquired, which is denoted as the first image sequence. For example, the image sensor 1220 collects a one-minute image sequence of the rectangular calibration plate during the translation process to obtain the first image sequence.
请参照图6,矩形校准板包括中心标记和四角标记(分别为左上角标记、右上角标记、右下角标记和左下角标记),由于电子设备100与预设校准工具中的矩形校准板的位置相对固定,光学防抖组件130因电子设备100平移而进行光学防抖处理将导致中心标记在成像得到第一图像中的位置偏离第一图像的中心。Please refer to FIG. 6 , the rectangular calibration plate includes a center mark and four corner marks (respectively upper left corner mark, right upper corner mark, right lower corner mark and left lower corner mark), due to the position of the rectangular calibration plate in the electronic device 100 and the preset calibration tool Relatively fixed, the optical anti-shake processing performed by the optical anti-shake component 130 due to the translation of the electronic device 100 will cause the position of the center mark in the first image obtained by imaging to deviate from the center of the first image.
相应的,本实施例中,进一步从光学防抖组件130获取镜头1210对应第一图像序列中每一第一图像的位置姿态数据,即图像传感器1220在采集每一第一图像时镜头1210的位置姿态数据,记为第三位置姿态数据。此外,还获取中心标记在每一第一图像中的位置坐标,记为第一位置坐标。Correspondingly, in this embodiment, the position and posture data of the lens 1210 corresponding to each first image in the first image sequence is further obtained from the optical anti-shake component 130, that is, the position of the lens 1210 when the image sensor 1220 captures each first image The attitude data is recorded as the third position attitude data. In addition, the position coordinates of the center mark in each first image are also obtained, which are recorded as the first position coordinates.
可以理解的是,对于一第一图像,前述中心标记在该第一图像中的第一位置坐标等同于该第一图像的中心至中心标记的平移向量。因此,根据每一第一图像对应的第三位置姿态数据和第一位置坐标进行函数拟合,即可拟合得到第一函数关系。此处对函数拟合的方式不作具体限制,包括但不限于最小二乘法、随机抽样一致法以及多项式拟合法等。比如,本实施例采用最小二乘法拟合得到第一函数关系。It can be understood that, for a first image, the first position coordinates of the aforementioned center mark in the first image are equal to the translation vector from the center of the first image to the center mark. Therefore, the first functional relationship can be obtained by performing function fitting according to the third position posture data corresponding to each first image and the first position coordinates. There is no specific limitation on the method of function fitting here, including but not limited to least square method, random sampling consistent method, and polynomial fitting method. For example, in this embodiment, the least square method is used to fit to obtain the first functional relationship.
在其他实施例中,在拟合得到第一函数关系之后,还对第一函数关系的拟合误差进行评估(可由本领域技术人员根据实际需要选取评估方式,此处不作具体限制,比如可以采用均方误差),得到第一函数关系的拟合误差,若第一函数关系的拟合误差大于第一误差阈值(可由本领域技术人员根据实际需要取经验值),则识别并剔除明显异常的第三位置姿态数据和第一位置坐标后再次进行拟合,若新拟合的第一函数关系的拟合误差仍大于第 一误差阈值,则重新获取新的第一图像序列以及新的第三位置姿态数据进行拟合,直至得到拟合误差小于或等于第一误差阈值的第一函数关系。In other embodiments, after the first functional relationship is obtained by fitting, the fitting error of the first functional relationship is also evaluated (the evaluation method can be selected by those skilled in the art according to actual needs, and no specific limitation is made here, for example, it can be used mean square error) to obtain the fitting error of the first functional relationship, if the fitting error of the first functional relationship is greater than the first error threshold (experienced values can be obtained by those skilled in the art according to actual needs), then identify and eliminate obviously abnormal After the third position attitude data and the first position coordinates are fitted again, if the fitting error of the newly fitted first functional relationship is still greater than the first error threshold, a new first image sequence and a new third image sequence are reacquired. The position and attitude data are fitted until a first functional relationship with a fitting error less than or equal to a first error threshold is obtained.
可选地,在一实施例中,第二函数关系按照如下步骤预先生成:Optionally, in an embodiment, the second functional relationship is pre-generated according to the following steps:
(1)开启光学防抖组件130的图像传感器1220平移防抖功能,并关闭镜头1210平移防抖功能和图像传感器1220旋转防抖功能;(1) Turn on the translational anti-shake function of the image sensor 1220 of the optical anti-shake assembly 130, and turn off the translational anti-shake function of the lens 1210 and the rotation anti-shake function of the image sensor 1220;
(2)发送第二平移控制指令至预设校准工具,使得预设校准工具驱动电子设备100在电子设备100的X轴方向和Y轴方向平移;(2) sending the second translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100;
(3)在电子设备100的平移过程中,通过光学防抖组件130进行光学防抖处理,并获取图像传感器1220在平移过程中采集的矩形校准板的第二图像序列;(3) During the translation process of the electronic device 100, perform optical anti-shake processing through the optical anti-shake component 130, and acquire a second image sequence of the rectangular calibration plate collected by the image sensor 1220 during the translation process;
(4)从光学防抖组件130获取图像传感器1220采集第二图像序列中每一第二图像时的第四位置姿态数据,以及获取中心标记在每一第二图像中的第二位置坐标;(4) Obtain the fourth position and posture data when the image sensor 1220 acquires each second image in the second image sequence from the optical anti-shake component 130, and acquire the second position coordinates of the center mark in each second image;
(5)根据每一第二图像对应的第四位置姿态数据和第二位置坐标,拟合得到第二函数关系。(5) According to the fourth position and posture data corresponding to each second image and the second position coordinates, a second functional relationship is obtained by fitting.
本实施例中,还利用预设校准工具预先校准得到第二函数关系。同样的,按照以上方式首先将电子设备100固定于预设校准工具,使得电子设备100与预设校准工具中的矩形校准板的位置相对固定。具体可参照以上实施例中的相关描述,此处不再赘述。In this embodiment, the second functional relationship is obtained by pre-calibrating with a preset calibration tool. Similarly, firstly, the electronic device 100 is fixed to the preset calibration tool according to the above method, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed. For details, reference may be made to relevant descriptions in the foregoing embodiments, and details are not repeated here.
在将电子设备100固定于预设校准工具,并使得电子设备100与预设校准工具中的矩形校准板的位置相对固定之后,即可利用预设校准工具校准得到第二函数关系。After the electronic device 100 is fixed on the preset calibration tool, and the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed, the second functional relationship can be calibrated by using the preset calibration tool.
由于此时仅对第二函数关系进行校准,相应开启光学防抖组件130的图像传感器1220平移防抖功能,并关闭镜头1210平移防抖功能和图像传感器1220旋转防抖功能,以此,光学防抖组件130在电子设备100运动时,根据电子设备100的运动仅对图像传感器1220进行补偿平移。相应的,发送第二平移控制指令至预设校准工具,使得预设校准工具驱动电子设备100在电子设备100的X轴方向和Y轴方向平移,如图5所示。比如,该第二平移控制指令使得预设校准工具驱动电子设备100在其X轴方向和Y轴方向交替平移,其中平移的距离以及交替的频率可由本领域技术人员根据实际需要进行取值,此处不作具体限制。Since only the second functional relationship is calibrated at this time, the image sensor 1220 translation anti-shake function of the optical image stabilization component 130 is correspondingly turned on, and the lens 1210 translation anti-shake function and the image sensor 1220 rotation anti-shake function are turned off, so that the optical image stabilization When the electronic device 100 is in motion, the shaking component 130 only compensates for the translation of the image sensor 1220 according to the motion of the electronic device 100 . Correspondingly, the second translation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 , as shown in FIG. 5 . For example, the second translation control instruction enables the preset calibration tool to drive the electronic device 100 to alternately translate in the X-axis direction and the Y-axis direction, wherein the distance of translation and the frequency of the alternation can be determined by those skilled in the art according to actual needs. There are no specific restrictions.
在电子设备100的平移过程中,实时获取电子设备100的运动数据并提供给光学防抖组件130,从而通过光学防抖组件130进行光学防抖处理。可以理解的是,由于本实施例仅开启了光学防抖组件130的图像传感器1220平移防抖功能,光学防抖组件130在电子设备100的运动过程中将仅对图像传感器1220进行补偿平移。此外,获取图像传感器1220在平移过程中采集的矩形校准板的图像序列,记为第二图像序列。比如,通过图像传感器1220在平移过程中采集矩形校准板一分钟时长的图像序列,得到第二图像序列。During the translation process of the electronic device 100 , the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 . It can be understood that, since this embodiment only enables the translational anti-shake function of the image sensor 1220 of the optical anti-shake component 130 , the optical anti-shake component 130 will only compensate for the translation of the image sensor 1220 during the movement of the electronic device 100 . In addition, an image sequence of the rectangular calibration plate captured by the image sensor 1220 during the translation process is acquired, which is denoted as a second image sequence. For example, the image sensor 1220 collects a one-minute image sequence of the rectangular calibration plate during the translation process to obtain the second image sequence.
本实施例中,还从光学防抖组件130获取图像传感器1220采集第二图像序列中每一第二图像的位置姿态数据,记为第四位置姿态数据。此外,还获取中心标记在每一第二图像中的位置坐标,记为第二位置坐标。In this embodiment, the image sensor 1220 also acquires the position and attitude data of each second image in the second image sequence from the optical anti-shake component 130, which is recorded as the fourth position and attitude data. In addition, the position coordinates of the center mark in each second image are also obtained, which are recorded as the second position coordinates.
可以理解的是,对于一第二图像,前述中心标记在该第二图像中的第二位置坐标等同于该第二图像的中心至中心标记的平移向量。因此,根据每一第二图像对应的第四位置姿态数据和第二位置坐标进行函数拟合,即可拟合得到第二函数关系。此处对函数拟合的方式不作具体限制,包括但不限于最小二乘法、随机抽样一致法以及多项式拟合法等。比如,本实施例采用最小二乘法拟合得到第二函数关系。It can be understood that, for a second image, the second position coordinates of the aforementioned center mark in the second image are equal to the translation vector from the center of the second image to the center mark. Therefore, the second functional relationship can be obtained by performing function fitting according to the fourth position and posture data corresponding to each second image and the second position coordinates. There is no specific limitation on the method of function fitting here, including but not limited to least square method, random sampling consistent method, and polynomial fitting method. For example, in this embodiment, the least square method is used to fit to obtain the second functional relationship.
在其他实施例中,在拟合得到第二函数关系之后,还对第二函数关系的拟合误差进行评估(可由本领域技术人员根据实际需要选取评估方式,此处不作具体限制,比如可以采用均方误差),得到第二函数关系的拟合误差,若第二函数关系的拟合误差大于第二误差阈值(可由本领域技术人员根据实际需要取经验值),则识别并剔除明显异常的第四位置 姿态数据和第二位置坐标后再次进行拟合,若新拟合的第二函数关系的拟合误差仍大于第二误差阈值,则重新获取新的第二图像序列以及新的第四位置姿态数据和第二位置坐标进行拟合,直至得到拟合误差小于或等于第二误差阈值的第二函数关系。In other embodiments, after the second functional relationship is obtained by fitting, the fitting error of the second functional relationship is also evaluated (the evaluation method can be selected by those skilled in the art according to actual needs, and no specific limitation is made here, for example, mean square error) to obtain the fitting error of the second functional relationship, if the fitting error of the second functional relationship is greater than the second error threshold (experienced values can be obtained by those skilled in the art according to actual needs), then identify and remove obviously abnormal After the fourth position attitude data and the second position coordinates are fitted again, if the fitting error of the newly fitted second functional relationship is still greater than the second error threshold, a new second image sequence and a new fourth image sequence are reacquired. The position and attitude data are fitted with the second position coordinates until a second functional relationship is obtained in which the fitting error is less than or equal to the second error threshold.
可选地,在一实施例中,第一融合参数和第二融合参数按照如下步骤预先确定:Optionally, in an embodiment, the first fusion parameter and the second fusion parameter are predetermined according to the following steps:
(1)开启光学防抖组件130的镜头1210平移防抖功能和图像传感器1220平移防抖功能,并关闭图像传感器1220旋转防抖功能;(1) Turn on the lens 1210 translation anti-shake function and the image sensor 1220 translation anti-shake function of the optical anti-shake component 130, and turn off the image sensor 1220 rotation anti-shake function;
(2)发送第三平移控制指令至预设校准工具,使得预设校准工具驱动电子设备100在电子设备100的X轴方向和Y轴方向平移;(2) sending the third translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100;
(3)在电子设备100的平移过程中,通过光学防抖组件130进行光学防抖处理,并获取图像传感器1220在平移过程中采集的矩形校准板的第三图像序列;(3) During the translation process of the electronic device 100, perform optical anti-shake processing through the optical anti-shake component 130, and acquire a third image sequence of the rectangular calibration plate collected by the image sensor 1220 during the translation process;
(4)从光学防抖组件130获取镜头1210对应第三图像序列中每一第三图像的第五位置姿态数据,以及从光学防抖组件130获取图像传感器1220采集第三图像序列中每一第三图像时的第六位置姿态数据;(4) Acquire from the optical anti-shake component 130 the fifth position and attitude data of the lens 1210 corresponding to each third image in the third image sequence, and acquire the image sensor 1220 from the optical anti-shake component 130 to collect each of the third image sequences in the third image sequence The sixth position and posture data of three images;
(5)根据第一函数关系,获取对应每一第五位置姿态数据的第三平移向量,以及根据第二函数关系,获取对应每一第六位置姿态数据的第四平移向量;(5) Acquiring a third translation vector corresponding to each fifth position and attitude data according to the first functional relationship, and obtaining a fourth translation vector corresponding to each sixth position and attitude data according to the second functional relationship;
(6)获取中心标记在每一第三图像中的第三位置坐标,并根据每一第三图像对应的第三位置坐标、第三平移向量以及第四平移向量,获取第一融合参数和第二融合参数。(6) Obtain the third position coordinates of the center mark in each third image, and obtain the first fusion parameter and the first fusion parameter according to the third position coordinates, the third translation vector and the fourth translation vector corresponding to each third image Two fusion parameters.
本实施例中,还利用预设校准工具预先校准得到用于融合第一平移向量和第二平移向量的第一融合参数和第二融合参数。同样的,按照以上方式首先将电子设备100固定于预设校准工具,使得电子设备100与预设校准工具中的矩形校准板的位置相对固定。具体可参照以上实施例中的相关描述,此处不再赘述。In this embodiment, the first fusion parameter and the second fusion parameter for fusing the first translation vector and the second translation vector are obtained through pre-calibration by using a preset calibration tool. Similarly, firstly, the electronic device 100 is fixed to the preset calibration tool according to the above method, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed. For details, reference may be made to relevant descriptions in the foregoing embodiments, and details are not repeated here.
在将电子设备100固定于预设校准工具,并使得电子设备100与预设校准工具中的矩形校准板的位置相对固定之后,即可利用预设校准工具校准得到第一融合参数和第二融合参数。After the electronic device 100 is fixed on the preset calibration tool, and the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed, the first fusion parameter and the second fusion parameter can be obtained by calibration with the preset calibration tool. parameter.
由于此时对用于融合第一平移向量和第二平移向量的第一融合参数和第二融合参数,相应开启光学防抖组件130的镜头1210平移防抖功能和图像传感器1220平移防抖功能,并关闭图像传感器1220旋转防抖功能,以此,光学防抖组件130在电子设备100运动时,根据电子设备100的运动对镜头1210和图像传感器1220同时进行补偿平移。相应的,发送第三平移控制指令至预设校准工具,使得预设校准工具驱动电子设备100在电子设备100的X轴方向和Y轴方向平移,如图5所示。比如,该第三平移控制指令使得预设校准工具驱动电子设备100在其X轴方向和Y轴方向交替平移,其中平移的距离以及交替的频率可由本领域技术人员根据实际需要进行取值,此处不作具体限制。Since at this time, for the first fusion parameter and the second fusion parameter used to fuse the first translation vector and the second translation vector, the translation anti-shake function of the lens 1210 and the translation anti-shake function of the image sensor 1220 of the optical anti-shake component 130 are correspondingly turned on, And turn off the rotation anti-shake function of the image sensor 1220 , so that when the electronic device 100 moves, the optical anti-shake component 130 compensates and shifts the lens 1210 and the image sensor 1220 simultaneously according to the movement of the electronic device 100 . Correspondingly, the third translation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 , as shown in FIG. 5 . For example, the third translation control command enables the preset calibration tool to drive the electronic device 100 to alternately translate in the X-axis direction and the Y-axis direction, wherein the distance of translation and the frequency of the alternation can be determined by those skilled in the art according to actual needs. There are no specific restrictions.
在电子设备100的平移过程中,实时获取电子设备100的运动数据并提供给光学防抖组件130,从而通过光学防抖组件130进行光学防抖处理。可以理解的是,由于本实施例同时开启了光学防抖组件130的镜头1210平移防抖功能和图像传感器1220平移防抖功能,光学防抖组件130在电子设备100的运动过程中将同时对镜头1210和图像传感器1220进行补偿平移。此外,获取图像传感器1220在平移过程中采集的矩形校准板的图像序列,记为第三图像序列。比如,通过图像传感器1220在平移过程中采集矩形校准板一分钟时长的图像序列,得到第三图像序列。During the translation process of the electronic device 100 , the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 . It can be understood that, since this embodiment enables both the lens 1210 translation anti-shake function and the image sensor 1220 translation anti-shake function of the optical anti-shake component 130, the optical anti-shake component 130 will simultaneously scan the lens during the movement of the electronic device 100. 1210 and image sensor 1220 for compensating translation. In addition, an image sequence of the rectangular calibration plate captured by the image sensor 1220 during the translation process is obtained, which is denoted as a third image sequence. For example, the image sensor 1220 captures a one-minute image sequence of the rectangular calibration plate during the translation process to obtain a third image sequence.
本实施例中,还从光学防抖组件130获取镜头1210对应第三图像序列中每一第三图像的位置姿态数据,即图像传感器1220在采集每一第三图像时镜头1210的位置姿态数据,记为第五位置姿态数据。此外,还从光学防抖组件130获取图像传感器1220采集每一第三图像时的位置姿态数据,记为第六位置姿态数据。此外,还获取中心标记在每一第三图像中的位置坐标,记为第三位置坐标。In this embodiment, the position and posture data of the lens 1210 corresponding to each third image in the third image sequence is also obtained from the optical anti-shake component 130, that is, the position and posture data of the lens 1210 when the image sensor 1220 captures each third image, Recorded as the fifth position and attitude data. In addition, the position and posture data when the image sensor 1220 captures each third image is also obtained from the optical anti-shake component 130, which is recorded as the sixth position and posture data. In addition, the position coordinates of the center mark in each third image are also obtained, which are denoted as the third position coordinates.
此外,还根据已拟合得到的第一函数关系,获取对应每一第五位置姿态数据的平移向量,记为第三平移向量,以及根据已拟合得到的第二函数关系,获取对应每一第六位置姿态数据的平移向量,记为第四平移向量。In addition, according to the first functional relationship obtained by fitting, the translation vector corresponding to each fifth position and attitude data is obtained, which is recorded as the third translation vector, and according to the second functional relationship obtained by fitting, the translation vector corresponding to each The translation vector of the sixth position and attitude data is recorded as the fourth translation vector.
可以理解的是,对于一第三图像,前述中心标记在该第三图像中的第三位置坐标等同于该第三图像的中心至中心标记的平移向量,且该平移向量应当由该第三图像对应的第三平移向量和第四平移向量融合得到。因此,根据每一第三图像对应的第三位置坐标、第三平移向量以及第四平移向量进行拟合,得到第一融合参数和第二融合参数。此处对拟合得到第一融合参数和第二融合参数的方式不作具体限制,可由本领域技术人员根据实际需要进行选取。比如,本实施例采用线性回归方法拟合得到第一融合参数和第二融合参数。It can be understood that, for a third image, the third position coordinates of the aforementioned center mark in the third image are equivalent to the translation vector from the center to the center mark of the third image, and the translation vector should be determined by the third image The corresponding third translation vector and the fourth translation vector are fused to obtain. Therefore, fitting is performed according to the third position coordinates, the third translation vector and the fourth translation vector corresponding to each third image to obtain the first fusion parameter and the second fusion parameter. Here, there is no specific limitation on the manner of obtaining the first fusion parameter and the second fusion parameter through fitting, which can be selected by those skilled in the art according to actual needs. For example, in this embodiment, a linear regression method is used for fitting to obtain the first fusion parameter and the second fusion parameter.
在其他实施例中,在拟合得到第一融合参数和第二融合参数之后,还对第一融合参数和第二融合参数的拟合误差进行评估(可由本领域技术人员根据实际需要选取评估方式,此处不作具体限制,比如可以采用均方误差),得到第一融合参数和第二融合参数的拟合误差,若第一融合参数和第二融合参数的拟合误差大于第三误差阈值(可由本领域技术人员根据实际需要取经验值),则识别并剔除明显异常的第五位置姿态数据、第六位置姿态数据和第三位置坐标后再次进行拟合,若新拟合的第一融合参数和第二融合参数的拟合误差仍大于第三误差阈值,则重新获取新的第三图像序列以及新的第五位置姿态数据、第六位置姿态数据以及第三位置坐标进行拟合,直至得到拟合误差小于或等于第三误差阈值的第一融合参数和第二融合参数。In other embodiments, after fitting the first fusion parameter and the second fusion parameter, the fitting error of the first fusion parameter and the second fusion parameter is also evaluated (the evaluation method can be selected by those skilled in the art according to actual needs , not specifically limited here, for example, the mean square error can be used to obtain the fitting error of the first fusion parameter and the second fusion parameter, if the fitting error of the first fusion parameter and the second fusion parameter is greater than the third error threshold ( According to actual needs, those skilled in the art can take empirical values), then identify and eliminate the obviously abnormal fifth position and attitude data, the sixth position and attitude data and the third position coordinates and then perform fitting again, if the first fusion of the new fit If the fitting error of the parameter and the second fusion parameter is still greater than the third error threshold, then reacquire the new third image sequence and the new fifth position and attitude data, the sixth position and attitude data and the third position coordinates for fitting until The first fusion parameter and the second fusion parameter whose fitting error is less than or equal to the third error threshold are obtained.
可选地,在一实施例中,根据第一旋转姿态数据,获取用于对光学防抖图像进行旋转校正的第一校正旋转矩阵,包括:Optionally, in an embodiment, according to the first rotation posture data, obtaining a first correction rotation matrix for performing rotation correction on the optical image stabilization image includes:
(1)根据旋转姿态数据和旋转角度的第三函数关系,获取对应第一旋转姿态数据的旋转角度;(1) According to the third functional relationship between the rotation attitude data and the rotation angle, obtain the rotation angle corresponding to the first rotation attitude data;
(2)获取光学防抖图像的旋转中心坐标,并根据旋转中心坐标和旋转角度获取第一校正旋转矩阵。(2) Obtain the rotation center coordinates of the optical image stabilization image, and obtain a first correction rotation matrix according to the rotation center coordinates and the rotation angle.
应当说明的是,本实施例预设有旋转姿态数据和旋转角度的第三函数关系,该第三函数关系描述了图像传感器1220的旋转姿态变化导致的图像内容的旋转姿态变化之间的对应关系。此外,本实施例还预先拟合有图像传感器1220采集图像的旋转中心坐标,此处对具体的拟合方式不作限制,可由本领域技术人员根据实际需要选取合适的拟合方式。It should be noted that this embodiment presets a third functional relationship between the rotation attitude data and the rotation angle, and the third functional relationship describes the correspondence between the changes in the rotation attitude of the image content caused by the change in the rotation attitude of the image sensor 1220 . In addition, this embodiment also pre-fits the rotation center coordinates of the images collected by the image sensor 1220 . There is no limitation to the specific fitting method here, and a suitable fitting method can be selected by those skilled in the art according to actual needs.
基于以上第三函数关系,本实施例在根据第一旋转姿态数据,获取用于对光学防抖图像进行旋转校正的第一校正旋转矩阵时,首先根据该第三函数关系,获取对应第一旋转姿态数据的旋转角度,此外,还获取光学防抖图像的旋转中心坐标,也即预先拟合得到的图像传感器1220采集图像的旋转中心坐标。Based on the third functional relationship above, in this embodiment, when obtaining the first correction rotation matrix for performing rotation correction on the optical image stabilization image according to the first rotation posture data, firstly, according to the third functional relationship, the corresponding first rotation matrix is obtained. The rotation angle of the posture data, in addition, the rotation center coordinates of the optical image stabilization image, that is, the rotation center coordinates of the images collected by the image sensor 1220 obtained through pre-fitting.
如上,在获取到对应第一旋转姿态数据的旋转角度,以及获取到光学防抖图像的旋转中心坐标之后,进一步根据该旋转角度以及旋转中心坐标来获取第一校正旋转矩阵。As above, after obtaining the rotation angle corresponding to the first rotation attitude data and the rotation center coordinates of the optical image stabilization image, the first correction rotation matrix is further obtained according to the rotation angle and the rotation center coordinates.
可选地,在一实施例中,根据旋转中心坐标和旋转角度获取第一校正旋转矩阵,包括:Optionally, in an embodiment, obtaining the first corrected rotation matrix according to the coordinates of the rotation center and the rotation angle includes:
根据旋转中心坐标和旋转角度,按照如下公式获取第一校正旋转矩阵:According to the coordinates of the rotation center and the rotation angle, the first correction rotation matrix is obtained according to the following formula:
Figure PCTCN2022092755-appb-000004
Figure PCTCN2022092755-appb-000004
其中,R表示第一校正旋转矩阵,C表示cos(γ),γ表示旋转角度,S表示sin(γ),Cx表示旋转中心坐标中的横坐标,Cy表示旋转中心坐标中的纵坐标。Wherein, R represents the first correction rotation matrix, C represents cos(γ), γ represents the rotation angle, S represents sin(γ), Cx represents the abscissa in the rotation center coordinates, and Cy represents the ordinate in the rotation center coordinates.
可选地,在一实施例中,矩形校准板还包括四角标记,旋转中心坐标和第三函数关系按照如下步骤生成:Optionally, in an embodiment, the rectangular calibration plate further includes four-corner marks, and the coordinates of the rotation center and the third functional relationship are generated according to the following steps:
(1)开启光学防抖组件130的图像传感器1220旋转防抖功能,并关闭镜头1210平移防抖功能和图像传感器1220平移防抖功能;(1) Turn on the image sensor 1220 rotation anti-shake function of the optical anti-shake assembly 130, and turn off the lens 1210 translation anti-shake function and the image sensor 1220 translation anti-shake function;
(2)发送旋转控制指令至预设校准工具,使得预设校准工具驱动电子设备100绕图像传感器1220的Z轴旋转;(2) sending a rotation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to rotate around the Z axis of the image sensor 1220;
(3)在电子设备100的旋转过程中,通过光学防抖组件130进行光学防抖处理,并获取图像传感器1220在旋转过程中采集的矩形校准板的第四图像序列;(3) During the rotation process of the electronic device 100, perform optical anti-shake processing through the optical anti-shake component 130, and acquire a fourth image sequence of the rectangular calibration plate collected by the image sensor 1220 during the rotation process;
(4)从光学防抖组件130获取图像传感器1220采集第四图像序列中每一第四图像时的第二旋转姿态数据,以及获取四角标记在每一第四图像中的第四位置坐标;(4) Obtain from the optical anti-shake component 130 the second rotation attitude data when the image sensor 1220 captures each fourth image in the fourth image sequence, and acquire the fourth position coordinates of the four corner marks in each fourth image;
(5)根据每一第四图像对应的第二旋转姿态数据和第四位置坐标,拟合得到旋转中心坐标和第三函数关系。(5) According to the second rotation attitude data and the fourth position coordinates corresponding to each fourth image, the coordinates of the rotation center and the third functional relationship are obtained by fitting.
本实施例中,还利用预设校准工具预先校准得到旋转中心坐标和第三函数关系。同样的,按照以上方式首先将电子设备100固定于预设校准工具,使得电子设备100与预设校准工具中的矩形校准板的位置相对固定。具体可参照以上实施例中的相关描述,此处不再赘述。In this embodiment, the coordinates of the rotation center and the third functional relationship are obtained through pre-calibration using a preset calibration tool. Similarly, firstly, the electronic device 100 is fixed to the preset calibration tool according to the above method, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed. For details, reference may be made to relevant descriptions in the foregoing embodiments, and details are not repeated here.
在将电子设备100固定于预设校准工具,并使得电子设备100与预设校准工具中的矩形校准板的位置相对固定之后,即可利用预设校准工具校准得到旋转中心坐标和第三函数关系。After the electronic device 100 is fixed to the preset calibration tool, and the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed, the coordinates of the center of rotation and the third functional relationship can be obtained by calibration with the preset calibration tool .
由于此时对旋转中心坐标和第三函数关系进行校准,相应开启光学防抖组件130的图像传感器1220旋转防抖功能,并关闭镜头1210平移防抖功能和图像传感器1220平移防抖功能,以此,光学防抖组件130在电子设备100运动时,根据电子设备100的运动仅对图像传感器1220进行补偿旋转。相应的,发送旋转控制指令至预设校准工具,使得预设校准工具驱动电子设备100绕图像传感器1220的Z轴旋转。比如,该旋转控制指令使得预设校准工具驱动电子设备100绕图像传感器1220的Z轴交替旋转,其中旋转的速度以及交替的频率可由本领域技术人员根据实际需要进行取值,此处不作具体限制。Since the coordinates of the rotation center and the third functional relationship are calibrated at this time, the image sensor 1220 rotation anti-shake function of the optical anti-shake component 130 is correspondingly turned on, and the translation anti-shake function of the lens 1210 and the translation anti-shake function of the image sensor 1220 are turned off, thereby , when the electronic device 100 moves, the optical anti-shake component 130 only performs compensation rotation on the image sensor 1220 according to the movement of the electronic device 100 . Correspondingly, a rotation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to rotate around the Z-axis of the image sensor 1220 . For example, the rotation control command enables the preset calibration tool to drive the electronic device 100 to alternately rotate around the Z-axis of the image sensor 1220, wherein the rotation speed and the alternating frequency can be determined by those skilled in the art according to actual needs, and no specific limitation is made here. .
在电子设备100的旋转过程中,实时获取电子设备100的运动数据并提供给光学防抖组件130,从而通过光学防抖组件130进行光学防抖处理。可以理解的是,由于本实施例仅开启了光学防抖组件130的图像传感器1220旋转防抖功能,光学防抖组件130在电子设备100的运动过程中将仅对图像传感器1220进行补偿旋转。此外,获取图像传感器1220在旋转过程中采集的矩形校准板的图像序列,记为第四图像序列。比如,通过图像传感器1220在旋转过程中采集矩形校准板一分钟时长的图像序列,得到第四图像序列。During the rotation of the electronic device 100 , the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 . It can be understood that, since this embodiment only enables the anti-shake function of the image sensor 1220 of the optical anti-shake component 130 , the optical anti-shake component 130 will only compensate for the rotation of the image sensor 1220 during the movement of the electronic device 100 . In addition, an image sequence of the rectangular calibration plate captured by the image sensor 1220 during the rotation process is obtained, which is denoted as a fourth image sequence. For example, the image sensor 1220 captures a one-minute image sequence of the rectangular calibration plate during the rotation process to obtain a fourth image sequence.
本实施例中,还从光学防抖组件130获取图像传感器1220采集第四图像序列中每一第四图像的旋转姿态数据,记为第二旋转姿态数据。此外,还获取四角标记(左上角标记、右上角标记、右下角标记以及左下角标记)在每一第四图像中的位置坐标,记为第四位置坐标。In this embodiment, the image sensor 1220 also acquires the rotation attitude data of each fourth image in the fourth image sequence collected from the optical anti-shake component 130, which is recorded as the second rotation attitude data. In addition, the position coordinates of the four-corner markers (upper-left marker, upper-right marker, lower-right marker, and lower-left marker) in each fourth image are also obtained, which are recorded as fourth position coordinates.
可以理解的是,对于一第四图像,若采用第一校正旋转矩阵校正对前述四角标记进行旋转校正,校正后的四角标记应当位于校正后的第四图像的对应四角位置。因此,根据每一第四图像对应的第二旋转姿态数据和第四位置坐标进行拟合,即可拟合得到旋转中心坐标以及第三函数关系。It can be understood that, for a fourth image, if the first correction rotation matrix is used to correct the rotation of the aforementioned four-corner marks, the corrected four-corner marks should be located at the corresponding four-corner positions of the corrected fourth image. Therefore, by performing fitting according to the second rotation posture data and the fourth position coordinates corresponding to each fourth image, the rotation center coordinates and the third functional relationship can be obtained by fitting.
在其他实施例中,在拟合得到旋转中心坐标和第三函数关系之后,还对旋转中心坐标和第三函数关系的拟合误差进行评估(可由本领域技术人员根据实际需要选取评估方式,此处不作具体限制,比如可以采用重投影误差),得到旋转中心坐标和第三函数关系的拟合误差,若旋转中心坐标和第三函数关系的拟合误差大于第四误差阈值(可由本领域技术 人员根据实际需要取经验值),则识别并剔除明显异常的第二旋转姿态数据和第四位置坐标后再次进行拟合,若新拟合的旋转中心坐标和第三函数关系的拟合误差仍大于第四误差阈值,则重新获取新的第四图像序列以及新的第二旋转姿态数据和第四位置坐标进行拟合,直至得到拟合误差小于或等于第四误差阈值的第三函数关系。In other embodiments, after the rotation center coordinates and the third functional relationship are obtained through fitting, the fitting error between the rotation center coordinates and the third functional relationship is also evaluated (evaluation methods can be selected by those skilled in the art according to actual needs, here There is no specific limitation, for example, reprojection error can be used to obtain the fitting error between the rotation center coordinates and the third function relationship, if the fitting error between the rotation center coordinates and the third function relationship is greater than the fourth error threshold (which can be determined by those skilled in the art personnel according to actual needs), then identify and eliminate the obviously abnormal second rotation attitude data and fourth position coordinates, and then perform fitting again. If the fitting error between the newly fitted rotation center coordinates and the third function relationship is still If it is greater than the fourth error threshold, re-acquire a new fourth image sequence, new second rotation attitude data, and fourth position coordinates for fitting until a third functional relationship with a fitting error less than or equal to the fourth error threshold is obtained.
可选地,在一实施例中,第三函数关系包括多项式函数,根据每一第四图像对应的第二旋转姿态数据和第四位置坐标,拟合得到旋转中心坐标和第三函数关系,包括:Optionally, in an embodiment, the third functional relationship includes a polynomial function, and according to the second rotation posture data and the fourth position coordinates corresponding to each fourth image, the coordinates of the rotation center and the third functional relationship are obtained by fitting, including :
根据每一第四图像对应的第二旋转姿态数据和第四位置坐标,按照如下公式拟合得到旋转中心坐标和第三函数关系:According to the second rotation attitude data and the fourth position coordinates corresponding to each fourth image, the relationship between the rotation center coordinates and the third function is obtained by fitting according to the following formula:
Figure PCTCN2022092755-appb-000005
Figure PCTCN2022092755-appb-000005
θ=[Cx,Cy,α];θ = [Cx, Cy, α];
Figure PCTCN2022092755-appb-000006
Figure PCTCN2022092755-appb-000006
其中,Pi表示第i个四角标记的第四位置坐标,h 2'表示第二旋转姿态数据,f()表示多项式函数,r表示预设搜索半径,α表示多项式函数的多项式系数,imW表示第四图像的宽,imH表示第四图像的高。 Among them, Pi represents the fourth position coordinates of the i-th four-corner marker, h 2 ' represents the second rotation attitude data, f() represents a polynomial function, r represents a preset search radius, α represents the polynomial coefficient of the polynomial function, imW represents the first The width of the four images, imH represents the height of the fourth image.
应当说明的是,在对f()进行拟合时,可由本领域技术人员根据实际需要构建合适的损失函数,比如,可由本领域技术人员根据实际几何关系进行构建,包括但不限于弦长关系或旋转关系等。It should be noted that when fitting f(), a suitable loss function can be constructed by those skilled in the art according to actual needs, for example, it can be constructed by those skilled in the art according to the actual geometric relationship, including but not limited to the chord length relationship or rotation relations etc.
此外,本实施例中对预设搜索半径r的取值也不作具体限制,可由本领域技术人员根据实际需要进行取值。In addition, there is no specific limitation on the value of the preset search radius r in this embodiment, and it can be selected by those skilled in the art according to actual needs.
此外,本实施例中对多项式函数的次数不作具体限制,可由本领域技术人员根据实际需要进行选取,比如,本实施例中,采用3次多项式函数。In addition, the order of the polynomial function is not specifically limited in this embodiment, and can be selected by those skilled in the art according to actual needs. For example, in this embodiment, a polynomial function of degree 3 is used.
可选地,在一实施例中,本申请提供的图像处理方法,还包括:Optionally, in one embodiment, the image processing method provided by the present application further includes:
(1)开启光学防抖组件130的镜头1210平移防抖功能、图像传感器1220平移防抖功能以及图像传感器1220旋转防抖功能;(1) Turn on the lens 1210 translation anti-shake function of the optical anti-shake component 130, the image sensor 1220 translation anti-shake function and the image sensor 1220 rotation anti-shake function;
(2)发送旋转平移控制指令至预设校准工具,使得预设校准工具驱动电子设备100绕图像传感器1220的Z轴旋转,以及驱动电子设备100在电子设备100的X轴方向和Y轴方向平移;(2) Send a rotation and translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to rotate around the Z-axis of the image sensor 1220, and drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 ;
(3)在电子设备100的旋转平移过程中,通过光学防抖组件130进行光学防抖处理,并获取图像传感器1220在旋转平移过程中采集的矩形校准板的第五图像序列;(3) During the rotation and translation process of the electronic device 100, perform optical anti-shake processing through the optical anti-shake component 130, and acquire the fifth image sequence of the rectangular calibration plate collected by the image sensor 1220 during the rotation and translation process;
(4)从光学防抖组件130获取镜头1210对应第五图像序列中每一第五图像的第七位置姿态数据、图像传感器1220采集每一第五图像时的第八位置姿态数据和第三旋转姿态数据;(4) Obtain from the optical anti-shake component 130 the seventh position and attitude data of the lens 1210 corresponding to each fifth image in the fifth image sequence, the eighth position and attitude data and the third rotation when the image sensor 1220 captures each fifth image attitude data;
(5)根据每一第五图像对应的第七位置姿态数据、第八位置姿态数据以及第一函数关系、第二函数关系,获取用于对每一第五图像进行平移校正的第二校正平移向量;(5) According to the seventh position and attitude data, the eighth position and attitude data and the first functional relationship and the second functional relationship corresponding to each fifth image, obtain the second corrected translation for translation correction of each fifth image vector;
(6)根据每一第五图像对应的第三旋转姿态数据、第三函数关系以及旋转中心坐标,获取用于对每一第五图像进行旋转校正的第二校正旋转矩阵;(6) According to the third rotation posture data corresponding to each fifth image, the third functional relationship and the coordinates of the rotation center, obtain a second correction rotation matrix for performing rotation correction on each fifth image;
(7)根据第二校正平移向量和第二校正旋转矩阵分别对每一第五图像的中心像素进行平移校正和旋转校正,得到每一中心像素的校正坐标;(7) Perform translation correction and rotation correction on the center pixel of each fifth image according to the second correction translation vector and the second correction rotation matrix, to obtain the correction coordinates of each center pixel;
(8)获取中心标记在每一第五图像中的第五位置坐标,并根据每一第五图像对应的校正坐标和第五位置坐标的差异,对第一函数关系、第二函数关系以及第三函数关系进行联合修正。(8) Obtain the fifth position coordinates of the center mark in each fifth image, and according to the difference between the correction coordinates corresponding to each fifth image and the fifth position coordinates, the first functional relationship, the second functional relationship and the first functional relationship The three-function relationship is jointly corrected.
本实施例中,还利用预设校准工具对第一函数关系、第二函数关系以及第三函数关系进行联合修正。同样的,按照以上方式首先将电子设备100固定于预设校准工具,使得电子设备100与预设校准工具中的矩形校准板的位置相对固定。具体可参照以上实施例中的相关描述,此处不再赘述。In this embodiment, the first functional relationship, the second functional relationship and the third functional relationship are jointly corrected by using a preset calibration tool. Similarly, firstly, the electronic device 100 is fixed to the preset calibration tool according to the above method, so that the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed. For details, reference may be made to relevant descriptions in the foregoing embodiments, and details are not repeated here.
在将电子设备100固定于预设校准工具,并使得电子设备100与预设校准工具中的矩形校准板的位置相对固定之后,即可利用预设校准工具对第一函数关系、第二函数关系以及第三函数关系进行联合修正。After the electronic device 100 is fixed to the preset calibration tool, and the positions of the electronic device 100 and the rectangular calibration plate in the preset calibration tool are relatively fixed, the first functional relationship and the second functional relationship can be determined using the preset calibration tool. and the third functional relationship for joint correction.
由于此时对第一函数关系、第二函数关系以及第三函数关系进行联合修正,相应开启光学防抖组件130的全部防抖功能,即图像传感器1220平移防抖功能、镜头1210平移防抖功能和图像传感器1220旋转防抖功能,以此,使得光学防抖组件130在电子设备100运动时,根据电子设备100的运动对镜头1210进行补偿平移,以及对图像传感器1220进行补偿平移和补偿旋转。相应的,发送旋转平移控制指令至预设校准工具,使得预设校准工具驱动电子设备100绕图像传感器1220的Z轴旋转,同时驱动电子设备100在电子设备100的X轴方向和Y轴方向平移。比如,该旋转平移控制指令使得预设校准工具驱动电子设备100在其X轴方向和Y轴方向交替平移,同时绕图像传感器1220的Z轴交替旋转,其中平移的距离、交替平移的频率、旋转的速度以及交替旋转频率均可由本领域技术人员根据实际需要进行取值,此处不作具体限制。Since the first functional relationship, the second functional relationship, and the third functional relationship are jointly corrected at this time, all the anti-shake functions of the optical anti-shake component 130 are correspondingly turned on, that is, the translational anti-shake function of the image sensor 1220 and the translational anti-shake function of the lens 1210 and the image sensor 1220 rotation anti-shake function, so that when the electronic device 100 moves, the optical anti-shake component 130 performs compensation translation for the lens 1210 according to the movement of the electronic device 100 , and performs compensation translation and compensation rotation for the image sensor 1220 . Correspondingly, the rotation and translation control command is sent to the preset calibration tool, so that the preset calibration tool drives the electronic device 100 to rotate around the Z-axis of the image sensor 1220, and at the same time drives the electronic device 100 to translate in the X-axis direction and the Y-axis direction of the electronic device 100 . For example, the rotation and translation control command makes the preset calibration tool drive the electronic device 100 to alternately translate in its X-axis direction and Y-axis direction, and at the same time alternately rotate around the Z-axis of the image sensor 1220, wherein the distance of translation, the frequency of alternate translation, the rotation The speed and the alternating rotation frequency can be selected by those skilled in the art according to actual needs, and no specific limitation is made here.
在电子设备100的旋转平移过程中,实时获取电子设备100的运动数据并提供给光学防抖组件130,从而通过光学防抖组件130进行光学防抖处理。可以理解的是,由于本实施例开启了光学防抖组件130的全部防抖功能,光学防抖组件130在电子设备100的运动过程中将对镜头1210进行补偿平移,同时对图像传感器1220进行补偿平移和补偿旋转。此外,获取图像传感器1220在旋转平移过程中采集的矩形校准板的图像序列,记为第五图像序列。比如,通过图像传感器1220在旋转平移过程中采集矩形校准板一分钟时长的图像序列,得到第五图像序列。During the rotation and translation process of the electronic device 100 , the motion data of the electronic device 100 is acquired in real time and provided to the optical anti-shake component 130 , so that the optical anti-shake process is performed by the optical anti-shake component 130 . It can be understood that, since all the anti-shake functions of the optical anti-shake component 130 are turned on in this embodiment, the optical anti-shake component 130 will compensate the translation of the lens 1210 and compensate the image sensor 1220 during the movement of the electronic device 100 . Translation and compensated rotation. In addition, the image sequence of the rectangular calibration plate captured by the image sensor 1220 during the rotation and translation is acquired, which is denoted as the fifth image sequence. For example, the image sensor 1220 collects a one-minute image sequence of the rectangular calibration plate during the rotation and translation process to obtain a fifth image sequence.
本实施例中,从光学防抖组件130获取镜头1210对应第五图像序列中每一第五图像的位置姿态数据,也即是图像传感器1220采集每一第五图像时,镜头1210的位置姿态数据,记为第七位置姿态数据,此外,还获取图像传感器1220采集每一第五图像时的位置姿态数据,记为第八位置姿态数据,以及获取图像传感器1220采集每一第五图像时的旋转姿态数据,记为第三旋转姿态数据。In this embodiment, the position and posture data of the lens 1210 corresponding to each fifth image in the fifth image sequence is obtained from the optical anti-shake component 130, that is, the position and posture data of the lens 1210 when the image sensor 1220 captures each fifth image , recorded as the seventh position and posture data, in addition, the position and posture data when the image sensor 1220 captures every fifth image is also obtained, which is recorded as the eighth position and posture data, and the rotation when the image sensor 1220 captures every fifth image Attitude data, denoted as the third rotation attitude data.
如上,在获取到每一第五图像对应的第七位置姿态数据、第八位置姿态数据以及第三旋转姿态数据之后,进一步根据每一第五图像对应的第七位置姿态数据、第八位置姿态数据以及第一函数关系和第二函数关系,获取用于对每一第五图像进行平移校正的校正平移向量,记为第二校正平移向量。具体可参照以上实施例中获取第一校正平移向量的方式相应实施,此处不再赘述。As above, after obtaining the seventh position and posture data, the eighth position and posture data and the third rotation posture data corresponding to each fifth image, further according to the seventh position and posture data, the eighth position and posture data corresponding to each fifth image, The data and the first functional relationship and the second functional relationship are used to obtain a correction translation vector for translation correction of each fifth image, which is denoted as a second correction translation vector. Specifically, it may be implemented correspondingly with reference to the manner of obtaining the first correction translation vector in the above embodiments, which will not be repeated here.
此外,还根据第三函数关系、旋转中心坐标以及每一第五图像对应的第三旋转姿态数据,获取用于对每一第五图像进行旋转校正的校正旋转矩阵,记为第二校正旋转矩阵。具体可参照以上实施例中获取第一校正旋转矩阵的方式相应实施,此处不再赘述。In addition, according to the third functional relationship, the coordinates of the rotation center, and the third rotation posture data corresponding to each fifth image, a corrected rotation matrix for performing rotation correction on each fifth image is obtained, which is denoted as the second corrected rotation matrix . Specifically, it can be implemented correspondingly with reference to the manner of obtaining the first correction rotation matrix in the above embodiments, and details are not repeated here.
如上,在获取到用于对每一第五图像进行平移校正的第二校正平移向量以及用于对每一第五图像进行旋转校正的第二校正旋转矩阵之后,即根据第二校正平移向量和第二校正 旋转矩阵分别对每一第五图像的中心像素进行平移校正和旋转校正,得到每一第五图像的中心像素的校正坐标。此外,还获取中心标记在每一第五图像中的位置坐标,记为第五位置坐标。可以理解的是,对于一第五图像,该第五图像对于的校正坐标和第五位置坐标越接近,则说明本实施例对第一函数关系、第二函数关系以及第三函数关系的总拟合误差越小。因此,本实施例根据每一第五图像对应的校正坐标和第五位置坐标间的差异,以尽可能的消除该差异为目标,对第一函数关系、第二函数关系以及第三函数关系进行联合修正。As above, after obtaining the second correction translation vector for translation correction of each fifth image and the second correction rotation matrix for rotation correction of each fifth image, that is, according to the second correction translation vector and The second correction rotation matrix respectively performs translation correction and rotation correction on the central pixel of each fifth image to obtain corrected coordinates of the central pixel of each fifth image. In addition, the position coordinates of the center mark in each fifth image are also obtained, which are denoted as fifth position coordinates. It can be understood that, for a fifth image, the closer the corrected coordinates of the fifth image pair are to the fifth position coordinates, the more general simulations of the first functional relationship, the second functional relationship and the third functional relationship in this embodiment are described. The smaller the combined error. Therefore, in this embodiment, according to the difference between the correction coordinates corresponding to each fifth image and the fifth position coordinates, with the goal of eliminating the difference as much as possible, the first functional relationship, the second functional relationship, and the third functional relationship are calculated. Joint revision.
比如,本实施例中根据第一函数关系、第二函数关系以及第三函数关系各自拟合误差的大小,按照由大至小的顺序进行修正。For example, in this embodiment, according to the size of the fitting errors of the first functional relationship, the second functional relationship and the third functional relationship, corrections are made in descending order.
可选地,在一实施例中,获取图像传感器1220采集的对应运动数据的光学防抖图像,包括:Optionally, in an embodiment, acquiring an optical image stabilization image corresponding to motion data collected by the image sensor 1220 includes:
(1)根据对应运动数据的第一时延参数对运动数据的第一获取时间戳进行修正,得到第一修正时间戳;(1) Correcting the first acquisition time stamp of the motion data according to the first time delay parameter corresponding to the motion data to obtain the first corrected time stamp;
(3)按照第一修正时间戳,获取图像传感器1220采集的对应运动数据的光学防抖图像。(3) According to the first corrected time stamp, acquire the optical image stabilization image corresponding to the motion data collected by the image sensor 1220 .
本实施例中,在获取图像传感器1220采集的对应运动数据的光学防抖图像时,首先获取运动数据的获取时间戳,记为第一获取时间戳,该第一获取时间戳用于描述获取到运动数据的获取时刻。In this embodiment, when acquiring the optical image stabilization image corresponding to the movement data collected by the image sensor 1220, the acquisition time stamp of the movement data is first acquired, which is recorded as the first acquisition time stamp, and the first acquisition time stamp is used to describe the acquired The acquisition time of motion data.
可以理解的是,运动传感器110从采集得到运动数据到输出该运动数据存在一定的时延,本实施例中,为了消除该时延,获取到与运动数据准确对应的光学防抖图像,预先校准有对应运动数据的第一时延参数,该第一时延参数用于描述运动传感器110采集到运动数据直至输出运动数据的时延。It can be understood that there is a certain time delay between the motion sensor 110 collecting motion data and outputting the motion data. There is a first time delay parameter corresponding to the motion data, and the first time delay parameter is used to describe the time delay from the motion sensor 110 collecting the motion data to outputting the motion data.
相应的,本实施例根据对应运动数据的第一时延参数对第一获取时间戳进行修正,将修正后的第一获取时间戳记为第一修正时间戳,该第一修正时间戳即描述了前述运动数据的采集时刻。此时,按照第一修正时间戳,即可获取到图像传感器1220采集的对应前述运动数据的光学防抖图像。Correspondingly, in this embodiment, the first acquisition timestamp is corrected according to the first delay parameter of the corresponding motion data, and the corrected first acquisition timestamp is marked as the first modified timestamp, which describes the The collection time of the aforementioned motion data. At this point, according to the first corrected time stamp, the optical image stabilization image collected by the image sensor 1220 and corresponding to the aforementioned motion data can be acquired.
可选地,在一实施例中,第一时延参数按照如下步骤预先生成:Optionally, in an embodiment, the first delay parameter is pre-generated according to the following steps:
(1)获取样本抖动图像序列;(1) Obtain a sample dithering image sequence;
(2)按照样本抖动图像序列中每一样本抖动图像的第二获取时间戳,获取对应每一样本抖动图像的样本运动数据,得到样本运动数据序列;(2) Acquiring sample motion data corresponding to each sample shake image according to the second acquisition time stamp of each sample shake image in the sample shake image sequence to obtain a sample motion data sequence;
(3)根据预设时延参数、预设搜索步长、样本抖动图像序列及其对应的样本运动数据序列,搜索得到第一时延参数。(3) According to the preset time delay parameter, the preset search step size, the sample shaking image sequence and the corresponding sample motion data sequence, search to obtain the first time delay parameter.
本实施例提供一可选地的第一时延参数的校准方式。This embodiment provides an optional calibration manner of the first delay parameter.
其中,首先获取未经电子防抖处理的图像序列作为样本,记为样本抖动图像序列。比如,关闭光学防抖组件130和电子防抖组件140的防抖功能,通过电子设备100拍摄得到一定时长的图像序列作为样本抖动图像序列。Among them, the image sequence without electronic anti-shake processing is first obtained as a sample, which is recorded as a sample shake image sequence. For example, the anti-shake functions of the optical anti-shake component 130 and the electronic anti-shake component 140 are turned off, and an image sequence of a certain duration is captured by the electronic device 100 as a sample shake image sequence.
此外,还按照样本抖动图像序列中每一样本抖动图像的第二获取时间戳(用于描述图像传感器1220输出对应的样本抖动图像的输出时刻),获取对应每一样本抖动图像的样本运动数据,得到与样本抖动图像序列对应的样本运动数据序列。In addition, the sample motion data corresponding to each sample shake image is acquired according to the second acquisition time stamp (used to describe the output moment when the image sensor 1220 outputs the corresponding sample shake image) of each sample shake image in the sample shake image sequence, A sample motion data sequence corresponding to the sample shaken image sequence is obtained.
如上,在获取到样本抖动图像序列及其对应的样本运动数据序列之后,按照预设搜索策略,根据预设时延参数、预设搜索步长、样本抖动图像序列及其对应的样本运动数据序列,搜索得到第一时延参数。此处对预设搜索策略、预设时延参数以及预设搜索步长的配置不作具体限制,可由本领域技术人员根据实际需要进行配置。As above, after obtaining the sample shaking image sequence and its corresponding sample motion data sequence, according to the preset search strategy, according to the preset time delay parameter, preset search step size, sample shaking image sequence and its corresponding sample motion data sequence , to obtain the first delay parameter. Here, there is no specific limitation on the configuration of the preset search strategy, the preset delay parameter, and the preset search step size, which can be configured by those skilled in the art according to actual needs.
可选地,在一实施例中,根据预设时延参数、预设搜索步长、样本抖动图像序列及其对应的样本运动数据序列,搜索得到第一时延参数,包括Optionally, in an embodiment, according to a preset delay parameter, a preset search step size, a sample shaking image sequence and its corresponding sample motion data sequence, the first delay parameter is obtained by searching, including
(1)根据预设时延参数和预设搜索步长获取预设数量的候选时延参数;(1) Acquiring a preset number of candidate time delay parameters according to a preset time delay parameter and a preset search step;
(2)根据每一候选时延参数对样本运动数据序列进行修正,得到预设数量的修正样本运动数据序列;(2) Correcting the sample motion data sequence according to each candidate delay parameter to obtain a preset number of corrected sample motion data sequences;
(3)根据每一修正样本运动数据序列,通过电子防抖组件140对样本抖动图像序列进行电子防抖处理,得到预设数量的防抖图像序列;(3) According to each corrected sample motion data sequence, electronic anti-shake processing is performed on the sample shake image sequence through the electronic anti-shake component 140, to obtain a preset number of anti-shake image sequences;
(4)对每一防抖图像序列的防抖质量进行量化评分,得到每一防抖图像序列的防抖质量评分;(4) Quantify and score the anti-shake quality of each anti-shake image sequence, obtain the anti-shake quality score of each anti-shake image sequence;
(5)将预设时延参数更新为防抖质量评分最高的防抖图像序列所对应的候选时延参数,以及根据预设更新参数对预设搜索步长进行更新;(5) updating the preset time delay parameter to the candidate time delay parameter corresponding to the anti-shake image sequence with the highest anti-shake quality score, and updating the preset search step according to the preset update parameter;
(6)重复以上步骤,直至满足预设搜索条件,将满足预设搜索条件时的预设时延参数作为第一时延参数。(6) The above steps are repeated until the preset search condition is met, and the preset delay parameter when the preset search condition is met is used as the first delay parameter.
本实施例提供一可选地搜索第一时延参数的搜索策略。This embodiment provides a search strategy for optionally searching the first delay parameter.
其中,首先根据预设时延参数和预设搜索步长获取预设数量的候选时延参数。此处对预设数量的取值不作具体限制,比如,当取值为3时,以预设时延参数D 0为中心,以预设搜索步长Δd生成[D 0-Δd,D 0,D 0+Δd]3个候选时延参数。 Wherein, firstly, a preset number of candidate delay parameters are acquired according to a preset delay parameter and a preset search step. Here, there is no specific limitation on the value of the preset number. For example, when the value is 3, the preset delay parameter D 0 is the center, and the preset search step size Δd is used to generate [D 0 -Δd,D 0 , D 0 +Δd] 3 candidate delay parameters.
然后,根据每一候选时延参数分别对样本运动数据序列进行修正,也即根据每一候选时延参数对样本运动数据序列中样本运动数据与样本抖动图像序列中样本抖动图像的对应关系进行更新,相应得到预设数量的修正样本运动数据序列;Then, the sample motion data sequence is respectively corrected according to each candidate time delay parameter, that is, the corresponding relationship between the sample motion data in the sample motion data sequence and the sample shake image in the sample shake image sequence is updated according to each candidate time delay parameter , correspondingly obtain a preset number of corrected sample motion data sequences;
然后,根据每一修正样本运动数据序列,通过电子防抖组件140对样本抖动图像序列进行电子防抖处理,得到预设数量的防抖图像序列,其中,对于一修正样本运动数据序列,将该修正样本运动数据序列中每一修正样本运动数据和样本抖动图像序列与之对应的样本抖动图像输入样本抖动图像进行防抖处理,相应得到对应该修正样本运动数据序列的一防抖图像序列。Then, according to each corrected sample motion data sequence, electronic anti-shake processing is performed on the sample shake image sequence through the electronic anti-shake component 140 to obtain a preset number of anti-shake image sequences, wherein, for a corrected sample motion data sequence, the In the corrected sample motion data sequence, each corrected sample motion data and sample dithered image sequence corresponding to the sample dithered image is input to the sample dithered image for anti-shake processing, and an anti-shake image sequence corresponding to the corrected sample motion data sequence is correspondingly obtained.
如上,在得到预设数量的防抖图像序列之后,按照预设的量化评分策略对每一防抖图像序列的防抖质量进行量化评分,得到每一防抖图像序列的防抖质量评分。此次对量化评分策略的配置不作具体限制,可由本领域技术人员根据实际需要进行配置。As above, after the preset number of anti-shake image sequences are obtained, the anti-shake quality of each anti-shake image sequence is quantified and scored according to the preset quantitative scoring strategy, and the anti-shake quality score of each anti-shake image sequence is obtained. The configuration of the quantitative scoring strategy is not specifically limited this time, and can be configured by those skilled in the art according to actual needs.
比如,本实施例中采用逐帧特征匹配以及平均特征距离统计的方式对防抖图像序列的防抖质量进行量化评分,可以表示为:For example, in this embodiment, the method of frame-by-frame feature matching and average feature distance statistics is used to quantify and score the anti-shake quality of the anti-shake image sequence, which can be expressed as:
Figure PCTCN2022092755-appb-000007
Figure PCTCN2022092755-appb-000007
其中,s表示防抖质量评分(其值越大,表示防抖质量越高),p表示特征匹配点集,i表示防抖图像序列的帧号,N表示防抖图像序列中防抖图像的总帧数。应当说明的是,特征匹配算法及其描述子,可由本领域技术人员根据实际需要进行选择,包括但不限于SIFT、FAST、Harris、ORB等。Among them, s represents the anti-shake quality score (the larger the value, the higher the anti-shake quality), p represents the feature matching point set, i represents the frame number of the anti-shake image sequence, and N represents the number of anti-shake images in the anti-shake image sequence total frames. It should be noted that the feature matching algorithm and its descriptor can be selected by those skilled in the art according to actual needs, including but not limited to SIFT, FAST, Harris, ORB and so on.
如上,在完成对每一防抖图像序列的量化评分,相应得到每一防抖图像序列的防抖质量评分之后,将预设时延参数更新为防抖质量评分最高的防抖图像序列所对应的候选时延参数,以及根据预设更新参数,按照预设更新策略对预设搜索步长进行更新。此处对预设 更新策略的配置不作具体限制,以减少预设搜索步长为约束,可由本领域技术人员根据实际需要对预设更新策略进行配置。As above, after the quantitative scoring of each anti-shake image sequence is completed, and the anti-shake quality score of each anti-shake image sequence is correspondingly obtained, the preset delay parameter is updated to correspond to the anti-shake image sequence with the highest anti-shake quality score The candidate time delay parameters, and according to the preset update parameters, the preset search step is updated according to the preset update strategy. Here, there is no specific restriction on the configuration of the preset update strategy, and the preset update strategy can be configured by those skilled in the art according to actual needs with the restriction of reducing the preset search step size.
比如,本实施例配置的预设更新策略可以表示为:For example, the default update policy configured in this embodiment can be expressed as:
Δd′=Δd/M;M>1;Δd'=Δd/M; M>1;
其中,Δd′表示更新后的预设搜索步长,Δd表示更新前的预设搜索步长,M表示预设更新参数。Wherein, Δd' represents a preset search step after update, Δd represents a preset search step before update, and M represents a preset update parameter.
在完成对预设时延参数和预设搜索步长的更新之后,重复以上步骤继续进行搜索,直至满足预设搜索条件,将满足预设搜索条件时的预设时延参数作为第一时延参数。此处对预设搜索条件的配置不作具体限制,可由本领域技术人员根据实际需要进行配置。After updating the preset delay parameters and preset search steps, repeat the above steps to continue searching until the preset search conditions are met, and use the preset delay parameters when the preset search conditions are met as the first delay parameter. The configuration of the preset search conditions is not specifically limited here, and can be configured by those skilled in the art according to actual needs.
可选地,在一实施例中,预设搜索条件包括:Optionally, in an embodiment, the preset search conditions include:
任一防抖图像序列的防抖质量评分大于或等于评分阈值;或者The stabilization quality score of any stabilized image sequence is greater than or equal to the scoring threshold; or
更新后的预设搜索步长小于步长阈值;或者The updated preset search step size is smaller than the step size threshold; or
搜索次数达到次数阈值。The number of searches has reached the number threshold.
应当说明的是,本实施例对评分阈值、步长阈值以及次数阈值的取值均不作具体限制,可由本领域技术人员根据实际需要取经验值。It should be noted that this embodiment does not specifically limit the scoring threshold, the step threshold, and the number of times threshold, and those skilled in the art can obtain empirical values according to actual needs.
可选地,在一实施例中,从光学防抖组件130获取镜头1210的第一位置姿态数据、图像传感器1220的第二位置姿态数据和第一旋转姿态数据,包括:Optionally, in an embodiment, acquiring the first position and posture data of the lens 1210, the second position and posture data and the first rotation posture data of the image sensor 1220 from the optical anti-shake component 130 includes:
(1)根据对应光学防抖组件130的第二时延参数对第一修正时间戳进行修正,得到第二修正时间戳;(1) Correcting the first corrected timestamp according to the second time delay parameter corresponding to the optical anti-shake component 130 to obtain a second corrected timestamp;
(2)按照第二修正时间戳,从光学防抖组件130获取镜头1210的第一位置姿态数据、图像传感器1220的第二位置姿态数据和第一旋转姿态数据。(2) Obtain the first position and posture data of the lens 1210 , the second position and posture data and the first rotation posture data of the image sensor 1220 from the optical anti-shake component 130 according to the second corrected time stamp.
可以理解的是,光学防抖组件130从采集得到镜头1210的位置姿态数据、图像传感器1220的位置姿态数据和旋转姿态数据到输出这些姿态数据存在一定的时延,本实施例中,为了消除该时延,获取到光学防抖图像准确对应的第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据,预先校准有对应光学防抖组件130的第二时延参数,该第二时延参数用于描述光学防抖组件130采集到前述姿态数据直至输出前述姿态数据的时延。It can be understood that there is a certain delay in the optical anti-shake component 130 from collecting the position and attitude data of the lens 1210, the position and attitude data and the rotation attitude data of the image sensor 1220 to outputting these attitude data. In this embodiment, in order to eliminate this Time delay, the first position and attitude data, the second position and attitude data and the first rotation attitude data accurately corresponding to the optical image stabilization image are obtained, and the second time delay parameter corresponding to the optical anti-shake component 130 is pre-calibrated. The delay parameter is used to describe the delay from when the optical image stabilization component 130 collects the aforementioned attitude data until it outputs the aforementioned attitude data.
相应的,本实施例在从光学防抖组件130获取镜头1210的第一位置姿态数据、图像传感器1220的第二位置姿态数据和第一旋转姿态数据时,首先根据对应光学防抖组件130的第二时延参数对第一修正时间戳进行修正,得到第二修正时间戳;再按照第二修正时间戳,从光学防抖组件130获取镜头1210的第一位置姿态数据、图像传感器1220的第二位置姿态数据和第一旋转姿态数据,也即从光学防抖组件130获取输出时间戳与第二修正时间戳匹配的镜头1210的位置姿态数据作为第一位置姿态数据,从光学防抖组件130获取输出时间戳与第二修正时间戳匹配的图像传感器1220的位置姿态数据作为第二位置姿态数据,以及从光学防抖组件130获取输出时间戳与第二修正时间戳匹配的图像传感器1220的旋转姿态数据作为第一旋转姿态数据。Correspondingly, in this embodiment, when acquiring the first position and posture data of the lens 1210 , the second position and posture data and the first rotation posture data of the image sensor 1220 from the optical anti-shake component 130 , firstly, according to the first position and posture data of the corresponding optical anti-shake component 130 The second delay parameter corrects the first corrected time stamp to obtain the second corrected time stamp; then according to the second corrected time stamp, the first position and attitude data of the lens 1210 and the second position and attitude data of the image sensor 1220 are obtained from the optical anti-shake component 130. The position and attitude data and the first rotation attitude data, that is, the position and attitude data of the lens 1210 whose output time stamp matches the second modified time stamp are obtained from the optical anti-shake component 130 as the first position and attitude data, obtained from the optical anti-shake component 130 Output the position and attitude data of the image sensor 1220 whose time stamp matches the second modified time stamp as the second position and attitude data, and acquire the rotation attitude of the image sensor 1220 whose output time stamp matches the second modified time stamp from the optical image stabilization component 130 data as the first rotation attitude data.
应当说明的是,本实施例对第二时延参数的校准方式不做具体限制,可由本领域技术人员根据实际需要选取。比如,本实施例采用与第一时延参数相同的校准策略(具体可参照以上实施例中的相关描述,此处不再赘述),并在完成对第一时延参数的校准后,再对第二时延参数进行校准。It should be noted that, this embodiment does not specifically limit the calibration manner of the second delay parameter, which can be selected by those skilled in the art according to actual needs. For example, this embodiment adopts the same calibration strategy as that of the first delay parameter (for details, please refer to the relevant description in the above embodiments, which will not be repeated here), and after the calibration of the first delay parameter is completed, the The second delay parameter is calibrated.
可选地,在一实施例中,运动数据包括加速度数据和角速度数据。Optionally, in an embodiment, the motion data includes acceleration data and angular velocity data.
本申请实施例还提供一种图像处理装置,应用于电子设备,电子设备包括镜头、图像传感器、光学防抖组件和电子防抖组件,该图像处理装置包括:An embodiment of the present application also provides an image processing device, which is applied to an electronic device, and the electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component. The image processing device includes:
光学防抖模块,用于获取电子设备的运动数据,并根据运动数据,通过光学防抖组件控制镜头在镜头的X轴方向和Y轴方向进行补偿平移,控制图像传感器在图像传感器的X轴方向和Y轴方向进行补偿平移,以及控制图像传感器绕图像传感器的Z轴进行补偿旋转;The optical anti-shake module is used to obtain the motion data of the electronic device, and according to the motion data, control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component, and control the image sensor to move in the X-axis direction of the image sensor Perform compensation translation with the Y axis direction, and control the image sensor to perform compensation rotation around the Z axis of the image sensor;
姿态获取模块,用于获取图像传感器采集的对应运动数据的光学防抖图像,以及从光学防抖组件获取镜头的第一位置姿态数据、图像传感器的第二位置姿态数据和第一旋转姿态数据;The attitude acquisition module is used to acquire the optical image stabilization image corresponding to the motion data collected by the image sensor, and acquire the first position attitude data of the lens, the second position attitude data and the first rotation attitude data of the image sensor from the optical anti-shake component;
姿态校正模块,用于根据第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据对光学防抖图像的姿态进行还原校正,得到校正图像;The attitude correction module is used to restore and correct the attitude of the optical image stabilization image according to the first position attitude data, the second position attitude data and the first rotation attitude data, so as to obtain the corrected image;
电子防抖模块,用于根据运动数据,通过电子防抖组件对校正图像进行电子防抖处理,得到电子防抖图像。The electronic anti-shake module is used to perform electronic anti-shake processing on the corrected image through the electronic anti-shake component according to the motion data to obtain an electronic anti-shake image.
请参照图7,为了更好的执行本申请所提供的图像处理方法,本实施例还提供一种图像处理装置300,如图7所示,该图像处理装置300包括光学防抖模块310、姿态获取模块320、姿态校正模块330以及电子防抖模块340,该图像处理装置300被配置为执行本申请提供的任一图像处理方法中的步骤,比如:Please refer to FIG. 7. In order to better implement the image processing method provided by the present application, this embodiment also provides an image processing device 300. As shown in FIG. 7, the image processing device 300 includes an optical image stabilization module 310, a gesture Acquisition module 320, posture correction module 330 and electronic anti-shake module 340, the image processing device 300 is configured to execute the steps in any image processing method provided in this application, such as:
光学防抖模块310,用于获取电子设备的运动数据,并根据运动数据,通过光学防抖组件控制镜头在镜头的X轴方向和Y轴方向进行补偿平移,控制图像传感器在图像传感器的X轴方向和Y轴方向进行补偿平移,以及控制图像传感器绕图像传感器的Z轴进行补偿旋转;The optical anti-shake module 310 is used to obtain motion data of the electronic device, and according to the motion data, control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component, and control the image sensor to move in the X-axis direction of the image sensor direction and Y-axis direction to perform compensation translation, and control the image sensor to perform compensation rotation around the Z-axis of the image sensor;
姿态获取模块320,用于获取图像传感器采集的对应运动数据的光学防抖图像,以及从光学防抖组件获取镜头的第一位置姿态数据、图像传感器的第二位置姿态数据和第一旋转姿态数据;The attitude acquisition module 320 is configured to acquire the optical image stabilization image corresponding to the motion data collected by the image sensor, and acquire the first position attitude data of the lens, the second position attitude data and the first rotation attitude data of the image sensor from the optical image stabilization component ;
姿态校正模块330,用于根据第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据对光学防抖图像的姿态进行还原校正,得到校正图像;A pose correction module 330, configured to restore and correct the pose of the optical image stabilization image according to the first position and pose data, the second position and pose data, and the first rotation pose data, to obtain a corrected image;
电子防抖模块340,用于根据运动数据,通过电子防抖组件对校正图像进行电子防抖处理,得到电子防抖图像。The electronic anti-shake module 340 is configured to perform electronic anti-shake processing on the corrected image through the electronic anti-shake component according to the motion data to obtain an electronic anti-shake image.
应当说明的是,本申请实施例提供的图像处理装置300与上文实施例中的图像处理方法属于同一构思,其具体实现过程请参照以上相关实施例,此处不再赘述。It should be noted that the image processing device 300 provided in the embodiment of the present application belongs to the same idea as the image processing method in the above embodiment, and its specific implementation process refers to the above related embodiments, and details are not repeated here.
本申请实施例还提供一种电子设备,该电子设备包括镜头、图像传感器、光学防抖组件、电子防抖组件、处理器和存储器,存储器存储有计算机程序,处理器通过加载计算机程序执行如上述实施例提及的方法。The embodiment of the present application also provides an electronic device, the electronic device includes a lens, an image sensor, an optical anti-shake component, an electronic anti-shake component, a processor and a memory, the memory stores a computer program, and the processor executes the above-mentioned The method mentioned in the examples.
请结合参照图1和图8,本申请提供的电子设备100还可以包括存储器150和处理器160。本领域技术人员可以理解,图8中示出的电子设备100的结构并不构成对电子设备100的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Please refer to FIG. 1 and FIG. 8 in combination, the electronic device 100 provided in this application may further include a memory 150 and a processor 160 . Those skilled in the art can understand that the structure of the electronic device 100 shown in FIG. Part placement.
其中,存储器150可用于存储计算机程序和数据。存储器150存储的计算机程序中包含有可执行代码。计算机程序可以划分为各种功能模块。Among them, the memory 150 can be used to store computer programs and data. The computer programs stored in the memory 150 include executable codes. A computer program can be divided into various functional modules.
处理器160是电子设备100的控制中心,利用各种接口和线路连接整个电子设备100的各个部分,通过运行或执行存储在存储器150内的计算机程序,以及调用存储在存储器150内的数据,执行电子设备100的各种功能和处理数据,从而对电子设备100进行整体控制。The processor 160 is the control center of the electronic device 100. It uses various interfaces and lines to connect various parts of the entire electronic device 100. By running or executing the computer program stored in the memory 150 and calling the data stored in the memory 150, the processor 160 executes Various functions and processing data of the electronic device 100 , so as to control the electronic device 100 as a whole.
在本申请实施例中,电子设备100中的处理器160将一个或一个以上的计算机程序对应的可执行代码加载到存储器150中,并由处理器160来执行从而执行本申请提供的任一图像处理方法中步骤,比如:In this embodiment of the application, the processor 160 in the electronic device 100 loads the executable code corresponding to one or more computer programs into the memory 150, and is executed by the processor 160 to execute any image provided by the application. Steps in the processing method, such as:
获取电子设备100的运动数据,并根据运动数据,通过光学防抖组件130控制镜头1210在镜头1210的X轴方向和Y轴方向进行补偿平移,控制图像传感器1220在图像传感器1220的X轴方向和Y轴分析进行补偿平移,以及控制图像传感器1220绕图像传感器1220的Z轴进行补偿旋转;Obtain the motion data of the electronic device 100, and according to the motion data, control the lens 1210 to perform compensation translation in the X-axis direction and the Y-axis direction of the lens 1210 through the optical anti-shake component 130, and control the image sensor 1220 in the X-axis direction and the Y-axis direction of the image sensor 1220. Y-axis analysis for compensating translation, and controlling the image sensor 1220 to perform compensating rotation around the Z-axis of the image sensor 1220;
获取图像传感器1220采集的对应运动数据的光学防抖图像,以及从光学防抖组件130获取镜头1210的第一位置姿态数据、图像传感器1220的第二位置姿态数据和第一旋转姿态数据;Acquiring the optical image stabilization image corresponding to the motion data collected by the image sensor 1220, and obtaining the first position and posture data of the lens 1210, the second position and posture data and the first rotation posture data of the image sensor 1220 from the optical anti-shake component 130;
根据第一位置姿态数据、第二位置姿态数据以及第一旋转姿态数据对光学防抖图像的姿态进行还原校正,得到校正图像;Restoring and correcting the posture of the optical image stabilization image according to the first position and posture data, the second position and posture data and the first rotation posture data to obtain a corrected image;
根据运动数据,通过电子防抖组件140对校正图像进行电子防抖处理,得到电子防抖图像。According to the motion data, electronic anti-shake processing is performed on the corrected image through the electronic anti-shake component 140 to obtain an electronic anti-shake image.
应当说明的是,本申请实施例提供的电子设备100与上文实施例中的图像处理方法属于同一构思,其具体实现过程请参照以上相关实施例,此处不再赘述。It should be noted that the electronic device 100 provided in the embodiment of the present application is based on the same idea as the image processing method in the above embodiment, and its specific implementation process may refer to the above related embodiments, which will not be repeated here.
本申请实施例还提供一种电子设备,包括镜头、图像传感器、光学防抖组件、电子防抖组件、处理器和存储器,存储器存储有计算机程序,处理器通过加载计算机程序执行如本申请提供的图像处理方法中的步骤。。The embodiment of the present application also provides an electronic device, including a lens, an image sensor, an optical anti-shake component, an electronic anti-shake component, a processor, and a memory. Steps in an image processing method. .
本申请实施例还提供一种计算机可读的存储介质,其中存储有计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种图像处理方法中的步骤。The embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any image processing method provided in the embodiment of the present application.
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Wherein, the storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.
由于该计算机可读的存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种图像处理方法中的步骤,因此,可以实现本申请实施例所提供的任一种图像处理方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Since the computer program stored in the computer-readable storage medium can execute the steps in any image processing method provided by the embodiment of the application, therefore, any image processing method provided by the embodiment of the application can be realized For the beneficial effects that can be achieved by the method, refer to the previous embodiments for details, and will not be repeated here.
以上对本申请实施例提供的图像处理方法、装置、电子设备及存储介质进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请。同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The image processing method, device, electronic device, and storage medium provided in the embodiments of the present application have been introduced in detail above. In this paper, specific examples are used to illustrate the principles and implementation methods of the present application, and the descriptions of the above embodiments are only used to help understand the present application. At the same time, for those skilled in the art, based on the idea of this application, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be construed as limiting the application.

Claims (20)

  1. 一种图像处理方法,应用于电子设备,其中,所述电子设备包括镜头、图像传感器、光学防抖组件和电子防抖组件,所述图像处理方法包括:An image processing method applied to an electronic device, wherein the electronic device includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component, and the image processing method includes:
    获取所述电子设备的运动数据,并根据所述运动数据,通过所述光学防抖组件控制所述镜头在所述镜头的X轴方向和Y轴方向进行补偿平移,控制所述图像传感器在所述图像传感器的X轴方向和Y轴方向进行补偿平移,以及控制所述图像传感器绕所述图像传感器的Z轴进行补偿旋转;Acquire motion data of the electronic device, and according to the motion data, control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component, and control the image sensor in the performing compensation translation in the X-axis direction and the Y-axis direction of the image sensor, and controlling the compensation rotation of the image sensor around the Z-axis of the image sensor;
    获取所述图像传感器采集的对应所述运动数据的光学防抖图像,以及从所述光学防抖组件获取所述镜头的第一位置姿态数据、所述图像传感器的第二位置姿态数据和第一旋转姿态数据;Acquiring the optical image stabilization image corresponding to the motion data collected by the image sensor, and acquiring the first position and posture data of the lens, the second position and posture data of the image sensor and the first rotation attitude data;
    根据所述第一位置姿态数据、所述第二位置姿态数据以及所述第一旋转姿态数据对所述光学防抖图像的姿态进行还原校正,得到校正图像;Restoring and correcting the posture of the optical image stabilization image according to the first position and posture data, the second position and posture data, and the first rotation posture data to obtain a corrected image;
    根据所述运动数据,通过所述电子防抖组件对所述校正图像进行电子防抖处理,得到电子防抖图像。According to the motion data, electronic anti-shake processing is performed on the corrected image through the electronic anti-shake component to obtain an electronic anti-shake image.
  2. 根据权利要求1所述的方法,其中,所述根据所述第一位置姿态数据、所述第二位置姿态数据以及所述第一旋转姿态数据对所述光学防抖图像的姿态进行还原校正,得到校正图像,包括:The method according to claim 1, wherein the restoration and correction of the posture of the optical image stabilization image is performed according to the first position and posture data, the second position and posture data, and the first rotation posture data, Get the corrected image, including:
    根据所述第一位置姿态数据和所述第二位置姿态数据,获取用于对所述光学防抖图像进行平移校正的第一校正平移向量;Acquiring a first correction translation vector for performing translation correction on the optical image stabilization image according to the first position and attitude data and the second position and attitude data;
    根据所述第一旋转姿态数据,获取用于对所述光学防抖图像进行旋转校正的第一校正旋转矩阵;Acquiring a first correction rotation matrix for performing rotation correction on the optical image stabilization image according to the first rotation attitude data;
    根据所述第一校正平移向量和所述第一校正旋转矩阵分别对所述光学防抖图像的姿态进行平移校正和旋转校正,得到所述校正图像。Perform translation correction and rotation correction on the pose of the optical image stabilization image according to the first correction translation vector and the first correction rotation matrix to obtain the correction image.
  3. 根据权利要求2所述的方法,其中,所述根据所述第一位置姿态数据和所述第二位置姿态数据,获取用于对所述光学防抖图像进行平移校正的第一校正平移向量,包括:The method according to claim 2, wherein, according to the first position and attitude data and the second position and attitude data, a first correction translation vector for translation correction of the optical image stabilization image is obtained, include:
    根据位置姿态数据和平移向量的第一函数关系,获取对应所述第一位置姿态数据的第一平移向量;Acquiring a first translation vector corresponding to the first position and attitude data according to the first functional relationship between the position and attitude data and the translation vector;
    根据位置姿态数据和平移向量的第二函数关系,获取对应所述第二位置姿态数据的第二平移向量;Acquiring a second translation vector corresponding to the second position and attitude data according to a second functional relationship between the position and attitude data and the translation vector;
    根据所述第一平移向量、所述第一平移向量对应的第一融合参数、所述第二平移向量及其对应的第二融合参数,融合得到所述第一平移向量和所述第二平移向量的融合平移向量;According to the first translation vector, the first fusion parameter corresponding to the first translation vector, the second translation vector and its corresponding second fusion parameter, fused to obtain the first translation vector and the second translation vector of fused translation vectors;
    将所述融合平移向量作为所述第一校正平移向量。The fused translation vector is used as the first corrected translation vector.
  4. 根据权利要求3所述的方法,其中,将所述电子设备固定于预设校准工具,使得所述电子设备与所述预设校准工具中的矩形校准板的位置相对固定,所述矩形校准板包括中心标记,所述第一函数关系按照如下步骤预先生成:The method according to claim 3, wherein the electronic device is fixed to a preset calibration tool such that the position of the electronic device and the rectangular calibration plate in the preset calibration tool are relatively fixed, and the rectangular calibration plate Including the central mark, the first functional relationship is pre-generated according to the following steps:
    开启所述光学防抖组件的镜头平移防抖功能,并关闭图像传感器平移防抖功能和图像传感器旋转防抖功能;Turn on the lens translation anti-shake function of the optical anti-shake component, and turn off the image sensor translation anti-shake function and the image sensor rotation anti-shake function;
    发送第一平移控制指令至所述预设校准工具,使得所述预设校准工具驱动所述电子设备在所述电子设备的X轴方向和Y轴方向平移;sending a first translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to translate in the X-axis direction and the Y-axis direction of the electronic device;
    在所述电子设备的平移过程中,通过所述光学防抖组件进行光学防抖处理,并获取所述图像传感器在平移过程中采集的所述矩形校准板的第一图像序列;During the translation process of the electronic device, performing optical anti-shake processing through the optical anti-shake component, and acquiring a first image sequence of the rectangular calibration plate collected by the image sensor during the translation process;
    从所述光学防抖组件获取所述镜头对应所述第一图像序列中每一第一图像的第三位置姿态数据,以及获取所述中心标记在每一第一图像中的第一位置坐标;Acquiring third position and posture data of the lens corresponding to each first image in the first image sequence from the optical anti-shake component, and acquiring first position coordinates of the center mark in each first image;
    根据每一第一图像对应的所述第三位置姿态数据和所述第一位置坐标,拟合得到所述第一函数关系。According to the third position and posture data corresponding to each first image and the first position coordinates, the first functional relationship is obtained by fitting.
  5. 根据权利要求3所述的方法,其中,将所述电子设备固定于预设校准工具,使得所述电子设备与所述预设校准工具中的矩形校准板的位置相对固定,所述矩形校准板包括中心标记,所述第二函数关系按照如下步骤预先生成:The method according to claim 3, wherein the electronic device is fixed to a preset calibration tool such that the position of the electronic device and the rectangular calibration plate in the preset calibration tool are relatively fixed, and the rectangular calibration plate Including the central mark, the second functional relationship is pre-generated according to the following steps:
    开启所述光学防抖组件的图像传感器平移防抖功能,并关闭镜头平移防抖功能和图像传感器旋转防抖功能;Turn on the image sensor translation anti-shake function of the optical anti-shake component, and turn off the lens translation anti-shake function and the image sensor rotation anti-shake function;
    发送第二平移控制指令至所述预设校准工具,使得所述预设校准工具驱动所述电子设备在所述电子设备的X轴方向和Y轴方向平移;sending a second translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to translate in the X-axis direction and the Y-axis direction of the electronic device;
    在所述电子设备的平移过程中,通过所述光学防抖组件进行光学防抖处理,并获取所述图像传感器在平移过程中采集的所述矩形校准板的第二图像序列;During the translation process of the electronic device, performing optical anti-shake processing through the optical anti-shake component, and acquiring a second image sequence of the rectangular calibration plate collected by the image sensor during the translation process;
    从所述光学防抖组件获取所述图像传感器采集所述第二图像序列中每一第二图像时的第四位置姿态数据,以及获取所述中心标记在每一第二图像中的第二位置坐标;Acquiring fourth position and attitude data from the optical anti-shake component when the image sensor captures each second image in the second image sequence, and acquiring a second position of the center mark in each second image coordinate;
    根据每一第二图像对应的所述第四位置姿态数据和所述第二位置坐标,拟合得到所述第二函数关系。According to the fourth position and posture data corresponding to each second image and the second position coordinates, the second functional relationship is obtained by fitting.
  6. 根据权利要求3所述的方法,其中,将所述电子设备固定于预设校准工具,使得所述电子设备与所述预设校准工具中的矩形校准板的位置相对固定,所述矩形校准板包括中心标记,所述第一融合参数和所述第二融合参数按照如下步骤预先确定:The method according to claim 3, wherein the electronic device is fixed to a preset calibration tool such that the position of the electronic device and the rectangular calibration plate in the preset calibration tool are relatively fixed, and the rectangular calibration plate Including the center mark, the first fusion parameter and the second fusion parameter are predetermined according to the following steps:
    开启所述光学防抖组件的镜头平移防抖功能和图像传感器平移防抖功能,并关闭图像传感器旋转防抖功能;Turn on the lens translation anti-shake function and the image sensor translation anti-shake function of the optical anti-shake component, and turn off the image sensor rotation anti-shake function;
    发送第三平移控制指令至所述预设校准工具,使得所述预设校准工具驱动所述电子设备在所述电子设备的X轴方向和Y轴方向平移;sending a third translation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to translate in the X-axis direction and the Y-axis direction of the electronic device;
    在所述电子设备的平移过程中,通过所述光学防抖组件进行光学防抖处理,并获取所述图像传感器在平移过程中采集的所述矩形校准板的第三图像序列;During the translation process of the electronic device, performing optical anti-shake processing through the optical anti-shake component, and acquiring a third image sequence of the rectangular calibration plate collected by the image sensor during the translation process;
    从所述光学防抖组件获取所述镜头对应所述第三图像序列中每一第三图像的第五位置姿态数据,以及从所述光学防抖组件获取所述图像传感器采集所述第三图像序列中每一第三图像时的第六位置姿态数据;Obtaining the fifth position and posture data of the lens corresponding to each third image in the third image sequence from the optical anti-shake component, and obtaining the third image captured by the image sensor from the optical anti-shake component The sixth position and attitude data of each third image in the sequence;
    根据所述第一函数关系,获取对应每一第五位置姿态数据的第三平移向量,以及根据所述第二函数关系,获取对应每一第六位置姿态数据的第四平移向量;Obtaining a third translation vector corresponding to each fifth position and attitude data according to the first functional relationship, and obtaining a fourth translation vector corresponding to each sixth position and attitude data according to the second functional relationship;
    获取所述中心标记在每一第三图像中的第三位置坐标,并根据每一第三图像对应的所述第三位置坐标、所述第三平移向量以及所述第四平移向量,确定所述第一融合参数和所述第二融合参数。Acquiring the third position coordinates of the center mark in each third image, and determining the third position coordinates, the third translation vector, and the fourth translation vector corresponding to each third image. The first fusion parameter and the second fusion parameter.
  7. 根据权利要求3所述的方法,其中,所述根据所述第一旋转姿态数据,获取用于对所述光学防抖图像进行旋转校正的第一校正旋转矩阵,包括:The method according to claim 3, wherein said acquiring a first correction rotation matrix for performing rotation correction on said optical image stabilization image according to said first rotation attitude data comprises:
    根据旋转姿态数据和旋转角度的第三函数关系,获取对应所述第一旋转姿态数据的旋转角度;Acquiring a rotation angle corresponding to the first rotation attitude data according to a third functional relationship between the rotation attitude data and the rotation angle;
    获取所述光学防抖图像的旋转中心坐标,并根据所述旋转中心坐标和所述旋转角度获取所述第一校正旋转矩阵。Obtain the rotation center coordinates of the optical image stabilization image, and obtain the first correction rotation matrix according to the rotation center coordinates and the rotation angle.
  8. 根据权利要求7所述的方法,其中,所述根据所述旋转中心坐标和所述旋转角度获取所述第一校正旋转矩阵,包括:The method according to claim 7, wherein said obtaining said first correction rotation matrix according to said rotation center coordinates and said rotation angle comprises:
    根据所述旋转中心坐标和所述旋转角度,按照如下公式获取所述第一校正旋转矩阵:According to the rotation center coordinates and the rotation angle, the first corrected rotation matrix is obtained according to the following formula:
    Figure PCTCN2022092755-appb-100001
    Figure PCTCN2022092755-appb-100001
    其中,R表示所述第一校正旋转矩阵,C表示cos(γ),γ表示所述旋转角度,S表示sin(γ),Cx表示所述旋转中心坐标中的横坐标,Cy表示所述旋转中心坐标中的纵坐标。Wherein, R represents the first correction rotation matrix, C represents cos(γ), γ represents the rotation angle, S represents sin(γ), Cx represents the abscissa in the rotation center coordinates, and Cy represents the rotation Ordinate in center coordinates.
  9. 根据权利要求7所述的方法,其中,将所述电子设备固定于预设校准工具,使得所述电子设备与所述预设校准工具中的矩形校准板的位置相对固定,所述矩形校准板包括四角标记,所述旋转中心坐标和所述第三函数关系按照如下步骤生成:The method according to claim 7, wherein the electronic device is fixed to a preset calibration tool such that the positions of the electronic device and the rectangular calibration plate in the preset calibration tool are relatively fixed, and the rectangular calibration plate Including four-corner marks, the coordinates of the rotation center and the third functional relationship are generated according to the following steps:
    开启所述光学防抖组件的图像传感器旋转防抖功能,并关闭镜头平移防抖功能和图像传感器平移防抖功能;Turn on the image sensor rotation anti-shake function of the optical anti-shake component, and turn off the lens translation anti-shake function and the image sensor translation anti-shake function;
    发送旋转控制指令至所述预设校准工具,使得所述预设校准工具驱动所述电子设备绕所述图像传感器的Z轴旋转;sending a rotation control command to the preset calibration tool, so that the preset calibration tool drives the electronic device to rotate around the Z axis of the image sensor;
    在所述电子设备的旋转过程中,通过所述光学防抖组件进行光学防抖处理,并获取所述图像传感器在旋转过程中采集的所述矩形校准板的第四图像序列;During the rotation process of the electronic device, perform optical anti-shake processing through the optical anti-shake component, and acquire a fourth image sequence of the rectangular calibration plate collected by the image sensor during the rotation process;
    从所述光学防抖组件获取所述图像传感器采集所述第四图像序列中每一第四图像时的第二旋转姿态数据,以及获取所述四角标记在每一第四图像中的第四位置坐标;Acquiring the second rotation posture data when the image sensor captures each fourth image in the fourth image sequence from the optical anti-shake component, and acquiring the fourth position of the four-corner mark in each fourth image coordinate;
    根据每一第四图像对应的所述第二旋转姿态数据和所述第四位置坐标,拟合得到所述旋转中心坐标和所述第三函数关系。According to the second rotation attitude data and the fourth position coordinates corresponding to each fourth image, the coordinates of the rotation center and the third functional relationship are obtained by fitting.
  10. 根据权利要求9所述的方法,其中,所述第三函数关系包括多项式函数,所述根据每一第四图像对应的所述第二旋转姿态数据和所述第四位置坐标,拟合得到所述旋转中心坐标和所述第三函数关系,包括:The method according to claim 9, wherein the third functional relationship includes a polynomial function, and according to the second rotation attitude data corresponding to each fourth image and the fourth position coordinates, the fitting is obtained The coordinates of the center of rotation and the third functional relationship include:
    根据每一第四图像对应的所述第二旋转姿态数据和所述第四位置坐标,按照如下公式拟合得到所述旋转中心坐标和所述第三函数关系:According to the second rotation attitude data and the fourth position coordinates corresponding to each fourth image, the relationship between the rotation center coordinates and the third function is obtained by fitting according to the following formula:
    Figure PCTCN2022092755-appb-100002
    Figure PCTCN2022092755-appb-100002
    θ=[Cx,Cy,α];θ = [Cx, Cy, α];
    Figure PCTCN2022092755-appb-100003
    Figure PCTCN2022092755-appb-100003
    其中,P i表示第i个四角标记的第四位置坐标,h 2'表示第二旋转姿态数据,f()表示所述多项式函数,r表示预设搜索半径,α表示所述多项式函数的多项式系数,imW表示第四图像的宽,imH表示第四图像的高。 Wherein, P i represents the fourth position coordinates of the i-th four-corner mark, h 2 ' represents the second rotation attitude data, f() represents the polynomial function, r represents the preset search radius, and α represents the polynomial of the polynomial function coefficient, imW represents the width of the fourth image, and imH represents the height of the fourth image.
  11. 根据权利要求10所述的方法,其中,还包括:The method according to claim 10, further comprising:
    开启所述光学防抖组件的镜头平移防抖功能、图像传感器平移防抖功能以及图像传感器旋转防抖功能;Turn on the lens translation anti-shake function, the image sensor translation anti-shake function and the image sensor rotation anti-shake function of the optical anti-shake component;
    发送旋转平移控制指令至所述预设校准工具,使得所述预设校准工具驱动所述电子设备绕所述图像传感器的Z轴旋转,以及驱动所述电子设备在所述电子设备的X轴方向和Y轴方向平移;Sending a rotation and translation control instruction to the preset calibration tool, so that the preset calibration tool drives the electronic device to rotate around the Z-axis of the image sensor, and drives the electronic device in the direction of the X-axis of the electronic device and Y-axis direction translation;
    在所述电子设备的旋转平移过程中,通过所述光学防抖组件进行光学防抖处理,并获取所述图像传感器在旋转平移过程中采集的所述矩形校准板的第五图像序列;During the rotation and translation process of the electronic device, performing optical anti-shake processing through the optical anti-shake component, and acquiring a fifth image sequence of the rectangular calibration plate collected by the image sensor during the rotation and translation process;
    从所述光学防抖组件获取所述镜头对应所述第五图像序列中每一第五图像的第七位置姿态数据、所述图像传感器采集每一第五图像时的第八位置姿态数据和第三旋转姿态数据;The seventh position and attitude data of the lens corresponding to each fifth image in the fifth image sequence, the eighth position and attitude data and the eighth position and attitude data when the image sensor captures each fifth image are obtained from the optical anti-shake component. Three rotation attitude data;
    根据每一第五图像对应的所述第七位置姿态数据、所述第八位置姿态数据以及所述第一函数关系、所述第二函数关系,获取用于对每一第五图像进行平移校正的第二校正平移向量;According to the seventh position and attitude data, the eighth position and attitude data and the first functional relationship and the second functional relationship corresponding to each fifth image, the translation correction for each fifth image is obtained. The second correction translation vector of ;
    根据每一第五图像对应的所述第三旋转姿态数据、所述第三函数关系以及所述旋转中心坐标,获取用于对每一第五图像进行旋转校正的第二校正旋转矩阵;Obtaining a second correction rotation matrix for performing rotation correction on each fifth image according to the third rotation posture data corresponding to each fifth image, the third functional relationship, and the rotation center coordinates;
    根据所述第二校正平移向量和所述第二校正旋转矩阵分别对每一第五图像的中心像素进行平移校正和旋转校正,得到每一中心像素的校正坐标;respectively performing translation correction and rotation correction on the center pixel of each fifth image according to the second correction translation vector and the second correction rotation matrix, to obtain the correction coordinates of each center pixel;
    获取所述中心标记在每一第五图像中的第五位置坐标,并根据每一第五图像对应的所述校正坐标和所述第五位置坐标的差异,对所述第一函数关系、所述第二函数关系以及所述第三函数关系进行联合修正。Acquiring the fifth position coordinates of the center mark in each fifth image, and according to the difference between the correction coordinates corresponding to each fifth image and the fifth position coordinates, the first functional relationship, the The second functional relationship and the third functional relationship are jointly corrected.
  12. 根据权利要求1-11任一项所述的方法,其中,所述获取所述图像传感器采集的对应所述运动数据的光学防抖图像,包括:The method according to any one of claims 1-11, wherein the acquiring the optical image stabilization image corresponding to the motion data collected by the image sensor comprises:
    根据对应所述运动数据的第一时延参数,对所述运动数据的第一获取时间戳进行修正,得到第一修正时间戳;Correcting the first acquisition timestamp of the motion data according to the first delay parameter corresponding to the motion data to obtain a first modified timestamp;
    按照所述第一修正时间戳,获取所述图像传感器采集的对应所述运动数据的光学防抖图像。According to the first corrected time stamp, an optical image stabilization image collected by the image sensor and corresponding to the motion data is acquired.
  13. 根据权利要求12所述的方法,其中,所述第一时延参数按照如下步骤预先生成:The method according to claim 12, wherein the first delay parameter is pre-generated according to the following steps:
    获取样本抖动图像序列;Get a sequence of sample dithered images;
    按照所述样本抖动图像序列中每一样本抖动图像的第二获取时间戳,获取对应每一样本抖动图像的样本运动数据,得到样本运动数据序列;Acquiring sample motion data corresponding to each sample shake image according to the second acquisition time stamp of each sample shake image in the sample shake image sequence to obtain a sample motion data sequence;
    根据预设时延参数、预设搜索步长、所述样本抖动图像序列及其对应的样本运动数据序列,搜索得到所述第一时延参数。The first time delay parameter is obtained by searching according to a preset time delay parameter, a preset search step size, the sample shaking image sequence and its corresponding sample motion data sequence.
  14. 根据权利要求13所述的方法,其中,所述根据预设时延参数、预设搜索步长、所述样本抖动图像序列及其对应的样本运动数据序列,搜索得到所述第一时延参数,包括The method according to claim 13, wherein the first time delay parameter is obtained by searching according to the preset time delay parameter, the preset search step size, the sample shaking image sequence and its corresponding sample motion data sequence ,include
    根据所述预设时延参数和所述预设搜索步长获取预设数量的候选时延参数;Acquiring a preset number of candidate delay parameters according to the preset delay parameter and the preset search step;
    根据每一候选时延参数分别对所述样本运动数据序列进行修正,得到预设数量的修正样本运动数据序列;Correcting the sample motion data sequence according to each candidate delay parameter to obtain a preset number of corrected sample motion data sequences;
    根据每一修正样本运动数据序列,通过所述电子防抖组件对所述样本抖动图像序列进行电子防抖处理,得到预设数量的防抖图像序列;According to each corrected sample motion data sequence, the electronic anti-shake component is used to perform electronic anti-shake processing on the sample shake image sequence to obtain a preset number of anti-shake image sequences;
    对每一防抖图像序列的防抖质量进行量化评分,得到每一防抖图像序列的防抖质量评分;Quantify and score the anti-shake quality of each anti-shake image sequence to obtain the anti-shake quality score of each anti-shake image sequence;
    将所述预设时延参数更新为防抖质量评分最高的防抖图像序列所对应的候选时延参数,以及根据预设更新参数对所述预设搜索步长进行更新;Updating the preset delay parameter to a candidate delay parameter corresponding to the anti-shake image sequence with the highest anti-shake quality score, and updating the preset search step according to the preset update parameter;
    重复以上步骤,直至满足预设搜索条件,将满足预设搜索条件时的预设时延参数作为所述第一时延参数。The above steps are repeated until the preset search condition is met, and the preset delay parameter when the preset search condition is met is used as the first delay parameter.
  15. 根据权利要求14所述的方法,其中,所述预设搜索条件包括:The method according to claim 14, wherein the preset search conditions include:
    任一防抖图像序列的防抖质量评分大于或等于评分阈值;或者The stabilization quality score of any stabilized image sequence is greater than or equal to the scoring threshold; or
    更新后的预设搜索步长小于步长阈值。The updated preset search step size is smaller than the step size threshold.
  16. 根据权利要求12所述的方法,其中,所述从所述光学防抖组件获取所述镜头的第一位置姿态数据、所述图像传感器的第二位置姿态数据和第一旋转姿态数据,包括:The method according to claim 12, wherein said acquiring the first position and attitude data of the lens, the second position and attitude data and the first rotation attitude data of the image sensor from the optical anti-shake component comprises:
    根据对应所述光学防抖组件的第二时延参数对所述第一修正时间戳进行修正,得到第二修正时间戳;Correcting the first corrected timestamp according to a second delay parameter corresponding to the optical anti-shake component to obtain a second corrected timestamp;
    按照所述第二修正时间戳,从所述光学防抖组件获取所述镜头的第一位置姿态数据、所述图像传感器的第二位置姿态数据和第一旋转姿态数据。According to the second corrected timestamp, the first position and posture data of the lens, the second position and posture data and the first rotation posture data of the image sensor are obtained from the optical anti-shake component.
  17. 根据权利要求1-11任一项所述的方法,其中,所述运动数据包括加速度数据和角速度数据。The method according to any one of claims 1-11, wherein the motion data includes acceleration data and angular velocity data.
  18. 一种图像处理装置,应用于电子设备,其中,所述电子设备包括镜头、图像传感器、光学防抖组件和电子防抖组件,所述图像处理装置包括:An image processing device applied to electronic equipment, wherein the electronic equipment includes a lens, an image sensor, an optical anti-shake component, and an electronic anti-shake component, and the image processing device includes:
    光学防抖模块,用于获取所述电子设备的运动数据,并根据所述运动数据,通过所述光学防抖组件控制所述镜头在所述镜头的X轴方向和Y轴方向进行补偿平移,控制所述图像传感器在所述图像传感器的X轴方向和Y轴方向进行补偿平移,以及控制所述图像传感器绕所述图像传感器的Z轴进行补偿旋转;an optical anti-shake module, configured to acquire motion data of the electronic device, and control the lens to perform compensation translation in the X-axis direction and the Y-axis direction of the lens through the optical anti-shake component according to the motion data, controlling the image sensor to perform compensation translation in the X-axis direction and the Y-axis direction of the image sensor, and controlling the image sensor to perform compensation rotation around the Z-axis of the image sensor;
    姿态获取模块,用于获取所述图像传感器采集的对应所述运动数据的光学防抖图像,以及从所述光学防抖组件获取所述镜头的第一位置姿态数据、所述图像传感器的第二位置姿态数据和第一旋转姿态数据;an attitude acquisition module, configured to acquire the optical image stabilization image corresponding to the movement data collected by the image sensor, and acquire the first position attitude data of the lens, the second position and attitude data of the image sensor from the optical image stabilization component Position attitude data and first rotation attitude data;
    姿态校正模块,用于根据所述第一位置姿态数据、所述第二位置姿态数据以及所述第一旋转姿态数据对所述光学防抖图像的姿态进行还原校正,得到校正图像;A pose correction module, configured to restore and correct the pose of the optical image stabilization image according to the first position and pose data, the second position and pose data, and the first rotation pose data, to obtain a corrected image;
    电子防抖模块,用于根据所述运动数据,通过所述电子防抖组件对所述校正图像进行电子防抖处理,得到电子防抖图像。The electronic anti-shake module is configured to perform electronic anti-shake processing on the corrected image through the electronic anti-shake component according to the motion data, so as to obtain an electronic anti-shake image.
  19. 一种电子设备,所述电子设备包括镜头、图像传感器、光学防抖组件、电子防抖组件、处理器和存储器,所述存储器存储有计算机程序,其中,所述处理器通过加载所述计算机程序执行如权利要求1-17任一项所述的方法。An electronic device, the electronic device includes a lens, an image sensor, an optical anti-shake component, an electronic anti-shake component, a processor and a memory, the memory stores a computer program, wherein the processor loads the computer program Execute the method as described in any one of claims 1-17.
  20. 一种计算机可读的存储介质,其上存储有计算机程序,其中,当所述计算机程序被处理器加载时执行如权利要求1-17任一项所述的方法。A computer-readable storage medium on which a computer program is stored, wherein the method according to any one of claims 1-17 is executed when the computer program is loaded by a processor.
PCT/CN2022/092755 2021-07-09 2022-05-13 Image processing method and apparatus, electronic device, and storage medium WO2023279849A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110777734.0A CN113572929B (en) 2021-07-09 2021-07-09 Image processing method, device, electronic equipment and storage medium
CN202110777734.0 2021-07-09

Publications (1)

Publication Number Publication Date
WO2023279849A1 true WO2023279849A1 (en) 2023-01-12

Family

ID=78164153

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/092755 WO2023279849A1 (en) 2021-07-09 2022-05-13 Image processing method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN113572929B (en)
WO (1) WO2023279849A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135459A (en) * 2023-04-07 2023-11-28 荣耀终端有限公司 Image anti-shake method and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572929B (en) * 2021-07-09 2023-06-16 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and storage medium
CN117896618B (en) * 2024-03-15 2024-05-14 深圳市浩瀚卓越科技有限公司 Anti-shake method, device, equipment and storage medium for cradle head shooting

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150326785A1 (en) * 2014-05-12 2015-11-12 Canon Kabushiki Kaisha Image processing apparatus, imaging apparatus, control method, and information processing system
CN110769146A (en) * 2018-07-25 2020-02-07 北京小米移动软件有限公司 Shooting method and electronic equipment
CN110858873A (en) * 2018-08-23 2020-03-03 北京小米移动软件有限公司 Electronic device and photographing method
CN113572929A (en) * 2021-07-09 2021-10-29 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113596322A (en) * 2021-07-09 2021-11-02 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306804B (en) * 2014-07-31 2018-08-21 北京展讯高科通信技术有限公司 Intelligent terminal and its video image stabilization method and device
US9596411B2 (en) * 2014-08-25 2017-03-14 Apple Inc. Combined optical and electronic image stabilization
WO2018072353A1 (en) * 2016-10-17 2018-04-26 华为技术有限公司 Image acquiring method and terminal device
JP7191599B2 (en) * 2018-09-07 2022-12-19 キヤノン株式会社 optical equipment
CN112073600A (en) * 2019-06-11 2020-12-11 南昌欧菲光电技术有限公司 Camera module, electronic equipment and optical anti-shake method of camera module
CN110430365B (en) * 2019-08-26 2021-10-01 Oppo广东移动通信有限公司 Anti-shake method, anti-shake device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150326785A1 (en) * 2014-05-12 2015-11-12 Canon Kabushiki Kaisha Image processing apparatus, imaging apparatus, control method, and information processing system
CN110769146A (en) * 2018-07-25 2020-02-07 北京小米移动软件有限公司 Shooting method and electronic equipment
CN110858873A (en) * 2018-08-23 2020-03-03 北京小米移动软件有限公司 Electronic device and photographing method
CN113572929A (en) * 2021-07-09 2021-10-29 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113596322A (en) * 2021-07-09 2021-11-02 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135459A (en) * 2023-04-07 2023-11-28 荣耀终端有限公司 Image anti-shake method and electronic equipment

Also Published As

Publication number Publication date
CN113572929B (en) 2023-06-16
CN113572929A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
WO2023279849A1 (en) Image processing method and apparatus, electronic device, and storage medium
US8300011B2 (en) Pointer positioning device and method
CN102377941B (en) Image stabilization control apparatus and control method thereof, optical apparatus, and imaging apparatus
JP6209002B2 (en) Imaging apparatus and control method thereof
JP2009241247A (en) Stereo-image type detection movement device
JP4618370B2 (en) Imaging apparatus, imaging method, and program
JP5803124B2 (en) Robot, position detection device, position detection program, and position detection method
US20150123990A1 (en) Image processing device, image processing method, image processing program, and storage medium
JP6135848B2 (en) Imaging apparatus, image processing apparatus, and image processing method
JPS59115677A (en) Picture processor
CN113596322B (en) Image processing method, device, electronic equipment and storage medium
JP2008204384A (en) Image pickup device, object detection method and posture parameter calculation method
US20180184004A1 (en) Method for calibrating driving amount of actuator configured to correct blurring of image taken by camera
CN111711756A (en) Image anti-shake method, electronic equipment and storage medium
US20210018138A1 (en) Gimbal mode switching method, device, mobile platform and storage medium
JP2011030015A5 (en)
JP2014016451A (en) Imaging device, method for calculating camera shake correction amount, and program for calculating camera shake correction amount
US11310423B2 (en) Image capturing method and image capturing apparatus
JP2007181146A (en) Image projector, method and program for compensating projected image of image projector
US20050058367A1 (en) Image transformation method and apparatus, image recognition apparatus, robot control apparatus and image projection apparatus
CN112258581A (en) On-site calibration method for multi-fish glasses head panoramic camera
CN113396578A (en) Image pickup apparatus, solid-state image pickup element, camera module, drive control unit, and image pickup method
CN113438399B (en) Target guidance system, method for unmanned aerial vehicle, and storage medium
CN114283207A (en) Calibration method for alignment crimping of Flexible Printed Circuit (FPC) and screen cell
KR20040082645A (en) Device and method capable of acquisition stbilization image

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE