A kind of focal length of lens test method of no mechanical movement
Technical field
The present invention relates to a kind of focal length of lens test methods of no mechanical movement, belong to the technical field of Photoelectric Detection.
Background technique
Lens are a kind of very widely used optical devices, are applied to various optical systems, the focal length of lens
It is its main optical parameter.Whether the focal length of lens accurately directly affects the performance of optical system, and therefore, many applications all need
Its focal length is accurately measured.
In traditional focometry, the focal length of lens or optical system is measured with magnifying power method, using with microscopical
The spacing of eyepiece mircrometer gauge reading glass sieve plate picture.Because the complexity of eyepiece mircrometer gauge self structure, rotates in measurement process
It is easy to cause imaging unstable when micro- handwheel, leads to error of circling round, and due to only relying on operator's subjective judgement, to operator
It is more demanding, while there is biggish human error.Image measurement technology is applied in focal length of lens measurement at present, is able to achieve
Automatic interpretation and measurement greatly improve measurement efficiency and measurement accuracy, and avoid human error.But magnifying power method measures
The problem of lens or the focal length of optical system still have has:
(1) it seems the premise for measuring the spacing size of glass sieve plate picture that CCD, which is obtained clearly, it is necessary to micro- by accurate movement
The position of camera system could obtain clearly as the range of focometry is bigger, and the distance of Mechanical Moving is remoter, and entire
It will guarantee on the optical axis of system in moving range.To realize automatic measurement, it is necessary to high-precision stepper motor, and it is high
The large-scale mechanical movement controllable system price of precision is higher, will increase the cost of test macro, and increases the tune of system
Save difficulty.
(2) currently used glass sieve plate is three pairs of grooves, is easy to run out of visual field in adjustment process, and measurement accuracy is inadequate
It is high.
Summary of the invention
It is an object of the invention to solve existing focal length of lens test dress with the focal length of lens test method of no mechanical movement
It sets adjusting difficulty, survey the problems such as view precision is low, at high cost, it can quick, accurate detection automatically with test method of the present invention
The focal length of lens, it is easy to detect, precision is high, test scope is wide, at low cost.
A kind of focal length of lens test method of no mechanical movement, comprising the following steps:
(1) LED light source, Ronchi grating, parallel light tube, lens to be measured, electric control varifocal lens and microscope are set gradually
On test platform, Ronchi grating, parallel light tube, lens to be measured, electric control varifocal lens and microscope is made to be successively set on LED light
On the emitting light path in source;
(2) it by computer end control function generator, is applied on electric control varifocal lens to control high-voltage amplifier
Voltage, oscillograph are scanned the voltage being applied on electric control varifocal lens, the step-scan to voltage setting 0.1v, every step
It just controls microscope into 0.1v to take a picture, to obtain a series of photos;
(3) computer end is using a kind of improved sharpness evaluation function based on grey scale difference, to the eight of pixel I (x, y)
Difference is done in field, is judged point around each photo obtained in step (2), to obtain clarity highest one
Open photo;
(4) computer end utilizes a kind of nonlinear filter median filtering method, highest to the clarity obtained in step (3)
One photo carries out denoising, then carries out the correction process of image, specific steps are as follows:
A, detected using edge of the canny operator to photo, this method using the strong of two threshold test edges and
Weak value;
B, the straight line of edges is found;
C, the slope of straight line in step B is found out according to linear equation, and calculates the angle between straight line and vertical line, as
Then inclination angle carries out rotation correction to photo according to this angle;
(5) gray value of each column of photo after correction is added, using the row of pixel as horizontal axis, the gray value of column is made
For the longitudinal axis, the coordinate diagram drawn with software;Extreme point is Ronchi grating bright fringes position, the pixel separation of adjacent bright fringes
The as size of Ronchi grating is handled a plurality of bright fringes with the software of computer end, can obtain through microcobjective institute at
The size of picture, i.e. y3Average value;
(6) by y3Focal length of lens f to be measured can be acquired by substituting into following formula:
L in formula, m, V, f0, y0, it is known quantity, in which: y0For raster size, f0For the focal length of parallel light tube, m is aobvious
The magnifying power of speck mirror, L are lens to be measured at a distance from electric control varifocal lens, and V is the image distance being imaged through electric control varifocal lens.
Difference is done to eight fields of pixel I (x, y) described in above-mentioned steps (3), the position of eight neighborhood is shown below:
The improved sharpness evaluation function based on grey scale difference are as follows:
Wherein:
G1=| I (x, y)-I (x+1, y) |+| I (x, y)-I (x, y-1) |
G2=| I (x, y)-I (x, y+1) |+| I (x, y)-I (x-1, y) |
G3=| I (x, y)-I (x-1, y-1) |+| I (x, y)-I (x-1, y+1) |
G4=| I (x, y)-I (x+1, y-1) |+| I (x, y)-I (x+1, y+1) |
In formula: I (x, y) is the gray value of focal position, I (x+1, y), I (x, y-1), I (x, y+1), I (x-1, y), I
(x-1, y-1), I (x-1, y+1), I (x+1, y-1), I (x+1, y+1) are respectively 8 pixels around adjacent with I (x, y)
Gray value.G1、G2、G3、G4The sum of the grey scale difference absolute value of respectively I (x, y) and two pixels of surrounding.
A kind of applicable test device of the focal length of lens test method of no mechanical movement includes: LED light source, Ronchi grating,
Parallel light tube, lens to be measured, electric control varifocal lens and microscope are successively set on the emitting light path of LED light source;It is described automatically controlled
High-voltage amplifier is connected on zoom lens, high-voltage amplifier is connected to computer end by function generator, operates letter in computer end
Number generator provides different driving signals for high-voltage amplifier, to drive the focal length of electric control varifocal lens continuously adjustable;It is high
Pressure amplifier is connect with oscillograph, and the waveform of high-voltage amplifier output is detected on oscillograph;Microscope is connected to computer end, electricity
Voltage waveform that brain end is equipped on automatically scanning oscillograph, to obtain on high-voltage amplifier the software of driving voltage and right
Microscope the software that is handled at image.
Function generator is connected into high-voltage amplifier to obtain enough zoom lens driving voltages, then will be pressed from height
The waveform of big device output is detected on oscillograph, and function generator and high-voltage amplifier are connected to PC by USB interface
The automatically scanning of software realization voltage can be passed through.CCD camera is connected by USB interface with PC, may be implemented with software pair
Image is handled.The size that microscope imaging is measured by image measurement technology is obtained as the ratio between object, and then is obtained to be measured
Mirror focal length, without knowing the occurrence of electric control varifocal lens focal length.
Preferably, high-voltage amplifier output voltage range is 0-200 volt.High-voltage amplifier is for driving electric control zooming saturating
Mirror, the focal length to realize electric control varifocal lens is continuously adjustable, achieves that without mechanical movement burnt from the negative burnt lens to positive coke
Away from test.
Ronchi grating plays the role of graticle, and Ronchi grating has uniform fringe distribution, and groove is not easy to run out of view
, adjusting is adaptable, and can greatly improve the precision of measurement.
Technical effect of the invention:
Present invention greatly simplifies the processes for testing the focal length of lens to be measured, mechanical movement are not necessarily to, by the picture of Ronchi grating
Through lens to be measured and electric control varifocal lens on CCD, using electric control varifocal lens autozoom, measured on CCD in computer end
The clearest imaging obtained, and the size of the photo is taken pictures and calculates, it substitutes into formula and calculates the coke that lens to be measured can be obtained
Away from very high using method measurement accuracy of the present invention without knowing the specific focal length of electric control varifocal lens.
Detailed description of the invention
Fig. 1 is without mechanical moving lens focal length test device schematic diagram;
Fig. 2 is the connection schematic diagram of electric control varifocal lens and computer end;
Fig. 3 is that the image that CCD is obtained and clarity differentiate figure;Wherein Fig. 3 a is a series of photographs with voltage change obtained
Piece;Fig. 3 b is the differentiation of clearest photo;
Fig. 4 is that CCD obtains clearest image raster size measurement process figure;Fig. 4 a is the clearest photo obtained;Fig. 4 b
For image rectification;Fig. 4 c is bright fringes pixel separation.
Specific embodiment
The principle of the present invention are as follows:
As shown in Figure 1,2 size of Ronchi grating is y0, through parallel light tube 3 and lens to be measured 4 at lens focal plane to be measured
Imaging 5, size of the Ronchi grating through lens imaging to be measured is y1, then through the imaging of electric control varifocal lens 67, be imaged through zoom lens
Size be y2, be most imaged on CCD10 through microcobjective 8 afterwards, through microcobjective on CCD at picture 9 size be y3.When
The focal length variations of lens to be measured can obtain a clear figure by adjusting the driving voltage of electric control varifocal lens on CCD
Picture.The focal length of parallel light tube is f0, the focal length of lens to be measured is f, and the focal length of electric control varifocal lens is f1, lens to be measured with it is automatically controlled
The distance of zoom lens is L, and object distance and image distance through electric control varifocal lens imaging are respectively U and V, and the magnifying power of microcobjective is
m。
From the principle of magnifying power method:
From convex lens:
From microscope imaging:
It can be obtained by (1), (2), (3):
As shown in Figure 1:
U=L-f (5)
(5) are substituted into and arranges and can obtain in (4):
Ronchi grating size y0, determined by the specification of grating, be known quantity;The focal length f of parallel light tube0, by parallel light tube
Specification determines, is known quantity;The magnifying power m of microcobjective, is determined by microscopical model, is known quantity;Obtain L, the side of m, V
Method is: carrying out aforesaid operations with the lens to be measured of known focal length, when obtaining a clear image on CCD, obtains the size of the picture
y3, f, m, f in (6) formula at this time0, y0, y3It is to be counted it is known that carry out aforesaid operations with the lens to be measured of multiple known focal lengths
L is calculated, L, V is calculated in the equation of V, and the L, V are constant.
For example, using parallel light tube focal length f0For 500mm, y0For 0.2mm, electric control varifocal lens are the life of varioptie company
The Arctic316 type zoom lens of production, selected CCD camera are Daheng MER-125-30UM/UC-L series digit video camera,
For single pixel having a size of 3.75 μm of 3.75 μ m, m takes 10, is demarcated with two standard lens that focal length is known as 40mm and 120mm,
Y is measured according to the above method3Respectively 33.37 and 200.5 pixel separations, obtaining L is 200mm, V 50mm.
Therefore L, m, V, f in (6) formula0, y0, it is it is known that so measuring the y being imaged in CCD3Lens to be measured just can be obtained
Focal length f.
As shown in Fig. 2, building electric control varifocal lens system and image processing system.Function generator is connected into high voltage amplifier
Device is examined on oscillograph to obtain enough zoom lens driving voltages, then by the waveform exported from high-voltage amplifier
It surveys, function generator and high-voltage amplifier are connected to PC by USB interface can be by the automatically scanning of software realization voltage.
CCD camera is connected by USB interface with PC, may be implemented to handle image with software.
In order to measure the focal length of lens to be measured, by formula (6) as long as it is found that measuring the raster size y of micro-imaging3I.e.
Can, and y3It can be obtained by the processing of clearest photo captured in CCD camera.
Shown in complex chart 1,2, a kind of focal length of lens test device of no mechanical movement includes: LED light source, Ronchi grating,
Parallel light tube, lens to be measured, electric control varifocal lens and microscope are successively set on the emitting light path of LED light source;It is described automatically controlled
High-voltage amplifier is connected on zoom lens, high-voltage amplifier is connected to computer end by function generator, operates letter in computer end
Number generator provides different driving signals for high-voltage amplifier, to drive the focal length of electric control varifocal lens continuously adjustable;It is high
Pressure amplifier is connect with oscillograph, and the waveform of high-voltage amplifier output is detected on oscillograph;Microscope is connected to computer end, electricity
Voltage waveform that brain end is equipped on automatically scanning oscillograph, to obtain on high-voltage amplifier the software of driving voltage and right
Microscope the software that is handled at image.
A kind of focal length of lens test method of no mechanical movement, comprising the following steps:
(1) LED light source, Ronchi grating, parallel light tube, lens to be measured, electric control varifocal lens and microscope are set gradually
On test platform, Ronchi grating, parallel light tube, lens to be measured, electric control varifocal lens and microscope is made to be successively set on LED light
On the emitting light path in source;
(2) it by computer end control function generator, is applied on electric control varifocal lens to control high-voltage amplifier
Voltage, oscillograph are scanned the voltage being applied on electric control varifocal lens, the step-scan to voltage setting 0.1v, every step
It just controls microscope into 0.1v to take a picture, to obtain a series of photos, as shown in Figure 3a;
(3) computer end is using a kind of improved sharpness evaluation function based on grey scale difference, to the eight of pixel I (x, y)
Difference is done in field, is judged point around each photo obtained in step (2), to obtain clarity highest one
Open photo;Traditional grey scale difference evaluation function only both horizontally and vertically makes the difference gray value.Improved grey scale difference function
Difference is done to eight fields of pixel I (x, y), increases the judgement to surrounding point, improves the precision for obtaining clear image.To picture
Difference is done in eight fields of plain I (x, y), and the position of eight neighborhood is shown below:
The improved sharpness evaluation function based on grey scale difference are as follows:
Wherein:
G1=| I (x, y)-I (x+1, y) |+| I (x, y)-I (x, y-1) |
G2=| I (x, y)-I (x, y+1) |+| I (x, y)-I (x-1, y) |
G3=| I (x, y)-I (x-1, y-1) |+| I (x, y)-I (x-1, y+1) |
G4=| I (x, y)-I (x+1, y-1) |+| I (x, y)-I (x+1, y+1) |
In formula: I (x, y) is the gray value of focal position, I (x+1, y), I (x, y-1), I (x, y+1), I (x-1, y), I
(x-1, y-1), I (x-1, y+1), I (x+1, y-1), I (x+1, y+1) are respectively 8 pixels around adjacent with I (x, y)
Gray value.G1、G2、G3、G4The sum of the grey scale difference absolute value of respectively I (x, y) and two pixels of surrounding.
The sharpness evaluation function can obtain clearly image automatically and have both real-time, and the photo that will acquire passes through image
Clarity discriminant function calculates, and obtains clearest photo, as shown in Figure 3b.
(4) computer end utilizes a kind of nonlinear filter median filtering method, highest to the clarity obtained in step (3)
One photo carries out denoising, then carries out the correction process of image, specific steps are as follows:
A, detected using edge of the canny operator to photo, this method using the strong of two threshold test edges and
Weak value;By system multiple authentication, canny operator can accurately extract edge, and effect can reach experimental system requirement.
B, the straight line of edges is found;As shown in fig. 4 a.
C, the slope of straight line in step B is found out according to linear equation, and calculates the angle between straight line and vertical line, as
Then inclination angle carries out rotation correction to photo according to this angle;Photo after correction is as shown in Figure 4 b.
(5) gray value of each column of photo after correction is added, using the row of pixel as horizontal axis, the gray value of column is made
For the longitudinal axis, the coordinate diagram drawn with software, as illustrated in fig. 4 c;Extreme point is Ronchi grating bright fringes position, adjacent bright wisp
The pixel separation of line is the size of Ronchi grating, is handled with the software of computer end a plurality of bright fringes, can obtain warp
The size of microcobjective imaging, i.e. y3Average value;
Ronchi grating is more accurate, Divided errors very little, and the center line of every bright line is exactly that gray value is maximum.With software pair
A plurality of bright fringes is handled, and y can be obtained3Average value, to reduce error.
(6) by y3Focal length of lens f to be measured can be acquired by substituting into following formula:
L in formula, m, V, f0, y0, it is known quantity, in which: y0For raster size, f0For the focal length of parallel light tube, m is aobvious
The magnifying power of speck mirror, L are lens to be measured at a distance from electric control varifocal lens, and V is the image distance being imaged through electric control varifocal lens.
The lens to be measured in the above method are changed into standard lens that focal length is known as 40mm and 120mm, according to above-mentioned side
Method measures y3Respectively 33.37 and 200.5 pixel separations are respectively according to the measured value that lens are calculated in above-mentioned formula (6)
40.034mm and 120.12mm, it follows that, respectively 0.085% He very high using method measurement accuracy of the present invention
0.1%.