CN110632735A - Method for searching optimal focal plane in laser direct imaging system - Google Patents
Method for searching optimal focal plane in laser direct imaging system Download PDFInfo
- Publication number
- CN110632735A CN110632735A CN201910759337.3A CN201910759337A CN110632735A CN 110632735 A CN110632735 A CN 110632735A CN 201910759337 A CN201910759337 A CN 201910759337A CN 110632735 A CN110632735 A CN 110632735A
- Authority
- CN
- China
- Prior art keywords
- focal plane
- axis
- imaging
- camera
- image
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B7/00—Mountings, adjusting means, or light-tight connections, for optical elements
- G02B7/28—Systems for automatic generation of focusing signals
- G02B7/36—Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals
-
- G—PHYSICS
- G03—PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
- G03B—APPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
- G03B13/00—Viewfinders; Focusing aids for cameras; Means for focusing for cameras; Autofocus systems for cameras
- G03B13/32—Means for focusing
- G03B13/34—Power focusing
- G03B13/36—Autofocus systems
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Optics & Photonics (AREA)
- Studio Devices (AREA)
Abstract
The invention relates to a method for searching an optimal focal plane in a laser direct imaging system, which comprises the following steps: (1) playing a static graph in the graph generator; (2) presetting a search range of a focal plane according to a design focal length of an imaging lens; (3) controlling X, Y axis to make camera move to the middle position of imaging surface of imaging lens; (4) controlling the Z axis to move the camera to the position of the search starting point of the imaging lens; (5) controlling a camera to capture an image, calculating an imaging sharpness value of the image, and recording a Z-axis coordinate at the moment; (6) moving the Z axis in a stepping mode to a position close to the search end point; (7) repeating the steps (5) to (6) until the camera imaging surface exceeds the searching end point; (8) and fitting a quadratic curve according to the relation between the imaging sharpness value and the Z axis, and solving the Z axis coordinate at the maximum value of the quadratic curve. The method can effectively eliminate the static noise of the camera, has good repeatability and high precision, is convenient to use and learn and does not depend on personal experience.
Description
Technical Field
The invention relates to the technical field of laser imaging systems, in particular to a method for searching an optimal focal plane in a laser direct imaging system.
Background
In a laser direct imaging system with multiple imaging lenses, it is necessary to ensure that the imaging lens surfaces of the multiple imaging lenses are on the same horizontal plane, and if the imaging lens surfaces are not on the same horizontal plane, the final imaging quality of each lens will be inconsistent, which affects the quality of the product produced by the direct imaging system. In the prior art, the quality of an image is mainly checked by using human eyes, and when the human eyes feel the best image, the current coordinate value is recorded as the optimal focal plane position of an imaging lens. The artificial method comprises the following steps:
(1) playing a static image in a pattern generator, wherein the static image is generally a checkerboard, and can also be a line graph, a dot scatter graph or any other image with patterns;
(2) turning on the light source, adjusting to proper brightness, and making the camera image clearly visible without exposing to light;
(3) moving the position near the focal plane of the imaging lens of the Z axis below the imaging lens of the horizontally moving camera, slightly moving the Z axis, and capturing images and recording the position of the Z axis by the camera;
(4) and (4) checking the captured images by human eyes, selecting the image which is considered to be clearest in the images, and considering the position of the captured image as the optimal focal plane position of the lens.
Because the imaging lenses have certain focal depth, images are clearer in a larger range, the image definition changes slightly, and the human eyes cannot perceive the images, so that in the actual use process of the method, because the sampling process is discrete, an operator cannot grasp the accurate position of the optimal focal plane easily, the measurement results of different people have great difference, and the repeatability is poor.
Disclosure of Invention
The invention aims to provide a method for searching the optimal focal plane in a laser direct imaging system, which has the advantages of good continuity, good noise resistance, good repeatability, high precision, easy learning and no dependence on personal experience, provides a reliable quantitative standard for production and assembly, ensures the stability of the quality of an equipment system and accelerates the production efficiency.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for searching the optimal focal plane in a laser direct imaging system comprises the following steps:
(1) playing a static graph in the graph generator;
(2) presetting a search range of a focal plane according to a design focal length of an imaging lens;
(3) controlling X, Y axis to make camera move to the middle position of imaging surface of imaging lens;
(4) moving the camera to the position of the imaging lens search starting point by controlling the Z axis;
(5) controlling a camera to capture an image, calculating an imaging sharpness value of the image, and recording a Z-axis coordinate and the imaging sharpness value of the image at the moment;
(6) moving the Z axis in a stepping mode to a position close to the search end point;
(7) repeating the steps (5) to (6) until the camera imaging surface exceeds the searching end point;
(8) and fitting a quadratic curve according to the relation between the imaging sharpness value and the Z axis, and solving the Z axis coordinate at the maximum value of the quadratic curve, namely the Z axis coordinate of the optimal focal plane.
In the above scheme, the static image adopts checkerboard, line graph, dot scatter graph or other images with any patterns.
In the above scheme, the search range is larger than the depth of focus width.
In the above scheme, in the step (2), the focal plane search starting point and the search end point include positions of focal planes; the distance of the stepping movement Z axis is not more than half of the image space focal depth at most, and preferably, the distance of the stepping movement Z axis is not more than one third of the image space focal depth.
In the above scheme, the imaging sharpness value and the Z-axis coordinate satisfy a quadratic curve distribution, and the quadratic curve equation is:
K=aZ2+bZ+c
wherein Z is the position of the camera imaging surface, K is the image sharpness value under the corresponding Z-axis coordinate, and a, b and c are coefficients of a quadratic curve equation.
The clear position of the camera imaging surface is obtained by solving a first derivative function of a parabolic equation: z is-b/2 a.
According to the technical scheme, the method for searching the optimal focal plane in the laser direct imaging system has the advantages that the digital evaluation on the definition of the image is carried out, and then the quadratic curve fitting is carried out on the discrete data, so that the beneficial effect is remarkable. The method has the advantages of good continuity, good noise resistance, good repeatability, high precision, easy learning and no dependence on personal experience, provides reliable quantitative standards for the equipment assembly process, ensures the quality and stability of the equipment and accelerates the production efficiency.
Drawings
FIG. 1 is an imaging schematic of the present invention;
FIG. 2 is a flow chart of a method of the present invention;
FIG. 3 is a schematic diagram of the system architecture of the present invention;
FIG. 4 is a sample distribution relationship and mathematical model schematic of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings:
the method for searching the optimal focal plane in the laser direct imaging system of the embodiment adopts the following existing system components: as shown in fig. 3, the image forming apparatus includes a pattern generator 2(DMD, TI 9500), a laser 6 (disging 15W 405nm laser diode module), a control system 7, an imaging lens 1, an XY axis 5, a Z axis 3, and an industrial camera 4(JAI Spark 2000).
The X, Y, Z axis is used to control the relative position between the lens and the camera 4 so that the camera can view the entire imaging plane. The control system 7 is used for calculating the imaging sharpness of the image shot by the camera, and controlling the movement of the motion system and the fitting calculation of a quadratic curve.
As shown in FIG. 1, assume now that the design focal length of the imaging lens is foThe focal depth of the imaging lens is D. Setting the search distance as 10D, the imaging surface of the industrial camera is close to the focal plane of the imaging lens, and the Z-axis coordinate is ZfComplete coverage of Z-axis travel [ Zf-5D,Zf+5D]。
As shown in fig. 2, the method for finding the optimal focal plane in the laser direct imaging system includes the following steps:
step 1: putting a static image into a DMD screen of the image generator, turning on a laser 6, and adjusting the light-emitting brightness of the image to enable the industrial camera 4 to normally image without exposure; the static image may be a checkerboard, line bar, dot-and-dash, or any other pattern, or a glass template with a backlight may be used in place of the pattern generator and static image. The glass template with the backlight source can be a mask plate with a checkerboard, a line graph, a dot scatter graph and other graphic structures.
Step 2: setting the search ranges of the rough focal plane and the focal plane, and the middle position (x) of the imaging plane of the imaging lens0,y0) The search range is required to be greater than the depth of focus width DOF. The search range of this example is defined as 10 times the depth of focus D, the search starting point is above the focal plane, the search ending point is below the focal plane, and the distance from the search starting point to the search ending point includes the position of the focal plane and is much greater than the depth of focus. Adjusting the light source to proper light-emitting intensity, wherein no overexposure pixel point exists during camera imaging;
and step 3: controlling the motion system to move the industrial camera 4 to the position right in front of the imaging lens through the control system 7, and controlling the X, Y shaft 5 to move the camera 4 to the middle position of the imaging surface of the imaging lens;
and 4, step 4: moving the Z axis to Zf-5D position, capturing the image, recording the Z-axis coordinate Z at that time1And sharpness value K of image formation1(ii) a In order to ensure good sampling effect and take efficiency into consideration, the moving step length of the embodiment is D/3, and the Z axis is controlled to be Zf+5D direction movement.
And 5: capturing the image for the ith time, calculating the imaging sharpness value of the image, and recording the Z-axis coordinate Z at the momentiAnd sharpness value K of image formationiI is sequentially increased from 1;
common image imaging sharpness evaluation functions are: a Krisch evaluation function, Brenner gradient function, Tenengrad gradient function, Laplacian gradient function, SMD (grayscale variance) function, variance function, etc.; the present embodiment calculates the imaging sharpness value of the image captured at this time using the Krisch evaluation function.
Step 6: jogging a Z axis to a position close to a search end point, wherein the moving distance cannot exceed DOF/2 to the maximum extent and is unlimited to the minimum extent according to a sampling theorem, wherein the DOF is the focal depth of a lens;
and 7: repeating the process of the step 5-6 until the Z-axis coordinate exceeds Zf+5D。
And 8: fitting a quadratic curve according to the relation between the imaging sharpness value and the Z axis, and solving the Z axis coordinate at the maximum value of the quadratic curve, namely the Z axis coordinate of the optimal focal plane;
as shown in fig. 4, intoThe relation between the image sharpness value and the Z-axis coordinate meets the distribution of a quadratic curve, and the equation of the quadratic curve is as follows: k ═ aZ2+ bZ + c, where Z is the Z-axis coordinate of the camera imaging plane, K is the imaging sharpness value of the image captured by the camera, and a, b, c are several coefficients of a quadratic curve equation.
According to the above formula: ki,Zi(i ═ 1.., n), a least squares fit curve K ═ aZ is now used2+ bZ + c, and obtaining coefficients a, b and c of the quadratic curve.
The least squares solution process is as follows:
At M min, the following partial derivative function values are zero:
i.e. solving the following linear equation, wherein a, b, c are solved
Using Cramer rule:
a is DA/DM; b is DB/DM; c is DC/DM, and a, b, and c are determined.
And step 9: according to the basic characteristics of the parabolic quadratic curve function, the clearest image is under the extreme value condition of the function; the first derivative function of the function is K '═ 2aZ + b, and under the condition of the extreme value of the quadratic curve, the derivative function value is K' ═ 2aZ + b ═ 0, so that the clearest position is Z: z is-b/2 a.
The above-mentioned embodiments are merely illustrative of the preferred embodiments of the present invention, and do not limit the scope of the present invention, and various modifications and improvements of the technical solution of the present invention by those skilled in the art should fall within the protection scope defined by the claims of the present invention without departing from the spirit of the present invention.
Claims (8)
1. A method for searching an optimal focal plane in a laser direct imaging system is characterized by comprising the following steps:
(1) playing a static graph in the graph generator;
(2) presetting a search range of a focal plane according to a design focal length of an imaging lens;
(3) controlling X, Y axis to make camera move to the middle position of imaging surface of imaging lens;
(4) moving the camera to the position of the imaging lens search starting point by controlling the Z axis;
(5) controlling a camera to capture an image, calculating an imaging sharpness value of the image, and recording a Z-axis coordinate and the imaging sharpness value of the image at the moment;
(6) moving the Z axis in a stepping mode to a position close to the search end point;
(7) repeating the steps (5) to (6) until the camera imaging surface exceeds the searching end point;
(8) and fitting a quadratic curve according to the relation between the imaging sharpness value and the Z axis, and solving the Z axis coordinate at the maximum value of the quadratic curve, namely the Z axis coordinate of the optimal focal plane.
2. The method for finding the optimal focal plane in the laser direct imaging system according to claim 1, wherein: the static image adopts checkerboard, line graph, dot scatter graph or other random pattern images.
3. The method for finding the optimal focal plane in the laser direct imaging system according to claim 1, wherein: the search range is greater than the depth of focus width.
4. The method for finding the optimal focal plane in the laser direct imaging system according to claim 1, wherein: in the step (2), the focal plane search starting point and the search end point include positions of focal planes.
5. The method for finding the optimal focal plane in the laser direct imaging system according to claim 1, wherein: the imaging sharpness value and the Z coordinate meet the distribution of a quadratic curve, and the quadratic curve equation is as follows:
K=aZ2+bZ+c
wherein Z is the position of the camera imaging surface, K is the image sharpness value under the corresponding Z-axis coordinate, and a, b and c are coefficients of a quadratic curve equation.
6. The method for finding the optimal focal plane in the laser direct imaging system according to claim 1, wherein: in the step (6), the maximum distance of the stepping movement Z axis is not more than half of the image focal depth.
7. The method for finding the optimal focal plane in the laser direct imaging system according to claim 1 or 6, wherein: the distance of the step movement Z axis does not exceed one third of the focal depth of the image space.
8. The method for finding the optimal focal plane in the laser direct imaging system according to claim 1, wherein: the clear Z-axis coordinate of the camera imaging surface is obtained by first-order derivation of a quadratic curve according to a zero first-order derivation value under an extreme value condition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910759337.3A CN110632735A (en) | 2019-08-16 | 2019-08-16 | Method for searching optimal focal plane in laser direct imaging system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910759337.3A CN110632735A (en) | 2019-08-16 | 2019-08-16 | Method for searching optimal focal plane in laser direct imaging system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110632735A true CN110632735A (en) | 2019-12-31 |
Family
ID=68970377
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910759337.3A Pending CN110632735A (en) | 2019-08-16 | 2019-08-16 | Method for searching optimal focal plane in laser direct imaging system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110632735A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111965783A (en) * | 2020-08-28 | 2020-11-20 | 合肥众群光电科技有限公司 | LDI exposure lens focal plane adjusting method |
CN113406764A (en) * | 2021-07-13 | 2021-09-17 | 广东弘景光电科技股份有限公司 | Optical lens aligning method and system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102317951A (en) * | 2009-02-11 | 2012-01-11 | 数据逻辑扫描公司 | Utilize the high-resolution optical code imaging of colour imaging device |
CN102914262A (en) * | 2012-09-29 | 2013-02-06 | 北京控制工程研究所 | Non-cooperative target abutting measurement method based on additional sighting distance |
CN106094162A (en) * | 2016-08-26 | 2016-11-09 | 英华达(上海)科技有限公司 | A kind of focusing method |
US20170124680A1 (en) * | 2014-10-31 | 2017-05-04 | Fyusion, Inc. | Stabilizing image sequences based on camera rotation and focal length parameters |
CN107667309A (en) * | 2015-06-04 | 2018-02-06 | 高通股份有限公司 | The method and apparatus that alignment is focused on for thin camera |
CN108225190A (en) * | 2016-12-15 | 2018-06-29 | 卡尔蔡司工业测量技术有限公司 | Measuring system |
CN108693625A (en) * | 2017-04-10 | 2018-10-23 | 深圳市瀚海基因生物科技有限公司 | Imaging method, apparatus and system |
-
2019
- 2019-08-16 CN CN201910759337.3A patent/CN110632735A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102317951A (en) * | 2009-02-11 | 2012-01-11 | 数据逻辑扫描公司 | Utilize the high-resolution optical code imaging of colour imaging device |
CN102914262A (en) * | 2012-09-29 | 2013-02-06 | 北京控制工程研究所 | Non-cooperative target abutting measurement method based on additional sighting distance |
US20170124680A1 (en) * | 2014-10-31 | 2017-05-04 | Fyusion, Inc. | Stabilizing image sequences based on camera rotation and focal length parameters |
CN107667309A (en) * | 2015-06-04 | 2018-02-06 | 高通股份有限公司 | The method and apparatus that alignment is focused on for thin camera |
CN106094162A (en) * | 2016-08-26 | 2016-11-09 | 英华达(上海)科技有限公司 | A kind of focusing method |
CN108225190A (en) * | 2016-12-15 | 2018-06-29 | 卡尔蔡司工业测量技术有限公司 | Measuring system |
CN108693625A (en) * | 2017-04-10 | 2018-10-23 | 深圳市瀚海基因生物科技有限公司 | Imaging method, apparatus and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111965783A (en) * | 2020-08-28 | 2020-11-20 | 合肥众群光电科技有限公司 | LDI exposure lens focal plane adjusting method |
CN113406764A (en) * | 2021-07-13 | 2021-09-17 | 广东弘景光电科技股份有限公司 | Optical lens aligning method and system |
CN113406764B (en) * | 2021-07-13 | 2022-01-28 | 广东弘景光电科技股份有限公司 | Optical lens aligning method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1727983B (en) | Strobe illumination | |
DE102017220104A1 (en) | Lens system with variable focal length with multi-level image processing with extended depth of focus | |
DE102017009128B4 (en) | Projection pattern making device and three-dimensional measuring device | |
CN104637064A (en) | Defocus blurred image definition detection method based on edge intensity weight | |
DE102016120954A1 (en) | Imaging device and imaging method | |
DE102017220101A1 (en) | Inspection system using machine vision to obtain an image with extended depth of field | |
DE112016006069T5 (en) | STEREO DEPTH CAMERA WITH VCSEL PROJECTOR WITH CONTROLLED PROJECTION LINES | |
DE102015114376B4 (en) | Apparatus and method for characterizing subjective speckle formation | |
US11360304B2 (en) | Image distortion detection method and system | |
CN109506591A (en) | A kind of adaptive illumination optimization method being adapted to complex illumination scene | |
CN110261069B (en) | Detection method for optical lens | |
CN110632735A (en) | Method for searching optimal focal plane in laser direct imaging system | |
WO2019104670A1 (en) | Method and apparatus for determining depth value | |
CN116433780B (en) | Automatic calibration method for laser structured light based on machine vision | |
DE112017001464B4 (en) | Distance measuring device and distance measuring method | |
DE102013014475A1 (en) | Method for calibration of optical measurement device for measuring geometric features of measuring object, involves executing static calibration and generating static calibration data or from evaluating- and control unit | |
CN115494652A (en) | Method, device and equipment for assembling head display equipment and storage medium | |
EP3071928B1 (en) | Image capturing simulation in a coordinate measuring apparatus | |
WO2007134567A1 (en) | Method for generating image information | |
CN108347577B (en) | Imaging system and method | |
CN117073988B (en) | System and method for measuring distance of head-up display virtual image and electronic equipment | |
CN112995653A (en) | Angle adjusting device and method thereof | |
CN108287060A (en) | A kind of measuring device and method of laser beam divergence | |
EP3433669A1 (en) | Method and apparatus for determining 3d coordinates of at least one predetermined point of an object | |
CN112361989A (en) | Method for calibrating parameters of measurement system through point cloud uniformity consideration |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191231 |