Light spot detection method and device, electronic equipment and storage medium

By segmenting the spot image and fitting the energy distribution function, the problem of insufficient detection accuracy of the spot center is solved, and higher detection accuracy and communication effects are achieved.

CN119991767AActive Publication Date: 2025-05-13CHONGQING SATELLITE NETWORK SYSTEM CO LTD

Patent Information

Application Number
CN202510438821.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-05-13
Estimated Expiration
2045-04-09

AI Technical Summary

Technical Problem

The prior art is difficult to accurately determine the center of the spot in spot detection, which affects the effect of laser communication.

Method used

By acquiring the spot image, performing image segmentation to obtain the spot area image, determining the spot energy distribution function, and using the Taylor expansion fitting function, calculate the extreme point offset until the offset is not greater than the preset threshold value, and determine the center of the target spot.

Benefits of technology

The accuracy of spot center detection is improved, ensuring the stability and communication effect of the laser communication system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991767A_ABST
    Figure CN119991767A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a light spot detection method and device, electronic equipment and a storage medium, and relates to the technical field of laser communication.The light spot detection method comprises the steps that a light spot image is obtained, and the light spot image comprises at least one laser imaging light spot; image segmentation is carried out on the light spot image to obtain at least one light spot area image, and each light spot area image comprises a light spot; for each light spot area image, determining a light spot energy distribution function corresponding to the light spot area image; determining a first light spot center based on the light spot energy distribution function; taking the center of the first light spot as an initial interpolation center, and calculating an offset; and when the offset is not greater than a preset threshold value, determining a target light spot center based on an interpolation center corresponding to the offset. Through the light spot detection method and device, the electronic equipment and the storage medium provided by the embodiment of the invention, the light spot detection precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of laser communication technology, and in particular to a light spot detection method, device, electronic equipment and storage medium. Background Art

[0002] Compared with microwave communication, laser communication has the advantages of large communication capacity, security and confidentiality, strong anti-interference ability, small communication delay, and low power consumption, and is a hot spot in the development of the communication field. In recent years, my country has achieved rapid development in the field of laser communication. With the continuous development of satellite communications, laser communication technology plays a vital role, and spot detection is an important part of the laser communication process that affects the communication effect. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a light spot detection method, device, electronic device and storage medium to improve the light spot detection accuracy. The specific technical solution is as follows:

[0004] In a first aspect, a light spot detection method is provided, comprising:

[0005] Acquire a spot image, wherein the spot image includes at least one laser imaging spot;

[0006] Performing image segmentation on the light spot image to obtain at least one light spot region image, each light spot region image including a light spot;

[0007] For each light spot area image, determining a light spot energy distribution function corresponding to the light spot area image;

[0008] Based on the light spot energy distribution function, determining a first light spot center;

[0009] Using the Taylor expansion of the light spot energy distribution function at the interpolation center as a fitting function, wherein the first light spot center is used as an initial interpolation center;

[0010] Calculating the offset of the extreme point of the fitting function relative to the interpolation center;

[0011] If the offset is greater than a preset threshold, the sum of the interpolation center and the offset is used as a new interpolation center, and the step of using the Taylor expansion of the spot energy distribution function at the interpolation center as a fitting function is returned to execute until the offset is no greater than the preset threshold, and the target spot center is determined based on the interpolation center.

[0012] Optionally, determining the first light spot center based on the light spot energy distribution function includes:

[0013] The maximum point of the light spot energy distribution function is calculated as the first light spot center.

[0014] Optionally, determining the first light spot center based on the light spot energy distribution function includes:

[0015] Performing Gaussian convolution on the light spot energy distribution function to obtain a blurred light spot energy distribution function;

[0016] The maximum point of the blurred light spot energy distribution function is calculated as the first light spot center.

[0017] Optionally, determining the target spot center based on the interpolation center includes:

[0018] The interpolation center when the offset is not greater than the preset threshold is used as the target spot center; or the sum of the interpolation center and the offset when the offset is not greater than the preset threshold is used as the target spot center.

[0019] Optionally, the method further comprises:

[0020] When the offset calculated by taking the first light spot center as the initial interpolation center is not greater than the preset threshold, the first light spot center is taken as the target light spot center.

[0021] Optionally, performing image segmentation on the light spot image to obtain at least one light spot area image includes:

[0022] Determine the segmentation threshold based on application scenario requirements;

[0023] Binarizing the spot image using the segmentation threshold;

[0024] Connectivity analysis is performed on the binarized light spot image to obtain at least one light spot area image.

[0025] Optionally, determining the segmentation threshold based on application scenario requirements includes:

[0026] When the number of target pixel points is greater than a preset number, a segmentation threshold set by a user is obtained, wherein the target pixel point is a pixel point in the spot image whose brightness value is greater than a preset brightness threshold;

[0027] When the number of target pixels is not greater than the preset number, the segmentation threshold is automatically assigned.

[0028] In a second aspect, a light spot detection device is provided, comprising:

[0029] An acquisition module, used for acquiring a spot image, wherein the spot image includes at least one laser imaging spot;

[0030] An image segmentation module, used for performing image segmentation on the light spot image to obtain at least one light spot region image, each light spot region image including a light spot;

[0031] A first determination module is used to determine, for each light spot area image, a light spot energy distribution function corresponding to the light spot area image; and determine a first light spot center based on the light spot energy distribution function;

[0032] The second determination module is used to use the Taylor expansion of the light spot energy distribution function at the interpolation center as a fitting function, wherein the first light spot center is used as the initial interpolation center; calculate the offset of the extreme point of the fitting function relative to the interpolation center; if the offset is greater than a preset threshold, use the sum of the interpolation center and the offset as the new interpolation center, and return to execute the step of using the Taylor expansion of the light spot energy distribution function at the interpolation center as the fitting function, until the offset is not greater than the preset threshold, and determine the target light spot center based on the interpolation center.

[0033] Optionally, the first determination module is specifically used to calculate a maximum point of the light spot energy distribution function as the first light spot center.

[0034] Optionally, the first determination module is specifically used to perform Gaussian convolution on the light spot energy distribution function to obtain a blurred light spot energy distribution function; and calculate a maximum point of the blurred light spot energy distribution function as the first light spot center.

[0035] Optionally, the second determination module is specifically used to take the interpolation center when the offset is not greater than the preset threshold as the target spot center; or, take the sum of the interpolation center and the offset when the offset is not greater than the preset threshold as the target spot center.

[0036] Optionally, the device further comprises:

[0037] The third determination module is configured to use the first light spot center as the target light spot center when the offset calculated by using the first light spot center as the initial interpolation center is not greater than the preset threshold.

[0038] Optionally, the image segmentation module is specifically used to determine a segmentation threshold based on application scenario requirements; use the segmentation threshold to binarize the spot image; and perform connectivity analysis on the binarized spot image to obtain at least one spot area image.

[0039] Optionally, the image segmentation module is specifically used to obtain a segmentation threshold set by the user when the number of target pixel points is greater than a preset number, wherein the target pixel point is a pixel point in the spot image whose brightness value is greater than a preset brightness threshold; when the number of target pixel points is not greater than a preset number, the segmentation threshold is automatically assigned.

[0040] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0041] Memory, used to store computer programs;

[0042] The processor is used to implement any method step described in the first aspect when executing a program stored in the memory.

[0043] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0044] An embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned light spot detection methods.

[0045] Beneficial effects of the embodiments of the present invention:

[0046] In the embodiment of the present invention, after acquiring the spot image, the spot image is first segmented to obtain at least one spot area image, and then for each spot area image, the spot energy distribution function corresponding to the spot area image is determined; based on the spot energy distribution function, the first spot center is determined, so that the spot energy distribution function better describes the diffusion of the spot in space, and provides a basis for accurately detecting the spot center. In addition, the first spot center is used as the initial interpolation center, and the Taylor expansion of the spot energy distribution function at the interpolation center is used as the fitting function, wherein the first spot center is used as the initial interpolation center; the offset of the extreme point of the fitting function relative to the interpolation center is calculated; if the offset is greater than the preset threshold, the sum of the interpolation center and the offset is used as the new interpolation center, and the step of using the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function is returned to execute until the offset is not greater than the preset threshold, and the target spot center is determined based on the interpolation center, so that the first spot center determined based on the spot energy distribution function is verified, and the accuracy of the detected spot center is improved.

[0047] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0049] Figure 1 A flow chart of a light spot detection method provided by an embodiment of the present invention;

[0050] Figure 2 A schematic diagram of a light spot detection method provided by an embodiment of the present invention;

[0051] Figure 3 A schematic diagram showing measurement results in an embodiment of the present invention;

[0052] Figure 4 A schematic diagram of the structure of a light spot detection device provided by an embodiment of the present invention;

[0053] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 based on the present invention belong to the scope of protection of the present invention.

[0055] As the communication distance continues to increase, the requirements for the detection and analysis of the beacon light spot and the rough tracking accuracy are becoming higher and higher. The accuracy of the laser spot center detection algorithm directly affects the stability and communication effect of the communication system.

[0056] Reference Figure 1 , an embodiment of the present invention provides a light spot detection method, comprising:

[0057] S11, acquiring a spot image, where the spot image includes at least one laser imaging spot;

[0058] S12, performing image segmentation on the light spot image to obtain at least one light spot region image, each light spot region image including a light spot;

[0059] S13, for each light spot area image, determining a light spot energy distribution function corresponding to the light spot area image;

[0060] S14, determining the center of the first light spot based on the light spot energy distribution function;

[0061] S15, using the Taylor expansion of the light spot energy distribution function at the interpolation center as a fitting function, wherein the first light spot center is used as an initial interpolation center;

[0062] S16, calculating the offset of the extreme point of the fitting function relative to the interpolation center;

[0063] S17, if the offset is greater than the preset threshold, the sum of the interpolation center and the offset is used as the new interpolation center, and the process returns to the step of using the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, that is, returns to S15;

[0064] Until the offset is no greater than the preset threshold, execute S18;

[0065] S18, determining the target spot center based on the interpolation center.

[0066] In the embodiment of the present invention, after acquiring the spot image, the spot image is first segmented to obtain at least one spot area image, and then for each spot area image, the spot energy distribution function corresponding to the spot area image is determined; based on the spot energy distribution function, the first spot center is determined, so that the spot energy distribution function better describes the diffusion of the spot in space, and provides a basis for accurately detecting the spot center. In addition, the first spot center is used as the initial interpolation center, and the Taylor expansion of the spot energy distribution function at the interpolation center is used as the fitting function, wherein the first spot center is used as the initial interpolation center; the offset of the extreme point of the fitting function relative to the interpolation center is calculated; if the offset is greater than the preset threshold, the sum of the interpolation center and the offset is used as the new interpolation center, and the step of using the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function is returned to execute until the offset is not greater than the preset threshold, and the target spot center is determined based on the interpolation center, so that the first spot center determined based on the spot energy distribution function is verified, and the accuracy of the detected spot center is improved.

[0067] Here, detecting the center of the light spot may also be understood as determining the position of the center of the light spot; or, it may also be understood as positioning the light spot. The embodiment of the present invention improves the accuracy of positioning the light spot.

[0068] In S11, the spot image may be a grayscale image or a color image.

[0069] When the acquired light spot image is a color image, the acquired light spot image may be firstly subjected to grayscale processing to obtain a grayscale image for subsequent processing.

[0070] In one possible implementation, a frame of grayscale image is acquired through a camera. The grayscale image is the acquired light spot image. The grayscale image contains more than one laser imaging light spots.

[0071] In an optional implementation, after S11, the following steps may also be included:

[0072] The light spot image is preprocessed. Then, subsequent processing is performed based on the preprocessed light spot image, such as image segmentation of the preprocessed light spot image to obtain a plurality of light spot area images.

[0073] The preprocessing may include one or more operations such as denoising, removing stray light, and enhancing contrast.

[0074] By preprocessing the spot image to reduce interference, the accuracy of subsequent segmentation of the spot image based on the segmentation threshold is guaranteed, thereby improving the accuracy of spot detection and positioning.

[0075] In S12, when the spot image contains more than one laser imaging spot, more than one spot region images can be obtained, that is, multiple spot regions are extracted. Specifically, one laser imaging spot corresponds to one spot region.

[0076] In this step, the segmentation algorithm used to segment the spot image may include a segmentation algorithm for binarization, for example, a manual or automatic threshold segmentation algorithm.

[0077] In one achievable manner, S12 may include: determining a segmentation threshold based on application scenario requirements; binarizing the spot image using the segmentation threshold; and performing connectivity analysis on the binarized spot image to obtain at least one spot area image.

[0078] Based on the requirements of specific application scenarios, you can choose to manually set the segmentation threshold or automatically set the threshold. In this way, you can flexibly select the segmentation threshold for image segmentation according to the requirements of the application scenario. Then, you can choose a suitable segmentation threshold in different application scenarios to obtain good segmentation effects in different application scenarios.

[0079] The manually setting of the segmentation threshold may be manually selecting a value in the range of (0, 255) as the segmentation threshold according to system indicator requirements. The system indicator requirements may include test indicators and the like.

[0080] Automatically setting the threshold can also be understood as selecting an adaptive segmentation threshold. Specifically, the segmentation threshold can be determined by a preset segmentation algorithm, such as the OTSU (maximum between-class variance method) threshold method. The automatic threshold setting method can improve the degree of automation.

[0081] In one possible implementation, when the number of target pixels is greater than a preset number, a segmentation threshold set by the user is obtained, wherein the target pixel is a pixel in the spot image whose brightness value is greater than a preset brightness threshold; when the number of target pixels is not greater than the preset number, a segmentation threshold is automatically assigned.

[0082] The preset pixel threshold and the preset number can be determined according to actual needs or experience, etc. In an example, the preset pixel threshold is 245, and the preset number is 1.

[0083] Acquiring the segmentation threshold set by the user may also be understood as a specific implementation method of manually setting the segmentation threshold.

[0084] In the embodiment of the present invention, a segmentation algorithm based on a manual or automatic threshold (according to specific application requirements) is adopted. In application scenarios with high brightness of the light spot, the threshold can be manually set to adapt to specific requirements, thereby improving the adaptability of the method. For example, in application scenarios with high brightness of the light spot, a higher fixed threshold is selected according to specific application requirements to filter out low-intensity noise points. Automatic threshold setting can be applied in real-time processing or automated systems. For example, in application scenarios such as scenarios with low brightness of the light spot or low signal-to-noise ratio, real-time processing or automated systems, and scenarios with complex or asymmetric light spot distribution, an automatic threshold segmentation algorithm can be adopted.

[0085] For example, a larger spot brightness means that the number of points exceeding the threshold value of the spot is greater than 1, that is, the number of pixels with brightness values ​​greater than 245 in the spot image is greater than 1; under real-time processing and automation systems, the automatic threshold can be automatically adjusted to the range required for system indicator measurement according to the laser power, such as: making the number of points exceeding the threshold value less than 1.

[0086] In the above process of performing connectivity analysis on the binarized spot image, the connectivity analysis may be four-connectivity or eight-connectivity. The number of spots, the initial centroid positions of all spots, the length and width of the spot area, etc. can be obtained through the connectivity analysis.

[0087] On the basis of the binary spot image, the preliminary centroid position, length and width of each spot area in the spot image are obtained based on connectivity analysis, and multiple spot area images can be obtained.

[0088] In addition to accuracy, the speed of the laser spot center detection algorithm also affects the stability and communication effect of the communication system.

[0089] The embodiment of the present invention detects multiple light spots through connectivity analysis. The connectivity domain algorithm itself uses recursion, and the processed image frame rate is very fast, so it can meet the real-time and system indicator detection rate requirements, and realize fast and efficient detection of multiple light spots. Among them, real-time means that detection can be performed under the normal frame rate of the camera. System indicator requirements such as 4000f / s (frame rate) can also ensure that the detection requirements are met in combination with connectivity analysis. Furthermore, subsequent sub-pixel positioning can be performed based on connectivity analysis.

[0090] In S13, for each light spot area image, based on the relationship that the light intensity decreases as the distance from the center of the light spot increases, a light spot energy distribution function corresponding to the light spot area image is determined.

[0091] The light intensity at the center of the light spot formed by a Gaussian beam is the strongest. As the radius increases, the light intensity decreases. When the light intensity decreases to 1 / e² of the central light intensity (e.g. approximately equal to 0.135), the corresponding radius is the beam waist radius of the laser beam. When the light spot image is formed, sometimes the area near the center of the light spot reaches or approaches saturation. Therefore, the mathematical model of the light spot energy distribution (taking the X direction as an example) (i.e., the light spot energy distribution function) can be approximately defined as:

[0092] (Formula 1)

[0093] in, is the maximum energy value on the spot, As the grayscale maximum value of the spot image without saturation, is the coordinate of the extreme value of the spot energy, is the diameter of the spot energy distribution in the X direction, is the coordinate position of the light spot in the X direction, and the pixel brightness represents the brightness value of the pixel point.

[0094] Correspondingly, the mathematical model of the spot energy distribution in the Y direction (that is, the spot energy distribution function) can be approximately defined as:

[0095] (Formula 2)

[0096] in, is the diameter of the spot energy distribution in the Y direction, is the coordinate position of the light spot in the Y direction.

[0097] In an embodiment of the present invention, the light spot energy distribution model can better describe the actual brightness change of the light spot, help understand the shape characteristics of the light spot and its diffusion in space, and further improve the accuracy in subsequent sub-pixel positioning, especially when the light spot has an asymmetric distribution or intensity change, providing a more accurate data basis for locating the center of the light spot.

[0098] In S14, the first light spot center may also be understood as the preliminary light spot center.

[0099] In one achievable manner, S14 may include: calculating a maximum point of the light spot energy distribution function as the first light spot center.

[0100] For example, the maximum point is the coordinate point corresponding to the maximum value of the spot energy distribution function.

[0101] In another achievable manner, S14 may include: performing Gaussian convolution on the light spot energy distribution function to obtain a blurred light spot energy distribution function; and calculating a maximum point of the blurred light spot energy distribution function as the first light spot center.

[0102] Based on the Gaussian blurring of the light spot center positioning, when the CCD (Charge Coupled Device) saturation is not considered, the detection of the light spot center can be transformed into the detection of the local extreme value of the original light spot image.

[0103] In practical applications, the images of multiple light spots usually present different scales, and the sizes of energy saturation areas are also different. It is difficult to determine the exact center of the light spot by detecting the original light spot image. The center position of the light spot remains unchanged after Gaussian blurring, so the center of the light spot can be determined by detecting the extreme values ​​of images of different scales.

[0104] In one possible implementation, the spot energy distribution function is Gaussian convolved using the following formula:

[0105] (Formula 3)

[0106] in, is the energy distribution function of the blurred light spot, is the spot energy distribution function, is a two-dimensional Gaussian convolution kernel, is the fuzzy scale factor.

[0107] Among them, the two-dimensional Gaussian distribution is the expression of the one-dimensional Gaussian distribution in the X direction and the Y direction in the three-dimensional coordinate system. Based on this, E(x,y) is a two-dimensional Gaussian function, and the combination of E(x) and E(y) is E(x,y).

[0108] After appropriate Gaussian blurring of the ideal spot grayscale distribution model, the spot center of the original image , is still the extreme point in the blurred image. Therefore, for a local image containing a single light spot, that is:

[0109] (Formula 4)

[0110] In this way, the center of the light spot can be determined by detecting the local extreme value of the image after Gaussian blur.

[0111] The local image containing a single light spot here is the image of each light spot area obtained above.

[0112] S15 to S18 use the first spot center as the initial interpolation center and calculate the offset; when the offset is not greater than a preset threshold, determine the target spot center based on the interpolation center corresponding to the offset, wherein the offset represents the offset of the interpolation center from the actual spot center.

[0113] In S15, the fitting function is used to fit the grayscale surface in the neighborhood of the center of the light spot.

[0114] In S16, when the first light spot center is used as the initial interpolation center and the calculated offset of the extreme point of the fitting function relative to the interpolation center is not greater than a preset threshold, the first light spot center can be used as the target light spot center.

[0115] S17, if the offset is greater than the preset threshold, the sum of the interpolation center and the offset is used as the new interpolation center. And, return to execute S15 until the offset is no greater than the preset threshold, and execute S18;

[0116] In S18, determining the target spot center based on the interpolation center may include: taking the interpolation center when the offset is not greater than a preset threshold as the target spot center, or taking the sum of the interpolation center and the offset when the offset is not greater than the preset threshold as the target spot center.

[0117] The preset threshold can be determined according to actual needs. In an example, the preset threshold is 0.5.

[0118] The first spot center determined in S14 can be understood as a rough spot center. In simple terms, the pixel-level coordinates of the spot center are roughly determined, which can be expressed by vector Indicates its position, which is the above-mentioned , Represents a transpose operation.

[0119] In order to improve the accuracy of locating the center of the light spot and achieve sub-pixel-level precise positioning of the center of the light spot, the first light spot center is further verified in the embodiment of the present invention. Specifically, the following methods are used:

[0120] Use the Taylor expansion at the center of the first light spot as a fitting function to fit the grayscale surface near the center of the light spot. For example, use the secondary Taylor expansion at the center of the first light spot as a fitting function, as follows:

[0121] (Formula 5)

[0122] Formula 5 is an expression with high terms discarded, where: For the above , is a function exist The value at is a function exist The gradient at (in vector form), is a function exist The Hessian at (i.e., the second-order partial derivative matrix), Represents a transpose operation.

[0123] is the sub-pixel coordinate of the center of the light spot, and its position should be near the pixel center of the light spot, so the coordinate position As the interpolation center, express Relative to At the center of the spot, the fitting surface reaches an extreme value, The first-order derivative of is 0, that is, then the extreme point is relative to the interpolation center The offset of

[0124] (Formula 6)

[0125] in, function exist The Hessian at (i.e., the second-order partial derivative matrix), is a function exist The gradient at .

[0126] In practical applications, if the offset calculated by formula 6 is If the value is greater than a preset threshold, such as 0.5, it means that the interpolation point (i.e., the interpolation center) has deviated from the original pixel-level center coordinates. At this time, the pixel point in its direction is refitted as the interpolation center (i.e., the sum of the interpolation center and the offset is used as the new interpolation center) until the calculated offset is no greater than the preset threshold, which can obtain better results. Finally, the interpolation center and the offset are combined. Determine the sub-pixel spot center.

[0127] In the embodiment of the present invention, the second-order Taylor expansion interpolation method is used for sub-pixel positioning of the center of the light spot, which provides a more accurate offset estimation, and can obtain a more accurate positioning effect on the grayscale surface of the center of the light spot, thereby achieving higher positioning accuracy.

[0128] The above process of determining the center of the light spot can also be understood as a process of positioning the light spot. In addition to positioning the light spot, the embodiment of the present invention may also include: analyzing and measuring at least one light spot area image to obtain attribute information of multiple light spots.

[0129] Specifically, the light spot parameters of each light spot area image are analyzed to obtain the measurement data of the light spot in each light spot area image. The measurement data can also be understood as attribute information.

[0130] The measurement data can include the centroid of the spot area, beam diameter, ellipticity, light intensity distribution, spot tilt angle, etc.

[0131] In addition, the measurement data of the light spots in all the light spot area images in the light spot image may be summarized to obtain the measurement result.

[0132] Furthermore, the measurement results can be output and displayed, for example, crosshair marks of each spot area can be displayed in the spot image.

[0133] The light spot detection method provided in the embodiment of the present invention can also be understood as a spatial multi-spot detection and center positioning method, or a multi-spot beam analysis method, which can simultaneously and rapidly detect multiple light spots and perform analysis and precise positioning.

[0134] Figure 2 A schematic diagram of a light spot detection method provided by an embodiment of the present invention. Figure 2 , the light spot detection method provided by the embodiment of the present invention may include:

[0135] Step 1: Input grayscale image;

[0136] The grayscale image is also the above-mentioned light spot image.

[0137] A frame of grayscale image is acquired through a camera, and the grayscale image contains more than one laser imaging spot.

[0138] Step 2: Preprocessing;

[0139] The grayscale image obtained above is preprocessed by denoising, removing stray light, enhancing contrast, etc. to reduce interference, ensure the accuracy of the image threshold in the next step, and improve the accuracy of light spot detection and positioning.

[0140] Step 3: Manual or automatic thresholding.

[0141] The pre-processed image is segmented using a segmentation algorithm based on manual or automatic threshold (depending on the specific application requirements) to extract the area with multiple light spots.

[0142] The selection of manual or automatic threshold has been described in detail in the above embodiments and will not be repeated here.

[0143] Step 4: Four-connectivity or eight-connectivity analysis.

[0144] The four-connected or eight-connected analysis is performed on the above preprocessed image to calculate the number of light spots and obtain the preliminary centroid positions, length and width of the light spot area of ​​all light spots.

[0145] Step 5: Mathematical model of light spot image.

[0146] Analyzing the spot image imaging to establish the spot image mathematical model can also be understood as establishing a spot energy distribution model for each spot area (the spot area image obtained above), as specifically shown in Formulas 1 and 2 above.

[0147] Step 6: Locate the center of the Gaussian blur spot.

[0148] As analyzed above, in order to locate the center of the light spot more conveniently and accurately, the light spot energy distribution function may be first subjected to Gaussian convolution to perform Gaussian blur, such as by performing Gaussian blur through the above formula 3. Then, the maximum value point of the light spot energy distribution function after Gaussian convolution is determined as the light spot center, such as by determining the light spot center through the above formula 4. The light spot center is also the first light spot center obtained above, and may also be understood as the preliminary light spot center.

[0149] Step 7: Sub-pixel precise positioning.

[0150] Through the above formula 5, the second-order Taylor expansion of the preliminary spot center obtained in step 6 is used as the fitting function to fit the grayscale surface near the spot center, and the offset is calculated through the above formula 6. If the offset is not greater than the preset threshold, such as 0.5, the preliminary spot center obtained in step 6 is determined as the target spot center; and if the offset is greater than the preset threshold, it means that the interpolation point (that is, the above interpolation center) has deviated from the original pixel-level center coordinate. At this time, the pixel point to which it deviates is refitted as the interpolation center (that is, the sum of the interpolation center and the offset is used as the new interpolation center) until the calculated offset is not greater than the preset threshold, and the interpolation center when the offset is not greater than the preset threshold is used as the target spot center, or the sum of the interpolation center and the offset when the offset is not greater than the preset threshold is used as the target spot center.

[0151] Step 8: Spot parameter analysis.

[0152] By analyzing and measuring the spot parameters of each spot area (that is, the above-mentioned spot area images) respectively, more spot measurement data can be obtained, such as the centroid of the spot area, beam diameter, ellipticity, light intensity distribution, and spot tilt angle.

[0153] Step 9: Summarize the measurement data.

[0154] The measurement data of the light spots of all the light spot area images in the grayscale image are summarized to obtain the measurement result.

[0155] Step 10: Mark the center.

[0156] Output and display the measurement results obtained above, for example, display the crosshair mark of the spot area, such as Figure 3 shown.

[0157] Traditional center algorithms such as grayscale centroid method and Hough transform are insufficient in detection accuracy or speed. At present, in some major space-based, ground-based and sea-based projects, higher requirements are put forward for the detection speed, tracking accuracy and multi-spot detection and positioning functions of space laser communication terminals. Therefore, in order to meet the high performance and efficiency requirements of laser communication equipment, improve the accuracy of spot detection, and further improve the speed of spot detection, the embodiment of the present invention provides the above-mentioned spot detection method.

[0158] As a key technology to improve the accuracy and efficiency of laser systems, multi-spot detection and center positioning technology has a wide range of application scenarios in satellite on-orbit laser communications, including multiple key aspects such as multi-target tracking, signal quality assessment, and stray light interference processing. Its advantage is that it can monitor the number, position, intensity, and distribution of light spots in real time, distinguish between target and non-target light spots, and support the system to perform dynamic adjustment, optimization, and fault detection, thereby improving the accuracy and efficiency of the laser system, which is of great significance for promoting industry progress. The embodiments of the present invention can not only perform multi-spot detection and analysis, but also meet the requirements in terms of accuracy and speed.

[0159] One method in the related art is to select and copy multiple spot areas in the image, and use multiple independently running processes to analyze and measure the spot parameters of the spot areas respectively. This method requires manual selection and has a low degree of automation. Multi-threaded parallelism has high hardware requirements. When processing complex images, it may also cause system freezes or crashes due to insufficient memory. In the embodiment of the present invention, the spot area is divided by image segmentation algorithm and connectivity analysis, and the spot center is determined based on the spot energy distribution function for the spot area, and the spot center determined based on the spot energy distribution function is further verified, which improves the accuracy of spot detection, improves the degree of automation, and avoids the high hardware requirements of multi-threading and the system freezes or crashes caused by it.

[0160] Another method in the related art is: after multiple filtering, the classical centroid method is used for binarization processing to calculate the center of gravity of the light spot, and mask image processing is used. On the one hand, the filtering methods in this method all use MATLAB (a mathematical calculation software) functions, which have poor portability and versatility. The light spot detection method in the embodiment of the present invention can improve portability and versatility; on the other hand, mask image processing usually requires additional storage space, and storing and processing multiple images may increase the storage and computing burden. The embodiment of the present invention avoids the storage and computing burden caused by the use of mask image processing.

[0161] There is another method in the related art: matching a specified number of sub-images from an image containing multiple arbitrarily arranged light spots by matching templates, and then performing calculations on the sub-images. In this method, the matching template uses the function of the visual module in the Labview (Laboratory Virtual instrument Engineering Workbench, a graphical programming language development environment) software, which is heavily dependent on the image processing framework, and has poor portability and applicability. Template matching has limitations and is sensitive to image rotation, scaling and lighting changes, which may cause errors, thereby affecting the image detection accuracy. The embodiment of the present invention avoids template matching through the function of the visual module in the Labview software, improves portability and applicability, and avoids the errors that may be caused by template matching, thereby further improving the detection accuracy.

[0162] There is another method in the related art: by filtering and reconstructing the phase spectrum of the discrete information of the spot image, the enhancement of the key target area can be achieved, and then the binarization algorithm and the centroid detection method are adopted. On the one hand, the filtering and reconstruction calculation complexity in this method is high, and it may affect the processing speed, and it is difficult to meet the real-time requirements; on the other hand, the extraction and processing of the phase information involved in this method are easily interfered by noise, resulting in unstable processing results, affecting the accuracy of spot detection and positioning; on the other hand, the inverse discrete cosine transform is used in the reconstruction process of this method, which has high requirements for calculation accuracy. If it is not handled properly, it will affect the final reconstruction effect. The embodiment of the present invention avoids the influence of filtering and reconstruction on the processing speed, can better meet the real-time requirements, avoids the influence of the extraction and processing of phase information on the stability of the processing results, and further improves the detection accuracy. Furthermore, the embodiment of the present invention avoids the inability to meet the calculation accuracy requirements of the inverse discrete cosine transform. In addition, in the embodiment of the present invention, based on the specific application scenario requirements, the segmentation threshold is manually set or the threshold is automatically set, so that the selected segmentation threshold is better adapted to the specific scene, and the false detection or missed detection of low contrast and uneven lighting environments is reduced.

[0163] Corresponding to the light spot detection method provided in the above embodiment, the embodiment of the present invention further provides a light spot detection device, such as Figure 4 As shown, including:

[0164] An acquisition module 401 is used to acquire a spot image, where the spot image includes at least one laser imaging spot;

[0165] An image segmentation module 402 is used to segment the light spot image to obtain at least one light spot region image, each of which contains a light spot;

[0166] A first determination module 403 is used to determine, for each light spot area image, a light spot energy distribution function corresponding to the light spot area image; and determine a first light spot center based on the light spot energy distribution function;

[0167] The second determination module 404 is used to use the Taylor expansion of the spot energy distribution function at the interpolation center as a fitting function, wherein the first spot center is used as the initial interpolation center; calculate the offset of the extreme point of the fitting function relative to the interpolation center; if the offset is greater than a preset threshold, use the sum of the interpolation center and the offset as the new interpolation center, and return to execute the step of using the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, until the offset is no greater than the preset threshold, and determine the target spot center based on the interpolation center.

[0168] Optionally, the first determination module 403 is specifically configured to calculate a maximum point of the light spot energy distribution function as the first light spot center.

[0169] Optionally, the first determination module 403 is specifically configured to perform Gaussian convolution on the light spot energy distribution function to obtain a blurred light spot energy distribution function; and calculate a maximum point of the blurred light spot energy distribution function as the first light spot center.

[0170] Optionally, the second determination module 404 is specifically configured to use the interpolation center when the offset is not greater than a preset threshold as the target spot center; or use the sum of the interpolation center when the offset is not greater than a preset threshold and the offset as the target spot center.

[0171] Optionally, the device further comprises:

[0172] The third determination module is used to take the first light spot center as the target light spot center when the offset calculated by taking the first light spot center as the initial interpolation center is not greater than a preset threshold.

[0173] Optionally, the image segmentation module 402 is specifically used to determine a segmentation threshold based on application scenario requirements; use the segmentation threshold to binarize the spot image; and perform connectivity analysis on the binarized spot image to obtain at least one spot area image.

[0174] Optionally, the image segmentation module 402 is specifically used to obtain a segmentation threshold set by the user when the number of target pixel points is greater than a preset number, wherein the target pixel point is a pixel point in the spot image whose brightness value is greater than a preset brightness threshold; when the number of target pixel points is not greater than a preset number, the segmentation threshold is automatically assigned.

[0175] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501 , a communication interface 502 , a memory 503 and a communication bus 504 , wherein the processor 501 , the communication interface 502 , and the memory 503 communicate with each other via the communication bus 504 .

[0176] Memory 503, used for storing computer programs;

[0177] The processor 501 is used to implement the above-mentioned light spot detection method when executing the program stored in the memory 503.

[0178] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0179] The communication interface is used for communication between the above electronic device and other devices.

[0180] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0181] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0182] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned light spot detection methods are implemented.

[0183] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any one of the light spot detection methods in the above embodiments.

[0184] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0185] It should be noted that, in this article, relational terms such as first and second, etc. are only used 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 "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0186] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0187] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A light spot detection method, characterized in that: include: Acquire a spot image, wherein the spot image includes at least one laser imaging spot; Performing image segmentation on the light spot image to obtain at least one light spot region image, each light spot region image including a light spot; For each light spot area image, determining a light spot energy distribution function corresponding to the light spot area image; Based on the light spot energy distribution function, determining a first light spot center; Using the Taylor expansion of the light spot energy distribution function at the interpolation center as a fitting function, wherein the first light spot center is used as an initial interpolation center; Calculating the offset of the extreme point of the fitting function relative to the interpolation center; If the offset is greater than a preset threshold, the sum of the interpolation center and the offset is used as a new interpolation center, and the step of using the Taylor expansion of the spot energy distribution function at the interpolation center as a fitting function is returned to execute until the offset is no greater than the preset threshold, and the target spot center is determined based on the interpolation center.

2. The method according to claim 1, characterized in that The step of determining the center of the first light spot based on the light spot energy distribution function comprises: The maximum point of the light spot energy distribution function is calculated as the first light spot center.

3. The method according to claim 1, characterized in that The step of determining the center of the first light spot based on the light spot energy distribution function comprises: Performing Gaussian convolution on the light spot energy distribution function to obtain a blurred light spot energy distribution function; The maximum point of the blurred light spot energy distribution function is calculated as the first light spot center.

4. The method according to claim 1, characterized in that: The step of determining the target spot center based on the interpolation center includes: The interpolation center when the offset is not greater than the preset threshold is used as the target spot center; or the sum of the interpolation center and the offset when the offset is not greater than the preset threshold is used as the target spot center.

5. The method according to claim 1, characterized in that The method further comprises: When the offset calculated by taking the first light spot center as the initial interpolation center is not greater than the preset threshold, the first light spot center is taken as the target light spot center.

6. The method according to any one of claims 1 to 5, characterized in that: The step of performing image segmentation on the light spot image to obtain at least one light spot area image comprises: Determine the segmentation threshold based on application scenario requirements; Binarizing the spot image using the segmentation threshold; Connectivity analysis is performed on the binarized light spot image to obtain at least one light spot area image.

7. The method according to claim 6, characterized in that The step of determining the segmentation threshold based on the application scenario requirements includes: When the number of target pixel points is greater than a preset number, a segmentation threshold set by a user is obtained, wherein the target pixel point is a pixel point in the spot image whose brightness value is greater than a preset brightness threshold; When the number of target pixels is not greater than the preset number, the segmentation threshold is automatically assigned.

8. A light spot detection device, characterized in that: include: An acquisition module, used for acquiring a spot image, wherein the spot image includes at least one laser imaging spot; An image segmentation module, used for performing image segmentation on the light spot image to obtain at least one light spot region image, each light spot region image including a light spot; A first determination module is used to determine, for each light spot area image, a light spot energy distribution function corresponding to the light spot area image; and determine a first light spot center based on the light spot energy distribution function; The second determination module is used to use the Taylor expansion of the light spot energy distribution function at the interpolation center as a fitting function, wherein the first light spot center is used as the initial interpolation center; calculate the offset of the extreme point of the fitting function relative to the interpolation center; if the offset is greater than a preset threshold, use the sum of the interpolation center and the offset as the new interpolation center, and return to execute the step of using the Taylor expansion of the light spot energy distribution function at the interpolation center as the fitting function, until the offset is not greater than the preset threshold, and determine the target light spot center based on the interpolation center.

9. The device according to claim 8, characterized in that The first determination module is specifically used to calculate the maximum point of the light spot energy distribution function as the first light spot center.

10. The device according to claim 8, characterized in that The first determination module is specifically used to perform Gaussian convolution on the light spot energy distribution function to obtain a blurred light spot energy distribution function; and calculate the maximum point of the blurred light spot energy distribution function as the first light spot center.

11. The device according to claim 8, characterized in that The second determination module is specifically configured to use the interpolation center when the offset is not greater than the preset threshold as the target light spot center; or use the sum of the interpolation center and the offset when the offset is not greater than the preset threshold as the target light spot center.

12. The device according to claim 8, characterized in that The device also includes: The third determination module is configured to use the first light spot center as the target light spot center when the offset calculated by using the first light spot center as the initial interpolation center is not greater than the preset threshold.

13. The device according to any one of claims 8 to 12, characterized in that The image segmentation module is specifically used to determine a segmentation threshold based on application scenario requirements; use the segmentation threshold to binarize the spot image; and perform connectivity analysis on the binarized spot image to obtain at least one spot area image.

14. The device according to claim 13, characterized in that The image segmentation module is specifically used to obtain a segmentation threshold set by a user when the number of target pixel points is greater than a preset number, wherein the target pixel point is a pixel point in the spot image whose brightness value is greater than a preset brightness threshold; when the number of target pixel points is not greater than a preset number, the segmentation threshold is automatically assigned.

15. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and apparatus for extracting circular luminous spot second-pixel center

    CN101408985A

  • Light spot center detecting method for transmission type target image and bridge deflection image type detecting device

    CN109631787A

  • Method for automatically detecting and positioning light spot target

    CN112767439A

  • Multi-line array laser three-dimensional scanning system, and multi-line array laser three-dimensional scanning method

    WO2017041419A1

Cited By

  • Laser spot positioning method based on wavelet transform and adaptive dual modes

    CN122453930A