CN109544645B - Method for calibrating inclination angle of lens of camera module - Google Patents

Method for calibrating inclination angle of lens of camera module Download PDF

Info

Publication number
CN109544645B
CN109544645B CN201811426262.9A CN201811426262A CN109544645B CN 109544645 B CN109544645 B CN 109544645B CN 201811426262 A CN201811426262 A CN 201811426262A CN 109544645 B CN109544645 B CN 109544645B
Authority
CN
China
Prior art keywords
lens
inclination angle
camera module
angle
calculating
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
CN201811426262.9A
Other languages
Chinese (zh)
Other versions
CN109544645A (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.)
Suzhou Jieruisi Intelligent Technology Co ltd
Original Assignee
Suzhou Jieruisi Intelligent 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 Suzhou Jieruisi Intelligent Technology Co ltd filed Critical Suzhou Jieruisi Intelligent Technology Co ltd
Priority to CN201811426262.9A priority Critical patent/CN109544645B/en
Publication of CN109544645A publication Critical patent/CN109544645A/en
Application granted granted Critical
Publication of CN109544645B publication Critical patent/CN109544645B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T7/85Stereo camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]

Abstract

The invention discloses a method for calibrating the inclination angle of a lens of a camera module. The invention relates to a method for calibrating the inclination angle of a lens of a camera module, which comprises the following steps: determining X, Y, Z tilt angle range of the lens in three directions; determining the inclination angle sampling sample interval of the rough attitude determination according to the number of the sampling samples and the inclination angle range; acquiring the difference between the dip angle and the edge resolution of all samples; constructing a nonlinear equation according to the difference of the inclination angles and the edge resolutions of all the samples; calculating equation coefficients of the nonlinear equation; calculating a function extreme value to obtain a lens inclination angle; and determining a sampling sample of the inclination angle of the fine attitude according to the coarse attitude determination inclination angle and the sampling interval, repeating the steps, and calculating the inclination angle of the lens of the fine attitude determination. The invention has the beneficial effects that: the test board is simple in design and low in cost; three angles are calibrated at one time, so that the active alignment of the lens of the camera module is more convenient and faster; the detection process is simple and has strong repeatability.

Description

Method for calibrating inclination angle of lens of camera module
Technical Field
The invention relates to the field of camera module lens inclination angle calibration, in particular to a method for calibrating a camera module lens inclination angle.
Background
As the demand of high-end camera markets continues to increase, there are higher requirements on imaging quality and yield. Due to assembly or component errors, the camera module may have a certain lens tilt, resulting in a decrease in image resolution. In order to reduce the lens eccentricity error in the production process and improve the imaging quality of the camera, the lens needs to be aligned and corrected in three dimensions in the packaging process, and then cured and the like. At present, the assembly and adjustment of a high-end mobile phone camera module mainly depends on human eyes to observe the imaging effect of the mobile phone camera module, so that the problems of low accuracy and stability, low detection speed, easy fatigue of people and the like are caused.
Patent CN201510288398 calculates optical tilt between the optical axis of the lens and the optical axis of the image sensor of the camera module in the X-axis and Y-axis directions by plane fitting calculation by collecting spatial frequency response data; CN201610698589 determines the tilt angles of the lens in the X-axis and Y-axis directions by a method of fitting a data plane to a neural network.
The conventional technology has one or more of the following technical problems:
the rotation angles in XY two directions can be detected at one time, and the rotation angle in the z direction is not detected;
the detection process is complex and the time period is long;
the test board for detection has high manufacturing cost.
Disclosure of Invention
The invention provides a method for calibrating the inclination angle of a camera module lens, which is used for determining the optical inclination angles of a main optical axis of the camera lens relative to a normal of an image sensor plane in the directions of an X axis, a Y axis and a Z axis by comparing resolution differences of test card images at the periphery of the images by utilizing test card images acquired by the lens at different postures.
In order to solve the above technical problem, the present invention provides a method for calibrating a lens tilt angle of a camera module, comprising:
determining X, Y, Z tilt angle range of the lens in three directions;
determining the inclination angle sampling sample interval of the rough attitude determination according to the number of the sampling samples and the inclination angle range;
acquiring the difference between the dip angle and the edge resolution of all samples;
constructing a nonlinear equation according to the difference of the inclination angles and the edge resolutions of all the samples;
calculating equation coefficients of the nonlinear equation;
calculating a function extreme value to obtain a lens inclination angle;
and determining a sampling sample of the inclination angle of the fine attitude according to the coarse attitude determination inclination angle and the sampling interval, repeating the steps, and calculating the inclination angle of the lens of the fine attitude determination.
In one embodiment, the obtaining the difference between the dip angle and the edge resolution of all the samples specifically includes:
controlling the lens to rotate by the inclination angle of each sample X, Y, Z direction;
taking a picture of the test board;
determining a region of interest;
calculating an MTF value of the region of interest;
calculating the difference of the image edge resolution;
the above steps are repeated.
In one embodiment, the region of interest is four edge middle regions which are symmetrical in pairs from top to bottom, left to right and right of the image.
In one embodiment, the region size of the region of interest is 1/10 the length and width of the imaging region.
In one embodiment, the lens is controlled to rotate by a motor, the rotation angle being the tilt angle of the direction of each sample X, Y, Z.
In one embodiment, the equation coefficients of the non-linear equation are calculated using a least squares method.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the methods when executing the program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of any of the methods.
A processor for running a program, wherein the program when running performs any of the methods.
The invention has the beneficial effects that:
the test board is simple in design and low in cost; three angles are calibrated at one time, so that the active alignment of the lens of the camera module is more convenient and faster; the detection process is simple and has strong repeatability.
Drawings
Fig. 1(a) is a schematic diagram of a black and white stripe test card in the method for calibrating the lens tilt angle of a camera module according to the present invention.
FIG. 1(b) is a schematic diagram of another black and white stripe test card in the method for calibrating the lens tilt angle of a camera module according to the present invention.
FIG. 2 is a schematic diagram of lens tilt angle stereo sampling in the method for calibrating lens tilt angle of camera module according to the present invention.
Fig. 3 is a schematic diagram of determining an MTF value of an area of interest in the method for calibrating a lens tilt angle of a camera module according to the present invention.
FIG. 4 is a schematic diagram of two steps of coarse attitude determination and fine attitude determination in the method for calibrating the inclination angle of the lens of the camera module according to the present invention.
FIG. 5 is a flowchart illustrating a method for calibrating a lens tilt angle of a camera module according to the present invention.
Detailed Description
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
A method for calibrating the inclination angle of a lens of a camera module comprises the following steps:
determining X, Y, Z tilt angle range of the lens in three directions;
determining the inclination angle sampling sample interval of the rough attitude determination according to the number of the sampling samples and the inclination angle range;
acquiring the difference between the dip angle and the edge resolution of all samples;
constructing a nonlinear equation according to the difference of the inclination angles and the edge resolutions of all the samples;
calculating equation coefficients of the nonlinear equation;
calculating a function extreme value to obtain a lens inclination angle;
and determining a sampling sample of the inclination angle of the fine attitude according to the coarse attitude determination inclination angle and the sampling interval, repeating the steps, and calculating the inclination angle of the lens of the fine attitude determination.
In one embodiment, the obtaining the difference between the dip angle and the edge resolution of all the samples specifically includes:
controlling the lens to rotate by the inclination angle of each sample X, Y, Z direction;
taking a picture of the test board;
determining a region of interest;
calculating an MTF value of the region of interest;
calculating the difference of the image edge resolution;
the above steps are repeated.
In one embodiment, the region of interest is four edge middle regions which are symmetrical in pairs from top to bottom, left to right and right of the image.
In one embodiment, the region size of the region of interest is 1/10 the length and width of the imaging region.
In one embodiment, the lens is controlled to rotate by a motor, the rotation angle being the tilt angle of the direction of each sample X, Y, Z.
In one embodiment, the equation coefficients of the non-linear equation are calculated using a least squares method.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the methods when executing the program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of any of the methods.
A processor for running a program, wherein the program when running performs any of the methods.
The invention has the beneficial effects that:
the test board is simple in design and low in cost; three angles are calibrated at one time, so that the active alignment of the lens of the camera module is more convenient and faster; the detection process is simple and has strong repeatability.
A specific application scenario of the present application is described as follows:
referring to fig. 1 to 5:
a black and white stripe test card is prepared and fig. 1(a) and 1(b) show two black and white stripe test cards that can be used.
The inclination angles of the lens in X, Y, Z three directions are estimated based on camera mounting experience values. Assuming that the ranges of the inclination angles in the X direction (θ X _ min, θ X _ max), the ranges of the inclination angles in the Y direction (θ Y _ min, θ Y _ max), and the ranges of the inclination angles in the Z direction (θ Z _ min, θ Z _ max), the ranges of the inclination angles in the directions described above constitute a cube, as shown in fig. 2. The uniform sampling is carried out in the cubic area, and the sampling interval of each direction is respectively N on the assumption that the sampling step number of the inclination angle in each direction is N
Figure BDA0001881702620000061
Figure BDA0001881702620000062
Figure BDA0001881702620000063
Controlling the lens motor to rotate the lens in X, Y, Z directions by thetax、θY、θZAngle, first sampling, and
θx=θx_min
θY=θY_min
θZ=θZ_min
shooting a test card, and calculating the MTF value of an interested area, wherein the interested area is the middle area of four edges of the image, which are symmetrical in pairs, and the size of the interested area can be determined according to 1/10 or empirical parameters of the length and the width of an imaging area.
Respectively calculating MTF values of the upper, lower, left and right interested areas into mup、mdown、mLeft、mRightThen the image edge resolution difference v is due to the lens tiltMTFCan be defined as:
υMTF=(mLeft-mRight)2+(mup-mdown)2
theta can be obtained according to the lens rotation angle and the image edge resolution differencex、θY、θZAngle to υMTFA mapping of (2);
in the cubes determined in step 2, respectively, at θx、θY、θZWithin the range of the angle value, the motor is controlled to rotate to sample in each direction, and the step 4-6 is repeated to obtain thetax、θY、θZAngle to υMTFIs expressed as a polynomial
υMTF=g(θXYZ)
A typical nonlinear quadratic polynomial can be expressed as
g(θXYZ)=a0+a1·θX+a2·θY+a3·θZ+a4·θX 2+a5·θY 2+a6·θZ 2+a7·θX·θy+a8·θX·θZ+a9·θX·θZWherein, a0, a1, … … and a9 are parameters to be solved;
the variation (upsilon)MTF,θXYZ) Substituting a quadratic polynomial, and calculating each polynomial parameter a0, a1, … … and a9 by using a least square method;
computing an extreme value of the g function, order
Figure BDA0001881702620000071
Solving the above equation to obtain thetax、θY、θZThe optimum value of (c).
In actual operation, the sampling interval can be increased, and the posture can be determined roughly by using less sampling data, and then accurately determined in a small range according to the direction of rough positioning, as shown in fig. 4. Except for the step 2, the angle sample is determined, and other attitude determination processes can be implemented according to the steps 1 to 9.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.

Claims (8)

1. A method for calibrating the inclination angle of a lens of a camera module is characterized by comprising the following steps:
determining X, Y, Z tilt angle range of the lens in three directions;
determining the inclination angle sampling sample interval of the rough attitude determination according to the number of the sampling samples and the inclination angle range;
acquiring the difference between the dip angle and the edge resolution of all samples;
constructing a nonlinear equation according to the difference of the inclination angles and the edge resolutions of all the samples;
calculating equation coefficients of the nonlinear equation;
calculating a function extreme value to obtain a lens inclination angle;
determining a sampling sample of the inclination angle of the fine attitude according to the coarse attitude determination inclination angle and the sampling interval, repeating the steps, and calculating the inclination angle of the lens of the fine attitude determination;
the obtaining of the difference between the dip angle and the edge resolution of all the samples specifically includes:
controlling the lens to rotate by the inclination angle of each sample X, Y, Z direction;
taking a picture of the test board;
determining a region of interest;
calculating an MTF value of the region of interest;
calculating the difference of the image edge resolution;
the above steps are repeated.
2. The method for calibrating lens tilt angle of a camera module as claimed in claim 1, wherein the regions of interest are four edge middle regions that are symmetric with respect to each other.
3. The method for calibrating lens tilt angle of a camera module as claimed in claim 1, wherein the size of the region of interest is 1/10 of the length and width of the imaging area.
4. The method for calibrating lens tilt angle of camera module as claimed in claim 1, wherein the rotation angle of the lens is controlled by a motor and is the tilt angle of each sample X, Y, Z.
5. The method for calibrating lens tilt angle of a camera module as claimed in claim 1, wherein the coefficients of the non-linear equation are calculated by using least square method.
6. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 5 are implemented when the program is executed by the processor.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
8. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of any of claims 1 to 5.
CN201811426262.9A 2018-11-27 2018-11-27 Method for calibrating inclination angle of lens of camera module Active CN109544645B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811426262.9A CN109544645B (en) 2018-11-27 2018-11-27 Method for calibrating inclination angle of lens of camera module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811426262.9A CN109544645B (en) 2018-11-27 2018-11-27 Method for calibrating inclination angle of lens of camera module

Publications (2)

Publication Number Publication Date
CN109544645A CN109544645A (en) 2019-03-29
CN109544645B true CN109544645B (en) 2020-07-10

Family

ID=65851602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811426262.9A Active CN109544645B (en) 2018-11-27 2018-11-27 Method for calibrating inclination angle of lens of camera module

Country Status (1)

Country Link
CN (1) CN109544645B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111384B (en) * 2019-04-11 2021-11-26 歌尔光学科技有限公司 Calibration method, device and system of TOF (time of flight) depth module
CN110196062B (en) * 2019-06-27 2022-03-25 成都圭目机器人有限公司 Navigation method for tracking lane line by single camera
CN110753172B (en) * 2019-10-22 2022-02-15 Oppo广东移动通信有限公司 Correction method and device, electronic equipment and voice coil motor
CN110838147B (en) * 2019-10-25 2022-07-05 深圳信息职业技术学院 Camera module detection method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106296711B (en) * 2016-08-22 2019-04-09 华南理工大学 A kind of multiaxis active alignment method of mobile phone camera module group

Also Published As

Publication number Publication date
CN109544645A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN109544645B (en) Method for calibrating inclination angle of lens of camera module
US8711275B2 (en) Estimating optical characteristics of a camera component using sharpness sweep data
CN106462949B (en) Depth transducer is calibrated and is corrected pixel-by-pixel
CN107767422B (en) Fisheye lens correction method and device and portable terminal
US10547786B2 (en) Image processing for turbulence compensation
JP5075757B2 (en) Image processing apparatus, image processing program, image processing method, and electronic apparatus
US9582881B2 (en) Machine vision image sensor calibration
CN110717942B (en) Image processing method and device, electronic equipment and computer readable storage medium
US8675985B2 (en) Apparatus and method for processing image
CN110858872B (en) Optical axis offset compensation method and device
CN105049734A (en) License camera capable of giving shooting environment shooting prompt and shooting environment detection method
US9529085B2 (en) Method for measuring spatial points
US10965871B2 (en) Apparatus and method for compensating for image change caused by optical image stabilization motion
CN112422960B (en) Offset estimation method and device of camera module, storage medium and terminal
WO2019232793A1 (en) Two-camera calibration method, electronic device and computer-readable storage medium
CN112912932A (en) Calibration method and device of vehicle-mounted camera and terminal equipment
CN116433737A (en) Method and device for registering laser radar point cloud and image and intelligent terminal
US9158183B2 (en) Stereoscopic image generating device and stereoscopic image generating method
CN113012234A (en) High-precision camera calibration method based on plane transformation
US11436756B2 (en) Calibrating a machine vision camera
US8750641B2 (en) Apparatus and method for correcting distortion of image
CN111951295B (en) Method and device for determining flight trajectory with high precision based on polynomial fitting and electronic equipment
KR20200095183A (en) Method and system for calibration using dot grid pattern image and computer readable medium storing a program of the same
KR101239671B1 (en) Method and apparatus for correcting distortion of image by lens
JP2012198076A (en) Camera simulating device, camera simulating method and camera simulating program

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 15 Mudu East Road, Mudu Town, Wuzhong District, Suzhou City, Jiangsu Province

Applicant after: Suzhou jieruisi Intelligent Technology Co., Ltd

Address before: Zhujiang Road Wuzhong District Mudu town of Suzhou city in Jiangsu province 215000 No. 368 (Mudu Technology Park A025 room)

Applicant before: Suzhou Jieruisi Automation Equipment Co., Ltd.

GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Wen Erlong

Inventor after: Cai Yinqiao

Inventor before: Wen Erlong

Inventor before: Cai Yinqiao

Inventor before: Yu Yongtao

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 215128 No. 9, Zhufeng Road, Mudu Town, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou jieruisi Intelligent Technology Co.,Ltd.

Address before: 215128 No.15, Mudu Town, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: Suzhou jieruisi Intelligent Technology Co.,Ltd.