Spot centroid determination method and system for laser communication

By analyzing the grayscale similarity and stability of pixels, the confidence level of the spot centroid is determined, which solves the problems of complexity and inaccuracy in determining the centroid of dynamic spots and realizes accurate tracking and trajectory prediction of the spot centroid.

CN115994935BActive Publication Date: 2026-06-23SHANDONG UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2022-11-07
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In the prior art, the methods for determining the centroid of axisymmetric light spots are computationally complex and inaccurate, especially in the case of dynamic light spots, where it is difficult to uniquely determine the centroid position.

Method used

By analyzing the similarity between the gray values ​​of pixels and those of neighboring pixels, as well as the gray value changes, and combining this with gray value stability, the confidence level of the spot centroid is calculated, and the location of the spot centroid is determined.

Benefits of technology

It enables accurate and unique determination of the centroid of a light spot under dynamic light spot conditions, reducing computational complexity and error, and is suitable for light spot tracking and trajectory prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115994935B_ABST
    Figure CN115994935B_ABST
Patent Text Reader

Abstract

The application discloses a spot centroid determination method and system applied to laser communication, wherein in the process of spot movement, the gray scale change of each pixel point in a certain time period is continuously monitored, the gray scale change in the spot area at different time points is dynamically analyzed, the stability of the gray scale of the pixel point in the spot area and the similarity with the gray scale of the adjacent pixel point are evaluated, the probability that a certain pixel point is the spot centroid is obtained, and thus the spot centroid point is determined. The application is especially suitable for dynamic spot centroid tracking and has important significance in spot tracking and spot trajectory prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of laser communication, and in particular to a method for determining the centroid of a laser spot used in laser communication. Background Technology

[0002] In laser communication, the communication spot is a crucial carrier for information transmission. To ensure real-time and accurate reception of optical signals by the optical receiving device, the communication spot must be tracked. Locating and tracking the centroid of the spot can achieve better tracking results. Therefore, it is necessary to research a method to identify the centroid of the spot signal, thereby ensuring more accurate tracking during laser communication. Currently, for image images with known axisymmetric grayscale distributions, the Hough transform and Gaussian surface fitting methods are commonly used. However, these methods are computationally complex and inefficient. Some studies use the spatial moment positioning method to calculate the centroid position, but this method requires high edge accuracy and is difficult to meet the needs of practical applications. Furthermore, while some calculation methods are simpler, such as directly determining the centroid position based on grayscale values ​​(where the point with the smallest grayscale value in an axisymmetric spot is the centroid), sometimes multiple smallest grayscale values ​​exist, leading to multiple centroids. Therefore, this method also has inaccuracies. All of the above methods study static light spot images. There is no theory that uses dynamic light spots to determine the centroid of the light spot. Therefore, it is necessary to seek a simple method for determining the centroid of dynamic light spots with axisymmetric gray-scale distribution. Summary of the Invention

[0003] To address the above technical problems, this invention provides a method and system for determining the centroid of a laser spot in laser communication. By analyzing the similarity between the gray value of a pixel at a certain point and the gray values ​​of adjacent pixels, and evaluating the gray value changes of a certain point over different time periods, the probability that the pixel is the centroid of the laser spot is finally obtained, thereby determining the location of the centroid of the laser spot.

[0004] To achieve the above objectives, the present invention provides the following solution:

[0005] In a first aspect, the method for determining the centroid of a laser beam used in laser communication, provided by the present invention, includes the following steps:

[0006] S1: Select a pixel i within the light spot area as the monitoring point and record the gray value of that point at time t.

[0007] Assuming the light spot region contains m pixels, then the grayscale set S = {S1, S2, S3, S4, ..., S} is formed. m}

[0008] S2: Determine the valid monitoring pixels.

[0009] In the acquired spot images, the edges are often blurred, leading to the misidentification of non-spot areas as monitoring pixels. However, the centroid of the spot must exist within the spot area. Therefore, it is necessary to ensure that the monitored pixels are located within the spot area, i.e., they are valid pixels. Generally, when the grayscale value of a pixel is 100%, the pixel is located outside the spot area and is an invalid monitoring pixel; when the grayscale value of a pixel is less than 100%, the pixel is located within the spot area and is a valid monitoring point.

[0010] S3: Calculate the grayscale similarity between a given pixel i and any other pixel in the same region.

[0011] By selecting regions, the entire spot area is divided into several independent regions. The purpose is to facilitate the calculation of pixel grayscale similarity, that is, to calculate the grayscale similarity of pixels within the same region. This avoids calculating the similarity of two pixels with excessively large grayscale similarity differences. On the one hand, when the grayscale similarity difference is too large, there is no similarity between the two by default, which can reduce meaningless calculations and reduce the amount of computation. On the other hand, it can avoid data with excessively large similarity differences from interfering with the similarity results, leading to inaccurate similarity calculation results.

[0012] S4: Calculate the similarity of a given pixel i with the grayscale of all pixels within the region.

[0013] To ensure data accuracy, the grayscale similarity between pixel i and other pixels in the same region is calculated to obtain the grayscale consistency similarity between the pixel and its neighboring pixels. The grayscale consistency similarity is used as the metric for evaluating the grayscale similarity between pixel i and other pixels.

[0014] S5: Calculate the stability of the grayscale value of pixel i at different times.

[0015] To further improve the accuracy of the centroid position of the light spot, the applicant, taking into account the characteristic that the gray value change at the centroid is small during the movement of the light spot, considers the gray value similarity of the same pixel projection point at different times as a factor. To distinguish them, the gray value similarity of the same pixel at different times is defined as the gray value stability of the projection point.

[0016] S6: Calculate the centroid confidence score ζ i .

[0017] Centroid confidence level ζ i To characterize the confidence that pixel i is the centroid, in the aforementioned steps, the grayscale similarity between the pixel and its neighboring pixels has been obtained, and the grayscale stability of the pixel projection point at different times has been obtained. In this invention, the sum of grayscale similarity and grayscale stability is used as the basis for evaluating the confidence of the spot centroid.

[0018] Secondly, the present invention also provides a system for determining the centroid of a laser beam in laser communication; the system includes:

[0019] The pixel grayscale value recording module is used to record the pixel grayscale value;

[0020] The pixel filtering module is used to filter valid pixels;

[0021] The grayscale similarity calculation module is used to calculate the grayscale similarity and consistency similarity between any valid pixel and its adjacent pixels.

[0022] The grayscale stability calculation module is used to calculate the grayscale stability of any pixel's projection point at different times.

[0023] The centroid confidence calculation module is used to calculate the probability that a certain point is the centroid.

[0024] Thirdly, the present invention provides an electronic device including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the first aspect.

[0025] Fourthly, the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in the first aspect.

[0026] The present invention achieves the following technical effects compared to the prior art:

[0027] This invention continuously monitors the grayscale changes of each pixel within a certain time period during the movement of a light spot, dynamically analyzes the grayscale changes within the light spot region at different times, evaluates the stability of the grayscale of pixels within the light spot region and the similarity of grayscale with adjacent pixels, and obtains the probability that a certain pixel is the centroid of the light spot, thereby determining the centroid point of the light spot. This invention is particularly suitable for dynamic light spot centroid tracking and has important significance in light spot tracking and light spot trajectory prediction. The calculation results of this invention are accurate and can avoid the phenomenon of non-unique centroids in existing methods. For example, it can solve the drawback of multiple pixels having the same grayscale value in grayscale value extraction centroid methods, thus making it impossible to determine a unique centroid. It can also overcome the drawback of the Hough centroid detection method having tied votes, thus calculating multiple reliable centroid points. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments 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.

[0029] Figure 1 A schematic diagram of a light spot image that is symmetrical about the grayscale axis;

[0030] Figure 2 This is a schematic diagram illustrating the relationship between the grayscale value and the centroid position of the light spot in this invention;

[0031] Figure 3 for Figure 2 A schematic diagram showing the light spot shifted upwards by 40 pixels.

[0032] Figure 4 This is a schematic diagram showing that point m is located in multiple regions;

[0033] Figure 5 This is a schematic diagram of the calculation process of the present invention. Detailed Implementation

[0034] 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.

[0035] The purpose of this invention is to provide a method and system for determining the centroid of a laser spot in laser communication. By monitoring the grayscale change of a point within the laser spot area over different time periods, the stability of the grayscale change at that point is calculated, and the grayscale similarity between adjacent points is calculated. Finally, the confidence level of the centroid at a point is obtained, and the location of the laser spot centroid is determined.

[0036] First, this invention targets light spot images with grayscale symmetry, such as... Figure 1 As shown, this image is a typical axisymmetric spot image. In this image, the gray value is the highest at the edge of the spot, while the gray value is the lowest at the centroid of the spot. Theoretically, the centroid of the spot is the brightest pixel in the middle of the spot.

[0037] In addition, a basic description is made of the pixel gray-scale features of the axially symmetric spot image. In the above axially symmetric spot image, among the pixel points on the same radial line, the gray-scale differences between any two adjacent pixel points are different. The farther the distance from the centroid of the spot, the greater the gray-scale difference. That is, the magnitude of the gray-scale difference between two pixel points is related to the distance between the two points and the centroid of the spot. The farther the distance from the centroid of the spot, the greater the gray-scale difference between two adjacent pixels. For the convenience of understanding, the applicant uses the points in the attached Figure 2 to describe. In Figure 2 , O is the centroid point, OE is the radius of the spot O. There are four points A, B, C, and D in sequence on OE, and the line segment OA < OB < OC < OD, and there is OA = AB = BC = CD. If the pixel gray-scale difference between point A and point B is n1, the pixel gray-scale difference between point B and point C is n2, and the pixel gray-scale difference between point C and point D is n3, then n1 < n2 < n3. That is, as the distance of the pixel point from the centroid of the spot increases, the gray-scale difference between it and the adjacent pixel point becomes larger and larger. Generally speaking, the change of the light and dark of the spot gradually darkens from the centroid to the edge, that is, the gray scale gradually increases from the centroid to the edge, and the rate of increase becomes "faster" and "faster". Since the dynamic spot image is the continuous offset of the static spot image, therefore, during the movement of the spot, for a fixed point within the projection area of the spot, the farther the point is from the centroid of the spot, the greater the gray-scale change as the spot moves, and the worse the stability of its gray-scale value. For example, if the spot in Figure 2 is offset upward by 40 pixels, Figure 3 is obtained. It can be seen that the change of the pixel gray-scale value of point O is the smallest, while the change of the gray-scale value of point E is the largest. The gray-scale change values of points O, A, B, C, D, and E increase in sequence.

[0038] Secondly, the main calculation method and calculation object of this invention will be introduced. This invention is for determining the centroid of a moving light spot. As the light spot moves, its projection position changes. For example, at the first moment, pixels A and B on the light spot are projected onto the background, forming projection points A1 and B1 on the background, respectively. As the light spot moves, the projection points of pixels A and B change. For instance, at the second moment, the projection points of A and B are C1 and D1 on the background, respectively. At this time, A1 and B1 on the background become the projection points of other pixels E and F of the light spot. Since the grayscale of each pixel within the light spot area is different—that is, the grayscale of the projection formed by each pixel is different—the grayscale values ​​of points A1 and B1 on the background are not the same at the first and second moments. This invention focuses on point A1 or B1 on the background, monitoring its grayscale changes during the movement of the light spot, evaluating its grayscale stability at different times, comparing it with adjacent points, calculating the similarity of grayscale with adjacent points, and obtaining the probability that the projection point on the background is the centroid projection point of the light spot. In the following description of this invention, any point A1 on the background is referred to as a pixel, and the grayscale change of A1 is taken as the research object. Furthermore, in this invention, by setting a certain monitoring time, all pixels within the spot area are selected for monitoring. Since the spot is in motion, some monitoring points will no longer be within the spot area over time. To ensure the accuracy of the calculation results, monitoring points that remain within the spot area throughout the monitoring time are considered valid monitoring points. The centroid of the spot is determined by calculating the stability of the grayscale values ​​of each valid monitoring point.

[0039] The method for determining the centroid of a light spot provided by this invention includes the following steps:

[0040] S1: Select a pixel i within the light spot area as the monitoring point and record the gray value of that point at time t.

[0041] Specifically, in this step, multiple pixels within the spot area are selected as monitoring points. To make the calculation results more accurate, all pixels within the spot area should be selected as monitoring points. For ease of understanding, in this embodiment, different monitoring points are named as: first pixel, second pixel, ... Assuming the spot area contains a total of m pixels, a grayscale set S = {S1, S2, S3, S4, ... S} is formed. m},

[0042] S2: Determine the valid monitoring pixels.

[0043] In the acquired spot images, the edges are often blurred, leading to the misidentification of non-spot areas as monitoring pixels. However, the centroid of the spot must exist within the spot area. Therefore, it is necessary to ensure that the monitored pixels are located within the spot area, i.e., they are valid pixels. Generally, when the grayscale value of a pixel is 100%, the pixel is located outside the spot area and is an invalid monitoring pixel; when the grayscale value of a pixel is less than 100%, the pixel is located within the spot area and is a valid monitoring point.

[0044] Furthermore, since the light spot is moving, some monitoring points will no longer be located within the light spot area over time. Because the centroid of the light spot must be within the light spot area, to ensure the accuracy of the calculation results, monitoring points that remain within the light spot area throughout the monitoring period are considered valid monitoring points. Specifically, if a pixel's grayscale value is 100% at a certain moment, it means that the point is not located within the light spot area at that moment. To ensure the accuracy of the calculation results, if a pixel has a grayscale value of 100% at any two moments, it is determined to be an invalid monitoring point. This invalid monitoring point is not included in subsequent calculations. That is, if a pixel has a grayscale value of 100% twice during the monitoring process, it means that the point is outside the light spot area at both moments and is not applicable to this method for calculation; therefore, it is listed as an invalid monitoring pixel. Furthermore, in order to ensure the accuracy of the calculation results and reduce the impact of invalid monitoring points on the calculation results, when a pixel has a gray value of 100% at any time, the current pixel is determined to be an invalid monitoring point. That is, when the gray value of any pixel reaches 100%, the pixel is defined as an invalid monitoring point. Invalid monitoring points are not related to the monitoring time, but only to their gray value.

[0045] S3: Calculate the grayscale similarity between pixel i and any other pixel in the same region.

[0046] Specifically, pixel i refers to any valid pixel monitoring point determined in step S2. The selection of this region is based on this pixel point as the center, and includes all pixels within a certain range. For example, it can be all valid pixels within a circular area with radius r centered on the valid pixel point, where radius r contains at least one pixel and is smaller than the radius of the spot area. By selecting the region, the entire spot area is divided into several independent regions. The purpose is to facilitate the calculation of pixel grayscale similarity, that is, to calculate only the similarity of pixel grayscale within the current region, thereby avoiding similarity calculation for two pixels with excessively large grayscale similarity differences. On the one hand, when the grayscale similarity difference is too large, there is no similarity between the two by default, thus reducing meaningless calculations and reducing the computational load. On the other hand, it can avoid data with excessively large similarity differences interfering with the similarity results, leading to inaccurate similarity calculations. It should be noted that the same pixel point may belong to multiple regions. For example, pixel i may belong to multiple different regions simultaneously. Figure 4 Point m is located in both region A and region B.

[0047] Specifically, in order to facilitate the quantization of the pixel grayscale value S of a certain pixel point i at time t i (t) and the pixel gray value S of any adjacent pixel j j To ensure grayscale consistency between (t), a membership function is introduced here to represent the grayscale values ​​S. i (t), S j (t) corresponds to the uniform function C in the range [0,1]. ij (t) represents the pixel grayscale value S of pixel i at time t. i (t) and the pixel gray value S of pixel j j Gray level consistency between (t).

[0048] Specifically, the consistency function C ij (t) is calculated as follows:

[0049]

[0050] In the above consistency function C ij In (t), the function range takes continuous values ​​in the interval [0,1]. When the range is closer to 1, it means that the gray values ​​of pixel i and pixel j are closer, and the similarity between the two pixel gray values ​​is higher. Conversely, when the range is closer to 0, it means that the difference between the gray values ​​of pixel i and pixel j is higher, and the similarity is worse.

[0051] S4: Calculate the similarity of pixel i with the grayscale of all pixels in the region.

[0052] In step S3, the grayscale similarity between pixel i and any adjacent pixel j has been calculated. Obviously, in order to ensure the accuracy of the data, the grayscale similarity between pixel i and all other pixels in the same region should be calculated to obtain the grayscale consistency similarity between the pixel and its adjacent pixels. The grayscale consistency similarity is used as the index to judge the grayscale similarity between pixel i and other pixels.

[0053] Specifically, the method for calculating grayscale consistency similarity is as follows:

[0054]

[0055] In the above formula, gray-level uniformity similarity U i The magnitude of (t) indicates the degree of similarity between the gray value of pixel i and the gray values ​​of its neighboring pixels. As mentioned earlier, the brightness of the spot gradually decreases from the centroid to the edge, meaning the gray value gradually increases from the centroid to the edge. Furthermore, for two pixels at the same pixel distance, the farther away from the centroid, the greater the gray value difference, indicating a more pronounced gray value change. Therefore, the gray value similarity between the spot's centroid and its neighboring pixels is the highest, while the gray value similarity between pixels at the edge and their neighboring pixels is the lowest. When U i The larger (t) is, the higher the gray-level similarity between pixels, and the closer pixel i is to the centroid of the spot.

[0056] S5: Calculate the stability of the grayscale value of pixel i at different times.

[0057] Step S4 yields the pixel with the highest similarity in the static spot image, i.e., the spot centroid. Generally, in laser communication, the spot moves along with the light emitting device. Without interference from other factors, the spot centroid does not jump during movement. Therefore, for the projection point of the spot centroid, the pixel grayscale similarity is high within a short time interval during spot movement. This is because the spot centroid has high grayscale similarity with adjacent pixels. When the spot centroid moves, the original projection point is no longer the centroid projection point, but becomes the projection point of adjacent pixels, ultimately resulting in high pixel grayscale similarity at the spot centroid projection point. Based on this, to further improve the accuracy of the spot centroid location, the applicant, considering the small grayscale change at the centroid during spot movement, takes the grayscale similarity of the same pixel projection point at different times as a factor. To differentiate this, the grayscale similarity of the same pixel at different times is defined as the grayscale stability of the projection point.

[0058]

[0059] In the above formula, C i (t kThis represents the grayscale change of the projected point of pixel i at two different times, forming a graph with different times t. k The grayscale values ​​in the variable are functions of the variable t. k It is a time set formed at different times, where k = {1, 2, ..., n}, and r ∈ k, s ∈ k, C i (t k This function describes the grayscale similarity of the same pixel at two different times. The function's value range is continuous in the interval [0,1]. The closer the value range is to 1, the closer the grayscale values ​​of pixel i are at different times. Conversely, the closer the value range is to 0, the higher the difference in grayscale values ​​of pixel i at different times.

[0060] To further accurately describe the grayscale similarity of the same pixel at different time points, the grayscale stability of the pixel projection point is used for characterization. The calculation method is as follows:

[0061]

[0062] In the above formula, n is the number of time points, and k = {1, 2, ..., n}.

[0063] S6: Calculate the centroid confidence score ζ i .

[0064] The centroid confidence level ζ i To characterize the confidence level of pixel i as the centroid, in the aforementioned steps, the grayscale similarity between the pixel and its neighboring pixels has been obtained, and the grayscale value stability of the pixel projection point at different times has been obtained. As can be seen from the aforementioned analysis, the pixel grayscale stability at the centroid of the spot is the best, and its grayscale value is closest to that of its neighboring pixels. Therefore, in this invention, the sum of grayscale similarity and grayscale value stability is used as the basis for evaluating the confidence level of the centroid of the spot.

[0065] The calculation is as follows:

[0066]

[0067] The above credibility ζ i The value range is within the interval [0,2]. To more intuitively represent the magnitude of its credibility, the credibility is expressed as a percentage, specifically:

[0068]

[0069] The centroid confidence level mentioned above can be understood as the probability that a certain pixel is the centroid of the spot, that is, the pixel with the highest probability is the centroid of the spot.

[0070] The present invention also provides a system for determining the centroid of a laser beam in laser communication; the system includes: a pixel grayscale value recording module, a pixel filtering module, a grayscale value similarity calculation module, a grayscale value stability calculation module, and a centroid confidence calculation module;

[0071] The pixel grayscale value recording module is used to record the pixel grayscale value;

[0072] The pixel filtering module is used to filter valid pixels;

[0073] The grayscale similarity calculation module is used to calculate the grayscale similarity and consistency similarity between any valid pixel and its adjacent pixels.

[0074] The grayscale stability calculation module is used to calculate the grayscale stability of any pixel's projection point at different times.

[0075] The centroid confidence calculation module is used to calculate the probability that a certain point is the centroid.

[0076] The present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the method for determining the centroid of a laser spot applied to laser communication as described in the first aspect.

[0077] Furthermore, the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the method for determining the centroid of a laser spot applied to laser communication as described in the first aspect.

[0078] In further embodiments, the present invention also provides:

[0079] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When executed by the processor, the computer instructions perform the method for determining the centroid of a laser beam used in laser communication as described in Embodiment 1. For simplicity, further details are omitted here.

[0080] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0081] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.

[0082] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method for determining the centroid of a laser spot applied to laser communication as described in Embodiment 1.

[0083] The method in Example 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.

[0084] Those skilled in the art will recognize that the units, i.e., algorithm steps, of the various examples described in connection with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0085] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0086] This specification uses specific examples 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. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Those skilled in the art should understand that, based on the technical solutions of the present invention, various modifications or variations that can be made by those skilled in the art without creative effort are still within the protection scope of the present invention.

[0087] In summary, the contents of this specification should not be construed as limiting the present invention.

Claims

1. A method for determining the centroid of a laser spot used in laser communication, characterized in that, Includes the following steps: Step 1: Select a pixel i within the light spot area as the monitoring point, and record the gray value S of that point at time t. i (t); Step 2: Calculate the grayscale similarity C between a given pixel i and any other pixel within the same region. ij (t); Step 3: Calculate the grayscale stability C of pixel i at two different times. i (t k ); Step 4: Calculate the centroid confidence level ζ using grayscale similarity and grayscale value stability. i ; In step two above, the gray-level similarity calculation also includes: calculating the uniform similarity between a certain pixel and all pixels in the region, i.e., the uniform gray-level similarity U. i (t); Step three above also includes calculating the grayscale value stability U of pixel i at multiple different times. i (t k ); In step four above, the centroid confidence level ζ i The similarity Ui(t) based on grayscale consistency and grayscale stability U i (t k It was calculated.

2. The method for determining the centroid of a laser spot in laser communication according to claim 1, characterized in that, The grayscale similarity calculation method is as follows: using a membership function, the grayscale values ​​S of pixel i and pixel j are... i (t), S j (t) corresponds to the uniform function C in the range [0,1]. ij (t) represents the pixel grayscale value S of pixel i at time t. i (t) and the pixel gray value S of pixel j j Gray-level similarity between (t); Specifically, the consistency function C ij (t) The gray-level similarity is calculated as follows: C i j ( t ) = e x p - 1 2 S i ( t ) - S j ( t ) When the value is closer to 1, it means that the gray values ​​of pixel i and pixel j are closer, and the similarity between the two pixels is higher. Conversely, when the value is closer to 0, it means that the difference between the gray values ​​of pixel i and pixel j is greater, and the similarity is worse.

3. The method for determining the centroid of a laser spot applied to laser communication according to claim 1, characterized in that, The method for calculating grayscale value stability is as follows: First, the grayscale stability of the same pixel at two different times is calculated as follows: C i ( t k ) = e x p - 1 2 S i t r - S i t s In the above formula, S i (t r ) and S i (t s C represents the grayscale value of pixel i at time r and time s, respectively. i (t k This represents the grayscale change of the projected point of pixel i at two different times, forming a graph with different times t. k The grayscale values ​​in the variable are functions of the variable t. k It is a time set formed at different times, where k = {1, 2, ..., n}, and r ∈ k, s ∈ k, C i (t k The function describes the grayscale stability of the same pixel at two different times. The function takes continuous values ​​in the interval [0,1]. When the value range is closer to 1, the grayscale values ​​of pixel i at different times are closer. Conversely, when the value range is closer to 0, the grayscale values ​​of pixel i at different times are more different. Secondly, to further accurately describe the grayscale stability of the same pixel at different times, the stability of the pixel's grayscale at multiple times is calculated. The calculation method is as follows: In the above formula, U i (t k ) represents the stability of pixel i's grayscale value at multiple time points, where n is the number of time points, and k = {1, 2, ..., n}.

4. The method for determining the centroid of a laser spot in laser communication according to claim 1, characterized in that, The method for calculating the grayscale similarity of each pixel is as follows: In the above formula, U i The value of (t) indicates the similarity between the gray value of pixel i and the gray values ​​of its neighboring pixels, j is any pixel in this region, and m is the number of pixels in this region.

5. The method for determining the centroid of a laser spot in laser communication according to claim 1, characterized in that, The method for calculating the centroid confidence level is as follows: The calculation is as follows: In the above formula, U i (t) represents the similarity of pixel i to other pixels in terms of grayscale, U i (t k The expression represents the stability of pixel i's grayscale value across multiple time points. To more intuitively represent its reliability, this reliability is expressed as a percentage, specifically: The centroid confidence level mentioned above can be understood as the probability that a certain pixel is the centroid of the spot, that is, the pixel with the highest probability is the centroid of the spot.

6. The method for determining the centroid of a laser spot in laser communication according to claim 1, characterized in that, Between step one and step two, the following step is also included: determining the effective monitoring pixels. When the gray level of any pixel reaches 100%, the pixel is defined as an invalid monitoring pixel; otherwise, it is a valid monitoring pixel.

7. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the method according to any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, perform the method described in any one of claims 1-6.