CN112118386B - Offset compensation method, device and storage medium - Google Patents

Offset compensation method, device and storage medium Download PDF

Info

Publication number
CN112118386B
CN112118386B CN201910542246.4A CN201910542246A CN112118386B CN 112118386 B CN112118386 B CN 112118386B CN 201910542246 A CN201910542246 A CN 201910542246A CN 112118386 B CN112118386 B CN 112118386B
Authority
CN
China
Prior art keywords
processor
determining
optical anti
pattern
drive assembly
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910542246.4A
Other languages
Chinese (zh)
Other versions
CN112118386A (en
Inventor
周秀秀
吴炳
姜俊彬
诸海江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Sunny Opotech Co Ltd
Original Assignee
Ningbo Sunny Opotech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Sunny Opotech Co Ltd filed Critical Ningbo Sunny Opotech Co Ltd
Priority to CN201910542246.4A priority Critical patent/CN112118386B/en
Publication of CN112118386A publication Critical patent/CN112118386A/en
Application granted granted Critical
Publication of CN112118386B publication Critical patent/CN112118386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/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

Abstract

Disclosed are a method, an apparatus, and a storage medium for compensating for an offset of an optical anti-shake lens. One embodiment of the method comprises: obtaining a reference image based on a reference object having a marker pattern, the reference image including a reference pattern corresponding to the marker pattern; photographing a reference object using an optical anti-shake lens to obtain a sample image, the sample image including a sample pattern corresponding to the marker pattern; and resetting an initial offset value of a driving assembly driving the optical anti-shake lens based on the first position difference between the sample pattern and the reference pattern to compensate for the offset of the optical anti-shake lens.

Description

Offset compensation method, device and storage medium
Technical Field
The present disclosure relates to the field of adjustment technology of optical systems, and more particularly, to a method and an apparatus for compensating for an offset of an optical anti-shake lens, and a storage medium.
Background
When a user uses a handheld device such as a mobile phone to shoot, both hands inevitably shake, so that a shot image is blurred, and therefore an optical anti-shake lens is developed in the industry to counteract the shake of the device during shooting so as to shoot a better image.
The lens assembly of the optical anti-shake lens is fixed on the photosensitive assembly through the driving assembly, and the driving assembly can control the lens assembly to move relative to the photosensitive assembly. However, when the optical anti-shake lens is assembled and manufactured, the position of the lens assembly relative to the photosensitive assembly may deviate, which causes a deviation of the field angle during imaging. In addition, when the multi-camera module is assembled, after the installation position of one camera in the vertical plane of the optical axis of one camera in the plurality of cameras rotates relative to the theoretical position, the images generated by the camera and the images generated by the rest cameras have offset, the difficulty in synthesizing the plurality of images is improved, and the imaging quality is reduced.
Therefore, a method for compensating for the field angle offset of the optical anti-shake lens is desired in the industry, so that the assembled optical anti-shake lens has high-quality imaging.
Disclosure of Invention
To solve or partially solve the above-mentioned drawbacks of the prior art, embodiments of the present application provide a method and an apparatus for compensating for an offset of an optical anti-shake lens. The embodiment of the application also provides an optical anti-shake lens.
In a first aspect, an embodiment of the present application provides a method for compensating an offset of an optical anti-shake lens, the method including: obtaining a reference image based on a reference object having a marker pattern, the reference image including a reference pattern corresponding to the marker pattern; photographing a reference object using an optical anti-shake lens to obtain a sample image, the sample image including a sample pattern corresponding to the marker pattern; and resetting an initial offset value of a driving assembly driving the optical anti-shake lens based on the first position difference between the sample pattern and the reference pattern to compensate for the offset of the optical anti-shake lens.
In one embodiment, resetting an initial offset value of a drive assembly driving the optical anti-shake lens based on a first position difference between sample pattern reference points comprises: reading a current offset value of the drive assembly; determining a compensation value based on the first position difference and the movement characteristic of the drive assembly; adding the determined compensation value to the current offset value to obtain a reset initial offset value.
In one embodiment, the method further comprises: responding to a lens assembly of the optical anti-shake lens for forming a light path at a first position, and shooting a first image through the optical anti-shake lens; driving the lens assembly to move to a second position through the driving assembly; shooting a second image through the optical anti-shake lens at a second position; and determining a movement characteristic of the drive assembly based on a ratio between a second positional difference between the first image and the second image and a motion positional difference between the first position and the second position.
In one embodiment, determining the movement characteristic of the drive assembly comprises: determining a first movement characteristic of the drive assembly in the first direction based on a ratio of a component of the second position difference in the first direction on the horizontal plane to a component of the motion position difference in the first direction; and determining a second movement characteristic of the drive assembly in a second direction based on a ratio of a component of the second positional difference in the second direction in the horizontal plane to a component of the movement positional difference in the second direction, the second direction being perpendicular to the first direction.
In one embodiment, determining the compensation value based on the first position difference and the movement characteristic of the drive assembly comprises: determining a first direction compensation value based on a first movement characteristic of the drive assembly in a first direction on the horizontal plane and a component of the first position difference in the first direction; and determining a second direction compensation value based on a second movement characteristic of the driving assembly in a second direction on the horizontal plane and a component of the first position difference in the second direction, the second direction being perpendicular to the first direction.
In one embodiment, determining the movement characteristic of the drive assembly comprises: the rotational characteristic of the drive assembly is determined based on the rotational angle of the second position difference and the rotational angle of the kinematic position difference.
In one embodiment, determining the compensation value based on the first position difference and the movement characteristic of the drive assembly comprises: a rotational angle compensation value is determined based on the rotational angle of the drive assembly at the rotational characteristic and the first position difference.
In one embodiment, the method further comprises: acquiring the movement characteristics of a plurality of driving assemblies of the same type as the driving assemblies for driving the optical anti-shake lens; and determining an average value of the movement characteristics of the plurality of driving components as the movement characteristic of the driving component of the optical anti-shake lens.
In one embodiment, obtaining a reference image based on a reference having a marker pattern comprises: and determining the imaging surface center as the reference point of the reference pattern in response to the imaging surface center of the optical anti-shake lens facing the reference point of the mark pattern of the reference object.
In one embodiment, obtaining a reference image based on a reference having a marker pattern comprises: and shooting a reference object through another optical lens forming an array with the optical anti-shake lens to obtain a reference image.
In a second aspect, embodiments of the present application also provide an apparatus for compensating for an offset of an optical anti-shake lens, the apparatus including: a processor; and a memory in communication with the processor and storing machine-readable instructions that, when executed by the processor, cause the processor to: driving an optical anti-shake lens to shoot a reference object with a mark pattern to obtain a sample image, wherein the sample image comprises a sample pattern corresponding to the mark pattern; obtaining a reference image based on a reference, the reference image including a reference pattern corresponding to the marker pattern; and resetting an initial offset value of a driving assembly driving the optical anti-shake lens based on the first position difference between the sample pattern and the reference pattern to compensate for the offset of the optical anti-shake lens.
In one embodiment, the machine readable instructions, when executed by the processor, further cause the processor to: reading a current offset value of the drive assembly; determining a compensation value based on the first position difference and the movement characteristic of the drive assembly; adding the determined compensation value to the current offset value to obtain a reset initial offset value.
In one embodiment, the machine readable instructions, when executed by the processor, further cause the processor to: responding to a lens assembly of the optical anti-shake lens for forming a light path at a first position, and shooting a first image through the optical anti-shake lens; driving the lens assembly to move to a second position through the driving assembly; shooting a second image through the optical anti-shake lens at a second position; and determining a movement characteristic of the drive assembly based on a ratio between a second positional difference between the first image and the second image and a motion positional difference between the first position and the second position.
In one embodiment, the machine readable instructions, when executed by the processor, further cause the processor to: determining a first movement characteristic of the drive assembly in the first direction based on a ratio of a component of the second position difference in the first direction on the horizontal plane to a component of the motion position difference in the first direction; and determining a second movement characteristic of the drive assembly in a second direction based on a ratio of a component of the second positional difference in the second direction in the horizontal plane to a component of the movement positional difference in the second direction, the second direction being perpendicular to the first direction.
In one embodiment, the machine readable instructions, when executed by the processor, further cause the processor to: determining a first direction compensation value based on a first movement characteristic of the drive assembly in a first direction on the horizontal plane and a component of the position difference in the first direction; and determining a second direction compensation value based on a second movement characteristic of the driving assembly in a second direction on the horizontal plane and a component of the position difference in the second direction, the second direction being perpendicular to the first direction.
In one embodiment, the machine readable instructions, when executed by the processor, further cause the processor to: the rotational characteristic of the drive assembly is determined based on the rotational angle of the second position difference and the rotational angle of the kinematic position difference.
In one embodiment, the machine readable instructions, when executed by the processor, further cause the processor to: a rotational angle compensation value is determined based on the rotational angle of the drive assembly at the rotational characteristic and the first position difference.
In one embodiment, the machine readable instructions, when executed by the processor, further cause the processor to: acquiring the movement characteristics of a plurality of driving assemblies of the same type as the driving assemblies for driving the optical anti-shake lens; and determining an average value of the movement characteristics of the plurality of driving components as the movement characteristic of the driving component of the optical anti-shake lens.
In one embodiment, the machine readable instructions, when executed by the processor, further cause the processor to: and determining the center of the imaging surface as a reference pattern in response to the mark pattern, in which the center of the imaging surface of the optical anti-shake lens faces the reference object.
In one embodiment, the apparatus further comprises another optical lens in an array with the optical anti-shake lens, the machine readable instructions when executed by the processor further cause the processor to: the reference object is photographed through another optical lens to obtain a reference image.
In a third aspect, embodiments of the present application also provide a non-transitory machine-readable storage medium storing machine-readable instructions executable by a processor and causing the processor to: obtaining a reference image based on a reference object having a marker pattern, the reference image including a reference pattern corresponding to the marker pattern; photographing a reference object using an optical anti-shake lens to obtain a sample image, the sample image including a sample pattern corresponding to the marker pattern; and resetting an initial offset value of a driving assembly driving the optical anti-shake lens based on the first position difference between the sample pattern and the reference pattern to compensate for the offset of the optical anti-shake lens.
The method for compensating the offset of the optical anti-shake lens provided by the embodiment of the disclosure can make precise and targeted adjustment on each optical anti-shake lens based on the actual assembly state of each optical anti-shake lens. The disassembly and reassembly of the module with complex process are not required to be performed in a time-consuming and labor-consuming manner, and the problem that the assembled size of the terminal is influenced due to the fact that the module is ultrahigh due to the directional compensation process can be solved. And the deviation is calibrated by resetting the initial offset value in the production stage of the optical anti-shake lens, so that when the camera module with the optical anti-shake lens is used, an image calibration program does not need to be executed every time of shooting, and the imaging quality and the system performance of the camera module can be improved.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 illustrates a flowchart of a method for compensating for an offset of an optical anti-shake lens according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an optical anti-shake lens;
FIG. 3 is a schematic diagram of a multi-lens module;
fig. 4 shows a flowchart of step S1030 in fig. 1;
fig. 5 is a schematic view illustrating an apparatus for compensating for a field angle offset of an optical anti-shake lens according to an embodiment of the present application;
FIG. 6 illustrates a computer system according to an embodiment of the present application;
FIG. 7 shows a sample image taken by an optical anti-shake lens; and
fig. 8 shows an image photographed by the optical anti-shake lens after compensating for the offset.
Detailed Description
For a better understanding of the present application, various aspects of the present application will be described in more detail with reference to the accompanying drawings. It should be understood that the detailed description is merely illustrative of exemplary embodiments of the present application and does not limit the scope of the present application in any way. Like reference numerals refer to like elements throughout the specification. The expression "and/or" includes any and all combinations of one or more of the associated listed items.
It should be noted that in this specification, the expressions first, second, third, etc. are used only to distinguish one feature from another, and do not represent any limitation on the features. Thus, a first direction discussed below may also be referred to as a second direction without departing from the teachings of the present application. And vice versa.
In the drawings, the thickness, size and shape of the components have been slightly adjusted for convenience of explanation. The figures are purely diagrammatic and not drawn to scale. For example, the offset of the lens assembly relative to the photosensitive assembly is not an actual offset. As used herein, the terms "approximately", "about" and the like are used as table-approximating terms and not as table-degree terms, and are intended to account for inherent deviations in measured or calculated values that would be recognized by one of ordinary skill in the art.
It will be further understood that the terms "comprises," "comprising," "has," "having," "includes" and/or "including," when used in this specification, specify the presence of stated features, elements, and/or components, but do not preclude the presence or addition of one or more other features, elements, components, and/or groups thereof. Moreover, when a statement such as "at least one of" appears after a list of listed features, the entirety of the listed features is modified rather than modifying individual elements in the list. Furthermore, when describing embodiments of the present application, the use of "may" mean "one or more embodiments of the present application. Also, the term "exemplary" is intended to refer to an example or illustration.
Unless otherwise defined, all terms (including engineering and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. In addition, unless explicitly defined or contradicted by context, the specific steps included in the methods described herein are not necessarily limited to the order described, but can be performed in any order or in parallel. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows a flowchart of a method 1000 for compensating an offset of an optical anti-shake lens according to an embodiment of the present application. Fig. 2 shows a schematic diagram of an optical anti-shake lens.
Referring to fig. 2, an optical anti-shake lens 2000 according to an embodiment of the present application includes a photosensitive assembly 2030, where the photosensitive assembly 2030 may serve as a reference for installation and also serve to cooperate with an external component; the driving assembly 2020 can be a motor, a stator 2022 of the motor is fixedly connected with the photosensitive assembly 2030, and the mover 2021 is driven by the stator 2022 to move; the lens assembly 2010 is fixedly connected with the mover 2021.
In step S1010, a reference image is obtained based on a reference object having a marker pattern, the reference image including a reference pattern corresponding to the marker pattern. The reference image may be a theoretical image or an actually captured image, and when a sample pattern of a sample image described below coincides with the reference pattern, the sample image is considered to have no deviation, and no adjustment is required for the optical anti-shake lens 2000. When the sample pattern coincides with the reference pattern, an adjustment may be made. For example, the method 1000 may be performed when a first positional difference between the sample pattern and the reference pattern is greater than a threshold, such as when the first positional difference is greater than two pixels. Illustratively, the first positional difference includes a translational deviation and a rotational deviation.
In step S1020, the reference object with the mark pattern is photographed using the optical anti-shake lens 2000 to be compensated to obtain a sample image including a sample pattern corresponding to the mark pattern. The sample image may be a bitmap with the smallest element being one pixel, the size of the sample image being controlled by the size of the photosensitive elements 2030, e.g., 600 pixels by 800 pixels. The position of the sample pattern in the sample image may be represented by coordinates, the unit of which is a pixel.
In step S1030, an initial offset value of the driving assembly 2020 driving the optical anti-shake lens 2000 is reset based on the first position difference between the sample pattern and the reference pattern to compensate for the offset of the optical anti-shake lens 2000. The drive assembly 2020 may have a variety of implementations, such as a VCM (voice coil motor), SMA (shape memory alloy) motor, MEMS motor, piezoelectric ceramic motor, or the like. Motor manufacturers typically calibrate the motors before putting them on the market, setting an initial offset value for the motors. Different motors of the same model tend to have different initial values, which are very close to each other and tend to be normally distributed. The present application employs resetting the initial offset values of the motors to compensate for offsets such as those due to lens module assembly errors.
Referring to fig. 2 and 3, the offset of the optical anti-shake lens 2000 may be understood as an offset of an angle of view. The shift of the optical anti-shake lens 2000 may be caused by the deflection of the mover 2021 relative to the stator 2022 as shown in fig. 2, or by the deflection of the optical anti-shake lens 2000 relative to the frame as shown in fig. 3. By resetting the initial offset value of the driving component 2020 driving the optical anti-shake lens 2000, the driving component 2020 is started up according to the reset initial offset value when the driving component 2020 is started up, and when the anti-shake program is executed, the action of the driving component 2020 is also re-corrected based on the reset initial offset value, so that the optical anti-shake lens 2000 captures a clear and accurate-position image.
The method 1000 for compensating the offset of the optical anti-shake lens 2000 in the embodiment of the application does not need to perform the disassembling and reassembling work of a module with a complex process, and can accurately adjust the offset of each optical anti-shake lens 2000, thereby improving the imaging quality. The deviation is calibrated by resetting the initial offset value, so that the multi-camera module with the optical anti-shake lens does not need to execute an image calibration program every time when the multi-camera module synthesizes images, and the system performance is improved.
In an exemplary embodiment, referring to fig. 4, step S1030 may include the following steps.
In step S1031, the current offset value of the drive component 2020 is read.
In step S1032, a compensation value is determined based on the first position difference and the movement characteristic of the driving assembly 2020.
In step S1033, the determined compensation value is added to the current offset value to obtain a reset initial offset value.
Optionally, in step S1034, the reset initial offset value may also be written into the register of the optical anti-shake lens 2000.
For example, the current offset value of the driving assembly 2020 may be an Analog-to-Digital (a/D) converted offset value, and after the driving assembly 2020 receives the Digital control signal, the mover 2021 performs a corresponding action, and the movers 2021 of the driving assemblies 2020 of the same model have the same moving characteristic, although the specific values of the moving characteristic may also have a deviation. After the mover 2021 performs the corresponding action, the imaging of the optical anti-shake lens 2000 has an offset and then obtains a first position difference, and a compensation value and then an initial offset value for resetting can be determined based on the first position difference and the movement characteristic. After the reset initial offset value is written in the register of the optical anti-shake lens 2000 and the driving assembly 2020 receives the digital control signal, the action performed by the mover 2021 is deflected with respect to the action corresponding to the digital control signal, but the imaging of the optical anti-shake lens 2000 is corrected.
In an exemplary embodiment, the method 1000 further comprises: acquiring movement characteristics of a plurality of driving components of the same model as the driving component 2020 driving the optical anti-shake lens 2000; and determining an average of the movement characteristics of the plurality of driving components as the movement characteristic of the driving component 2020 of the optical anti-shake lens 2000. Wherein the same model may be a drive assembly of the same configuration, preferably a model made by the same manufacturer, and whether the mean value can be adopted or whether the batch to which the mean value is applicable needs to be reduced can be judged by the significance degree of the mean value and the like. By the method 1000 of the embodiment, the movement characteristic of the driving element 2020 can be set quickly, and the driving element 2020 can be reset more accurately and quickly.
In an exemplary embodiment, the method 1000 for compensating for an offset of the optical anti-shake lens 2000 of an embodiment of the present application further includes: when the lens assembly 2010 of the optical anti-shake lens 2000 for forming the optical path is in the first position, capturing a first image through the optical anti-shake lens 2000; driving the lens assembly 2010 to move to the second position by the drive assembly 2020; a second image is photographed through the optical anti-shake lens 2000 at a second position; and determining a movement characteristic of the drive assembly 2020 based on a ratio between a second positional difference between the first image and the second image and a motion positional difference between the first position and the second position. The position of lens assembly 2010 after drive assembly 2020 has been actuated at the initial offset value may be referred to as the first position. Referring to the first image, lens assembly 2010 is driven to a second position in a direction that requires correction. By actually measuring the optical anti-shake lens 2000 to be compensated, an accurate movement characteristic of the driving assembly 2020 can be obtained.
In an exemplary embodiment, determining the movement characteristics of drive assembly 2020 includes: determining a first movement characteristic of the drive assembly in the first direction based on a ratio of a component of the second position difference in the first direction on the horizontal plane to a component of the motion position difference in the first direction; and determining a second movement characteristic of the drive assembly in a second direction based on a ratio of a component of the second positional difference in the second direction in the horizontal plane to a component of the movement positional difference in the second direction, the second direction being perpendicular to the first direction.
The pixels of the image formed by the optical anti-shake lens 2000 are generally arranged in a first direction and a second direction perpendicular to each other. The motion of the drive assembly 2020 also has a component in the first direction and a second direction in the horizontal plane, which is therefore the imaging planeThe component (c) above. Dividing the movement characteristic of the drive assembly 2020 into a first movement characteristic kxAnd a second movement characteristic kyThe initial offset value of the driving component 2020 can be reset more precisely to obtain more accurate correction.
In an exemplary embodiment, determining a movement characteristic of drive assembly 2020 may include determining a rotational characteristic of drive assembly 2020. Specifically, the rotation characteristic may be determined based on a ratio between the angle of the second position difference and the angle of the movement position difference.
In an exemplary embodiment, the reference object may be a target having a mark pattern for imaging different from the background, and the mark pattern may be an asymmetric pattern, and the arrangement direction and the position of the reference point may be obtained based on the mark pattern itself. For example, referring to the sample pattern shown in fig. 7, the sample pattern (i.e., the image formed by the marker pattern) has five asymmetric sample points, and any sample point can be used as a reference point of the sample pattern, and the arrangement direction of the sample pattern can be obtained.
Referring to fig. 7, if the center of the imaging plane of the optical anti-shake lens 2000 is directed to the reference point of the mark pattern of the reference object, then a sample image is obtained in which the reference point of the sample pattern is located at the upper left of the center of the image. After the optical anti-shake lens 2000 is compensated by the method 1000 according to the embodiment of the present disclosure, the captured image is as shown in fig. 8, and the pattern corresponding to the mark pattern in fig. 8 is located at the center of the image.
Illustratively, the mover 2021 of the driving assembly 2020 of the optical anti-shake lens 2000 is in a first position, the reference object is photographed using the optical anti-shake lens 2000, and a first image is obtained, the first image includes a first shot pattern corresponding to the mark pattern, the first direction is an x-axis, the second direction is a y-axis, the center of the first image is exemplarily used as an origin, and the coordinate of the reference point of the first shot pattern is (x-axis)1,y1) Wherein x is1And y1The unit of (d) is pixel; the mover 2021 moves to the second position, and the moving stroke of the mover 2021 is u. Since the actual displacement of the mover 2021 is proportional to the encoded value that drives it, u can be measured by the encoded value. Photographing a reference object using the optical anti-shake lens 2000 to obtain a second photographed image including a second photographed pattern corresponding to the mark pattern, the reference point of the second photographed pattern having coordinates of (x)2,y2) Wherein x is2And y2The unit of (a) is a pixel; the second shot pattern has a second positional difference with the first shot pattern, and a component Δ x' of the second positional difference in the first direction satisfies Δ x ═ x2-x1The component Δ y' in the second direction satisfies Δ y ═ y3-y2(ii) a The motion characteristics of the drive assembly 2020 with respect to the two directional components of the second position difference are kx'、ky', movement path u and kxAnd kyThe following formula is satisfied: k is a radical ofx=kx'=u/Δx',ky=ky'u/Deltay', where kxAnd kyIn code/pixel (coded value per pixel).
In an exemplary embodiment, the movement characteristic of drive assembly 2020 includes a rotation characteristic kθ. The mover 2021 rotates by an angle s when moving from the first position to the second position, and the second position difference includes a rotational deviation. In the first image, the first shot pattern has a pivot angle theta relative to the x-axis1. The motion characteristic of the drive assembly 202 with respect to the rotational deviation is kθAngle of rotation s and kθThe following formula is satisfied: k is a radical ofθ=s/θ1Wherein k isθIs a dimensionless ratio.
In an exemplary embodiment, determining the compensation value based on the first position difference and the movement characteristic of the drive assembly 2020 includes: determining a first direction compensation value based on a first movement characteristic of drive assembly 2020 in a first direction on a horizontal plane and a component of the first position difference in the first direction; and determining a second direction compensation value based on a second movement characteristic of the driving assembly 2020 in a second direction on the horizontal plane and a component of the first position difference in the second direction, the second direction being perpendicular to the first direction.
Illustratively, the first direction compensation value FxA second direction compensation value FyAre respectively based on formula Fx=(x0-xc)*kxAnd Fy=(y0-yc)*kyObtaining; wherein x is0Is the x-coordinate, y, of the sample pattern in the sample image0Is the y-coordinate, x, of the sample pattern in the sample imagecIs the x-coordinate, y, of a reference pattern in a reference imagecIs the y coordinate of the reference pattern in the reference image; x is the number ofc、yc、x0And y0Has a unit of pixel, kxAnd kyThe unit of (d) is the encoded value/pixel. The first direction movement characteristic and the second direction movement characteristic can be calculated respectively, or the movement characteristics can be calculated and then decomposed into a first direction movement characteristic and a second direction movement characteristic. By decomposing the motion characteristics, the initial offset value of the drive assembly 2020 can be more accurately reset.
In an exemplary embodiment, the rotation compensation value FθBased on Fθ=θ0*kθIs obtained wherein theta0Is the rotation angle of the sample pattern in the sample image.
In an exemplary embodiment, obtaining a reference image based on a reference having a marker pattern includes: the imaging plane center is determined as the reference pattern in response to the mark pattern in which the imaging plane center of the optical anti-shake lens 2000 faces the reference object. When only one lens is provided in a terminal such as a mobile phone, in order to compensate for the shift of the optical anti-shake lens 2000, other fixed points on the imaging plane may be aligned with the mark pattern based on the assembly reference of the photosensitive assembly 2030, and the coordinates of the fixed points are the coordinates of the reference pattern of the reference image. Through the matching of the imaging surface and the marking pattern, the coordinates of the pattern can be conveniently and quickly referenced.
In an exemplary embodiment, obtaining a reference image based on a reference having a marker pattern includes: the reference object is photographed through another optical lens forming an array with the optical anti-shake lens 2000 to obtain a reference image. When the multi-camera module is used for imaging, imaging of a plurality of lenses can be synthesized to obtain a synthesized image, and the reference image is shot by the lenses except the optical anti-shake lens 2000, so that the offset of the optical anti-shake lens 2000 can be compensated in a more targeted manner, and the imaging quality is improved.
Referring to fig. 5, an embodiment of the present application also provides an apparatus 3000 for compensating for an offset of an optical anti-shake lens, the apparatus 3000 including: a processor 3100; and a memory 3200, memory 3200 in communication with processor 3100 and storing machine readable instructions that, when executed by processor 3100, cause processor 3100 to: driving the optical anti-shake lens 2000 to photograph a sample image based on a reference object having a marker pattern, the sample image including a sample pattern corresponding to the marker pattern; obtaining a reference image based on a reference, the reference image including a reference pattern corresponding to the marker pattern; and resetting an initial offset value of the driving component 2020 driving the optical anti-shake lens 2000 based on the first position difference between the sample pattern and the reference pattern to compensate for the offset of the optical anti-shake lens 2000. The device 3000 provided in the embodiment of the present application can be used to compensate the offset of the optical anti-shake lens 2000, so that the imaging position of the optical anti-shake lens 2000 is accurate.
In an exemplary embodiment, the machine readable instructions, when executed by the processor 3100, further cause the processor 3100 to: read the current offset value of the drive assembly 2020; determining a compensation value based on the first position difference and the movement characteristic of the drive assembly 2020; adding the determined compensation value to the current offset value to obtain a reset initial offset value.
In an exemplary embodiment, the machine readable instructions, when executed by the processor 3100, further cause the processor 3100 to: when the lens assembly 2010 of the optical anti-shake lens 2000 for forming the optical path is in the first position, a first image is captured through the optical anti-shake lens 2000; driving the lens assembly 2010 to move to the second position by the drive assembly 2020; a second image is photographed through the optical anti-shake lens 2000 at a second position; and determining a movement characteristic of the drive assembly 2020 based on a ratio between a second positional difference between the first image and the second image and a motion positional difference between the first position and the second position.
In an exemplary embodiment, the machine readable instructions, when executed by the processor 3100, further cause the processor 3100 to: determining a first movement characteristic of drive assembly 2020 in the first direction based on a ratio of a component of the second position difference in the first direction in the horizontal plane and a component of the motion position difference in the first direction; and determining a second movement characteristic of the driven component in a second direction based on a ratio of a component of the second position difference in the second direction in the horizontal plane to a component of the motion position difference in the second direction, the second direction being perpendicular to the first direction.
In an exemplary embodiment, the machine readable instructions, when executed by the processor 3100, further cause the processor 3100 to: determining a first direction compensation value based on a first movement characteristic of drive assembly 2020 in a first direction on a horizontal plane and a component of the position difference in the first direction; and determining a second direction compensation value based on a second movement characteristic of the driving assembly in a second direction on the horizontal plane and a component of the position difference in the second direction, the second direction being perpendicular to the first direction.
In an exemplary embodiment, the machine readable instructions, when executed by the processor 3100, further cause the processor 3100 to: acquiring the movement characteristics of a plurality of driving assemblies of the same type as the driving assemblies for driving the optical anti-shake lens; and determining an average of the movement characteristics of the plurality of driving components as the movement characteristic of the driving component 2020 of the optical anti-shake lens 2000.
In an exemplary embodiment, the machine readable instructions, when executed by the processor 3100, further cause the processor 3100 to: in response to the imaging plane center of the optical anti-shake lens 2000 facing the reference point of the mark pattern of the reference object, the imaging plane center is determined as the reference point of the reference pattern.
In an exemplary embodiment, the apparatus further comprises another optical lens in an array with the optical anti-shake lens 2000, the machine readable instructions when executed by the processor 3100 further cause the processor 3100 to: the reference object is photographed through another optical lens to obtain a reference image.
Referring to fig. 6, the present application also provides a computer system, which may be, for example, a mobile terminal, a Personal Computer (PC), a tablet computer, a server, etc. Referring now to FIG. 6, there is shown a schematic block diagram of a computer system suitable for use in implementing the terminal device or server of the present application. The computer system includes one or more processors, communication, etc., such as: one or more Central Processing Units (CPUs) 601, and/or one or more image processors (GPUs) 613, etc., which may perform various appropriate actions and processes according to executable instructions stored in a Read Only Memory (ROM)602 or loaded from a storage section 608 into a Random Access Memory (RAM) 603. Communications portion 612 may include, but is not limited to, a network card, which may include, but is not limited to, an IB (Infiniband) network card.
The processor may communicate with the read only memory 602 and/or the random access memory 603 to execute the executable instructions, connect with the communication part 612 through the bus 604, and communicate with other target devices through the communication part 612, so as to complete the operations corresponding to any method provided by the embodiments of the present application, for example: obtaining a reference image based on a reference object having a marker pattern, the reference image including a reference pattern corresponding to the marker pattern; driving the optical anti-shake lens to capture the reference object to obtain a sample image, wherein the sample image comprises a sample pattern corresponding to the mark pattern; and resetting an initial offset value of a driving assembly driving the optical anti-shake lens based on a first position difference between the sample pattern and the reference pattern to compensate for an offset of the optical anti-shake lens. For another example: acquiring an input image; and performing feature enhancement on the input image by using a residual error network and utilizing a residual error output by the residual error network.
In addition, in the RAM 603, various programs and data necessary for the operation of the device can also be stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. The ROM 602 is an optional module in case of the RAM 603. The RAM 603 stores or writes executable instructions into the ROM 602 at runtime, and the executable instructions cause the CPU 601 to execute operations corresponding to the above-described communication method. An input/output (I/O) interface 605 is also connected to bus 604. The communication unit 612 may be integrated, or may be provided with a plurality of sub-modules (e.g., a plurality of IB network cards) and connected to the bus link.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage unit 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
It should be noted that the architecture shown in fig. 6 is only an optional implementation manner, and in a specific practical process, the number and types of the components in fig. 6 may be selected, deleted, added or replaced according to actual needs; in different functional component settings, separate settings or integrated settings may also be used, for example, the GPU and the CPU may be separately set or the GPU may be integrated on the CPU, the communication part may be separately set or integrated on the CPU or the GPU, and so on. These alternative embodiments are all within the scope of the present disclosure.
Further, according to an embodiment of the present application, the processes described above with reference to the flowcharts may be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium having stored thereon machine-readable instructions executable by a processor to perform instructions corresponding to the method steps provided herein, such as: obtaining a reference image based on a reference object having a marker pattern, the reference image including a reference pattern corresponding to the marker pattern; driving the optical anti-shake lens to capture the reference object to obtain a sample image, wherein the sample image comprises a sample pattern corresponding to the mark pattern; and resetting an initial offset value of a driving assembly driving the optical anti-shake lens based on a first position difference between the sample pattern and the reference pattern to compensate for an offset of the optical anti-shake lens. In such embodiments, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
The method and apparatus, device of the present application may be implemented in a number of ways. For example, the methods and apparatuses, devices of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present application may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present application. Thus, the present application also covers a recording medium storing a program for executing the method according to the present application.
The above description is only a preferred embodiment of the present application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of protection covered by the present application is not limited to the embodiments with a specific combination of the features described above, but also covers other embodiments with any combination of the features described above or their equivalents without departing from the technical idea described above. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (19)

1. A method for compensating for an offset of an optical anti-shake lens, wherein the method comprises:
obtaining a reference image based on a reference object having a marker pattern, the reference image including a reference pattern corresponding to the marker pattern;
photographing the reference object using the optical anti-shake lens to obtain a sample image including a sample pattern corresponding to the marker pattern; and
determining a compensation value based on a first position difference between the sample pattern and the reference pattern and a movement characteristic of a driving assembly driving the optical anti-shake lens to reset an initial offset value of the driving assembly, compensating for an offset of the optical anti-shake lens,
characterized in that the method further comprises:
acquiring the movement characteristics of a plurality of driving assemblies of the same type as the driving assemblies; and
determining an average of the movement characteristics of the plurality of drive assemblies as the movement characteristic of the drive assembly.
2. The method of claim 1, wherein determining a compensation value based on a first position difference between the sample pattern and the reference pattern and a movement characteristic of a driving component driving the optical anti-shake lens to reset an initial offset value of the driving component comprises:
reading a current offset value of the drive assembly;
determining a compensation value based on the first position difference and a movement characteristic of the drive assembly;
adding the determined compensation value to the current offset value to obtain a reset initial offset value.
3. The method of claim 2, further comprising:
responding to a lens component of the optical anti-shake lens for forming a light path at a first position, and shooting a first image through the optical anti-shake lens;
driving the lens assembly to move to a second position through the driving assembly;
shooting a second image through the optical anti-shake lens at the second position; and
determining a movement characteristic of the drive assembly based on a ratio between a second positional difference between the first image and the second image and a motion positional difference between the first position and the second position.
4. The method of claim 3, wherein determining the movement characteristic of the drive assembly comprises:
determining a first movement characteristic of the drive assembly in a first direction based on a ratio of a component of the second position difference in the first direction on a horizontal plane and a component of the motion position difference in the first direction; and
determining a second movement characteristic of the drive assembly in a second direction based on a ratio of a component of the second position difference in the second direction in the horizontal plane to a component of the motion position difference in the second direction, the second direction being perpendicular to the first direction.
5. The method of claim 4, wherein determining a compensation value based on the first position difference and a movement characteristic of the drive assembly comprises:
determining a first direction compensation value based on a first movement characteristic of the drive assembly in a first direction on a horizontal plane and a component of the first position difference in the first direction; and
determining a second direction compensation value based on a second movement characteristic of the drive assembly in a second direction on the horizontal plane and a component of the first position difference in the second direction, the second direction being perpendicular to the first direction.
6. The method of claim 3, wherein determining the movement characteristic of the drive assembly comprises:
determining a rotational characteristic of the drive assembly based on the rotational angle of the second position difference and the rotational angle of the kinematic position difference.
7. The method of claim 6, wherein determining a compensation value based on the first position difference and a movement characteristic of the drive assembly comprises:
a rotational angle compensation value is determined based on a rotational angle of the drive assembly at the rotational characteristic and the first position difference.
8. The method of claim 1, wherein obtaining a reference image based on a reference object having a marker pattern comprises:
and determining the center of the imaging surface as the datum point of the reference pattern in response to the fact that the center of the imaging surface of the optical anti-shake lens is opposite to the datum point of the mark pattern of the reference object.
9. The method of claim 1, wherein obtaining a reference image based on a reference object having a marker pattern comprises:
and shooting the reference object through another optical lens forming an array with the optical anti-shake lens to obtain the reference image.
10. An apparatus for compensating for an offset of an optical anti-shake lens, the apparatus comprising:
a processor; and
a memory in communication with the processor and storing machine-readable instructions that, when executed by the processor, cause the processor to:
driving an optical anti-shake lens to capture a reference object having a marker pattern to obtain a sample image, the sample image including a sample pattern corresponding to the marker pattern;
obtaining a reference image based on the reference, the reference image including a reference pattern corresponding to the marker pattern; and
determining a compensation value based on a first position difference between the sample pattern and the reference pattern and a movement characteristic of a driving assembly driving the optical anti-shake lens to reset an initial offset value of the driving assembly, compensating for an offset of the optical anti-shake lens,
further, the machine-readable instructions, when executed by the processor, further cause the processor to:
acquiring the movement characteristics of a plurality of driving assemblies of the same type as the driving assemblies; and
determining an average of the movement characteristics of the plurality of drive assemblies as the movement characteristic of the drive assembly.
11. The apparatus of claim 10, wherein the machine readable instructions, when executed by the processor, further cause the processor to:
reading a current offset value of the drive assembly;
determining a compensation value based on the first position difference and a movement characteristic of the drive assembly; and
adding the determined compensation value to the current offset value to obtain a reset initial offset value.
12. The apparatus of claim 11, wherein the machine readable instructions, when executed by the processor, further cause the processor to:
responding to a lens component of the optical anti-shake lens for forming a light path at a first position, and shooting a first image through the optical anti-shake lens;
driving the lens assembly to move to a second position through the driving assembly;
shooting a second image through the optical anti-shake lens at the second position; and
determining a movement characteristic of the drive assembly based on a ratio between a second positional difference between the first image and the second image and a motion positional difference between the first position and the second position.
13. The apparatus of claim 12, wherein the machine readable instructions, when executed by the processor, further cause the processor to:
determining a first movement characteristic of the drive assembly in a first direction based on a ratio of a component of the second position difference in the first direction on a horizontal plane and a component of the motion position difference in the first direction; and
determining a second movement characteristic of the drive assembly in a second direction based on a ratio of a component of the second position difference in the second direction in the horizontal plane to a component of the motion position difference in the second direction, the second direction being perpendicular to the first direction.
14. The apparatus of claim 13, wherein the machine readable instructions, when executed by the processor, further cause the processor to:
determining a first direction compensation value based on a first movement characteristic of the drive assembly in a first direction on a horizontal plane and a component of the position difference in the first direction; and
determining a second direction compensation value based on a second movement characteristic of the drive assembly in a second direction on the horizontal plane and a component of the position difference in the second direction, the second direction being perpendicular to the first direction.
15. The apparatus of claim 12, wherein the machine readable instructions, when executed by the processor, further cause the processor to:
determining a rotational characteristic of the drive assembly based on the rotational angle of the second position difference and the rotational angle of the kinematic position difference.
16. The apparatus of claim 15, wherein the machine readable instructions, when executed by the processor, further cause the processor to:
a rotational angle compensation value is determined based on a rotational angle of the drive assembly at the rotational characteristic and the first position difference.
17. The apparatus of claim 10, wherein the machine readable instructions, when executed by the processor, further cause the processor to:
and determining the center of an imaging surface of the optical anti-shake lens as the reference pattern in response to the mark pattern of which the center of the imaging surface is directly opposite to the reference object.
18. The apparatus of claim 10, further comprising another optical lens in an array with the optical anti-shake lens, the machine readable instructions when executed by the processor further cause the processor to:
and shooting the reference object through the other optical lens to obtain the reference image.
19. A non-transitory machine-readable storage medium storing machine-readable instructions executable by a processor and causing the processor to:
obtaining a reference image based on a reference object having a marker pattern, the reference image including a reference pattern corresponding to the marker pattern;
photographing the reference object using the optical anti-shake lens to obtain a sample image including a sample pattern corresponding to the marker pattern; and
determining a compensation value based on a first position difference between the sample pattern and the reference pattern and a movement characteristic of a driving assembly driving the optical anti-shake lens to reset an initial offset value of the driving assembly, compensating for an offset of the optical anti-shake lens,
further, the machine-readable instructions are executable by the processor and further cause the processor to:
acquiring the movement characteristics of a plurality of driving assemblies of the same type as the driving assemblies; and
determining an average of the movement characteristics of the plurality of drive assemblies as the movement characteristic of the drive assembly.
CN201910542246.4A 2019-06-21 2019-06-21 Offset compensation method, device and storage medium Active CN112118386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910542246.4A CN112118386B (en) 2019-06-21 2019-06-21 Offset compensation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910542246.4A CN112118386B (en) 2019-06-21 2019-06-21 Offset compensation method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112118386A CN112118386A (en) 2020-12-22
CN112118386B true CN112118386B (en) 2022-03-25

Family

ID=73796695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910542246.4A Active CN112118386B (en) 2019-06-21 2019-06-21 Offset compensation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112118386B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207514A (en) * 2012-01-13 2013-07-17 鸿富锦精密工业(深圳)有限公司 Lens detecting device and method
CN109660718A (en) * 2018-11-30 2019-04-19 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment, computer readable storage medium
CN109788277A (en) * 2019-01-08 2019-05-21 浙江大华技术股份有限公司 Compensation method, device and the storage medium of the optical axis deviation of stabilization machine core

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9699381B2 (en) * 2014-04-18 2017-07-04 Samsung Electro-Mechanics Co., Ltd. Digital photographing motion compensation system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207514A (en) * 2012-01-13 2013-07-17 鸿富锦精密工业(深圳)有限公司 Lens detecting device and method
CN109660718A (en) * 2018-11-30 2019-04-19 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment, computer readable storage medium
CN109788277A (en) * 2019-01-08 2019-05-21 浙江大华技术股份有限公司 Compensation method, device and the storage medium of the optical axis deviation of stabilization machine core

Also Published As

Publication number Publication date
CN112118386A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN108769528B (en) Image compensation method and apparatus, computer-readable storage medium, and electronic device
US9979889B2 (en) Combined optical and electronic image stabilization
WO2019237977A1 (en) Image compensation method, computer readable storage medium and electronic device
CN110035222B (en) Semiconductor device and electronic apparatus
WO2020088133A1 (en) Image processing method and apparatus, electronic device and computer-readable storage medium
JP5531194B2 (en) Image processing apparatus, image processing method, and image processing program
CN109714536B (en) Image correction method, image correction device, electronic equipment and computer-readable storage medium
JP6308748B2 (en) Image processing apparatus, imaging apparatus, and image processing method
WO2018180916A1 (en) Blur correction device, replacement lens, and imaging device
JP2012114849A (en) Image processing apparatus and image processing method
CN109660718B (en) Image processing method and device, electronic equipment and computer readable storage medium
US11678055B2 (en) Imaging support device, imaging support system, imaging system, imaging support method, and program
CN112118386B (en) Offset compensation method, device and storage medium
JPWO2010055809A1 (en) Image pickup apparatus adjustment method and image pickup apparatus
CN109671028A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN108603752B (en) Deflection angle detection method and device and jitter compensation method and device for camera module of terminal
CN112203080B (en) Resolution testing method, device and storage medium
WO2021134219A1 (en) Parameter calibration method and apapratus
CN112543321A (en) Position compensation detection and correction method, camera module and manufacturing method thereof
JP2016208483A (en) Video system and aerial photography system using the same
CN113709330B (en) Imaging lens driving module and electronic device
CN114900675A (en) Laser projection apparatus and projected image correction method
CN115396596B (en) Super-resolution image imaging method, device and storage medium
JP5401696B2 (en) Image processing apparatus, image processing method, and image processing program
US20220150408A1 (en) Optical image stabilization circuit and optical image stabilization device for object position correction using face tracking

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant