A precise positioning method based on the central image point of a circular target
By using the Sobel operator and ellipse fitting of eight direction templates combined with the projective geometry correction algorithm, the problems of edge detection error and perspective projection deviation in circular target positioning are solved, achieving higher positioning accuracy.
Patent Information
- Application Number
- CN202310193055.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2043-03-03
AI Technical Summary
In the precise positioning of circular targets, existing technologies have difficulty in effectively reducing edge detection errors and center deviations caused by perspective projection, which affects the accuracy of imaging measurements.
The Sobel operator of eight directional templates is used for sub-pixel subdivision calculation, combined with ellipse fitting and projective geometry correction algorithms to accurately locate the central image point of the circular target.
The accuracy of circular target positioning is improved, and the positioning error is reduced from 0.1149% to 0.019%.
Smart Images

Figure CN116309401B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer technology, and in particular relates to a method for accurately positioning a circular cooperative target. Background Art
[0002] In the real world, circles are common geometric features, and research on positioning and pose calculation based on geometric features such as points, lines, and circles is extensive. Compared to points and lines, circles have many parameters and strong constraints. Circular target center localization technology is widely used in camera calibration, visual navigation, and industrial defect detection. Accurately obtaining the true projected position of the center of the circle on the image is a key issue affecting the accuracy of circular target imaging measurements. Besides being affected by lighting conditions and the measurement environment, key factors affecting circular target center localization accuracy include edge detection algorithm errors, circle center fitting errors, and center deviation caused by perspective projection transformation. In perspective projection imaging, circular targets are often imaged as ellipses. The center of the ellipse and the imaged center do not coincide, resulting in center deviation. Directly replacing the actual image point of the circular target center with the center image point of the projected ellipse on the image plane will inevitably introduce errors in positioning. Therefore, in the precise localization of circular targets, in addition to accurately obtaining the position of the imaged circle or ellipse, it is necessary to correct for center projection deviation. Summary of the Invention
[0003] This technical solution proposes a precise positioning method based on the central image point of a circular target, which has stronger noise resistance and higher positioning accuracy.
[0004] Considering that the edge gradient of a circular target is directional, in order to reduce the error of edge detection, the Sobel operator (Sobel operator) of eight directional templates is first used to perform sub-pixel subdivision calculations to obtain the coordinates of the sub-pixel edge points; secondly, the obtained ellipse sub-pixel edge points are subjected to high-precision ellipse fitting; then, after obtaining the accurate ellipse center positioning, in order to eliminate the center deviation caused by perspective projection, the fitted ellipse parameters are corrected for the center projection using a correction algorithm that is simpler and easier to execute than other methods, thereby accurately obtaining the true projection point of the center of the circular target in the image and achieving precise positioning of the circular target. Finally, experimental verification was carried out on both simulated and real images. The results show that the algorithm of this technical solution has stronger noise resistance and higher positioning accuracy. The relative positioning error can be reduced from 0.1149% to 0.019%.
[0005] The precise positioning of circular targets is a key factor affecting the accuracy of optical imaging measurements based on circular cooperative targets. In addition to being affected by environmental factors such as lighting conditions and measurement background, the target precise positioning algorithm plays a key role in the positioning accuracy of the center of the circular cooperative target. This technical solution proposes a method for accurately positioning the center of a circular target. In order to reduce edge detection errors, eight directional templates constructed using the classic Sobel operator are used to process the grayscale image to obtain a gradient image. Then, a polynomial interpolation method is used to perform sub-pixel subdivision calculation along the gradient direction of the target edge on the gradient image to accurately locate the target edge in sub-pixels. Furthermore, the obtained sub-pixel edge points are fitted with an ellipse using a second-order noise precision fitting method. Finally, in order to eliminate the center deviation caused by perspective projection, the fitted ellipse parameters are used to correct the center using the principles of projective geometry, thereby accurately obtaining the true projection point of the center of the circular target in the image. This method has higher positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Figure 1 This is a flow chart of the algorithm for accurately positioning the central image point of a circular target according to the present invention.
[0007] Figure 2 These are eight gradient image results during the edge detection process.
[0008] Figure 3 is a circle test image.
[0009] Figure 4 It is a circular logo.
[0010] Figure 5 The simulated original image and the noised image.
[0011] Figure 6 It is a space circle, its projection image and an image containing Gaussian noise. DETAILED DESCRIPTION
[0012] A precise positioning method based on the central image point of a circular target is used to calculate the sub-pixel coordinates of the processed image edge information, including:
[0013] Step 1: Convolve each pixel in the image with eight templates using the Sobel operator, and use the eight template convolutions to generate a gradient image. The point with the maximum gradient amplitude is the integer coordinate of the edge.
[0014] Step 2: After the edge is accurately located to a pixel precision, sub-pixel subdivision calculation is performed. The Sobel operator is used on the grayscale image without denoising to obtain the target circle pixel-level edge point (X i ,Y j) area to calculate sub-pixel coordinates. Use the eight direction templates of the Sobel operator to convolve the edge points one by one, and take the maximum value as the edge point (X i ,Y j ) is the gradient magnitude G(i,j).
[0015] Find edge points along the gradient direction of edge points (X i ,Y j )’s neighboring points, calculate the edge points (X i ,Y j )The gradient magnitude of the neighboring points.
[0016] In the horizontal direction, the edge point (X i ,Y j )The neighboring point with a distance of 1 pixel is (X i-1 ,Y j ) and (X i+1 ,Y j ); in the vertical direction, the edge point (X i ,Y j )The neighboring point with a distance of 1 pixel is (X i ,Y j-1 ) and (X i ,Y j-1 ), use the Sobel operator to obtain the gradient amplitude of the neighboring points. The gradient amplitude of any point is represented by G. The gradient amplitude of the edge point is represented by G i,j , the gradient amplitude of the edge point adjacent to the pixel point is G -1 , G1 represents. In the horizontal direction, G1=G i-1,j , G -1 =G i+1,j ; In the vertical direction, G1=G i,j-1 , G -1 =G i,j+1 ; In the diagonal direction, G1=G i+1,j+1 , G -1 =G i-1,j-1 .
[0017] The function value is the gradient amplitude of the edge point and its neighboring points in the gradient direction. The edge point and its neighboring points are used as the interpolation base points. Substitute the quadratic polynomial interpolation function. θ is the angle between the gradient direction and the positive X-axis. By extrapolation, the sub-pixel coordinates in the horizontal and vertical directions are:
[0018]
[0019]
[0020] The sub-pixel coordinates in the diagonal direction are:
[0021]
[0022]
[0023] Step 2: Due to the influence of noise, the obtained edge points deviate from the true value; the second-order noise precision fitting method takes into account the statistical characteristics of noise, removes the noise influence components on the basis of the traditional least squares method, and can more accurately obtain the ellipse parameters, which is superior to the traditional fitting method in terms of noise resistance.
[0024] Perform second-order noise accuracy fitting calculation on the obtained sub-pixel coordinates, including:
[0025] The ellipse equation is fitted using the detected ellipse edge points. The general equation for a plane ellipse is: Au 2 +Buv+Cv 2 +Du+Ev+F=0, A, B, C, D, E and F are the parameters of the elliptic equation. The elliptic equation is written in the form of the inner product of two vectors (P,μ)=0, P=(u 2 ,uv,v 2 ,u,v,1) T ,μ=(A,B,C,D,E,F) T
[0026] and Indicates the sample point for obtaining pixel coordinates, which is affected by noise factors. and Deviate from their true values. Assume that the sample point data and The deviations from their true values u and v are Δu and Δv respectively, then:
[0027] vector It can be expressed as:
[0028]
[0029] Can be decomposed into in:
[0030] P1=(uΔu,vΔu+uΔv,vΔv,Δu,Δv,1) T , P2=(Δu 2 ,ΔuΔv,Δv 2 ,0,0,0) T .
[0031] The solution calculated by the least squares method Expressed as: where Δ k μ is the k-th order term of the noise components Δμ, Δv.
[0032] This means that the least squares method is used to solve It is not completely consistent with the expected value E(μ). Expressed as: where Δ k μ is the kth order term of the noise components Δμ and Δv. Since Δ1μ is a linear expression of Δu and Δv, E[Δ1μ]=0. However, E[Δ2μ]≠0, using the calculated Subtracting E[Δ2μ], we can get Production ratio Higher precision.
[0033] Consider the noise terms Δu and Δv as random variables and define the covariance matrix: V[P α ]=E[P1P1 T ].
[0034] Assume that Δμ and Δv follow independent Gaussian distributions with mean 0 and standard deviation σ.
[0035] use Calculate the covariance matrix.
[0036] The iterative reweighting method can be used to decompose the characteristic matrix from (P,μ)=0 satisfy W α Represents the corresponding weight, and the minimum eigenvalue corresponding to
[0037] σ 2 The estimated value of is calculated using the following formula:
[0038] The calculated correction difference is:
[0039]
[0040] For the second-order noise term E[P2] = σ 2 e defines the vector e, where e = (1,0,1,0,0,0) T , is the pseudo-inverse matrix of the matrix M with truncated rank of 5. After correction
[0041] Step 3: Ellipse parametric equation Au 2 +Buv+Cv 2 +Du+Ev+F=0 is written in the form of vector and matrix multiplication, as follows:
[0042] Where f0 is a constant for resizing.
[0043] The coefficient matrix Q of the ellipse is transformed as follows:
[0044]
[0045] calculate The eigenvalues λ1, λ2 and λ3 of .
[0046] Arrange in the order of λ2≥λ1>0>λ3.
[0047] Let e1, e2, and e3 be the corresponding unit eigenvectors. Calculate the unit vector n perpendicular to the ellipse support surface:
[0048]
[0049] Calculating vectors
[0050] The corrected coordinates of the center point can be expressed as
Claims
1. A precise positioning method based on the central image point of a circular target, characterized in that The steps include: Step 1: Grayscale the input image and perform Gaussian smoothing noise reduction; Step 2: Calculate sub-pixel coordinates of the processed image edge information; Step 3: Fit the obtained sub-pixel coordinates to an ellipse with second-order noise accuracy; Step 4: The ellipse parameters obtained by fitting the ellipse are used to calculate the center deviation projection and then obtain the coordinates of the real projection point; The step 2 includes: 2.1) Convolve each pixel in the image with the eight templates using the Sobel operator, and use the eight template convolutions to generate a gradient image. The point with the maximum gradient amplitude is the integer coordinate of the edge; 2.2) After the edge is accurately located to a pixel precision, sub-pixel subdivision calculation is performed; the Sobel operator is used on the grayscale image without denoising to obtain the target circle pixel-level edge point (X i ,Y j ) area to calculate sub-pixel coordinates; use the eight direction templates of the Sobel operator to convolve the edge points one by one, and take the maximum value as the edge point (X i ,Y j )’s gradient magnitude G(i,j); 2.3) Using the gradient amplitude of the edge point and its neighboring points in the gradient direction as the function value, and the edge point and its neighboring points as the interpolation base points, substitute the quadratic polynomial interpolation function; and obtain the sub-pixel coordinates of the point through polynomial interpolation. The process of step 3 includes: assuming that the data and The deviations from their true values u and v are Δu and Δv respectively, then but Expressed as Decompose into Where P1=(uΔu,vΔu+uΔv,vΔv,Δu,Δv,1) T P2=(Δu 2 ,ΔuΔv,Δv 2 ,0,0,0) T This means that the least squares method is used to solve It is not completely consistent with the true value E(μ); the calculated solution Expressed as: where Δ k μ is the kth order term of the noise components Δμ and Δv; since Δ1μ is a linear expression of Δu and Δv, E[Δ1μ]=0; however, E[Δ2μ]≠0, using the calculated Subtract E[Δ2μ] and we get Production ratio Higher accuracy; The step 4 comprises: 4.1) Normal to the circular plane in space: Ellipse equation Au 2 +Buv+Cv 2 +Du+Ev+F=0 is written in the form of vector and matrix multiplication, as follows: f0 is the proportional coefficient for adjusting the size of the ellipse, and f is the focal length of the camera; the coefficient matrix Q of the ellipse is transformed into: calculate The eigenvalues λ1, λ2, and λ3 of , and arrange them in the order λ2 ≥ λ1 > 0 > λ3; let e1, e2, and e3 be the corresponding unit eigenvectors; calculate the unit vector n perpendicular to the elliptical support surface: 4.2) Center calibration Calculate vector m=(m i ); The corrected center point coordinates are expressed as
Citation Information
Patent Citations
Control method and system for improving calibration accuracy of camera
CN108898635A
Analysis method of electronic spotting scope for automatically analyzing shooting accuracy
US10107594B1