Method and system for extracting the centroid of a collimator image

By using a Gaussian filter with a mean square error of σ and multi-level calculations in the autocollimator image, the edges are refined and the elliptical centroid is fitted, solving the problem of low accuracy caused by grayscale instability and achieving higher centroid extraction accuracy.

CN115760959BActive Publication Date: 2026-07-03BEIJING AEROSPACE INST FOR METROLOGY & MEASUREMENT TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING AEROSPACE INST FOR METROLOGY & MEASUREMENT TECH
Filing Date
2022-12-10
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing methods for extracting the centroid of autocollimator images have low accuracy due to unstable grayscale information, which affects measurement stability.

Method used

A Gaussian filter with a mean square error of σ is used to filter the image. The edges are refined through multi-level calculations, the center of the ellipse is fitted, and normalization is performed to improve accuracy.

Benefits of technology

By using filtering and multi-level calculations, the influence of grayscale instability on centroid extraction is overcome, significantly improving the extraction accuracy of centroid in autocollimated images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115760959B_ABST
    Figure CN115760959B_ABST
Patent Text Reader

Abstract

The application discloses a kind of centroid extraction method and extraction system of autocollimator image, wherein based on the Gaussian filter of mean square deviation σ is filtered to image;According to the edge of the image refined by multistage calculation, the edge detection of image is completed, and edge pixel point is determined;Ellipse centroid is fitted to edge pixel point;Based on each ellipse centroid is normalized, and the centroid of image is calculated, at this time, the edge of the image refined by filtering processing under multistage calculation, and corresponding edge pixel point is determined, ellipse centroid is fitted to edge pixel point, and based on each ellipse centroid is normalized, by this method, the influence of unstable gray on centroid extraction can be overcome, and the centroid extraction precision of autocollimator image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of autocollimator images, and more particularly to a method and system for extracting the centroid of autocollimator images. Background Technology

[0002] An optoelectronic autocollimator emits light through its own light source, which is reflected back from the target and returns to the optical system, eventually reaching the image sensor.

[0003] Algorithms for extracting the centroid of images from grayscale information face the following problems: the light spot image returned after reflection by the reflector is not uniform, which affects the accuracy of grayscale centroid extraction. Furthermore, due to the corresponding differences of each pixel in the image sensor and factors such as light source flicker, the grayscale exhibits unstable changes, which affects the measurement stability and results in the low accuracy of existing autocollimation image centroid extraction. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a method and system for extracting the centroid of an autocollimator image. The image is filtered and the edges of the image are refined through multi-level calculations, and the corresponding edge pixels are determined. Elliptical centroids are fitted to the edge pixels, and normalization is performed based on each elliptical centroid. This method can overcome the influence of grayscale instability on centroid extraction and improve the accuracy of centroid extraction of autocollimated images.

[0005] To address the aforementioned technical problems, this invention provides a method for centroid extraction of an autocollimator image, comprising: filtering the image using a Gaussian filter with a mean square error of σ; refining the image edges using multi-level calculations to complete edge detection and determine edge pixels; fitting elliptical centroids to the edge pixels; normalizing the elliptical centroids and calculating the image centroid.

[0006] In addition, this embodiment of the invention also provides a centroid extraction system for autocollimator images. The centroid extraction system for autocollimator images includes: a filtering module for filtering the image based on a Gaussian filter with a mean square error of σ; a detection module for refining the image edges according to multi-level calculations, completing edge detection of the image, and determining edge pixels; a fitting module for fitting elliptical centroids to the edge pixels; and a calculation module for normalizing based on each elliptical centroid and calculating the centroid of the image.

[0007] In this embodiment of the invention, the image is filtered using a Gaussian filter with a mean square error of σ; the image edges are refined through multi-level calculations to complete edge detection and determine edge pixels; elliptical centroids are fitted to the edge pixels; normalization is performed based on each elliptical centroid, and the image centroid is calculated. Thus, the filtered image has its edges refined through multi-level calculations, and the corresponding edge pixels are determined. Elliptical centroids are fitted to the edge pixels, and normalization is performed based on each elliptical centroid. This method overcomes the influence of grayscale instability on centroid extraction and improves the accuracy of centroid extraction in self-collimated images. Attached Figure Description

[0008] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0009] Figure 1 This is a flowchart illustrating the centroid extraction method for autocollimator images in an embodiment of the present invention.

[0010] Figure 2 This is a schematic diagram of the filtering process of the centroid extraction method for autocollimator images in an embodiment of the present invention;

[0011] Figure 3 This is a schematic diagram of the centroid extraction method for autocollimator images in an embodiment of the present invention;

[0012] Figure 4 This is an image unfolding mapping diagram of the centroid extraction method for autocollimator images in this embodiment of the invention;

[0013] Figure 5 This is a schematic diagram of the structural composition of the centroid extraction system for the autocollimator image in an embodiment of the present invention;

[0014] Figure 6 This is a hardware diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] Example

[0017] Please see Figures 1 to 4 A method for centroid extraction of autocollimator images, the method comprising:

[0018] S11: Image filtering is performed based on a Gaussian filter with a mean square error of σ;

[0019] In the specific implementation of this invention, the specific steps can be as follows:

[0020] S111: Perform grayscale processing on the image;

[0021] S112: The grayscale image is input to a Gaussian filter with a mean square error of σ, and the Gaussian filter with a mean square error of σ performs filtering processing on the image.

[0022] S12: Refine the image edges based on multi-level calculations, complete the image edge detection, and determine the edge pixels;

[0023] In the specific implementation of this invention, the specific steps can be as follows:

[0024] A circle is fitted using a multi-level edge detection algorithm;

[0025] The edge n pixels of the fitted circle are unfolded using polar coordinates and mapped to a rectangular region with a height equal to the edge n pixels and a length equal to the circumference of the circle in pixels. According to the first formula, the gray values ​​of each column are extracted and edge gray-level polynomial fitting is performed. The inflection point is the sub-pixel edge. All columns are traversed to obtain the set of edge points in polar coordinates. The set of edge points in polar coordinates is transformed to Cartesian coordinates to obtain the set of sub-pixel edges.

[0026] Wherein, the first formula is ;in: To fit the coefficients of the cubic term of the polynomial; To fit the coefficients of the quadratic term of the polynomial; To fit the coefficients of the first-order term of the polynomial; To fit the constant term of the polynomial.

[0027] S13: Fit the center of an ellipse to the edge pixels;

[0028] In the specific implementation of this invention, the specific steps can be as follows:

[0029] Use least squares to fit the ellipse parameters; let... Let n be the set of pixel coordinates on the image to be fitted into an ellipse, and their image coordinates be:

[0030] ;

[0031] Let be the pixel coordinates of the i-th pixel in the image to be fitted into an ellipse; Let x be the x-coordinate of the i-th pixel to be fitted into an ellipse in the image coordinate system. Let be the ordinate of the i-th pixel to be fitted into an ellipse in the image coordinate system.

[0032] S14: Normalize the image based on the centroids of each ellipse and calculate the centroid of the image;

[0033] In the specific implementation of this invention, the specific steps can be as follows:

[0034] Obtain the centroids of the ellipses and perform normalization processing based on each centroid; based on the centroids of each ellipse, a total of five centroid coordinates can be obtained, from centroid 2. and the center of the circle 4 A defined straight line With the centroid 1 and the center of the circle 3 A defined straight line The intersection points are calculated using equation (10), and their coordinates are obtained. This is the centroid of the image.

[0035]

[0036] In addition, in practice:

[0037] 1. Subpixel edge extraction of light spot images

[0038] First, a circle is fitted using the Canny algorithm. Then, the n pixels of the fitted circle's edge are unfolded using polar coordinates and mapped to a rectangular region. The height of this region is the n pixels of the edge, and the length is the number of pixels equal to the circumference of the circle. According to formula ①, the gray values ​​of each column are extracted and edge gray-level polynomial fitting is performed. The inflection point is the sub-pixel edge. By traversing all columns, the set of edge points in polar coordinates is obtained. Figure 2 In the image, the red area represents the edge (5 pixels), which is mapped to... Rectangular area.

[0039]

[0040] in:

[0041] To fit the coefficients of the cubic term of the polynomial

[0042] To fit the coefficients of the quadratic term of the polynomial

[0043] To fit the coefficients of the first term of the polynomial

[0044] To fit the constant term of the polynomial

[0045] Then, transform the set of edge points in polar coordinates to Cartesian coordinates to obtain the sub-pixel edge set, such as... Figure 3 As shown.

[0046] 2. Fitting the center of the light spot image

[0047] Use least squares to fit the ellipse parameters. Let... Let n be the set of pixel coordinates on the image to be fitted into an ellipse, and their image coordinates be:

[0048]

[0049] Let be the pixel coordinates of the i-th pixel in the image to be fitted into an ellipse;

[0050] Let x be the x-coordinate of the i-th pixel to be fitted into an ellipse in the image coordinate system.

[0051] Let be the ordinate of the i-th pixel to be fitted into an ellipse in the image coordinate system;

[0052] Let vector represent:

[0053]

[0054] in:

[0055] The x-coordinate of the pixel in the image coordinate system;

[0056] The ordinate of the pixel in the image coordinate system;

[0057] Assumption:

[0058]

[0059] in The implicit equation of the ellipse is given by:

[0060]

[0061] Make:

[0062]

[0063] For distances expressed in different forms, the ellipse is fitted using a method based on algebraic distance, and equation ⑧ is minimized:

[0064]

[0065] in:

[0066] 9

[0067] Using algebraic distance to approximate Euclidean distance can transform the least squares fitting problem into a linear problem to solve, ultimately obtaining the ellipse parameters of the sub-pixel edge, and thus obtaining the sub-pixel coordinates of the point.

[0068] 3. Image center extraction

[0069] By completing steps 1 and 2 to determine the centroid of each circular light spot, a total of five centroid coordinates can be obtained. Starting from centroid 2... and the center of the circle 4 A defined straight line With the centroid 1 and the center of the circle 3 A defined straight line The intersection points are calculated using equation (10), and their coordinates are obtained. That is, the center of the image.

[0070]

[0071] In this embodiment of the invention, the image is filtered using a Gaussian filter with a mean square error of σ; the image edges are refined through multi-level calculations to complete edge detection and determine edge pixels; elliptical centroids are fitted to the edge pixels; normalization is performed based on each elliptical centroid, and the image centroid is calculated. Thus, the filtered image has its edges refined through multi-level calculations, and the corresponding edge pixels are determined. Elliptical centroids are fitted to the edge pixels, and normalization is performed based on each elliptical centroid. This method overcomes the influence of grayscale instability on centroid extraction and improves the accuracy of centroid extraction in self-collimated images.

[0072] Example

[0073] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of the centroid extraction system for autocollimator images in an embodiment of the present invention.

[0074] like Figure 5 As shown, a centroid extraction system for autocollimator images is provided, the system comprising:

[0075] Filtering module 21: Used to filter images based on a Gaussian filter with a mean square error of σ;

[0076] Detection module 22: used to refine the image edges based on multi-level calculations, complete the image edge detection, and determine the edge pixels;

[0077] Fitting module 23: Used to fit the center of an ellipse to edge pixels;

[0078] Calculation module 24: Used to perform normalization processing based on the centroids of each ellipse and calculate the centroid of the image.

[0079] In this embodiment of the invention, the image is filtered using a Gaussian filter with a mean square error of σ; the image edges are refined through multi-level calculations to complete edge detection and determine edge pixels; elliptical centroids are fitted to the edge pixels; normalization is performed based on each elliptical centroid, and the image centroid is calculated. Thus, the filtered image has its edges refined through multi-level calculations, and the corresponding edge pixels are determined. Elliptical centroids are fitted to the edge pixels, and normalization is performed based on each elliptical centroid. This method overcomes the influence of grayscale instability on centroid extraction and improves the accuracy of centroid extraction in self-collimated images.

[0080] Example

[0081] Please see Figure 6 See below for reference. Figure 6 To describe an electronic device 40 according to this embodiment of the present invention. Figure 6 The electronic device 40 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0082] like Figure 6 As shown, the electronic device 40 is manifested in the form of a general-purpose computing device. The components of the electronic device 40 may include, but are not limited to: at least one processing unit 41, at least one storage unit 42, and acquisition unit 43.

[0083] The storage unit stores program code, which can be executed by the processing unit 41 to perform the steps described in the "Embodiment Methods" section of this specification according to various exemplary embodiments of the present invention.

[0084] Storage unit 42 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422, and may further include a read-only memory unit (ROM) 423.

[0085] Storage unit 42 may also include a program / utility 424 having a set (at least one) program module 425, such program module 425 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0086] The acquisition unit 43 can be an image acquisition card or other image acquisition unit.

[0087] Electronic device 40 communicates with an imaging unit via acquisition unit 43.

[0088] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0089] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. This program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. Furthermore, it stores computer program instructions, which, when executed by a computer, cause the computer to perform the methods described above.

[0090] Furthermore, the above provides a detailed description of the method and system for centroid extraction of autocollimator images provided in the embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for extracting a centroid of a collimator image, characterized by, include: Image filtering is performed based on a Gaussian filter with a mean square error of σ. The image edges are refined through multi-level calculations to complete edge detection and determine edge pixels. Fitting ellipse center to edge pixel points, get centroid 1 , centroid 2 , centroid 3 and centroid 4 ; Normalization is performed based on the centroids of each ellipse, and the centroid of the entire image is calculated. The process of refining the image edges based on multi-level calculations to complete image edge detection and determine edge pixels includes: A circle is fitted using a multi-level edge detection algorithm; The edge n pixels of the fitted circle are expanded using polar coordinates and mapped to a rectangular region. The gray values ​​of each column are extracted according to the first formula and edge gray-level polynomial fitting is performed. The inflection point is the sub-pixel edge. By traversing all columns, the set of edge points in polar coordinates is obtained. Transform the set of edge points in polar coordinates to Cartesian coordinates to obtain the set of sub-pixel edges; The first formula is ; wherein: is a fitting polynomial cubic term coefficient; is a fitting polynomial quadratic term coefficient; is a fitting polynomial linear term coefficient; is a fitting polynomial constant term.

2. The method of claim 1, wherein, The image filtering process based on a Gaussian filter with a mean square error of σ includes: Perform grayscale processing on the image; The grayscale image is input to a Gaussian filter with a mean square error of σ, which then performs filtering on the image.

3. The method of claim 2, wherein, The fitting of the elliptical center to the edge pixels includes: Ellipse parameters are fitted using least squares; set For a set of n pixel coordinate points to be fitted into an ellipse on an image, their image coordinates are: ; Let be the pixel coordinates of the i-th pixel in the image to be fitted into an ellipse; Let x be the x-coordinate of the i-th pixel to be fitted into an ellipse in the image coordinate system. Let be the ordinate of the i-th pixel to be fitted into an ellipse in the image coordinate system.

4. The method of claim 3, wherein, The normalization process based on the centroids of each ellipse, and the calculation of the centroid of the image, includes: Obtain the center of each ellipse and perform normalization based on each ellipse center; From centroid 2 and the center of the circle 4 A defined straight line With the centroid 1 and the center of the circle 3 A defined straight line The intersection points are calculated using equation (10), and their coordinates are obtained. That is, the centroid of the image; ⑩。 5. The method of claim 4, wherein, The method for extracting the centroid of the autocollimator image further includes: By using algebraic distance instead of Euclidean distance, the least squares fitting problem is transformed into a linear problem to be solved, and finally the ellipse parameters of the sub-pixel edge are obtained, thereby obtaining the sub-pixel coordinates of the circle.

6. A system for centroid extraction from a collimator image for performing the method of any one of claims 1 to 5, characterized by The centroid extraction system for the autocollimator image includes: Filtering module: Used to filter images based on a Gaussian filter with a mean square error of σ; Detection module: Used to refine the image edges based on multi-level calculations, complete the image edge detection, and determine the edge pixels; Fitting module: Used to fit the center of an ellipse to edge pixels; Calculation module: Used to perform normalization based on the centroids of each ellipse and calculate the centroid of the image.