A kind of grid type sub-pixel extraction of calibrated points
Technical field
The invention belongs to Computerized three-dimensional vision measurement technology, relate to improvement grid target point grid point sub-pixel extraction.
Background technology
In the Computerized three-dimensional vision measurement, usually need utilize the three dimensional space coordinate of target calibration point and the model parameter that the two dimensional image coordinate comes calibration system thereof, wherein, the target calibration point pattern that is adopted and the extraction algorithm of respective image coordinate will directly influence the precision and the stability of calibration result.The grid target point (see figure 1) is that the target pattern is used in a kind of vision system demarcation relatively more commonly used, in order to guarantee the stated accuracy of system, need reach sub-pixel to the extraction result of calibration point image coordinate usually.Traditional grid point sub-pixel extraction mainly is to extract near the lines central point of grid point earlier, carries out fitting a straight line then, determines the sub-pixel location of grid point again by the intersection point that calculates two straight lines.The shortcoming of this algorithm mainly contains: need to extract earlier the lines central point on the one hand, leaching process is loaded down with trivial details; When there was distortion in camera lens, near the lines central point the grid point was not to distribute in strict accordance with straight line on the other hand, therefore, utilized the method for fitting a straight line find intersection bring error can for actual extraction, and it is not high to extract precision.
Summary of the invention
The objective of the invention is:, propose a kind of grid target point sub-pixel extraction that extract, that leaching process is simple, precision is high that is used at the deficiency of existing method.
Technical scheme of the present invention is: a kind of grid type sub-pixel extraction of calibrated points, it is characterized in that,
1, utilize the Hessian matrix to judge the location of pixels of grid point;
Decision condition obtains according to the eigenwert of Hessian matrix, the expression formula of Hessian matrix as shown in Equation 1:
Wherein, f
Xx, f
Xy, f
YyBe respectively the second-order partial differential coefficient of gradation of image with respect to x, y, Gauss operator convolution by gradation of image and corresponding differential form obtains, for grid target point, two eigenwerts of Hessian matrix just are, and judge that then the shape operator S of grid type point location of pixels is expressed as:
Wherein, λ
1, λ
2Be the eigenwert of Hessian matrix, ideally the positive extreme point of the S value of grid point near zone distribution is the location of pixels of grid point;
2, determine the sub-pixel location of grid point by hierarchical search;
2.1, near the grid point in the ideal image ± sub-pixel location point in 1 pixel coverage carries out gray-level interpolation, make the curved surface that obtained behind the gray-level interpolation be zero at the grid point place along the first order derivative of all directions, the constraint condition that obtains searching for the grid point sub-pixel location is as follows:
min(r
x 2(x
0+s,y
0+t)+r
y 2(x
0+s,y
0+t))|
(s,t)∈[-1,1]×[-1,1](3)
Wherein, (x
0, y
0) be the location of pixels of grid point, r
x(x
0+ s, y
0+ t), r
y(x
0+ s, y
0+ t) be respectively point (x
0+ s, y
0+ t) locate the single order partial derivative of gradation of image with respect to x, y;
2.2, be the center with the location of pixels that obtains in 1.1, to its ± sub-pixel location point in 1 pixel coverage carries out gray-level interpolation, interpolation is elected 0.1 pixel at interval as, further judges the grid central point according to constraint condition (3) then; Be the center with this point again, to its ± sub-pix point in 0.1 pixel coverage carries out gray-level interpolation, interpolation is spaced apart 0.01 pixel, and then judges grid point according to constraint condition (3); By that analogy, carry out hierarchical search, the search number of plies is 2~6 layers, till satisfying the predetermined precision requirement.
Advantage of the present invention is:
(1) with respect to the extracting method of traditional fitting a straight line find intersection, the present invention is according to the gray feature of topography, can obtain the sub-pixel location of grid point very soon by hierarchical search, and leaching process is simple.
(2) the present invention just utilizes the gradation of image in the grid point close region, therefore, even exist at image under the situation of distortion and big noise, still has higher extraction precision.
Description of drawings
Fig. 1 is the target synoptic diagram with grid target point.
Fig. 2 is that the S value of ideally grid point near zone distributes, and its positive extreme point is a grid point.
Fig. 3 be near the grid point in the ideal image ± sub-pixel location point in 1 pixel coverage carries out the result after the gray-level interpolation.
Fig. 4 is the hierarchical search synoptic diagram in the inventive method.
Fig. 5 is the virtual plane target that the embodiment of the invention is used.
Fig. 6 is the target image of Fig. 5 target after the virtual video camera imaging.
Embodiment
The present invention mainly is the variation of image grayscale according to the grid point near zone, utilizes the location of pixels of the eigenwert judgement grid point of Hassian matrix, on this basis, determines the sub-pixel location of grid point by hierarchical search.Concrete scheme is as follows:
(1) utilize the Hessian matrix to judge the location of pixels of grid point
Before the sub-pixel location of extracting grid point, need to judge earlier the location of pixels of this point, decision condition can obtain according to the eigenwert of Hessian matrix.The expression formula of Hessian matrix is as shown in Equation 1:
Wherein, f
Xx, f
Xy, f
YyBe respectively the second-order partial differential coefficient of gradation of image, can obtain by the Gauss operator convolution of gradation of image and corresponding differential form with respect to x, y.For grid target point, two eigenwerts of Hessian matrix just are, and judge that then the shape operator of grid type point location of pixels is expressed as:
Wherein, λ
1, λ
2Eigenwert for the Hessian matrix.Fig. 2 is that the S value of ideally grid point near zone distributes, and its positive extreme point is a grid point.
(2) determine the sub-pixel location of grid point by hierarchical search
After location of pixels, can determine that the sub-pixel location of grid point promptly is positioned at this pixel adjacent domain according to shape operator preliminary judgement grid point.Fig. 3 be near the grid point in the ideal image ± sub-pixel location point in 1 pixel coverage carries out the result after the gray-level interpolation, this curved surface is zero at the grid point place along the first order derivative of all directions, can search for the constraint condition of grid point sub-pixel location:
min(r
x 2(x
0+s,y
0+t)+r
y 2(x
0+s,y
0+t))|
(s,t)∈[-1,1]×[-1,1](3)
Wherein, (x
0, y
0) be the location of pixels of grid point, r
x(x
0+ s, y
0+ t), r
y(x
0+ s, y
0+ t) be respectively point (x
0+ s, y
0+ t) locate the single order partial derivative of gradation of image with respect to x, y.
In order to improve search speed, can adopt the method for hierarchical search.As shown in Figure 4, utilize shape operator (2) to judge the location of pixels of grid point earlier, be the center with this point then, to its ± sub-pixel location point in 1 pixel coverage carries out gray-level interpolation, interpolation is elected 0.1 pixel at interval as, further judge the grid central point according to constraint condition (3) then, be the center with this point again, to its ± sub-pix point in 0.1 pixel coverage carries out gray-level interpolation, interpolation is spaced apart 0.01 pixel, and then according to constraint condition (3) judgement grid point, by that analogy.When carrying out actual grid point extraction, the search number of plies is made as 3, and last interpolation is made as 0.001 pixel at interval, can satisfy actual calibration request.
Simulation example
It below is one group of simulation example.Fig. 5 is a virtual plane target that is generated by computing machine, has 144 grid points on the target, every distance between two points 16mm.The image resolution ratio of virtual video camera is made as 512 * 512; Inner parameter is set at: α=1000, β=1000, γ=0, u
0=256, v
0=256; External parameter is set at: r
1=[0.951-0.174 0.255]
T, r
2=[0.168 0.9850.045]
T, t=[00500]
TThe lens distortion parameter setting is: k
1=-0.22, k
2=0.20.Fig. 6 is the target image after the virtual video camera imaging.Table 1 is the contrast that classic method and new method are extracted the result, and extraction precision of the present invention is better than classic method.
The extraction precision of two kinds of methods of table 1
| Noise level |
Extract precision |
| Classic method |
New method |
| 0 |
0.105 |
0.048 |
| 0.02 |
0.106 |
0.054 |
| 0.04 |
0.108 |
0.069 |
| 0.06 |
0.108 |
0.089 |
| 0.08 |
0.112 |
0.111 |