CN109788277B - Method and device for compensating optical axis deviation of anti-shake movement and storage medium - Google Patents

Method and device for compensating optical axis deviation of anti-shake movement and storage medium Download PDF

Info

Publication number
CN109788277B
CN109788277B CN201910017285.2A CN201910017285A CN109788277B CN 109788277 B CN109788277 B CN 109788277B CN 201910017285 A CN201910017285 A CN 201910017285A CN 109788277 B CN109788277 B CN 109788277B
Authority
CN
China
Prior art keywords
optical axis
deviation
axis deviation
photosensitive element
determining
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
CN201910017285.2A
Other languages
Chinese (zh)
Other versions
CN109788277A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201910017285.2A priority Critical patent/CN109788277B/en
Publication of CN109788277A publication Critical patent/CN109788277A/en
Application granted granted Critical
Publication of CN109788277B publication Critical patent/CN109788277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Adjustment Of Camera Lenses (AREA)

Abstract

The application discloses a method and a device for compensating optical axis deviation of an anti-shake movement and a storage medium, wherein in the method, a first image of a calibration sample is obtained under a first optical zoom parameter of the anti-shake movement; the calibration sample is provided with a plurality of reference points which are not on a straight line; acquiring a second image of the calibration sample under a second optical zoom parameter of the anti-shake movement; determining coordinate points of the reference points in the first image and the second image respectively; determining an optical axis deviation between the center of the optical axis of the lens of the anti-shake movement and the center of the photosensitive element of the anti-shake movement according to the coordinate points of the reference points and a pre-constructed optical axis deviation determination model; and then, moving the photosensitive element according to the optical axis deviation to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens. In the embodiment of the application, the optical axis deviation can be accurately determined by using a plurality of reference points which are not on the same straight line, and the optical axis deviation compensation is carried out.

Description

Method and device for compensating optical axis deviation of anti-shake movement and storage medium
Technical Field
The present disclosure relates to anti-shake mechanisms, and particularly to a method and an apparatus for compensating for an optical axis deviation of an anti-shake mechanism, and a storage medium.
Background
Optical anti-shake is a popular movement anti-shake mode at present, and can be mainly divided into two types, one type is lens anti-shake, and the other type is sensor (photosensitive element) anti-shake; the sensor anti-shake is that the sensor is arranged on a device which can move in the direction of X, Y, and the sensor is moved to realize the shake compensation effect.
In the assembling process of the sensor anti-shake movement, a sensor plate and a lens are required to be assembled, the imaging center of the sensor plate is coincided with the optical axis center of the lens under the ideal condition, but in the conveying process of the anti-shake movement to a customer, due to the inedibility factors such as collision and falling, the two centers inevitably have deviation (namely, optical axis deviation is generated). Therefore, the deviation needs to be compensated to enable the anti-shake movement to be in a better working state.
Disclosure of Invention
The embodiment of the application provides a system, a method and a device for compensating optical axis deviation of an anti-shake movement and a storage medium, which are used for solving the problem that the compensation operation of the optical axis deviation of the anti-shake movement in the prior art is labor intensive operation, so that the compensation efficiency of the optical axis deviation of the anti-shake movement is low.
The embodiment of the application provides a compensation method for optical axis deviation of an anti-shake movement, which comprises the following steps:
acquiring a first image of a calibration sample under a first optical zoom parameter of the anti-shake movement; the calibration sample is provided with a plurality of reference points, and the reference points are not on a straight line;
acquiring a second image of the calibration sample under a second optical zoom parameter of the anti-shake movement;
determining coordinate points of the reference points in the first image and the second image respectively;
determining an optical axis deviation between the center of the optical axis of the lens of the anti-shake movement and the center of the photosensitive element of the anti-shake movement according to the coordinate point of each reference point and a pre-constructed optical axis deviation determination model; the optical axis deviation determination model is constructed by zooming along the optical axis of the lens under different optical zoom parameters according to the same reference point;
and moving the photosensitive element according to the optical axis deviation to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens.
The embodiment of this application still provides a compensation arrangement of optical axis deviation of anti-shake core, the device includes:
the first image acquisition module is used for acquiring a first image of a calibration sample under a first optical zoom parameter of the anti-shake movement; the calibration sample is provided with a plurality of reference points, and the reference points are not on a straight line;
the second image acquisition module is used for acquiring a second image of the calibration sample under a second optical zoom parameter of the anti-shake movement;
a reference point coordinate determination module, configured to determine coordinate points of the reference points in the first image and the second image respectively;
the optical axis deviation determining module is used for determining the optical axis deviation between the center of the optical axis of the lens of the anti-shake movement and the center of the photosensitive element of the anti-shake movement according to the coordinate point of each reference point and a pre-constructed optical axis deviation determining model; the optical axis deviation determination model is constructed by zooming along the optical axis of the lens under different optical zoom parameters according to the same reference point;
and the compensation module is used for moving the photosensitive element according to the optical axis deviation so as to enable the imaging central point of the photosensitive element to coincide with the central point of the optical axis of the lens.
Another embodiment of the present application also provides a computing device comprising at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method for compensating the optical axis deviation of any anti-shake movement provided by the embodiment of the application.
Another embodiment of the present application further provides a computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions are configured to enable a computer to execute a method for compensating an optical axis deviation of any anti-shake movement in the embodiments of the present application.
The embodiment of the application provides a method and a device for compensating optical axis deviation of an anti-shake movement and a storage medium. In the method, a first image of a calibration sample is obtained under a first optical zoom parameter of an anti-shake movement; the calibration sample is provided with a plurality of reference points which are not on a straight line; acquiring a second image of the calibration sample under a second optical zoom parameter of the anti-shake movement; determining coordinate points of the reference points in the first image and the second image respectively; determining an optical axis deviation between the center of the optical axis of the lens of the anti-shake movement and the center of the photosensitive element of the anti-shake movement according to the coordinate points of the reference points and a pre-constructed optical axis deviation determination model; and then, moving the photosensitive element according to the optical axis deviation to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens. In the embodiment of the application, the optical axis deviation can be accurately determined by using a plurality of reference points which are not on the same straight line, and the optical axis deviation compensation is carried out.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram illustrating a deviation between an optical axis center of a lens and an imaging center of an induction element in a method for compensating an optical axis deviation of an anti-shake movement according to an embodiment of the present application;
fig. 2 is a schematic diagram of a calibration sample used in a method of compensating for an optical axis deviation of an anti-shake movement in an embodiment of the present application;
fig. 3 is a schematic view of an application scenario of the method for compensating for the optical axis deviation of the anti-shake movement in the embodiment of the present application;
fig. 4 is a schematic flow chart illustrating a method for compensating for optical axis deviation of an anti-shake movement according to an embodiment of the present application;
fig. 5 is a second flowchart illustrating a method for compensating for optical axis deviation of an anti-shake movement according to an embodiment of the present application;
fig. 6 is a schematic diagram of coordinates obtained by different magnification changes of a reference point in the compensation method for optical axis deviation of an anti-shake movement in the embodiment of the present application;
fig. 7 is a schematic diagram of an image taken before compensation of optical axis deviation of the anti-shake movement in the embodiment of the present application;
fig. 8 is a schematic diagram of an image captured after compensation of optical axis deviation of the anti-shake movement in the embodiment of the present application;
fig. 9 is a schematic structural view of a device for compensating for optical axis deviation of an anti-shake movement in an embodiment of the present application;
fig. 10 is a schematic structural diagram of a computing device according to an embodiment of the present application.
Detailed Description
In order to facilitate the compensation of the optical axis deviation of the anti-shake movement, so that the anti-shake movement can be in a better working state, the embodiment of the application provides a compensation method and device of the optical axis deviation of the anti-shake movement and a storage medium. In order to better understand the technical solution provided by the embodiments of the present application, the following brief description is made on the basic principle of the solution:
as shown in fig. 1, a circle represents a lens, an intersection point of inner cross lines of the circle is an optical axis center of the lens, a rectangular frame represents a sensor, and an intersection point of diagonal lines of the rectangular frame represents a center of the sensor. In the core optical zooming process, the optical axis of the light ray is vertical to the sensor plate, so all points are zoomed along the optical axis center when the optical zooming is carried out.
According to the principle, the application provides a method for compensating the optical axis deviation of the anti-shake movement. In the method, a calibration sample is involved. The calibration sample has a plurality of reference points therein, and the plurality of reference points are not in a straight line. Fig. 2 is a schematic diagram of a calibration sample provided in the present application. The calibration sample shown in fig. 2 includes 3 black circles with the same size as reference points, and the reference points are placed in non-parallel positions in a fully white drawing with a background (i.e., the reference points are not in a straight line, and the reference points can form a plane).
When the calibration sample is shot in a variable magnification mode, all reference points in the calibration sample are zoomed along the direction of the optical axis of the lens. Based on this, in the embodiment of the present application, images of calibration samples are obtained under different light magnification-varying parameters, then coordinates of the same reference point in the two images are determined, deviations of the optical axis center of the lens and the center of the sensor are determined according to an optical axis deviation determination model which is previously researched and established by the inventor, and optical axis deviation compensation is realized accordingly.
When the number of the reference points is 2, on one hand, the optical axis deviation error determined according to the two points is large easily caused by the fact that the number of the two points is small and the position distribution of the two points is improper. Therefore, in the embodiment of the present application, the plurality of reference points are not on a straight line, that is, the number of the reference points is required to be greater than or equal to 3. Thus, determining the optical axis center from a plurality of points improves the accuracy of the determined optical axis center.
In addition, a plurality of reference points are preferably uniformly distributed in the calibration image in the application, so that errors caused by the sample positions of the reference points are reduced, the accuracy of determining the center of the optical axis is further improved, accurate optical axis deviation can be determined, and high-precision compensation can be performed on the optical axis deviation.
Fig. 3 is a schematic view of an operation scene of an optical axis deviation of an anti-shake movement provided in the embodiment of the present application. In this scenario, user 10, anti-shake movement 11, calibration sample 13, and fixtures 12 and 14 are included.
The user 10 fixes the anti-shake movement 11 and the calibration sample 13 by a fixing device, so that the relative positions of the anti-shake movement and the calibration sample are not changed in the shooting process. The anti-shake movement shoots calibration samples under different optical zoom parameters. For example, different images of the calibration sample are taken at variable magnification and at low magnification. Then, a reference point in the image of the calibration sample is positioned, and the coordinate of the optical axis center of the lens is determined according to the coordinate of the reference point. And then determining the deviation between the optical axis center of the lens and the center of the photosensitive element, thereby realizing the compensation of the optical axis deviation.
It should be noted that, since the calibration sample includes a plurality of reference points in the embodiment of the present application, the position relationship between the calibration sample and the optical axis center of the lens is not limited. For example, it is not required that the optical axis center of the optical lens is perpendicular to the calibration sample, and the calibration sample may be tilted in any direction as long as all reference points can be captured.
The following further describes a method for compensating for an optical axis deviation of an anti-shake movement provided in an embodiment of the present application with reference to the accompanying drawings. As shown in fig. 4, is a schematic flow chart of the method, and includes the following steps:
step 401: acquiring a first image of a calibration sample under a first optical zoom parameter of the anti-shake movement; the calibration sample has a plurality of reference points therein, and the reference points are not in a straight line.
Step 402: and acquiring a second image of the calibration sample under a second optical zoom parameter of the anti-shake movement.
Step 403: coordinate points of the reference points in the first image and the second image are determined.
In specific implementation, the center point of the reference point may be used as the coordinate point of the reference point. The coordinate points of the reference points may be calculated from the positions of the reference points after the images are acquired and the reference points are identified by image analysis. The image may be opened in software capable of reading the coordinate points of the image, and the coordinate points of the reference points may be read after the reference points are selected by a mouse.
Step 404: determining an optical axis deviation between the center of the optical axis of the lens of the anti-shake movement and the center of the photosensitive element of the anti-shake movement according to the coordinate point of each reference point and a pre-constructed optical axis deviation determination model; the optical axis deviation determination model is constructed by zooming along the optical axis of the lens under different optical zoom parameters according to the same reference point.
Step 405: and moving the photosensitive element according to the optical axis deviation to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens.
Further, in order to determine the optical axis center of the lens, in the embodiment of the present application, according to the coordinate point of each reference point and a pre-constructed optical axis deviation determination model, determining the optical axis deviation between the optical axis center of the lens of the anti-shake movement and the center of the photosensitive element of the anti-shake movement may be performed as the following steps, as shown in fig. 5:
step 501: and forming straight lines by the coordinate points of the same reference point in the first image and the coordinate points in the second image, and determining the intersection point of the straight lines.
Step 502: and calculating the average coordinate of each intersection point as the coordinate of the lens optical axis center of the anti-shake movement.
Step 503: and calculating the deviation between the coordinate of the central point of the optical axis of the lens and the coordinate of the imaging central point of the photosensitive element of the anti-shake movement to obtain the deviation of the optical axis.
For ease of understanding, the above steps are exemplified herein. This will be explained by taking the calibration sample shown in fig. 2 as an example.
1) As shown in fig. 6, taking the upper left corner of the region where the photosensitive element can image as the origin of coordinates (0, 0), zooming the anti-shake movement to large magnification, and acquiring the coordinates of each reference point in the calibration sample under large magnification, which are (x0, y0), (x1, y1), (x2, y2) in sequence;
2) in a similar way, the anti-shake movement is multiplied to a small time, and the coordinates of each reference point in the calibration sample under the small time are obtained, namely (x3, y3), (x4, y4), (x5 and y5) in sequence;
3) the six coordinate points determined previously are generated in the same coordinate system, and the dot coordinates of the same point at the size times are connected, so that three straight lines (e.g., a straight line composed of (x0, y0) and (x3, y 3)) are obtained. The three straight lines intersect with each other two by two to obtain three coordinates (X0, Y0), (X1, Y1), (X2, Y2), the average value of the three coordinates is obtained, namely the optical axis center coordinates (X, Y) of the lens, and the specific calculation process is as follows: the coordinates of the lens optical axis center are calculated as the average coordinates (X, Y) of the points (X0, Y0) by formula one, the points (X1, Y1) by formula two, the points (X2, Y2) by formula three, and then the coordinates (X, Y) of the points (X0, Y0), (X1, Y1), (X2, Y2) by formula four.
The formula I is as follows:
Figure BDA0001939524080000071
Figure BDA0001939524080000072
the formula II is as follows:
Figure BDA0001939524080000073
Figure BDA0001939524080000074
the formula III is as follows:
Figure BDA0001939524080000075
Figure BDA0001939524080000081
the formula four is as follows:
Figure BDA0001939524080000082
Figure BDA0001939524080000083
4) after the optical axis center coordinates (X, Y) are calculated, the offset pixel values (offset _ X, offset _ Y) between the sensor plate imaging center and the lens optical axis center can be calculated according to the resolution
offset.X=Abs(X-Resolution.Width/2)
offset.Y=Abs(Y-Resolution.Height/2)
Wherein (resolution. width/2, resolution. height/2) constitutes the imaging center point of the photosensitive element.
5) After the optical axis deviation calculation is completed, the anti-shake movement moves the sensor plate up and down and left and right according to the calculated deviation pixel value along the X, Y axis direction to compensate the optical axis deviation, so that the imaging center of the sensor plate is completely coincided with the optical axis center of the lens.
Because the optical axis deviation is the pixel number, so, according to the optical axis deviation removes photosensitive element makes photosensitive element's formation of image central point with the coincidence of the central point of camera lens optical axis, can implement and be: moving the photosensitive element in a first direction according to the number of deviation pixels of the optical axis deviation in the first direction; moving the photosensitive element in a second direction according to the number of the deviation pixels of the optical axis deviation in the second direction so as to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens; wherein the first direction and the second direction are perpendicular to each other. In a specific implementation, the first direction and the second direction are a width direction and a height direction of an image forming region in the photosensitive element. As described above, the optical axis deviation compensation is performed by moving the photosensitive element right and left or up and down in the X, Y two directions according to the number of pixels of the deviation.
Furthermore, in the embodiment of the present application, when the optical axis deviation is small, the performance of the anti-shake movement is hardly affected, so that a preset standard deviation can be set in the present application. In specific implementation, the preset standard deviation of the anti-shake movement can be determined according to the following method: firstly, determining the 2 power of the resolution of the width direction of the photosensitive element, and determining the 2 power of the resolution of the height direction of the photosensitive element; determining a sum of the 2 nd power of the resolution in the width direction and the 2 nd power of the resolution in the height direction; and determining the product of the sum and a preset percentage to obtain the 2 nd power preset standard deviation of the resolution in the height direction.
Specifically described by the formula, the preset standard deviation can be determined according to the formula five.
The formula five is as follows:
Figure BDA0001939524080000091
wherein resolution.width and resolution.height are image resolutions, L imitRate is a preset percentage, which can be fixed to 3% at present, and standard _ R is a calculated preset standard deviation.
Then, in order to save processing resources, the magnitude relation between the optical axis deviation and the preset standard deviation of the anti-shake movement can be judged firstly, and after the optical axis deviation is determined to be greater than the preset standard deviation of the anti-shake movement, the photosensitive element is moved according to the optical axis deviation, so that the imaging central point of the photosensitive element is coincided with the central point of the optical axis of the lens.
Of course, in order to quantify the optical axis deviation of the anti-shake movement so that there is a quantified measurement standard for the optical axis deviation of the assembled anti-shake movement or the transported anti-shake movement, in the embodiment of the present application, the deviation may be measured by a pixel value. In addition, whether the optical axis deviation reaches the standard can be clearly given, if the optical axis deviation is the number of pixels; if the optical axis deviation is smaller than or equal to the preset standard deviation, determining that the optical axis deviation of the anti-shake movement meets the standard; and the degree conforming to the standard is represented by the number of pixels of the optical axis deviation; if the optical axis deviation is larger than the preset standard deviation, determining that the optical axis deviation of the anti-shake movement does not meet the standard; and the degree of non-compliance is expressed by the number of pixels of the optical axis deviation.
And if the sixth formula is satisfied, indicating that the deviation pixel value of the sensor plate imaging center and the lens optical axis center is unqualified, and prompting that the deviation value exceeds the standard. The degree of failure is an indication of the number of pixels of deviation in both directions of the user X, Y.
Formula six:
offset.X2+offset.Y2>standard_R2
if the formula seven is satisfied, the pixel value of the deviation between the imaging center of the sensor plate and the optical axis center of the lens is qualified, and the qualified degree is represented by the number of pixels of the deviation in two directions of the user X, Y. Meanwhile, the optical axis offset can be saved for standby.
The formula seven:
offset.X2+offset.Y2<standard_R2
when the two sides in the formula seven are in the equal relation, the product can be determined to be qualified, and can also be determined to be unqualified, and the product can be determined according to actual requirements.
In specific implementation, there may be an anti-shake movement 1) the main control ISP board acquires the first and second images and determines the calculated optical axis deviation value, and then stores it. When compensation is carried out, the main control ISP reads the stored optical axis deviation value; then controlling the sensor plate to move up, down, left and right along the direction of an X, Y axis, and compensating the deviation pixel displacement between the imaging center of the sensor plate and the center of the optical axis of the lens; and finally, judging whether the optical axis deviation of the sensor plate is completed, and if the optical axis deviation fails, controlling the sensor plate again to perform deviation pixel displacement compensation. The specific embodiment of judging whether the optical axis deviation of the sensor plate is moved is judged according to the information of success or failure fed back by the sensor plate.
In specific implementation, the moving the photosensitive element in the first direction and the moving the photosensitive element in the second direction may be implemented as: moving the photosensitive element in a first direction and a second direction according to a set step length; judging whether the imaging center point of the moved photosensitive element is coincident with the center point of the optical axis of the lens; if the positions are overlapped, the movement is determined to be finished; if the two are not coincident, determining the direction needing to be moved; and returning to execute the step of judging whether the imaging central point of the moved photosensitive element is coincident with the central point of the optical axis of the lens after moving according to the set step length in the determined direction. The set step size for this is, for example, 2 pixels. Thus, the photosensitive chip can be moved easily according to the set step length.
The following result-effect diagram further illustrates the method for compensating the optical axis deviation of the anti-shake movement provided in the embodiment of the present application. As shown in fig. 7, the image with optical axis deviation is shown, the thin cross represents the sensor plate imaging center, and the thick cross represents the calculated optical axis center of the anti-shake movement lens; as can be seen from fig. 7, the image captured due to the misalignment of the two centers has some distortion (e.g., the side of the wall is skewed). As shown in fig. 8, the image with the optical axis deviation compensated is compensated, and after the sensor plate is moved for compensation, the imaging center of the green sensor plate coincides with the optical axis center of the lens, so that the obtained image is natural.
Based on the same inventive concept, the embodiment of the present application further provides a device for compensating an optical axis deviation of an anti-shake movement, as shown in fig. 9, the device includes:
a first image obtaining module 901, configured to obtain a first image of a calibration sample under a first optical zoom parameter of the anti-shake movement; the calibration sample is provided with a plurality of reference points, and the reference points are not on a straight line;
a second image obtaining module 902, configured to obtain a second image of the calibration sample under a second optical zoom parameter of the anti-shake movement;
a reference point coordinate determining module 903, configured to determine coordinate points of the reference points in the first image and the second image respectively;
an optical axis deviation determining module 904, configured to determine, according to the coordinate point of each reference point and a pre-constructed optical axis deviation determining model, an optical axis deviation between a lens optical axis center of the anti-shake movement and a center of a photosensitive element of the anti-shake movement; the optical axis deviation determination model is constructed according to the principle that the same reference point is zoomed along the optical axis of the lens under different optical zoom parameters;
and the compensation module 905 is used for moving the photosensitive element according to the optical axis deviation to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens.
Further, the optical axis deviation determining module specifically includes:
an intersection point determining unit, configured to form a straight line from a coordinate point of the same reference point in the first image and a coordinate point in the second image, and determine an intersection point of the straight lines;
the optical axis center determining unit is used for calculating the average coordinate of each intersection point as the coordinate of the lens optical axis center of the anti-shake movement;
and the optical axis deviation determining unit is used for calculating the deviation between the coordinate of the optical axis central point of the lens and the coordinate of the imaging central point of the photosensitive element of the anti-shake movement to obtain the optical axis deviation.
Further, the apparatus further comprises:
and the standard determining module is used for determining that the optical axis deviation is greater than the preset standard deviation of the anti-shake movement before the compensating module moves the photosensitive element according to the optical axis deviation.
Further, the optical axis deviation is the number of pixels; the device further comprises:
the first determining module is used for determining that the optical axis deviation of the anti-shake movement meets the standard if the optical axis deviation is smaller than or equal to the preset standard deviation; and the degree conforming to the standard is represented by the number of pixels of the optical axis deviation;
the second determining module is used for determining that the optical axis deviation of the anti-shake movement does not meet the standard if the optical axis deviation is larger than the preset standard deviation; and the degree of non-compliance is expressed by the number of pixels of the optical axis deviation.
Further, the apparatus further comprises:
the preset standard deviation determining module is used for determining the preset standard deviation of the anti-shake movement according to the following method:
determining a 2 nd power of a resolution in a width direction of the photosensitive element, and determining a 2 nd power of a resolution in a height direction of the photosensitive element;
determining a sum of the 2 nd power of the resolution in the width direction and the 2 nd power of the resolution in the height direction;
and determining the product of the sum and a preset percentage to obtain the 2 nd power preset standard deviation of the resolution in the height direction.
Further, the optical axis deviation is the number of pixels, and the compensation module is specifically configured to:
moving the photosensitive element in a first direction according to the number of the deviation pixels of the optical axis deviation in the first direction; moving the photosensitive element in a second direction according to the number of the deviation pixels of the optical axis deviation in the second direction so as to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens; wherein the first direction and the second direction are a width direction and a height direction of an image forming region in the photosensitive element.
Further, the compensation module is specifically configured to:
moving the photosensitive element in a first direction and a second direction according to a set step length;
judging whether the imaging center point of the moved photosensitive element is coincident with the center point of the optical axis of the lens;
if the positions are overlapped, the movement is determined to be finished;
if the two are not coincident, determining the direction needing to be moved;
and returning to execute the step of judging whether the imaging central point of the moved photosensitive element is coincident with the central point of the optical axis of the lens after moving according to the set step length in the determined direction.
Having described the method and apparatus for compensating for optical axis deviation of an anti-shake movement according to an exemplary embodiment of the present application, a computing apparatus according to another exemplary embodiment of the present application will be described next.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, a computing device according to the present application may include at least one processor, and at least one memory. The memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the system permission opening method according to the various exemplary embodiments of the present application described above in the present specification. For example, the processor may perform step 401 as shown in FIG. 4 and 405.
The computing device 130 according to this embodiment of the present application is described below with reference to fig. 10. The computing device 130 of fig. 10 is only an example and should not impose any limitations on the functionality or scope of use of embodiments of the present application.
As shown in fig. 10, computing device 130 is embodied in the form of a general purpose computing device. Components of computing device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Computing device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and may also communicate with one or more devices that enable a user to interact with computing device 130, and/or with any devices (e.g., router, modem, etc.) that enable computing device 130 to communicate with one or more other computing devices, such communication may occur via input/output (I/O) interfaces 135. also, computing device 130 may communicate with one or more networks (e.g., local area network (L AN), Wide Area Network (WAN) and/or a public network, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules for computing device 130 via bus 133. it should be understood, although not shown, that other hardware and/or software modules may be used in conjunction with computing device 130, including, but not limited to, microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
In some possible embodiments, various aspects of the screen display adjustment method provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps in the screen display adjustment method according to various exemplary embodiments of the present application described above in this specification when the program product is run on the computer device, for example, the computer device may perform the steps 401 and 405 as shown in fig. 4.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for display adjustment of a screen of an embodiment of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be executable on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including AN object oriented programming language such as Java, C + +, or the like, as well as conventional procedural programming languages, such as the "C" language or similar programming languages.
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (17)

1. A method of compensating for optical axis deviation of an anti-shake movement, the method comprising:
acquiring a first image of a calibration sample under a first optical zoom parameter of the anti-shake movement; the calibration sample is provided with a plurality of reference points, and the reference points are not on a straight line;
acquiring a second image of the calibration sample under a second optical zoom parameter of the anti-shake movement;
determining coordinate points of the reference points in the first image and the second image respectively;
determining an optical axis deviation between the center of the optical axis of the lens of the anti-shake movement and the center of the photosensitive element of the anti-shake movement according to the coordinate point of each reference point and a pre-constructed optical axis deviation determination model; the optical axis deviation determination model is constructed by zooming along the optical axis of the lens under different optical zoom parameters according to the same reference point;
and moving the photosensitive element according to the optical axis deviation to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens.
2. The method according to claim 1, wherein determining an optical axis deviation between a lens optical axis center of the anti-shake movement and a center of a photosensitive element of the anti-shake movement according to a coordinate point of each reference point and a pre-constructed optical axis deviation determination model specifically comprises:
forming straight lines by coordinate points of the same reference point in the first image and coordinate points in the second image, and determining intersection points of the straight lines;
calculating the average coordinate of each intersection point as the coordinate of the lens optical axis center of the anti-shake movement;
and calculating the deviation between the coordinate of the central point of the optical axis of the lens and the coordinate of the imaging central point of the photosensitive element of the anti-shake movement to obtain the deviation of the optical axis.
3. The method according to claim 1 or 2, wherein before moving the photosensitive element according to the optical axis deviation, the method further comprises:
and determining that the optical axis deviation is greater than the preset standard deviation of the anti-shake movement.
4. The method of claim 3, wherein the optical axis deviation is a number of pixels; the method further comprises the following steps:
if the optical axis deviation is smaller than or equal to the preset standard deviation, determining that the optical axis deviation of the anti-shake movement meets the standard; and the degree conforming to the standard is represented by the number of pixels of the optical axis deviation;
if the optical axis deviation is larger than the preset standard deviation, determining that the optical axis deviation of the anti-shake movement does not meet the standard; and the degree of non-compliance is expressed by the number of pixels of the optical axis deviation.
5. The method of claim 3, further comprising:
determining a preset standard deviation of the anti-shake movement according to the following method:
determining a 2 nd power of a resolution in a width direction of the photosensitive element, and determining a 2 nd power of a resolution in a height direction of the photosensitive element;
determining a sum of the 2 nd power of the resolution in the width direction and the 2 nd power of the resolution in the height direction;
and determining the product of the sum and a preset percentage to obtain the 2 nd power preset standard deviation of the resolution in the height direction.
6. The method according to claim 1, wherein the optical axis deviation is a number of pixels, and the moving the photosensitive element according to the optical axis deviation specifically comprises:
moving the photosensitive element in a first direction according to the number of deviation pixels of the optical axis deviation in the first direction; moving the photosensitive element in a second direction according to the number of the deviation pixels of the optical axis deviation in the second direction so as to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens; wherein the first direction and the second direction are perpendicular to each other.
7. The method according to claim 6, wherein the first direction and the second direction are a width direction and a height direction of an image forming area in the photosensitive element, respectively.
8. The method according to claim 6 or 7, wherein the photosensitive element is moved in the first direction in accordance with a deviation pixel number in the first direction of the optical axis deviation; and according to the deviation pixel number of the optical axis deviation in the second direction, moving the photosensitive element in the second direction, specifically comprising:
moving the photosensitive element in a first direction and a second direction according to a set step length;
judging whether the imaging center point of the moved photosensitive element is coincident with the center point of the optical axis of the lens;
if the positions are overlapped, the movement is determined to be finished;
if the two are not coincident, determining the direction needing to be moved;
and returning to execute the step of judging whether the imaging central point of the moved photosensitive element is coincident with the central point of the optical axis of the lens after moving according to the set step length in the determined direction.
9. A device for compensating for optical axis deviation of an anti-shake movement, the device comprising:
the first image acquisition module is used for acquiring a first image of a calibration sample under a first optical zoom parameter of the anti-shake movement; the calibration sample is provided with a plurality of reference points, and the reference points are not on a straight line;
the second image acquisition module is used for acquiring a second image of the calibration sample under a second optical zoom parameter of the anti-shake movement;
a reference point coordinate determination module, configured to determine coordinate points of the reference points in the first image and the second image respectively;
the optical axis deviation determining module is used for determining the optical axis deviation between the center of the optical axis of the lens of the anti-shake movement and the center of the photosensitive element of the anti-shake movement according to the coordinate point of each reference point and a pre-constructed optical axis deviation determining model; the optical axis deviation determination model is constructed by zooming along the optical axis of the lens under different optical zoom parameters according to the same reference point;
and the compensation module is used for moving the photosensitive element according to the optical axis deviation so as to enable the imaging central point of the photosensitive element to coincide with the central point of the optical axis of the lens.
10. The apparatus according to claim 9, wherein the optical axis deviation determining module specifically comprises:
an intersection point determining unit, configured to form a straight line from a coordinate point of the same reference point in the first image and a coordinate point in the second image, and determine an intersection point of the straight lines;
the optical axis center determining unit is used for calculating the average coordinate of each intersection point as the coordinate of the lens optical axis center of the anti-shake movement;
and the optical axis deviation determining unit is used for calculating the deviation between the coordinate of the optical axis central point of the lens and the coordinate of the imaging central point of the photosensitive element of the anti-shake movement to obtain the optical axis deviation.
11. The apparatus of claim 9 or 10, further comprising:
and the standard determining module is used for determining that the optical axis deviation is greater than the preset standard deviation of the anti-shake movement before the compensating module moves the photosensitive element according to the optical axis deviation.
12. The apparatus of claim 11, wherein the optical axis deviation is a number of pixels; the device further comprises:
the first determining module is used for determining that the optical axis deviation of the anti-shake movement meets the standard if the optical axis deviation is smaller than or equal to the preset standard deviation; and the degree conforming to the standard is represented by the number of pixels of the optical axis deviation;
the second determining module is used for determining that the optical axis deviation of the anti-shake movement does not meet the standard if the optical axis deviation is larger than the preset standard deviation; and the degree of non-compliance is expressed by the number of pixels of the optical axis deviation.
13. The apparatus of claim 11, further comprising:
the preset standard deviation determining module is used for determining the preset standard deviation of the anti-shake movement according to the following method:
determining a 2 nd power of a resolution in a width direction of the photosensitive element, and determining a 2 nd power of a resolution in a height direction of the photosensitive element;
determining a sum of the 2 nd power of the resolution in the width direction and the 2 nd power of the resolution in the height direction;
and determining the product of the sum and a preset percentage to obtain the 2 nd power preset standard deviation of the resolution in the height direction.
14. The apparatus of claim 9, wherein the optical axis deviation is a number of pixels, and the compensation module is specifically configured to:
moving the photosensitive element in a first direction according to the number of the deviation pixels of the optical axis deviation in the first direction; moving the photosensitive element in a second direction according to the number of the deviation pixels of the optical axis deviation in the second direction so as to enable the imaging center point of the photosensitive element to coincide with the center point of the optical axis of the lens; wherein the first direction and the second direction are perpendicular to each other.
15. The apparatus of claim 14, wherein the compensation module is specifically configured to:
moving the photosensitive element in a first direction and a second direction according to a set step length;
judging whether the imaging center point of the moved photosensitive element is coincident with the center point of the optical axis of the lens;
if the positions are overlapped, the movement is determined to be finished;
if the two are not coincident, determining the direction needing to be moved;
and returning to execute the step of judging whether the imaging central point of the moved photosensitive element is coincident with the central point of the optical axis of the lens after moving according to the set step length in the determined direction.
16. A computer-readable medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1-8.
17. A computing device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
CN201910017285.2A 2019-01-08 2019-01-08 Method and device for compensating optical axis deviation of anti-shake movement and storage medium Active CN109788277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910017285.2A CN109788277B (en) 2019-01-08 2019-01-08 Method and device for compensating optical axis deviation of anti-shake movement and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910017285.2A CN109788277B (en) 2019-01-08 2019-01-08 Method and device for compensating optical axis deviation of anti-shake movement and storage medium

Publications (2)

Publication Number Publication Date
CN109788277A CN109788277A (en) 2019-05-21
CN109788277B true CN109788277B (en) 2020-08-04

Family

ID=66500224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910017285.2A Active CN109788277B (en) 2019-01-08 2019-01-08 Method and device for compensating optical axis deviation of anti-shake movement and storage medium

Country Status (1)

Country Link
CN (1) CN109788277B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118386B (en) * 2019-06-21 2022-03-25 宁波舜宇光电信息有限公司 Offset compensation method, device and storage medium
CN111045220A (en) * 2019-12-17 2020-04-21 天津津航技术物理研究所 Method for aligning optical axis and visual axis of zoom optical system
CN111263142B (en) * 2020-02-25 2022-04-08 昆山丘钛微电子科技股份有限公司 Method, device, equipment and medium for testing optical anti-shake of camera module
CN113758499B (en) * 2021-03-18 2024-05-17 北京京东乾石科技有限公司 Method, device and equipment for determining positioning sensor assembly deviation compensation parameter
CN113834640B (en) * 2021-09-30 2024-03-01 杭州微影软件有限公司 Method for determining optical center deviation of thermal imaging module, optical center alignment method and device
CN114222115A (en) * 2021-12-16 2022-03-22 昆山丘钛微电子科技股份有限公司 Optical anti-shake calibration method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105118055A (en) * 2015-08-11 2015-12-02 北京电影学院 Camera positioning correction calibration method and system
CN106338841A (en) * 2016-10-20 2017-01-18 深圳市立品光电有限公司 Method and apparatus for calibrating optical axis of optical lens of photographic module group
CN106482640A (en) * 2016-12-07 2017-03-08 北京汉邦高科数字技术股份有限公司 A kind of apparatus and method of integrated machine core optical axis correction
WO2018087424A1 (en) * 2016-11-08 2018-05-17 Nokia Technologies Oy Determining an intersection location of an optical axis of a lens with a camera sensor

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4346988B2 (en) * 2003-07-28 2009-10-21 キヤノン株式会社 Image capturing apparatus and optical adjustment method for image capturing apparatus
JP2008311804A (en) * 2007-06-13 2008-12-25 Sony Corp Imaging apparatus and method
JP5161702B2 (en) * 2008-08-25 2013-03-13 キヤノン株式会社 Imaging apparatus, imaging system, and focus detection method
JP5887465B2 (en) * 2013-04-17 2016-03-16 富士フイルム株式会社 IMAGING DEVICE, IMAGING DEVICE DRIVE METHOD, IMAGING DEVICE CONTROL PROGRAM
US9661193B2 (en) * 2014-08-01 2017-05-23 Panasonic Intellectual Property Management Co., Ltd. Imaging apparatus and analyzing apparatus
CN108508680B (en) * 2018-04-10 2020-08-04 珠海博明视觉科技有限公司 Method for aligning center of calibration plate of camera module automatic focusing device with center of photosensitive chip
CN108805938B (en) * 2018-06-12 2021-01-08 Oppo(重庆)智能科技有限公司 Detection method of optical anti-shake module, mobile terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105118055A (en) * 2015-08-11 2015-12-02 北京电影学院 Camera positioning correction calibration method and system
CN106338841A (en) * 2016-10-20 2017-01-18 深圳市立品光电有限公司 Method and apparatus for calibrating optical axis of optical lens of photographic module group
WO2018087424A1 (en) * 2016-11-08 2018-05-17 Nokia Technologies Oy Determining an intersection location of an optical axis of a lens with a camera sensor
CN106482640A (en) * 2016-12-07 2017-03-08 北京汉邦高科数字技术股份有限公司 A kind of apparatus and method of integrated machine core optical axis correction

Also Published As

Publication number Publication date
CN109788277A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN109788277B (en) Method and device for compensating optical axis deviation of anti-shake movement and storage medium
US11997397B2 (en) Method, apparatus, and device for processing images, and storage medium
CN111815634A (en) Machine vision-based memory alignment plug-in method, system, equipment and storage medium
CN108805938B (en) Detection method of optical anti-shake module, mobile terminal and storage medium
CN106570907B (en) Camera calibration method and device
CN112991459B (en) Camera calibration method, device, equipment and storage medium
JP5926462B2 (en) Method and system for automatically adjusting optical seismic camera module
CN109949306B (en) Reflecting surface angle deviation detection method, terminal device and storage medium
CN112396558A (en) Image processing method, image processing apparatus, and computer-readable storage medium
JP2015532446A5 (en)
CN111445537A (en) Calibration method and system of camera
CN110853102B (en) Novel robot vision calibration and guide method and device and computer equipment
CN113313772B (en) Calibration method, calibration device, electronic equipment and storage medium
CN114463436A (en) Calibration method, system, equipment and storage medium of galvanometer scanning device
CN117495975A (en) Zoom lens calibration method and device and electronic equipment
CN111818260B (en) Automatic focusing method and device and electronic equipment
CN111246094B (en) Holder, holder offset compensation correction method, computer storage medium and equipment
CN111353945B (en) Fisheye image correction method, device and storage medium
CN113628284B (en) Pose calibration data set generation method, device and system, electronic equipment and medium
CN110675445B (en) Visual positioning method, device and storage medium
CN115841520A (en) Camera internal reference calibration method and device, electronic equipment and medium
CN112348874B (en) Method and device for determining structural parameter representation of lane line
CN111220360B (en) Method and device for testing resolution of camera module
CN112118370A (en) Dark corner defect eliminating method, device, equipment and storage medium
CN117031443B (en) Point cloud data construction method and system and electronic equipment

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