CN113156656B - Optical axis correction method for zoom camera - Google Patents

Optical axis correction method for zoom camera Download PDF

Info

Publication number
CN113156656B
CN113156656B CN202110352377.3A CN202110352377A CN113156656B CN 113156656 B CN113156656 B CN 113156656B CN 202110352377 A CN202110352377 A CN 202110352377A CN 113156656 B CN113156656 B CN 113156656B
Authority
CN
China
Prior art keywords
crop
image
width
height
deviation
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
CN202110352377.3A
Other languages
Chinese (zh)
Other versions
CN113156656A (en
Inventor
李鹏
叶帧
伍仲祥
王金锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Guangying Writing Technology Co ltd
Original Assignee
Hangzhou Guangying Writing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Guangying Writing Technology Co ltd filed Critical Hangzhou Guangying Writing Technology Co ltd
Priority to CN202110352377.3A priority Critical patent/CN113156656B/en
Publication of CN113156656A publication Critical patent/CN113156656A/en
Application granted granted Critical
Publication of CN113156656B publication Critical patent/CN113156656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B27/00Optical systems or apparatus not provided for by any of the groups G02B1/00 - G02B26/00, G02B30/00
    • G02B27/62Optical apparatus specially adapted for adjusting optical elements during the assembly of optical systems

Abstract

The invention discloses a zoom camera optical axis correction method, which comprises the steps of comparing an image center generated by an image acquisition module in a zooming process of a camera with an image center generated by the camera at 1 time to judge the deviation direction of the camera optical axis, comparing the deviation degree of the image center of a group of images at a specific multiplying power after the camera starts zooming with the deviation degree of the image center at 1 time to obtain a deviation array, and calling deviation direction parameters and deviation array parameters in an image processing module to cut the generated image so that the cut image center is consistent with the image center at 1 time. The correction method can enable all-in-one cameras without hardware devices for realizing the optical axis correction function to be compatible with the optical axis correction function from software, and can assist all-in-one cameras with hardware devices for realizing the optical axis correction function to further improve correction precision, so that compatibility and flexibility of all-in-one cameras for the optical axis correction function are improved.

Description

Optical axis correction method for zoom camera
Technical Field
The invention relates to the technical field of camera imaging, in particular to a zoom camera optical axis correction method.
Background
With the increasing development of imaging technology, the requirements on the consistency of the optical axes of cameras in the industry are increasing. We will refer to the description of the zoom lens structure in taiwan patent No. 225008 to analyze the optical axis offset cause. Referring to fig. 3, the structure of an imaging part in the zoom lens includes an outer sleeve, a cylindrical cam, a fixing ring and a lens barrel set, in which, a plurality of linear grooves are set in the outer sleeve for the convex keys on the fixing ring to lock the fixing ring outside the cylindrical cam sleeve, the lens barrel set includes a first group lens barrel and a second group lens barrel, a positioning slot is set on the fixing ring for locking the second group lens barrel to limit the rotation of the second group lens, the positioning piece on the first group lens barrel is locked in the positioning slot and can not rotate due to the limitation of the second group lens barrel, rollers are set outside the first group lens barrel and the second group lens barrel, the cylindrical cam can move linearly on the optical axis by the gear action of the slot hole groove set on one side of the outer sleeve and the outer wall of the bottom of the cylindrical cam, thus the lens barrel moves relatively back and forth on the optical axis to realize the zoom function.
From the analysis of the overall design structure and operation process of the zoom lens, the reasons for generating the problem of optical axis deviation are as follows:
(1) Design accuracy defect: due to assembly precision errors in the processing process, optical axes of all parts of the camera are inconsistent, for example, the centers of lens groups of the first group lens barrel and the second group lens barrel, which are caused by the assembly errors, are not aligned, and in fact, some high-precision zoom cameras have more group lens barrels, as shown in fig. 3-2; for example, the roller is not machined in place, so that the cylindrical cam is subjected to nonlinear displacement. Assembly errors of the camera hardware itself are important factors that cause the lens optical axis to shift.
(2) Motion offset: the zooming process of the lens is realized under the pushing of the gears of the roller and the cylindrical cam, but gaps generated in the gear engagement process are unavoidable, so that the cylindrical cam can shift left and right in the zooming process, and the optical axis of the camera is shifted.
However, in the current field, most of the problems of consistency of the optical axes of the cameras are solved by starting with hardware, or designing and changing the internal structure of the lens, for example, by detecting whether the center of the combined optical axis of each group of lenses on the optical axis path coincides with the central axis, so as to adjust the positions of the lenses to achieve the purpose of optical axis correction; for example, in the patent of publication CN111367090a, entitled "an optical lens optical axis correction device and method", a frame is designed to control the shooting direction of a camera lens from the outside, and the principle is that the optical axis deviation of the optical lens is analyzed by the directly shot image generated by the lens to the film image, and the camera position is corrected by the frame to achieve the purpose of optical axis correction. The two schemes similar to the method improve the complexity of hardware design, increase the design cost, and put forward higher requirements on the stability of the camera, meanwhile, the method of 'real-time detection and real-time correction' greatly increases the correction period of the camera, and the optical axis correction adjustment is performed under the environment of unstable scene so as to put forward a test on the sensitivity of the camera.
Still another method starts from image processing, for example, publication number CN206905698U, entitled "a device for correcting optical axis of an all-in-one machine", and proposes that two sets of images of a near end and a far end of a camera are obtained by moving two sets of motors, and offset coordinates of the optical axis of the camera are calculated by comparing reference feature points in the two sets of images, so as to correct the camera, however, due to the specificity of operation of a driving motor in an internal lens of the camera, the offset degree of the optical axis of a movement may not be linear in the whole zooming process, and in this case, a larger deviation occurs when the optical axis correction is performed on the camera by adopting the method.
Disclosure of Invention
The invention aims to provide a zoom camera optical axis correction method, which aims to solve the problems that the existing method for solving the problem of camera optical axis consistency is mainly based on hardware, so that the design cost is increased, and on the other hand, higher requirements are put forward on the stability of a camera.
In order to achieve the above purpose, the present invention provides the following technical solutions: a zoom camera optical axis correction method, comprising the steps of:
step one: setting canvas with original image as X Y, point a as central pixel characteristic point of original image (1 times), and point b as position after central pixel characteristic point of original image is offset under certain multiplying power, and cutting image to make point b in image under any multiplying power be in center of image so as to attain the goal of correcting image center.
Step two: first, the imaging principle of the image in the canvas (channel) is clarified: we rely on a set of characteristic parameters including the starting coordinates of the canvas, which are in the upper left corner, and the width and height of the canvas. Taking an original image as an example, the initial coordinates (primary_coordinates) are (primary_coordinates_x, primary_coordinates_y), primary_coordinates_x=0, primary_coordinates_y=0, the width (primary_width) is X, the height (primary_height) is Y, and the internal function will call the set of parameters to process and generate and output a frame of image, and the image size ratio c=x/Y.
Step three: the deviation direction detection_direction of the center pixel feature point is divided into 4 directions, and is sequentially defined as 1 (upper left), 2 (upper right), 3 (lower left), and 4 (lower right).
Step four: taking the point b in fig. 2 as an example, the offset direction is the upper right, so the displacement_direction=2, the point b is recorded as x_data compared with the point a, the longitudinal offset parameter is y_data, and a maximum canvas which enables the point b to be positioned at the center of the image is cut out from the original canvas, and marked as a divided image.
The characteristic parameters of the primary divided image are as follows:
start coordinates (first_crop_x, first_crop_y):
first_Crop_x=primitive_coord_x+(x_data*2)
first_Crop_y=primitive_coord_y
width first_loop_width:
first_Crop_width=X–(x_data*2)
height first_crop_height
first_crop_height=y- (y_data×2), and the divided image is shown in fig. 3-1;
for other bias directions, the starting coordinates of the primary divided image are modified only once:
if the deviation direction is upper left
device_direction=1, then:
first_Crop_x=primitive_coord_x
first_crop_y=primary_integral_y, and the divided images are shown in fig. 3-2; if the deviation direction is lower left
device_direction=3, then:
first_Crop_x=primitive_coord_x
first_crop_y=private_integral_y+ (y_data×2), and dividing the image as shown in fig. 3 to 3;
if the deviation direction is lower right
device_direction=4, then:
first_Crop_x=primitive_coord_x+(x_data*2)
first_crop_y=private_integral_y+ (y_data×2), and the divided images are shown in fig. 3 to 4;
step five: further adjusting the characteristic parameters of the primary divided image to ensure that the size proportion of the cut image is equal to the size proportion c of the original image, and obtaining a secondary divided image, wherein the characteristic parameters of the secondary divided image are calculated as follows:
start coordinates (second_loop_x, second_loop_y):
width second_loop_width:
height second_loop_width:
if first_loop_width/first_loop_height=c, then:
second_Crop_width=first_Crop_width
second_Crop_height=first_Crop_height
second_Crop_x=first_Crop_x
second_crop_y=first_crop_y, and the secondary divided image is identical to the primary divided image, if the width ratio is larger
first_loop_width/first_loop_height > c, then:
second_Crop_width=first_Crop_width*c
second_Crop_height=first_Crop_height
second_Crop_x=first_Crop_x+(first_Crop_width–second_Crop_width)/2
second_crop_y=first_crop_y, and the secondarily divided image is as shown in fig. 4-1; if the height ratio is larger
first_crop_width/first_crop_height < c, then
second_Crop_width=first_Crop_width
second_Crop_height=first_Crop_height/c
second_Crop_x=first_Crop_x
second_crop_y=first_crop_y+ (first_crop_height-second_crop_height)/2, and the secondary divided image is as shown in fig. 4-2.
Preferably, the image generation is based on an internal function, and the processing outputs a pixel image with a starting coordinate (primary_color_x, primary_color_y) from the upper left corner, a width of primary_width, and a height of primary_height.
Preferably, the original image is divided into four quadrants, the center point is taken as the center of the image, the image is sequentially arranged from left to right, the video camera is changed to be the largest multiple, the offset position of the pixel characteristic point is observed in which quadrant of the four quadrants to determine the offset diRection parameter, and if the pixel characteristic point is offset to the first quadrant, the offset diRection parameter is expressed as an offset_direct=1; if the pixel characteristic point is shifted to the second quadrant, the deviation direcTion parameter is changed to be direct=2; if the pixel characteristic point is shifted to the third quadrant, the deviation direction parameter is specified by the deviation_direction=3; if the pixel feature point is shifted to the fourth quadrant, the deviation direction parameter is found_direction=4.
Preferably, the image correction is performed according to the difference of the frame rate of the camera, and the processing chip of the camera periodically processes and outputs a deviation coefficient with reference to the current motor position to calculate the cropped image.
Preferably, after the target camera walks to a specific position, comparing and acquiring a deviation coefficient of the camera at the position, then calculating a new group of image characteristic parameters which can center an image optical axis without distortion and retain the most pixels at the current position, and generating and outputting a new pixel image, wherein the coordinates are (second_loop_x, second_loop_y), the width is second_loop_width, and the height is second_loop_height.
Compared with the prior art, the invention has the beneficial effects that: according to the zoom camera optical axis correction method, camera hardware is not changed, so that extra hardware development cost is reduced, meanwhile, the operation complexity of a camera is not expanded, and the problem of long correction period caused by 'real-time detection and real-time correction' is avoided; the invention also optimizes part of the existing software processing schemes, and overcomes the defect that the linear deviation parameter processing scheme is not applicable due to nonlinear deviation of the optical axis in the operation process of the camera.
(1) The method of the invention does not need to carry out secondary design on the hardware of the camera, reduces the operation complexity of the camera, reduces the design cost of the hardware, and simultaneously avoids the problem of losing the stability of the camera caused by changing the hardware structure (whether internal or external) of the camera.
(2) The method directly compares the original data of the camera to obtain the deviation direction parameter and the deviation array parameter, thereby correcting the optical axis of the camera through an image processing technology, greatly reducing the correction period in the actual working process of the camera, and avoiding the problem of inaccurate correction possibly caused by environmental influence in the real-time correction method in the hardware design scheme.
(3) The deviation array parameters of the method of the invention carry out the fold line correction to the camera, so the method is also suitable for equipment with nonlinear deviation of the optical axis center in the operation process.
Drawings
FIG. 1 is a block diagram of image acquisition, image processing, and image output of a chip during camera optical axis correction;
FIG. 2 is an image processing schematic of an image optical axis correction centering module in a camera image processing module;
FIG. 3-1 is an exploded perspective view of the upper right zoom lens structure of a conventional zoom camera;
FIG. 3-2 is an exploded perspective view of an upper left zoom lens configuration of a conventional zoom camera;
3-3 are exploded perspective views of a lower left zoom lens structure of a conventional zoom camera;
3-4 are exploded perspective views of a lower right zoom lens structure of a conventional zoom camera;
FIG. 4-1 is an abstract schematic diagram of a camera image processing module clipping out a primary corrected image centered on the optical axis;
FIG. 4-2 is an abstract diagram of a camera image processing module clipping out a secondary corrected image centered on the optical axis;
FIG. 5 is a schematic diagram of comparing linear scheme correction data with polyline scheme correction data;
fig. 6 is an original distribution diagram of a zoom lens of a conventional zoom camera.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1-6, the present invention provides a technical solution: a zoom camera optical axis correction method, comprising the steps of:
step one: setting canvas with original image as X Y, point a as central pixel characteristic point of original image (1 times), and point b as position after central pixel characteristic point of original image is offset under certain multiplying power, and cutting image to make point b in image under any multiplying power be in center of image so as to attain the goal of correcting image center.
Step two: first, the imaging principle of the image in the canvas (channel) is clarified: we rely on a set of characteristic parameters including the starting coordinates of the canvas, which are in the upper left corner, and the width and height of the canvas. Taking an original image as an example, the initial coordinates (primary_coordinates) are (primary_coordinates_x, primary_coordinates_y), primary_coordinates_x=0, primary_coordinates_y=0, the width (primary_width) is X, the height (primary_height) is Y, and the internal function will call the set of parameters to process and generate and output a frame of image, and the image size ratio c=x/Y.
Step three: the deviation direction detection_direction of the center pixel feature point is divided into 4 directions, and is sequentially defined as 1 (upper left), 2 (upper right), 3 (lower left), and 4 (lower right).
Step four: taking the point b in fig. 2 as an example, the offset direction is the upper right, so the displacement_direction=2, the point b is recorded as x_data compared with the point a, the longitudinal offset parameter is y_data, and a maximum canvas which enables the point b to be positioned at the center of the image is cut out from the original canvas, and marked as a divided image.
The characteristic parameters of the primary divided image are as follows:
start coordinates (first_crop_x, first_crop_y):
first_Crop_x=primitive_coord_x+(x_data*2)
first_Crop_y=primitive_coord_y
width first_loop_width:
first_Crop_width=X–(x_data*2)
height first_crop_height
first_crop_height=y- (y_data×2), and the divided image is shown in fig. 3-1;
for other bias directions, the starting coordinates of the primary divided image are modified only once:
if the deviation direction is upper left
device_direction=1, then:
first_Crop_x=primitive_coord_x
first_crop_y=primary_integral_y, and the divided images are shown in fig. 3-2; if the deviation direction is lower left
device_direction=3, then:
first_Crop_x=primitive_coord_x
first_crop_y=private_integral_y+ (y_data×2), and dividing the image as shown in fig. 3 to 3;
if the deviation direction is lower right
device_direction=4, then:
first_Crop_x=primitive_coord_x+(x_data*2)
first_crop_y=private_integral_y+ (y_data×2), and the divided images are shown in fig. 3 to 4;
step five: further adjusting the characteristic parameters of the primary divided image to ensure that the size proportion of the cut image is equal to the size proportion c of the original image, and obtaining a secondary divided image, wherein the characteristic parameters of the secondary divided image are calculated as follows:
start coordinates (second_loop_x, second_loop_y):
width second_loop_width:
height second_loop_width:
if first_loop_width/first_loop_height=c, then:
second_Crop_width=first_Crop_width
second_Crop_height=first_Crop_height
second_Crop_x=first_Crop_x
second_crop_y=first_crop_y, and the secondary divided image is identical to the primary divided image, if the width ratio is larger
first_loop_width/first_loop_height > c, then:
second_Crop_width=first_Crop_width*c
second_Crop_height=first_Crop_height
second_Crop_x=first_Crop_x+(first_Crop_width–second_Crop_width)/2
second_crop_y=first_crop_y, and the secondarily divided image is as shown in fig. 4-1; if the height ratio is larger
first_crop_width/first_crop_height < c, then
second_Crop_width=first_Crop_width
second_Crop_height=first_Crop_height/c
second_Crop_x=first_Crop_x
second_crop_y=first_crop_y+ (first_crop_height-second_crop_height)/2, and the secondary divided image is as shown in fig. 4-2.
In the invention, the following components are added: the image generation is to process and output a pixel image with a starting coordinate (primary_relevant_x, primary_relevant_y) from the upper left corner, a width of primary_width and a height of primary_height according to an internal function.
In the invention, the following components are added: the original image is divided into four quadrants, the center point is taken as the center of the picture, the picture is sequentially arranged from left to right, the video camera is changed to be the largest, the offset position of the pixel characteristic point is observed in which quadrant of the four quadrants to determine the offset diRection parameter, and if the pixel characteristic point is offset to the first quadrant, the offset diRection parameter is expressed as offset_direction=1; if the pixel characteristic point is shifted to the second quadrant, the deviation direcTion parameter is changed to be direct=2; if the pixel characteristic point is shifted to the third quadrant, the deviation direction parameter is specified by the deviation_direction=3; if the pixel feature point is shifted to the fourth quadrant, the deviation direction parameter is found_direction=4.
In the invention, the following components are added: the image correction is performed by periodically processing and outputting a deviation coefficient with reference to the current motor position by a processing chip of the camera according to the difference of the camera frame rate.
In the invention, the following components are added: and comparing the specific position where the target camera moves to obtain the deviation coefficient of the camera at the position, calculating a new group of image characteristic parameters which can center the image optical axis without distortion and keep the most pixels at the current position, and generating and outputting a new pixel image, wherein the coordinates are (second_drop_x, second_drop_y), the width is second_drop_width, and the height is second_drop_height.
Working principle: the correction method directly processes the images through software, and confirms the deviation direction of the optical axis in the running process of the lens from the near end to the far end as a deviation direction parameter by analyzing a group of images when the camera is not corrected; and meanwhile, comparing a group of limited and specific generated images in the middle of a zooming period with the generated images in 1 time, determining deviation data of each position in the group of positions, integrating the deviation data as a deviation array parameter of the camera, calling the deviation direction parameter and the deviation array parameter to correct and cut the images acquired by the image acquisition module at each zooming position in the real-time zooming process of the camera, and outputting the images, so that the aim of correction is fulfilled.
The specific operation is as follows: 1. acquiring a deviation direction parameter and a deviation array parameter; 2. by means of an optical axis correction algorithm of the deviation diRection parameters and the deviation array parameters, an image is divided into 4 quadrants, a center point is the center of a picture, when a camera is positioned in 1 time, a central pixel characteristic point in the image is marked, the camera is changed to be the largest time, the deviation position of the pixel characteristic point is observed in which quadrant of four quadrants to determine the deviation diRection parameters, and if the pixel characteristic point is deviated to the first quadrant, the deviation diRection parameters are detected to be less than 1; if the pixel characteristic point is shifted to the second quadrant, the deviation direcTion parameter is changed to be direct=2; if the pixel characteristic point is shifted to the third quadrant, the direction parameter is deviated
The displacement_direction=3; if the pixel feature point is shifted to the fourth quadrant, the deviation direction parameter is found_direction=4.
According to experience, the image center is shifted approximately towards one direction along with the zoom of the camera, so the acquisition of the deviation direction parameters is relatively easy, but in the actual zoom process, the image center is not linearly shifted towards one direction, so that a group of limited and specific magnification positions are selected in the whole zoom period, and each position is abstracted into a zoom step size parameter: boom [ N ] = { boom m1, boom 2, boom 3,......... Boom (N-1), boom N }, the camera walks the motor to a specific boom position, the offset condition of the image center is compared and analyzed, the lateral offset x_data_n and the longitudinal offset y_data_n of the pixel characteristic point of the current position are obtained, deviation data (x_data_n, y_data_n) of the current position are formed, and the deviation data of each boom position are integrated as a deviation parameter array: array [ N ] = { (x_data_1, y_data_1), (x_data_2, y_data_2),. The term "for (x_data_n, y_data_n) }, we can calculate a set of offset data (x_data_zoomc, y_data_zoomc) for two zoom positions (e.g. zoom a and zoom b) in-between these non-specific positions: calculating the position parameter data of the zoomC between the zoomA and the zoomB, wherein the data is = (zoomC-zoomA)/(zoomB-zoomA)
Then
x_data_zoomc= (1-data) ×x_data_zooma+data×x_data_zoomb y_data_zoomc= (1-data) ×y_data_data_zoomb so that we can calculate a set of image processing characteristic parameters which keep the image optical axis at the current position centered by querying the current position of the camera and calling the deviation data of the corresponding position in the array [ N ] according to the position of the camera and then calling the image optical axis correction algorithm to correct the image. The fold line type correction scheme for carrying out linear correction on the zoom value of each zoom interval effectively avoids larger errors caused by adopting the traditional linear correction scheme to correct the camera with the nonlinear offset of the optical axis.
To sum up: according to the zoom camera optical axis correction method, camera hardware is not changed, so that extra hardware development cost is reduced, meanwhile, the operation complexity of a camera is not expanded, and the problem of long correction period caused by 'real-time detection and real-time correction' is avoided; the invention also optimizes part of the existing software processing schemes, and overcomes the defect that the linear deviation parameter processing scheme is not applicable due to nonlinear deviation of the optical axis in the operation process of the camera.
(1) The method of the invention does not need to carry out secondary design on the hardware of the camera, reduces the operation complexity of the camera, reduces the design cost of the hardware, and simultaneously avoids the problem of losing the stability of the camera caused by changing the hardware structure (whether internal or external) of the camera.
(2) The method directly compares the original data of the camera to obtain the deviation direction parameter and the deviation array parameter, thereby correcting the optical axis of the camera through an image processing technology, greatly reducing the correction period in the actual working process of the camera, and avoiding the problem of inaccurate correction possibly caused by environmental influence in the real-time correction method in the hardware design scheme.
(3) The deviation array parameters of the method of the invention carry out the fold line correction to the camera, so the method is also suitable for equipment with nonlinear deviation of the optical axis center in the operation process.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The related modules involved in the system are all hardware system modules or functional modules in the prior art combining computer software programs or protocols with hardware, and the computer software programs or protocols involved in the functional modules are all known technologies for those skilled in the art and are not improvements of the system; the system is improved in interaction relation or connection relation among the modules, namely, the overall structure of the system is improved, so that the corresponding technical problems to be solved by the system are solved.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (3)

1. A zoom camera optical axis correction method is characterized in that: the method comprises the following steps:
step one: setting canvas with original image as X Y, point a as central pixel characteristic point of original image, point b as position after central pixel characteristic point of original image is shifted under certain multiplying power, cutting image to make point b in image under any multiplying power be in center of image so as to attain the goal of correcting image center;
step two: first, the imaging principle of the image in the canvas is clarified: by means of a set of characteristic parameters, including initial coordinates of canvas and width and height of canvas, wherein the initial coordinates are at the upper left corner, taking an original image as an example, the initial coordinates are primary_relevant_x, primary_relevant_y, primary_relevant_x=0, primary_relevant_y=0, the width is X, the height is Y, an internal function will call the set of parameters to process and generate and output a frame of image, and the image size ratio c=x/Y;
step three: the deviation direction of the central pixel feature point is divided into 4 directions, and is sequentially defined as 1 being upper left, 2 being upper right, 3 being lower left and 4 being lower right;
step four: taking the point b with the deviation direction as the upper right as an example, so that the deviation_direction=2, recording the transverse deviation parameter of the point b as x_data and the longitudinal deviation parameter as y_data compared with the point a, cutting out a maximum canvas which enables the point b to be positioned at the center of the image from the original canvas, and marking the maximum canvas as a primary divided image;
the characteristic parameters of the primary divided image are as follows:
the start coordinates first_crop_x, first_crop_y:
first_Crop_x=primitive_coord_x+(x_data*2)
first_Crop_y=primitive_coord_y
width first_loop_width:
first_Crop_width=X–(x_data*2)
height first_crop_height
first_Crop_height=Y–(y_data*2);
For other bias directions, the starting coordinates of the primary divided image are modified only once:
if the deviation direction is upper left
device_direction=1, then:
first_Crop_x=primitive_coord_x
first_Crop_y=primitive_coord_y;
if the deviation direction is lower left
device_direction=3, then:
first_Crop_x=primitive_coord_x
first_Crop_y=primitive_coord_y+(y_data*2);
if the deviation direction is lower right
device_direction=4, then:
first_Crop_x=primitive_coord_x+(x_data*2)
first_Crop_y=primitive_coord_y+(y_data*2);
step five: further adjusting the characteristic parameters of the primary divided image to ensure that the size proportion of the cut image is equal to the size proportion c of the original image, and obtaining a secondary divided image, wherein the characteristic parameters of the secondary divided image are calculated as follows:
the start coordinates second_loop_x, second_loop_y:
width second_loop_width:
height second_loop_height:
if first_loop_width/first_loop_height=c, then:
second_Crop_width=first_Crop_width
second_Crop_height=first_Crop_height
second_Crop_x=first_Crop_x
second_crop_y=first_crop_y, and the secondary divided image is identical to the primary divided image, if the width ratio is larger
first_loop_width/first_loop_height > c, then:
second_Crop_width=first_Crop_width*c
second_Crop_height=first_Crop_height
second_Crop_x=first_Crop_x+(first_Crop_width–second_Crop_width)/2
second_Crop_y=first_Crop_y;
if the height ratio is larger
first_crop_width/first_crop_height < c, then
second_Crop_width=first_Crop_width
second_Crop_height=first_Crop_height/c
second_Crop_x=first_Crop_x
second_crop_y=first_crop_y+ (first_crop_height-second_crop_height)/2, wherein the image generation is to process and output a pixel image with a starting coordinate starting from the upper left corner of the pixel image as a primary_pixel_x, a primary_pixel_y, a width of the pixel image as X and a height of the pixel image as Y, the original image is required to be divided into four quadrants, a center point is taken as a picture center, the image is sequentially arranged from left to right, a camera is multiplied to the maximum, an offset position of the pixel feature point is observed in which quadrant of the four quadrants to determine an offset diRection parameter, and if the pixel feature point is offset to the first quadrant, the offset diRection parameter is identified as offset_direaction=1; if the pixel characteristic point is shifted to the second quadrant, the deviation direcTion parameter is changed to be direct=2; if the pixel characteristic point is shifted to the third quadrant, the deviation direction parameter is specified by the deviation_direction=3; if the pixel feature point is shifted to the fourth quadrant, the deviation direction parameter is found_direction=4.
2. A zoom camera optical axis correction method according to claim 1, characterized in that: the image correction is performed by periodically processing and outputting a deviation coefficient with reference to the current motor position by a processing chip of the camera according to the difference of the camera frame rate.
3. A zoom camera optical axis correction method according to claim 2, characterized in that: and comparing the specific position where the camera moves to obtain the deviation coefficient of the camera at the position, calculating a new group of image characteristic parameters which can center the image optical axis without distortion and keep the most pixels at the current position, and generating and outputting a new pixel image, wherein the coordinates of the new group of image characteristic parameters are second_drop_x, second_drop_y, the width of the new group of image characteristic parameters is second_drop_width, and the height of the new group of image characteristic parameters is second_drop_height.
CN202110352377.3A 2021-03-31 2021-03-31 Optical axis correction method for zoom camera Active CN113156656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110352377.3A CN113156656B (en) 2021-03-31 2021-03-31 Optical axis correction method for zoom camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110352377.3A CN113156656B (en) 2021-03-31 2021-03-31 Optical axis correction method for zoom camera

Publications (2)

Publication Number Publication Date
CN113156656A CN113156656A (en) 2021-07-23
CN113156656B true CN113156656B (en) 2023-05-16

Family

ID=76886350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110352377.3A Active CN113156656B (en) 2021-03-31 2021-03-31 Optical axis correction method for zoom camera

Country Status (1)

Country Link
CN (1) CN113156656B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113129238B (en) * 2021-04-29 2023-01-06 青岛海信移动通信技术股份有限公司 Photographing terminal and image correction method
WO2023236162A1 (en) * 2022-06-09 2023-12-14 北京小米移动软件有限公司 Camera module, image processing method and apparatus, terminal, electronic device and medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102041647B1 (en) * 2014-06-30 2019-11-07 삼성전기주식회사 System and method for calibration of camera
CN106997103A (en) * 2016-01-25 2017-08-01 深圳市睿晟自动化技术有限公司 A kind of device and method of rapid alignment minisize optical lens optical axis
CN106338841A (en) * 2016-10-20 2017-01-18 深圳市立品光电有限公司 Method and apparatus for calibrating optical axis of optical lens of photographic module group
CN106482640B (en) * 2016-12-07 2022-09-09 北京汉邦高科数字技术股份有限公司 Device and method for correcting optical axis of integrated machine core
CN110858872B (en) * 2018-08-23 2021-06-22 浙江宇视科技有限公司 Optical axis offset compensation method and device
CN110895372B (en) * 2018-09-13 2022-03-11 浙江宇视科技有限公司 Optical axis deviation calibration method and related device
CN110995998B (en) * 2019-12-12 2021-06-18 浙江大华技术股份有限公司 Optical axis deviation calibration method and device

Also Published As

Publication number Publication date
CN113156656A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN113156656B (en) Optical axis correction method for zoom camera
CN101465956B (en) Image capturing apparatus, control method therefor
US7970239B2 (en) Hand jitter reduction compensating for rotational motion
US8493460B2 (en) Registration of differently scaled images
US7139424B2 (en) Stereoscopic image characteristics examination system
JP4858263B2 (en) 3D measuring device
US20140086509A1 (en) Registration of Distorted Images
US20120224032A1 (en) Image capturing device, image capturing device control method, and program
CN103945110A (en) Imaging device and focus detection method
CN109600548A (en) Image processing method and device, electronic equipment, computer readable storage medium
US11849263B2 (en) Projection focusing method, projection focusing apparatus, projector, and readable storage medium
US20130002826A1 (en) Calibration data selection device, method of selection, selection program, and three dimensional position measuring apparatus
KR20090028255A (en) Method and apparatus for auto focusing of image capturing
CN103391397A (en) Focus detection apparatus and image pickup apparatus that perform focus detection using phase difference method
CN110233963A (en) A kind of binocular camera spacing adjusting method and device
US20120162499A1 (en) Focus detection device and image capturing apparatus provided with the same
CN104641276A (en) Imaging device and signal processing method
JP4489848B2 (en) Method for correcting image steadyness error in television film scanning, method for changing the motion sequence of a predetermined image object in a television image, and apparatus for performing the method
CN112422942B (en) White balance synchronization method, lens module and electronic equipment
JP2003169255A (en) Shading correction method
US9219853B2 (en) Focus detection apparatus, image pickup apparatus, and focus detection method
CN111721237B (en) Full-automatic multi-frequency defocusing projection three-dimensional imaging measurement system and measurement method thereof
CN112630924B (en) Zoom curve correction method, device, storage medium and system
WO2016194576A1 (en) Information processing device and method
US10360662B2 (en) Alignment of multiple camera images by matching projected one dimensional image profiles

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230421

Address after: Room 517, Building 5 (Building 4), No. 33 Xinwen Road, Gongshu District, Hangzhou City, Zhejiang Province, 310000

Applicant after: Hangzhou Guangying Writing Technology Co.,Ltd.

Address before: 313300 Room 502, building 1, No.1 Wufu Road, tianzihu Town, Anji County, Huzhou City, Hangzhou City, Zhejiang Province

Applicant before: Zhejiang Robby Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant