Embodiment
The irregular laser focal spot image adaptive of diffraction grating focalizer, comprises laser instrument 1, laser diffraction grating 2, plus lens 3, plane mirror 4, CCD5 and two-dimensional movement platform 6 axial for CCD5 and that horizontal direction moves; Laser instrument 1, laser diffraction grating 2, plus lens 3, plane mirror 4 set gradually along the primary optical axis direction of laser instrument 1 outgoing beam; Laser diffraction grating 2 is arranged near plus lens 3 one sides and is parallel to each other with plus lens 3, plane mirror 4.
Referring to Fig. 1, optical texture and the ultimate principle of the irregular laser focal spot focus adjustment of heavy caliber diffraction grating, be placed on laser instrument the focus " O of plus lens
1" point position, plus lens is a convexo-convex mirror, through overfocus " O
1" light of point propagates from right to left, seeing through successively can disperse after diffraction grating and plus lens becomes directional light (light emitting from lens focus after lens can along lens axis direction horizontal infection); Place a plane mirror in plus lens leftward position and perpendicular to plus lens optical axis direction, directional light incides plane mirror from plus lens, after plane mirror reflection, the diffraction sampling after plus lens and diffraction grating of the directional light of gained separates, form two-way light beam, reference path " the O O in corresponding diagram
1" and object light road " O O
2", wherein the light in reference path will converge to " O
1" point diffraction, the light on object light road will converge to " O
2" point diffraction.
" O
1" put the focus for plus lens, laser instrument is placed on " O
1" position; Plane mirror is perpendicular to the primary optical axis of plus lens and be placed on the left side of plus lens; Diffraction grating is placed between laser instrument and plus lens and near plus lens one side, and direction is parallel with level crossing with plus lens; CCD is placed in the direction on object light road and guarantees that the light on object light road can all be imaged onto on the target surface of CCD.
The irregular focal spot image adaptive of diffraction grating focuses on the difference between position of form center and the CCD target surface center of the laser focal spot image exactly CCD being collected and the difference between major and minor axis to be changed and resolves the distance that need to move for horizontal direction and axially-movable equipment, and determine moving direction according to difference symbol, change the image formation state of laser facula on CCD target surface by tangential movement and the axially-movable of controlling CCD, complete focus search.
Referring to Fig. 2, the utility model provides the irregular laser focal spot image adaptive of diffraction grating focus method, comprises following flow process:
1] gather the irregular laser focal spot image of a width diffraction grating to computing machine by CCD;
2] the irregular laser focal spot image collecting in step 1 is carried out to the calculating of image position of form center;
2.1] calculate and determine optimum thresholding δ, and setting the gray-scale value that represents (i, j) point with f (i, j);
2.1.1], using brightness value as horizontal coordinate, the frequency that brightness occurs, as vertical coordinate, is drawn brightness histogram, chooses the brightness value T corresponding to maximal value of the gray scale frequency of occurrences
n;
2.1.2] with T
nas the focal spot of initial image segmentation and the thresholding of background, and calculate respectively the average M of focal spot and background by formula
0and N
0; The computing formula of the average of described focal spot and background is:
Described object and background represent object/focal spot; Described
objectf (i, j) and
backgroundf (i, j) represents the gray-scale value of (i, j) point in focal spot region, described ∑
(i, j) ∈ objectf (i, j) and ∑
(i, j) ∈ backgroundf (i, j) represent focal spot region gray scale summation a little; Described #object_pixels and #background_pixels represent respectively total number of the pixel in focal spot region and in background area;
2.1.3] according to the focal spot average M of step 2.1.2
0average N with background
0, calculate the thresholding T of next focal spot and background by formula
n+1; The computing formula of the thresholding of described focal spot and background is:
2.1.4] pass through recursive operation method the repeating step 2.1.2 operation to step 2.1.3;
In the time of the t time computing, calculate respectively the average M of focal spot and background according to formula
tand N
t, and focal spot and the background thresholding in the time of the t time computing, image cut apart are set as T
t, and draw the thresholding T of next step focal spot and background
t+1;
If T
t=T
t+1, stop calculating, and to make optimum thresholding δ be focal spot and background thresholding T
t+1(δ=T
t+1); If T
t≠ T
t+1, repeating step 2.1.2 is to step 2.1.3, until result of calculation T
t=T
t+1till;
2.2] according to the optimum thresholding δ of gained in step 2.1, the image collecting in step 1 is carried out to thresholding processing, obtain corresponding bianry image, and represent brightness value with g, described function formula can be described as:
2.3] bianry image of gained in rapid 2.2 is carried out to open and close computing repeatedly with the structural element that size is 3 X 3, and form the region of a series of non-UNICOMs;
2.4] to a series of non-UNICOM region in step 2.3, from upper left side, utilize 8 to carry out border tracking computing to chain code, obtain serial non-UNICOM region;
2.5] sorted according to size in non-the series in step 2.4 UNICOM region, form chain code table, and select the region of area maximum as the effective coverage of focal spot;
2.6] the focal spot effective coverage in step 2.5 is filled by white, remainder is filled with black, obtains the effective bianry image of the irregular laser focal spot of the diffraction grating corresponding with the image collecting in step 1;
2.7] size of the effective bianry image of irregular diffraction grating in step 2.6 laser focal spot is made as to X × Y pixel, and set f[i, j] i of representative image is capable, the grey scale pixel value of j row, calculates the position of form center of the effective bianry image of the irregular laser focal spot of diffraction grating by formula; Described formula is calculated as:
The position of form center of the effective bianry image of the irregular laser focal spot of described diffraction grating is the position of form center of the irregular laser focal spot image of diffraction grating;
3] position of form center and the CCD target surface center of the irregular laser focal spot image of diffraction grating calculating in step 2 are compared, and need in the horizontal direction mobile distance and direction according to the variation adjustment CCD of distance between the image centre of form and CCD target surface center, as follows to CCD position adjustments step in the horizontal direction:
3.1] preserve the difference between the image position of form center and the CCD target surface center that are obtained by step 2, then CCD along continuous straight runs is moved to preset distance, and repeating step 1 and step 2 operate, until obtain the position of form center of time piece image; Described CCD along continuous straight runs moves preset distance capable of regulating;
3.2] calculate and preserve the difference between image position of form center new in step 3.1 and CCD target surface center, change of distance between the image position of form center collecting for twice according to front and back and CCD target surface center is adjusted the motion of CCD along continuous straight runs, step 3.2 is carried out to repeatedly iteration, and in the time that the aberration between image position of form center and CCD target surface center is less than 3 pixels, the adjustment of this CCD along continuous straight runs finishes;
4], after the irregular hot spot position of form center of diffraction grating is adjusted to the target surface center of CCD, use CCD Resurvey piece image to computing machine; The image of described new collection is for calculating the length axial length of the irregular laser focal spot of diffraction grating;
5] effective bianry image corresponding to the irregular laser focal spot image of diffraction grating collecting according to step 2.1 to the method for operating calculation procedure 4 of step 2.6, and distance between two picture elements that on the focal spot border in effective bianry image, distance is the longest is long as the major axis of present image, the distance between two the shortest picture elements is long as the minor axis of present image;
6] calculate and preserve the difference between the length axial length of step 5 gained image, by CCD mobile preset distance vertically, and repeating step 5, until obtain the difference between lower piece image length axial length;
7] difference of the major and minor axis of two sub-pictures that obtain is before compared, diminish if major and minor axis is poor, continue CCD to move according to former direction; If the poor change of major and minor axis is large, using the overall length of axially-movable as radix and carry out golden section computing, when obtaining needing, after mobile length, CCD is carried out to counter motion; And repeating step 5 to the operation of step 7 until the difference of major and minor axis be tending towards 0 and major and minor axis adjustable-length hour this CCD adjustment vertically finish;
Axially adjust according to being regional center square theory, regional center square theoretical description is as follows:
For arbitrary image, the area a in region is exactly counting in region | and R|, can be expressed as:
(formula one)
If represent region with the non-zero pixels point in image, when p >=0, q >=0 o'clock, (p, q) rank square is defined as:
(formula two)
Wherein, (r, c) represents pixel coordinate, and f (r, c) represents the gray scale corresponding to (r, c) point, in two-value situation, and m
0,0it is exactly region area; Change and the feature of variation in order to obtain not relying on area size, in the time of p+q>=1, can obtain normalized square with (formula two) divided by (formula one):
(formula three)
By the known (n of formula three
1,0, n
0,1) be the center of gravity in region, when (p+q>=2), can obtain the not center square with picture centre change in location and be:
(formula four)
For the ellipse shown in Fig. 3, its major axis r
1with minor axis r
2can be calculated by (formula five) and (formula six) two formulas:
(formula five)
(formula six)
Can draw by my door of oval parameter: anisotropy r
1/ r
2, it is invariable that this characteristic quantity will keep in the time of area zoom; Known according to anisotropic theory, work as r
1/ r
2≈ 1 and r
1, r
2adjustable-length hour focal spot area is minimum; If carry out axial adjustment using ratio of semi-minor axis length as feedback signal, can dwindle fast spot area at the adjustment initial stage, but in the time of major and minor axis approximately equal, a small sample perturbations will cause the vibration of closed loop procedure; In order to meet simplified operation and accurately to judge two of focal positions condition simultaneously, the utility model adopts the poor axial adjustment of carrying out CCD as feedback signal of major and minor axis, when the difference of the major and minor axis of laser focal spot goes to zero and major and minor axis adjustable-length for hour, the now area minimum of the irregular laser focal spot image of diffraction grating;
8] repeating step 1 is to the operation of step 7, finishes until the area of the irregular laser focal spot image of diffraction grating hour focuses on to adjust.
The utility model is for overcoming at the irregular laser focal spot image of whole during focusing Large diameter diffraction grating in constantly variation and all the time irregular problem, and based on centroid method and regional center square theory, propose to be used as with the difference of the centre of form of the irregular laser focal spot image of diffraction grating and the target surface center of CCD and major and minor axis subtractive combination the irregular laser focal spot image adaptive of the heavy caliber diffraction grating focalizer of feedback signal, the little speed of this device calculated amount is fast, there is higher degree of accuracy and consistance, for the automatic focus of heavy caliber diffraction grating provides the solution of core the most.