A light spot extraction method based on non-uniform scale Hessian matrix

By constructing a light spot extraction method based on a non-uniform scale Hessian matrix, the accuracy problem of light spot center extraction under non-uniform imaging conditions is solved, sub-pixel positioning of the light spot center is achieved, and the resolution and accuracy of the light spot image are improved.

CN114821104BActive Publication Date: 2025-09-12JIANGSU JITRI INTELLIGENT OPTOELECTRONIC SYST RES INST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210448876.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2025-09-12
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

Traditional methods have difficulty in accurately extracting the center of the light spot under non-uniform imaging conditions, which leads to scale changes in the light spot image and affects the resolution and accuracy.

Method used

A light spot extraction method based on non-uniform scale Hessian matrix is ​​adopted. By constructing a non-uniform scale Gaussian convolution template and a normalized Hessian matrix determinant operator, combined with the second-order Taylor expansion, the sub-pixel level extraction of the light spot center is achieved.

Benefits of technology

Under non-uniform imaging conditions, the positioning accuracy and adaptability of the light spot center are improved to meet the requirements of precise image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114821104B_ABST
    Figure CN114821104B_ABST
Patent Text Reader

Abstract

The present invention provides a light spot extraction method based on a non-uniform scale Hessian matrix. The method can ensure the accuracy of the light spot center while performing sub-pixel extraction of the light spot center, thereby meeting the requirements of precise image processing. The method comprises the following steps: S1, obtaining a non-uniform light spot image, binarizing the light spot image, and determining an initial scale value of a Gaussian convolution kernel; S2, establishing a Gaussian convolution template of a non-uniform scale according to the initial scale value; S3, constructing a determinant operator of a normalized Hessian matrix according to the Gaussian convolution template; S4, obtaining the Gaussian template scale when the determinant operator value is maximum, and using the image point coordinates at the Gaussian template scale as the pixel-level coordinates of the light spot center; and S5, performing sub-pixel center extraction in the obtained light spot image center area according to the pixel-level coordinates of the light spot center, thereby obtaining the sub-pixel coordinate position of the light spot center.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of dynamic precision spatial position measurement, and in particular to a light spot extraction method based on a non-uniform scale Hessian matrix. Background Art

[0002] Light spots are an important type of target feature for feature extraction. Using them as target features can effectively reduce the overall measurement error of the measurement system. For the sub-pixel extraction of light spot features from ordinary area array cameras, the commonly used extraction methods are the centroid method and the sub-pixel center extraction method based on the Hessian matrix. Among them, the method based on the Hessian matrix is ​​popular because of its high accuracy and mature theoretical basis. Ideally, the grayscale distribution of the light spot image is similar to the two-dimensional Gaussian distribution, and the Gaussian kernel scales in two different image directions are consistent; however, due to the existence of one-dimensional binning, the Gaussian kernel scale of the light spot image changes in the binning direction. For traditional area array cameras, after the area array imaging unit of the one-dimensional binning becomes an equivalent narrow area array, the scale of the light spot image extracted by this extraction method will change according to the binning direction. The specific changes are as follows: Figure 1 As shown from left to right, one-dimensional binning will lead to non-uniform imaging of light spots, affecting the grayscale distribution characteristics of the light spots and reducing the resolution of the light spot image in the binning direction; the traditional center of gravity method and Hessian matrix method have not proposed corresponding improvements to this phenomenon, making it difficult to ensure the accuracy of the light spot center. This shows that there are still deficiencies in the current accurate image processing of non-uniformly imaged light spots. Summary of the Invention

[0003] To address the above problems, the present invention provides a light spot extraction method based on a non-uniform scale Hessian matrix, which can ensure the accuracy of the light spot center while performing sub-pixel extraction of the light spot center, thereby meeting the requirements of precise image processing.

[0004] In order to achieve the above-mentioned purpose and the above-mentioned technical effect, the technical solution adopted by the present invention is:

[0005] A light spot extraction method based on a non-uniform scale Hessian matrix, characterized by comprising the following steps:

[0006] S1. Obtain a non-uniform light spot image, binarize the light spot image, and determine the initial scale value σ of the Gaussian convolution kernel g ;

[0007] S2, according to the initial value of scale σ g Establish a Gaussian convolution template g(x,y) of non-uniform scale;

[0008] S3. Construct the determinant operator C of the normalized Hessian matrix according to the Gaussian convolution template g(x,y);

[0009] S4, obtaining the Gaussian template scale when the determinant operator C value is maximum, and using the image point coordinates at the Gaussian template scale as the pixel-level coordinates of the light spot center;

[0010] S5. Perform sub-pixel center extraction in the obtained center area of ​​the light spot image according to the pixel-level coordinates of the light spot center, and then obtain the sub-pixel coordinate position of the light spot center.

[0011] Furthermore, in step S1, the maximum number of pixels in the x and y directions of the binarized non-uniform light spot image is taken as the diameter d of the light spot, and the initial scale value σ of the Gaussian convolution kernel is solved according to the diameter d of the light spot. g ,in,

[0012] Furthermore, step S2 includes the following steps:

[0013] S2.1. Set the standard discrete Gaussian convolution kernel function expression as:

[0014]

[0015] where σ x is the scale of the Gaussian kernel; the standard discrete Gaussian convolution kernel function is also the Gaussian convolution template g(x,y);

[0016] S2.2. For non-uniform images, it is necessary to introduce two different scales σ into the Gaussian convolution template g(x,y) x1 , σ x2 , so that the scale of the Gaussian kernel function matches the scale of its light point, and its expression is:

[0017]

[0018] Among them, σ x1 =σ g / B,σ x2 =σ g , B is the multiple of non-uniform image binning;

[0019] Then we have:

[0020] Furthermore, step S3 includes the following steps:

[0021] S3.1. Any pixel p in the non-uniform light spot image = (x, y) T The Hessian matrix at is expressed as:

[0022]

[0023] where r xx is the second-order partial derivative of the image in the x direction,

[0024] r xy is the second-order mixed partial derivative of the image in the x and y directions,

[0025] r yy is the second-order partial derivative of the image in the y direction;

[0026] S3.2. Normalize the second-order differential discrete Gaussian convolution kernel, that is:

[0027]

[0028] in is the normalized second-order differential discrete Gaussian convolution kernel; g xx 、g xy 、g yy is an ordinary second-order differential discrete Gaussian convolution kernel;

[0029] The determinant of the normalized Hessian matrix is ​​obtained, that is, the determinant operator C, which is calculated as follows:

[0030]

[0031] S3.3, combined with formula (3), (5), (6) to obtain:

[0032]

[0033] Among them, M is a constant reflecting the light intensity of the light spot, σ w Represents the standard deviation of the two-dimensional Gaussian light point grayscale distribution function;

[0034] Furthermore, step S4 includes the following steps:

[0035] S4.1, at the initial scale value σ g Select different Gaussian kernel scales from the neighborhood of and substitute them into the initial scale value σ in formula (7) g , respectively obtain the C value in the light spot area under different Gaussian kernel scales, recorded as C i ;

[0036] S4.2, according to the judgment condition of the center of the light spot, from C i Get the largest local maximum point C imax is the candidate point of the light spot center, compare C imaxThe size of the local maximum point in the image, the x and y values ​​corresponding to the largest point are recorded as the center pixel position (x0, y0) of the light spot, then the initial scale value σ corresponding to the center pixel position (x0, y0) is g is the optimal Gaussian kernel function scale, which also gives the optimal pixel-level coordinate position of the center of the light spot image;

[0037] Furthermore, in step S4, the conditions for determining the center of the light spot are: C(x,y)>0 and it is a local maximum;

[0038] Furthermore, step S5 includes the following steps:

[0039] Assume that the sub-pixel coordinates of the center of the light spot are (x0+s,y0+t), where (s,t)∈[-0.5,0.5]×[-0.5,0.5], that is, the first-order zero-crossing point of the edge is within the current pixel. By performing a second-order Taylor expansion on the grayscale value of the sub-pixel light spot at the light spot (x0,y0), we have:

[0040]

[0041] Among them, I0 refers to the grayscale value of the grayscale distribution function I(x,y) at (x0,y0);

[0042] s and t represent the sub-pixel coordinate position of the center of the light spot;

[0043] r x 、r y Represents the first-order derivatives of the image in the x-direction and y-direction at the point (x0, y0);

[0044] Furthermore, in step S5, the first-order derivative of the Taylor expansion at the center of the light spot with respect to s and t is 0, and thus:

[0045]

[0046] The beneficial effect of the present invention is that the light spot extraction based on the non-uniform scale Hessian matrix not only retains the advantages of the Hessian matrix, but also can realize sub-pixel extraction of the light spot center according to the scale change of the narrow area array light spot image, while ensuring the accuracy of the light spot center, and has good adaptability to various types of light spots, thereby meeting the requirements of precise image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Ideal images of B×1 binning spots under different values;

[0048] Figure 2 Schematic diagram of the extraction method of the present invention;

[0049] Figure 3 This is the distribution diagram of operator C of the present invention. DETAILED DESCRIPTION

[0050] The following is combined with Figures 1 to 3 The embodiments of the present invention are described in detail so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more specific definition of the protection scope of the present invention.

[0051] A light spot extraction method based on a non-uniform scale Hessian matrix includes the following steps:

[0052] S1. Obtain a non-uniform light spot image, binarize the light spot image, and determine the initial scale value σ of the Gaussian convolution kernel g ;

[0053] In step S1, according to optical knowledge, the grayscale distribution of the light spot presents a two-dimensional Gaussian distribution. Under ideal conditions, the grayscale distribution of the light spot is similar to the two-dimensional Gaussian distribution, and its grayscale function is:

[0054]

[0055] where σ w It represents the standard deviation of the grayscale distribution function of the two-dimensional Gaussian light spot, and M is a constant reflecting the light intensity of the light spot;

[0056] Therefore, the grayscale of the light spot in a certain direction on the image obeys the one-dimensional Gaussian distribution and the standard deviation of the one-dimensional Gaussian distribution is also σ w From a statistical point of view, since the light spot obeys Gaussian distribution in a certain image direction, it is in [μ-3σ w ,μ+3σ w ] The probability within the interval accounts for 99.74% of the total probability (μ represents the mathematical expectation of the Gaussian distribution of the light spot); Combining the above two points, it can be considered that the diameter of the light spot is 6σ w Therefore, for non-uniform imaging of light point targets, the diameter d of the light spot can be determined by analyzing the image features of the light spot in the non-binning direction, and then the initial Gaussian convolution kernel scale σ is obtained. g ;

[0057] The maximum number of pixels in the x and y directions of the binarized non-uniform light spot image is taken as the diameter d of the light spot, and the initial scale value σ of the Gaussian convolution kernel is solved according to the diameter d of the light spot. g ,in,

[0058] S2, according to the initial value of scale σ g Establish a Gaussian convolution template g(x,y) of non-uniform scale;

[0059] The step S2 comprises the following steps:

[0060] S2.1. For uniform images, the standard discrete Gaussian convolution kernel function expression is:

[0061]

[0062] where σ x is the scale (standard deviation) of the Gaussian kernel; the standard discrete Gaussian convolution kernel function is also the Gaussian convolution template g(x,y);

[0063] S2.2. For non-uniform images, due to the different scales in the x and y directions, it is necessary to introduce two different scales σ into the Gaussian convolution template g(x,y) x1 , σ x2 , so that the scale of the Gaussian kernel function matches the scale of its light point, and its expression is:

[0064]

[0065] The initial value of the Gaussian convolution kernel scale σ in the non-binning direction has been obtained g , combined with Figure 1 The characteristics of the non-uniform image shown in the figure, Equation (2) is changed as follows σ x1 =σ g / B,σ x2 =σ g , then:

[0066]

[0067] Where B is the multiple of non-uniform image binning;

[0068] In summary, the final non-uniform scale Gaussian convolution template g(x,y) can be obtained;

[0069] S3. Construct the determinant operator C of the normalized Hessian matrix according to the Gaussian convolution template g(x,y);

[0070] According to equation (1) and the properties of the two-dimensional Gaussian function, the ideal light spot center is the vertex of the image grayscale surface. And because the properties of the Hessian matrix at the light spot center are relatively special, it is possible to determine whether the pixel is the light spot center by calculating the Hessian matrix at each pixel in the image.

[0071] The step S3 comprises the following steps:

[0072] S3.1. Any pixel p in the non-uniform light spot image = (x, y) T The Hessian matrix at is expressed as:

[0073]

[0074] where r xx is the second-order partial derivative of the image in the x direction,

[0075] r xy is the second-order mixed partial derivative of the image in the x and y directions,

[0076] r yy is the second-order partial derivative of the image in the y direction;

[0077] r xx 、r xy and r yy The grayscale function I(x,y) and the second-order differential discrete Gaussian convolution kernel g xx 、g xy and g yy The result of convolution operation (the second-order differential discrete Gaussian convolution kernel is the second-order partial derivative of the Gaussian kernel, which will not be repeated here);

[0078] The above analysis shows the correlation between the second-order differentially discrete Gaussian convolution kernel and the second-order partial derivatives of the image. Therefore, the selection of the Gaussian convolution kernel scale will affect the positioning accuracy of the light spot center.

[0079] S3.2 For a uniform image, if we want to calculate the scale of the light point σ w And select the most appropriate Gaussian convolution kernel σ x , then the second-order differential discrete Gaussian convolution kernel needs to be normalized first, that is:

[0080]

[0081] in is the normalized second-order differential discrete Gaussian convolution kernel; g xx 、g xy 、g yy is an ordinary second-order differential discrete Gaussian convolution kernel;

[0082] The determinant of the normalized Hessian matrix is ​​obtained, that is, the determinant operator C, which is calculated as follows:

[0083]

[0084] Since the second-order partial derivative of the image grayscale function and the second-order Gaussian function are both Gaussian functions, and their convolution is also a Gaussian function, the operator C is also a two-dimensional Gaussian function, and the variance of the new Gaussian function is the sum of the variances of the original two Gaussian functions. In summary, by analyzing the value of operator C, the pixel coordinates of the center of the light spot can be determined.

[0085] S3.3. For non-uniform images, since the discrete Gaussian convolution kernel function in step S2 has changed, the operator determinant operator C will also change. Combining formulas (3), (5), and (6), we can obtain:

[0086]

[0087] S4, obtaining the Gaussian template scale when the determinant operator C value is maximum, and using the image point coordinates at the Gaussian template scale as the pixel-level coordinates of the light spot center;

[0088] According to formula (7), the C value at the center of the light spot reaches a maximum value, and is the maximum value of the operator C function image. At this point in the center, the C value and the initial scale value σ are considered. g , let x=y=0 in equation (7), then we get the following result:

[0089]

[0090] Consider the σ that maximizes the C value g The optimal value of σ g and In the positive domain, it has the same monotonicity, so we can directly find C with respect to The partial derivatives of are as follows:

[0091]

[0092] From formula (9), we can know that when When σ g =σ w , formula (8) obtains the maximum value, so when the change σ g As long as the C value is maximized, the corresponding σ g It is the optimal scale.

[0093] Therefore, when actually extracting the image coordinates of the center of the light spot, the initial scale value σ g Select different Gaussian kernel scales from the neighborhood of and substitute them into the initial scale value σ in formula (7) g , respectively obtain the C value in the light spot area under different Gaussian kernel scales, recorded as C i ;

[0094] Then according to the judgment condition of the center of the light spot, i The largest local maximum point is obtained, denoted as C imax , and take this point as the candidate point of the light spot center; finally compare C imaxThe size of the local maximum point in the image, the x and y values ​​corresponding to the largest point are recorded as the center pixel position (x0, y0) of the light spot, then the initial scale value σ corresponding to the center pixel position (x0, y0) is g is the optimal Gaussian kernel function scale, which also gives the optimal pixel-level coordinate position of the center of the light spot image;

[0095] Through the above analysis, we can determine the optimal center pixel position (x0, y0) and the optimal Gaussian template scale;

[0096] Figure 2 The three-dimensional surface distribution diagram of the operator C of the binning light point with B=4 is taken, and the three-dimensional surface distribution diagrams of the operator C under different binning multiples are similar. Therefore, according to Figure 3 The surface shape distribution characteristics of the light point operator C show that the conditions for determining the center of the light point are: C(x,y)>0 and it is a local maximum;

[0097] S5. Perform sub-pixel center extraction in the obtained center area of ​​the light spot image according to the pixel-level coordinates of the light spot center, thereby obtaining the sub-pixel coordinate position of the light spot center;

[0098] Specifically:

[0099] Given the central pixel coordinates (x0, y0), its sub-pixel coordinates must be within its domain. Therefore, let the sub-pixel coordinates of the light spot center be (x0+s, y0+t), where (s, t)∈[-0.5, 0.5]×[-0.5, 0.5], that is, the first-order zero-crossing point of the edge is within the current pixel. By performing a second-order Taylor expansion on the grayscale value of the sub-pixel light spot at the light spot (x0, y0), we have:

[0100]

[0101] Among them, I0 refers to the grayscale value of the grayscale distribution function I(x,y) at (x0,y0);

[0102] s and t represent the sub-pixel coordinate position of the center of the light spot;

[0103] r x 、r y Represents the first-order derivatives of the image in the x-direction and y-direction at the point (x0, y0);

[0104] According to the surface properties of the light spot grayscale function I(x,y), the first-order derivative of the expanded formula (10) with respect to s and t at the center of the light spot is 0, so the calculation can be obtained:

[0105]

[0106] Since formula (11) has already calculated the values ​​of s and t, combined with the pixel-level coordinates (x0, y0) of the center of the light spot obtained in step S4, the sub-pixel coordinate position of the center of the light spot can be easily calculated as (x0+s, y0+t).

[0107] Parts not described in detail in the present invention can be implemented using existing technologies and will not be described in detail here.

[0108] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.

[0109] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A light spot extraction method based on a non-uniform scale Hessian matrix, characterized by: The steps include: S1. Obtain a non-uniform light spot image, binarize the light spot image, and determine the initial scale value σ of the Gaussian convolution kernel g ; S2, according to the initial value of scale σ g Establish a Gaussian convolution template g(x,y) of non-uniform scale; S3. Construct the determinant operator C of the normalized Hessian matrix according to the Gaussian convolution template g(x,y); S4, obtaining the Gaussian template scale when the determinant operator C value is maximum, and using the image point coordinates at the Gaussian template scale as the pixel-level coordinates of the light spot center; S5. Perform sub-pixel center extraction in the obtained center area of ​​the light spot image according to the pixel-level coordinates of the light spot center, thereby obtaining the sub-pixel coordinate position of the light spot center; The step S2 comprises the following steps: S2.

1. Set the standard discrete Gaussian convolution kernel function expression as: where σ x is the scale of the Gaussian kernel; the standard discrete Gaussian convolution kernel function is also the Gaussian convolution template g(x,y); S2.

2. For non-uniform images, it is necessary to introduce two different scales σ into the Gaussian convolution template g(x,y) x1 , σ x2 , so that the scale of the Gaussian kernel function matches the scale of its light point, and its expression is: Among them, p x1 =s g / B, s x2 =s g ; Then we have: Where B is the multiple of non-uniform image binning; The step S3 comprises the following steps: S3.

1. Any pixel p in the non-uniform light spot image = (x, y) T The Hessian matrix at is expressed as: where r xx is the second-order partial derivative of the image in the x direction, r xy is the second-order mixed partial derivative of the image in the x and y directions, r yy is the second-order partial derivative of the image in the y direction; S3.

2. Normalize the second-order differential discrete Gaussian convolution kernel, that is: in is the normalized second-order differential discrete Gaussian convolution kernel; g xx 、g xy 、g yy is an ordinary second-order differential discrete Gaussian convolution kernel; The determinant of the normalized Hessian matrix is ​​obtained, that is, the determinant operator C, which is calculated as follows: S3.3, combined with formula (3), (5), (6) to obtain: Among them, M is a constant reflecting the light intensity of the light spot, σ w Represents the standard deviation of the two-dimensional Gaussian light point grayscale distribution function; The step S4 comprises the following steps: S4.1, at the initial scale value σ g Select different Gaussian kernel scales from the neighborhood of and substitute them into the initial scale value σ in formula (7) g , respectively obtain the C value in the light spot area under different Gaussian kernel scales, recorded as C i ; S4.2, according to the judgment condition of the center of the light spot, from C i Get the largest local maximum point C imax is the candidate point of the light spot center, compare C imax The size of the local maximum point in the image, the x and y values ​​corresponding to the largest point are recorded as the center pixel position (x0, y0) of the light spot, then the initial scale value σ corresponding to the center pixel position (x0, y0) is g is the optimal Gaussian kernel function scale, which also gives the optimal pixel-level coordinate position of the center of the light spot image; The step S5 comprises the following steps: Assume that the sub-pixel coordinates of the center of the light spot are (x0+s,y0+t), where (s,t)∈[-0.5,0.5]×[-0.5,0.5], that is, the first-order zero-crossing point of the edge is within the current pixel. By performing a second-order Taylor expansion on the grayscale value of the sub-pixel light spot at the light spot (x0,y0), we have: Among them, I0 refers to the grayscale value of the grayscale distribution function I(x,y) at (x0,y0); s and t represent the sub-pixel coordinate position of the center of the light spot; r x 、r y Represents the first-order derivatives of the image in the x-direction and y-direction at the point (x0, y0); In step S5, the first-order derivative of the Taylor expansion at the center of the light spot with respect to s and t is 0, and thus: Therefore, the sub-pixel coordinate position (x0+s, y0+t) of the center of the light spot is calculated according to formula (9).

2. The light spot extraction method based on the non-uniform scale Hessian matrix according to claim 1, characterized in that: In step S1, the maximum number of pixels in the x and y directions of the binarized non-uniform light spot image is taken as the diameter d of the light spot, and the initial scale value σ of the Gaussian convolution kernel is solved according to the diameter d of the light spot. g ,in, 3. The light spot extraction method based on the non-uniform scale Hessian matrix according to claim 1, characterized in that: In step S4, the conditions for determining the center of the light spot are: C(x, y)>0 and it is a local maximum.

Citation Information

Patent Citations

  • Weighting method based on point cloud light spot area

    CN108765569A

  • Line structured light center line extraction method and storage medium

    CN110866924A

  • Binarization method suitable for non-uniform illumination condition

    CN112287942A