A method and device for detecting the position of the center of a circle in a laser spot image
By combining the center of gravity method with the least squares iterative fitting, the accuracy and speed problems of determining the center position of the spot image in laser communication are solved, and the stability and computational efficiency of laser communication are improved.
Patent Information
- Application Number
- CN202411498485.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-10-25
AI Technical Summary
Existing technologies make it difficult to accurately determine the center position of the spot image in laser communications, especially when the center position of the beam drifts under atmospheric interference, resulting in signal loss and high information bit error rate. Existing methods have slow calculation speeds and large errors.
The center of gravity method is used to obtain the initial center position. The radial average radius in multiple directions is calculated and the center position is fitted using the least squares method. The calculation is iterated until the difference is less than the threshold, thereby improving the calculation accuracy and speed.
It achieves the rapid and accurate determination of the center position of the circle in the laser spot image, reduces the information bit error rate caused by signal loss, and improves the stability and computing efficiency of laser communication.
Smart Images

Figure CN119494872B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of laser communication technology, and in particular to a method and device for detecting the center position of a circle in a laser spot image. Background Art
[0002] In laser communication applications, the transmitter uses laser light as a carrier to transmit information. The receiver uses a photodetector to convert the received laser signal into an electrical signal, which is then decoded into a beam carrying the information, achieving the purpose of laser communication. However, laser communication requires extremely high alignment accuracy between the transmitter and receiver. However, during communication, the laser can be affected by atmospheric interference, causing the beam center position to drift, leading to signal lock, inability to effectively align the optical center, and information loss. Furthermore, the waveform becomes distorted and diffuse, making it difficult to determine the beam center position. This results in uneven signal strength at the receiver, information transmission errors, increased bit error rates, and reduced channel capacity.
[0003] Therefore, in order to monitor and correct the offset or blur of the light beam, monitoring measures will be added to the system design, such as using a CCD camera or CMOS sensor to capture the image of the light spot, and it is necessary to study the position acquisition algorithm of the blurred circle center and the ring center to reduce information errors caused by signal loss and improve communication quality.
[0004] Existing methods for determining the center of a circle are mainly divided into methods for obtaining the center of a distorted circle and methods for obtaining an obscured circle. For the center of a partially obscured circle, the center can be determined by the intersection of multiple perpendicular bisectors of the chords based on the theory that the perpendicular bisector of the chord passes through the center of the circle; or the center can be determined based on the theory that a unique circle can be determined based on three points on the circle. However, these methods will calculate multiple centers when used to process diffuse and blurred circles, and the original unique center cannot be determined. The center position is highly random and time-consuming. Currently, the more commonly used method is to obtain the center position by solving the center of gravity of the circle. This method obtains the horizontal and vertical coordinates of the center of the circle by solving the center of gravity in the horizontal and vertical directions. However, this method does not fully utilize the symmetry of the circle and will result in large errors when calculating the center of an unevenly distorted circle.
[0005] Therefore, how to provide a method and device for detecting the center position of a circle in a laser spot image with higher accuracy is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention
[0006] In response to the above research status and existing problems, the present invention provides a method and device for detecting the center position of a circle in a laser spot image. Compared with the center of gravity method, the method is more accurate in detecting the center position of a circle and has a faster calculation speed.
[0007] The present invention provides a method for detecting the center position of a circle in a laser spot image, comprising the following steps:
[0008] S1: Acquire a laser spot image, wherein the spot image contains a blurred circle / ring spot, and obtain the centroid coordinates of the blurred circle / ring spot as the initial circle center position;
[0009] S2: Calculating radial distances in multiple different directions along the blur circle / ring light spot starting from the initial circle center position, and calculating an average value of the radial distances in different directions as an average radius;
[0010] S3: fitting a new circle center position based on the average radius using the least squares method;
[0011] S4: Using the new circle center position as the initial circle center position, repeating S2-S3 until the difference between the current fitted new circle center position and the previous fitted new circle center position is less than a predetermined threshold, and then the current fitted new circle center position is determined as the final circle center position.
[0012] Preferably, the S1 comprises the following steps:
[0013] S11: Calculate the grayscale value I(x,y) corresponding to the coordinates (x,y) of all pixel points in the laser spot image;
[0014] S12: Calculate the centroid coordinates (x0, y0) of the blur circle / ring light spot in the laser spot image based on the grayscale value, and use the centroid coordinates as the initial center coordinates of the blur circle / ring light spot:
[0015]
[0016] Preferably, S2 comprises the following steps:
[0017]
[0018] Where R i is the average radius calculated based on i different directions of the blur circle / ring light spot starting from the initial circle center position, (x ij ,y ij ) is the pixel coordinate of the blurred circle / annular spot, that is, the coordinate of pixel j in the i direction, and (x0, y0) is the center coordinate of the blurred circle / annular spot.
[0019] Preferably, S3 includes the following steps:
[0020] (x Ri -x k ) 2 +(y Ri -y k ) 2 =R i 2 ;
[0021] In the formula, (x Ri ,y Ri ) is the average radius R of the blur circle / ring spot i The corresponding pixel coordinates, (x k ,y k ) is the new center position of the fitting circle, R i is the average radius calculated based on i different directions of the blur circle / ring light spot starting from the initial circle center position.
[0022] Preferably, the S4 comprises the following steps:
[0023] (x k -x k-1 ) 2 +(y k -y k-1 ) 2 <ε;
[0024] In the formula, (x k ,y k ) is the new center position of the current fitting, (x k-1 ,y k-1 ) is the new center position of the previous fitting, and ε is the predetermined threshold.
[0025] The present invention further provides a device for detecting the center position of a circle in a laser spot image according to the method for detecting the center position of a circle in a laser spot image, comprising:
[0026] An initial circle center position calculation module is used to obtain a laser spot image, wherein the spot image is a blurred circle / ring light spot, and obtain the centroid coordinates of the blurred circle / ring light spot as the initial circle center position;
[0027] an average radius calculation module, configured to calculate radial distances in multiple different directions along the blur circle / ring light spot starting from the initial circle center position, and calculate the average value of the radial distances in different directions as the average radius;
[0028] A new circle center position fitting module is used to fit a new circle center position based on the average radius using the least squares method, and to fit a new circle center position by repeatedly calling the average radius calculation module until the difference between the current fitted new circle center position and the previous fitted new circle center position is less than a predetermined threshold. In this case, the current fitted new circle center position is determined as the final circle center position.
[0029] Preferably, the detection device is located at a laser receiving end, and the laser receiving end is used to receive a laser beam carrying information.
[0030] Compared with the existing technology, it has the following beneficial effects:
[0031] The present invention can accurately solve the center positions of the blurred distortion circle and the ring in the laser spot image, and the calculation speed is relatively fast.
[0032] By accurately obtaining the center position of the circle, information errors caused by signal loss can be effectively reduced, thereby improving the stability of the laser communication system.
[0033] Compared with traditional methods for determining the center of a circle, such as the center of gravity method, the present invention uses an iterative algorithm to quickly solve the center position, which not only improves the calculation speed but also reduces the impact of distortion on the calculation of the center position, thereby making the calculation more efficient.
[0034] Using the least squares fitting method to obtain the center position of the circle can, to a certain extent, overcome the error accumulation problem in the calculation of the center position of the irregular or unevenly distorted circle, improve the robustness of the algorithm, and enable it to work stably in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only embodiments of the present invention. Those skilled in the art can also derive other drawings based on the provided drawings without inventive effort.
[0036] Figure 1 A flow chart of a method for detecting the center position of a circle in a laser spot image provided by an embodiment of the present invention;
[0037] Figure 2 The original blurred distorted circular image provided by the embodiment of the present invention;
[0038] Figure 3 A schematic diagram of the comparison circle detection results of the original blurred and distorted circular image provided by an embodiment of the present invention;
[0039] Figure 4 The original blurred and distorted circular image provided by the embodiment of the present invention;
[0040] Figure 5 A schematic diagram of the comparison circle detection results of the original blurred and distorted circular image provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0042] like Figure 1 As shown, the first aspect of an embodiment of the present invention discloses a method for detecting the center position of a circle in a laser spot image, comprising the following steps: S1: acquiring a laser spot image, wherein the spot image contains a blurred circle / ring spot, and obtaining the centroid coordinates of the blurred circle / ring spot as the initial center position; S2: calculating the radial distances along multiple different directions of the blurred circle / ring spot starting from the initial center position, and calculating the average value of the radial distances in different directions as the average radius; S3: fitting a new center position based on the average radius using the least squares method; S4: taking the new center position as the initial center position, repeating S2-S3 until the difference between the currently fitted new center position and the previously fitted new center position is less than a predetermined threshold value, and the currently fitted new center position is determined as the final center position.
[0043] It can be understood that the average radius is the average value of the distances from all pixels on the blur circle / ring light spot to the center of the circle.
[0044] In one embodiment, S1 includes the following steps:
[0045] S11: Calculate the grayscale value I(x,y) corresponding to the coordinates (x,y) of all pixels in the laser spot image;
[0046] S12: Calculate the centroid coordinates (x0, y0) of the blur circle / ring light spot in the laser spot image based on the grayscale value. The centroid coordinates are used as the initial center coordinates of the blur circle / ring light spot:
[0047]
[0048] In one embodiment, S2 includes the following steps:
[0049]
[0050] Where R i is the average radius calculated based on i different directions of the blur circle / ring light spot starting from the initial center position, (x ij ,y ij ) is the pixel coordinate of the blurred circle / ring light spot, that is, the coordinate of pixel j in the i direction, and (x0, y0) is the center coordinate of the blurred circle / ring light spot.
[0051] In one embodiment, S3 includes the following steps:
[0052] (x Ri -x k ) 2 +(y Ri -y k ) 2 =R i 2 ;
[0053] In the formula, (x Ri ,y Ri ) is the average radius R of the blur circle / ring spot i The corresponding pixel coordinates, (x k ,y k ) is the new center position of the fitting circle, R i is the average radius calculated based on i different directions of the blur circle / ring spot starting from the initial center position.
[0054] In one embodiment, S4 includes the following steps:
[0055] (x k -x k-1 ) 2 +(y k -y k-1 ) 2 <ε;
[0056] In the formula, (x k ,y k ) is the new center position of the current fitting, (x k-1 ,y k-1 ) is the new center position of the previous fitting, and ε is the predetermined threshold.
[0057] Taking blurred circles and rings as examples, the blurred laser spot obtained through simulation is typically a distorted circle or ring. The effectiveness of the embodiment method is tested by solving the center position of the circle. To make the result more intuitive, a circle with the calculated center position as the center and the average radius as the radius is drawn on the original image.
[0058] Example 1
[0059] like Figure 1 As shown, it is the original blurred distorted circular image. Figure 2 The corresponding detection result image contains a circle with the solved circle center coordinate as the center and the average radius as the radius, which can accurately reflect the center position and radius of the laser spot.
[0060] Example 2
[0061] like Figure 3 As shown, it is the original blurred distorted ring image. Figure 4 The corresponding detection result image includes a circle with the solved center coordinates as the center and the average radius as the radius, which can also accurately reflect the center position and radius of the laser spot.
[0062] The second aspect of the embodiment of the present invention provides a device for detecting the center position of a circle in a laser spot image according to the first aspect of the embodiment, which is used to execute all the steps in the first aspect of the embodiment. It includes: an initial center position calculation module, which is used to obtain a laser spot image, wherein the spot image is a blurred circle / ring spot, and obtain the centroid coordinates of the blurred circle / ring spot as the initial center position; an average radius calculation module, which is used to calculate the radial distances along multiple different directions of the blurred circle / ring spot from the initial center position, and calculate the average value of the radial distances in different directions as the average radius; a new center position fitting module, which is used to fit a new center position based on the average radius using the least squares method, and fit the new center position by repeatedly calling the average radius calculation module until the difference between the current fitted new center position and the previous fitted new center position is less than a predetermined threshold, and then the current fitted new center position is determined as the final center position.
[0063] In one embodiment, the detection device is located at a laser receiving end, and the laser receiving end is used to receive a laser beam carrying information.
[0064] In an embodiment of the present invention, an initial value of the center position of a circle is obtained based on the centroid method, the influence of distortion is reduced by solving the average of the radial average radius in different directions, a functional relationship between the radius and the center position of the circle is established, and the center position is obtained through least squares fitting. The solved average radius is converged to the center position through multiple iterations.
[0065] The above is a detailed introduction to the method and device for detecting the center position of a circle in a laser spot image provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
[0066] In this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A method for detecting the center position of a circle in a laser spot image, characterized in that: The steps include: S1: Acquire a laser spot image, wherein the spot image contains a blur circle / ring spot, and obtain the centroid coordinates of the blur circle / ring spot as the initial circle center position, including the following steps: S11: Calculate the grayscale value I(x,y) corresponding to the coordinates (x,y) of all pixel points in the laser spot image; S12: Calculate the centroid coordinates (x0, y0) of the blur circle / ring light spot in the laser spot image based on the grayscale value, and use the centroid coordinates as the initial center coordinates of the blur circle / ring light spot: S2: Calculating radial distances in multiple different directions along the blur circle / ring light spot starting from the initial circle center position, and calculating the average value of the radial distances in different directions as the average radius, including the following steps: Where R i is the average radius calculated based on i different directions of the blur circle / ring light spot starting from the initial circle center position, (x ij ,y ij ) is the pixel coordinate of the blur circle / ring light spot, that is, the coordinate of pixel j in the i direction, (x0, y0) is the center coordinate of the blur circle / ring light spot; S3: fitting a new circle center position based on the average radius using the least squares method; S4: Using the new circle center position as the initial circle center position, repeating S2-S3 until the difference between the current fitted new circle center position and the previous fitted new circle center position is less than a predetermined threshold, and then the current fitted new circle center position is determined as the final circle center position.
2. The method for detecting the center position of a circle in a laser spot image according to claim 1, wherein: The S3 comprises the following steps: (x Ri -x k ) 2 +(y Ri -y k ) 2 =R i 2 ; In the formula, (x Ri ,y Ri ) is the average radius R of the blur circle / ring spot i The corresponding pixel coordinates, (x k ,y k ) is the new center position of the fitting circle, R i is the average radius calculated based on i different directions of the blur circle / ring light spot starting from the initial circle center position.
3. The method for detecting the center position of a circle in a laser spot image according to claim 1, wherein: The S4 comprises the following steps: (x k -x k-1 ) 2 +(and k -and k-1 ) 2 <ε; In the formula, (x k ,y k ) is the new center position of the current fitting, (x k-1 ,y k-1 ) is the new center position of the previous fitting, and ε is the predetermined threshold.
4. A device for detecting the center position of a circle in a laser spot image according to a method for detecting the center position of a circle in a laser spot image according to any one of claims 1 to 3, characterized in that: include: The initial circle center position calculation module is used to obtain a laser spot image, wherein the spot image is a blur circle / ring light spot, and obtain the center of gravity coordinates of the blur circle / ring light spot as the initial circle center position, and is used to perform the following steps: S11: Calculate the grayscale value I(x,y) corresponding to the coordinates (x,y) of all pixel points in the laser spot image; S12: Calculate the centroid coordinates (x0, y0) of the blur circle / ring light spot in the laser spot image based on the grayscale value, and use the centroid coordinates as the initial center coordinates of the blur circle / ring light spot: The average radius calculation module is used to calculate the radial distances in multiple different directions along the blur circle / ring light spot starting from the initial circle center position, and calculate the average value of the radial distances in different directions as the average radius, and is used to perform the following steps: Where R i is the average radius calculated based on i different directions of the blur circle / ring light spot starting from the initial circle center position, (x ij ,y ij ) is the pixel coordinate of the blur circle / ring light spot, that is, the coordinate of pixel j in the i direction, (x0, y0) is the center coordinate of the blur circle / ring light spot; A new circle center position fitting module is used to fit a new circle center position based on the average radius using the least squares method, and to fit a new circle center position by repeatedly calling the average radius calculation module until the difference between the current fitted new circle center position and the previous fitted new circle center position is less than a predetermined threshold. In this case, the current fitted new circle center position is determined as the final circle center position.
5. The device for detecting the center position of a circle in a laser spot image according to claim 4, characterized in that: The detection device is located at a laser receiving end, and the laser receiving end is used to receive a laser beam carrying information.
Citation Information
Patent Citations
Method for measuring spatial orientation of pipeline based on CMOS image sensor
CN107289856A
Iron tower angle steel punching defect detection method based on BP neural network
CN113012098A