A method, device, electronic device and storage medium for spot detection

Through spot image segmentation and energy distribution function analysis, combined with Taylor expansion and Gaussian convolution, the problem of insufficient spot detection accuracy in laser communication is solved, and high-precision and efficient spot center positioning is achieved, meeting the high-precision and real-time requirements of laser communication systems.

CN119991767BActive Publication Date: 2025-07-29CHONGQING SATELLITE NETWORK SYSTEM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has insufficient spot detection accuracy in laser communication, which affects communication effects and system stability.

Method used

By acquiring the spot image, image segmentation and spot energy distribution function analysis are performed, the spot center is determined using Taylor expansion and Gaussian convolution, and combined with subpixel-level positioning technology, the detection accuracy of the spot center is improved.

Benefits of technology

It improves the accuracy and speed of spot detection, meets the requirements of high precision and real-time performance of the laser communication system, and improves the stability and communication effect of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991767B_ABST
    Figure CN119991767B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a spot detection method, apparatus, electronic device, and storage medium, which relate to the technical field of laser communication. Among them, the spot detection method includes: obtaining a spot image, where the spot image includes at least one laser imaging spot; performing image segmentation on the spot image to obtain at least one spot region image, and each spot region image contains one spot; for each spot region image, determining a spot energy distribution function corresponding to the spot region image; based on the spot energy distribution function, determining a first spot center; using the first spot center as an initial interpolation center, calculating an offset; when the offset is not greater than a preset threshold, determining a target spot center based on the interpolation center corresponding to the offset. Through the spot detection method, apparatus, electronic device, and storage medium provided by the embodiments of the present invention, the spot detection accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of laser communication, and particularly to a spot detection method, device, electronic device 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, low power consumption, etc., and is a hot spot in the development of the communication field. In recent years, China has achieved rapid development in the field of laser communication. With the continuous development of satellite communication and the like, laser communication technology plays a crucial role, and spot detection is an important content affecting the communication effect in the process of laser communication. Summary of the Invention

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

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

[0005] Obtain a spot image, where the spot image includes at least one laser imaging spot;

[0006] Perform image segmentation on the spot image to obtain at least one spot region image, and each spot region image contains one spot;

[0007] For each spot region image, determine the spot energy distribution function corresponding to the spot region image;

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

[0009] Use the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, where the first spot center is used as the initial interpolation center;

[0010] Calculate 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, 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 not greater than the preset threshold, and determine the target spot center based on the interpolation center.

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

[0013] Calculate the maximum point of the spot energy distribution function as the first spot center.

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

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

[0016] Calculating the maximum point of the blurred spot energy distribution function as the first spot center.

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

[0018] Taking the interpolation center when the offset is not greater than the 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.

[0019] Optionally, the method further includes:

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

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

[0022] Determining a segmentation threshold based on application scenario requirements;

[0023] Using the segmentation threshold to binarize the spot image;

[0024] Performing connectivity analysis on the binarized spot image to obtain at least one spot region 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, obtaining the segmentation threshold set by the user, where the target pixel points are the pixel points in the spot image whose brightness values are greater than a preset brightness threshold;

[0027] When the number of target pixel points is not greater than the preset number, automatically allocating the segmentation threshold.

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

[0029] An acquisition module, configured to acquire a spot image, where the spot image includes at least one laser imaging spot;

[0030] An image segmentation module for segmenting the spot image to obtain at least one spot region image, where each spot region image contains one spot;

[0031] A first determination module for, for each spot region image, determining the spot energy distribution function corresponding to the spot region image; and based on the spot energy distribution function, determining the first spot center;

[0032] A second determination module for using the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, where the first spot center is used as the 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, using the sum of the interpolation center and the offset as the new interpolation center, and returning 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 not greater than the preset threshold, and determining the target spot center based on the interpolation center.

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

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

[0035] Optionally, 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 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 spot center.

[0036] Optionally, the device further includes:

[0037] A third determination module for, when the offset calculated by using the first spot center as the initial interpolation center is not greater than the preset threshold, using the first spot center as the target spot center.

[0038] Optionally, the image segmentation module is specifically configured to determine a segmentation threshold based on the 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 region image.

[0039] Optionally, the image segmentation module is specifically configured to obtain a segmentation threshold set by the user when the number of target pixel points is greater than a preset number, where the target pixel points are pixel points in the spot image with a brightness value greater than a preset brightness threshold; when the number of target pixel points is not greater than the preset number, automatically allocate a segmentation threshold.

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

[0041] The memory is used to store a computer program;

[0042] The processor is configured to implement the method steps described in any one of the first aspects when executing the program stored in the memory.

[0043] In a fourth aspect, a computer-readable storage medium is provided, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps described in any one of the first aspects are implemented.

[0044] An embodiment of the present invention further provides a computer program product containing instructions, which when running on a computer, causes the computer to execute the above-mentioned spot detection method.

[0045] Advantages of the embodiments of the present invention:

[0046] In the embodiments of the present invention, after obtaining the spot image, first perform image segmentation on the spot image to obtain at least one spot area image, and then for each spot area image, determine the spot energy distribution function corresponding to the spot area image; based on the spot energy distribution function, determine the first spot center. In this way, the diffusion of the spot in space is better described by the spot energy distribution function, providing a basis for accurately detecting the spot center. And, taking the first spot center as the initial interpolation center, using the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, where the first spot center is used as the 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, using the sum of the interpolation center and the offset as the new interpolation center, and returning 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 not greater than the preset threshold, and determining the target spot center based on the interpolation center. In this way, the first spot center determined based on the spot energy distribution function is verified, improving the accuracy of the detected spot center.

[0047] Of course, it is not necessary for any product or method implementing the present invention to achieve all the above-mentioned advantages at the same time. Description of the Drawings

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following briefly introduces the drawings required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.

[0049] Figure 1 It is a flowchart of the spot detection method provided by the embodiment of the present invention;

[0050] Figure 2 It is a schematic diagram of applying the spot detection method provided by the embodiment of the present invention;

[0051] Figure 3 It is a schematic diagram showing the measurement results in the embodiment of the present invention;

[0052] Figure 4 It is a schematic structural diagram of the spot detection device provided by the embodiment of the present invention;

[0053] Figure 5 It is a schematic structural diagram of the electronic device provided by the embodiment of the present invention. Detailed implementation manners

[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art based on the present invention belong to the scope of protection of the present invention.

[0055] With the continuous increase of the communication distance, the requirements for the detection and analysis of the beacon light spot and the coarse tracking accuracy are also getting higher and higher. The accuracy of the laser spot center detection algorithm directly affects the stability and communication effect of the communication system.

[0056] Referring to Figure 1 , the embodiment of the present invention provides a spot detection method, including:

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

[0058] S12, performing image segmentation on the spot image to obtain at least one spot region image, and each spot region image contains one spot;

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

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

[0061] S15. Use the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, where the first spot center is used as the initial interpolation center.

[0062] S16. Calculate 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, 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, that is, return to execute S15.

[0064] Until the offset is not greater than the preset threshold, execute S18.

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

[0066] In the embodiments of the present invention, after obtaining the spot image, first perform image segmentation on the spot image to obtain at least one spot region image, and then for each spot region image, determine the spot energy distribution function corresponding to the spot region image; based on the spot energy distribution function, determine the first spot center. In this way, the diffusion of the spot in space is better described by the spot energy distribution function, providing a basis for accurately detecting the spot center. And, using the first spot center as the initial interpolation center, by using the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, where 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 the 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 not greater than the preset threshold, and determine the target spot center based on the interpolation center. In this way, the first spot center determined based on the spot energy distribution function is verified, improving the accuracy of the detected spot center.

[0067] Among them, detecting the spot center can also be understood as determining the position of the spot center; or, it can also be understood as positioning the spot. The embodiments of the present invention improve the accuracy of spot positioning.

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

[0069] When the obtained spot image is a color image, it can be first grayscale-processed to obtain a grayscale image for subsequent processing.

[0070] In one implementation, a grayscale image is obtained by a camera, and this grayscale image is the obtained spot image, which contains more than one laser imaging spot.

[0071] In an alternative implementation, after S11, it may further include:

[0072] Preprocess the spot image. Then, perform subsequent processing based on the preprocessed spot image, such as performing image segmentation on the preprocessed spot image to obtain multiple spot region images.

[0073] Among them, 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, ensure the accuracy of subsequent segmentation of the spot image based on the segmentation threshold, and then improve 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 image 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 for image segmentation of the spot image may include a segmentation algorithm for binarization. For example, it may be a segmentation algorithm with manual or automatic thresholds.

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

[0078] The segmentation threshold can be selected manually or automatically based on specific application scenario requirements. In this way, the segmentation threshold can be flexibly selected for image segmentation according to application scenario requirements. Furthermore, a suitable segmentation threshold can be selected in different application scenarios to obtain good segmentation effects in different application scenarios.

[0079] Among them, manually setting the segmentation threshold can be to manually select a value within the range of (0, 255) as the segmentation threshold according to system index requirements. The system index requirements may include test indexes, etc.

[0080] Automatically setting the threshold can also be understood as selecting an adaptive segmentation threshold. Specifically, it can be to determine the segmentation threshold through a preset segmentation algorithm, such as the otsu (maximum between-class variance method) threshold method. The way of automatically setting the threshold can improve the degree of automation.

[0081] In one implementation, when the number of target pixels is greater than a preset number, obtain the segmentation threshold set by the user, where the target pixels are the pixels in the spot image whose brightness values are greater than the preset brightness threshold; when the number of target pixels is not greater than the preset number, automatically assign the segmentation threshold.

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

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

[0084] In the embodiments of the present invention, a segmentation algorithm based on manual or automatic threshold (according to specific application requirements) can be used. In application scenarios with high spot brightness, the threshold can be manually set to adapt to specific requirements, improving the adaptability of the method. For example, in application scenarios with high spot brightness, a higher fixed threshold can be 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 those with low spot brightness or low signal-to-noise ratio, real-time processing or automated systems, and complex or asymmetric spot distributions, a segmentation algorithm with an automatic threshold can be used.

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

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

[0087] Based on the binarized spot image, and based on the connectivity analysis to obtain the preliminary centroid positions of each spot and the length and width of the spot area in the spot image, 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] In the embodiments of the present invention, multiple light spots are detected through connectivity analysis. The connectivity domain algorithm itself uses recursion and can process images at a very high frame rate, thus meeting the requirements of real-time performance and the detection rate of system indicators, and enabling fast and efficient detection of multiple light spots. Among them, real-time performance means that detection can be carried out under the condition of meeting the normal frame rate of the camera. The system indicator requirements, such as 4000 f / s (frame rate), can also be ensured to meet the detection requirements in combination with connectivity analysis. Further, 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, the light spot energy distribution function corresponding to the light spot area image is determined.

[0091] For the light spot formed by a Gaussian beam, the light intensity at the center of the light spot is the strongest. As the radius increases, the light intensity decreases. When the light intensity decreases to 1 / e² (approximately equal to 0.135) of the central light intensity, the corresponding radius is the 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 the saturation state. Therefore, the mathematical model of the light spot energy distribution (taking the X direction as an example) (that is, the light spot energy distribution function) can be approximately defined as:

[0092] (Formula 1)

[0093] Among them, is the maximum energy value on the light spot, and can be regarded as the gray-scale maximum value of the light spot image without saturation, is the coordinate of the light spot energy extreme value, is the diameter of the light 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 light spot energy distribution in the Y direction (that is, the light spot energy distribution function) can be approximately defined as:

[0095] (Formula 2)

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

[0097] In the embodiments of the present invention, the actual brightness change of the light spot can be better described through the light spot energy distribution model, which helps to understand the shape characteristics of the light spot and its diffusion in space, and further improves the accuracy in subsequent sub-pixel positioning. Especially in the case where the light spot has an asymmetric distribution or intensity change, it provides a more accurate data basis for the positioning of the light spot center.

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

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

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

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

[0102] Based on the Gaussian blurred light spot center positioning, when not considering the saturation of the CCD (Charge Coupled Device), detecting the light spot center can be transformed into detecting 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 the energy saturation regions are also different. It is difficult to determine the accurate light spot center by detecting the original light spot image. After Gaussian blurring, the position of the light spot center remains unchanged, and the light spot center can be determined by detecting the extreme values of images with different scales.

[0104] In one implementable manner, the Gaussian convolution of the light spot energy distribution function is performed through the following formula

[0105] (Formula 3)

[0106] Where is the blurred light spot energy distribution function, is the light spot energy distribution function, is the two-dimensional Gaussian convolution kernel, is the blurring scale factor.

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

[0108] After appropriately Gaussian blurring the ideal light spot gray level distribution model, the light spot center of the original image , is still at the extreme value 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 are to use the center of the first light spot as the initial interpolation center and calculate the offset; when the offset is not greater than the preset threshold, determine the target light spot center based on the interpolation center corresponding to the offset, where the offset represents the offset of the interpolation center from the actual center of the light spot.

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

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

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

[0116] In S18, determining the target light spot center based on the interpolation center may include: using the interpolation center when the offset is not greater than the preset threshold as the target light spot center, or using 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.

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

[0118] The center of the first light spot determined in the above S14 can be understood as the rough center of the light spot. Briefly understood, that is, the pixel-level coordinates of the center of the light spot are roughly determined, and it can be represented by a vector to represent its position, that is, the , represents the transpose operation.

[0119] In order to improve the accuracy of the light spot center positioning and achieve sub-pixel level precise positioning of the light spot center, in the embodiments of the present invention, the above first light spot center is further verified. Specifically, through the following method:

[0120] Use the Taylor expansion at the above first light spot center as the fitting function to fit the gray-level surface near the light spot center. For example, use the second-order Taylor expansion at the above first light spot center as the fitting function, as follows:

[0121] (Formula 5)

[0122] Equation 5 is an expression for discarding high-order terms, where is the above , is the value of the function at , is the gradient (in vector form) of the function at , is the Hessian (i.e., the second-order partial derivative matrix) of the function at , and represents the transpose operation.

[0123] is the sub-pixel coordinate of the center of the light spot, and its position should be near the pixel-level center of the light spot. Therefore, taking the coordinate position as the interpolation center, then represents 's offset relative to . At the center of the light spot, the fitting surface reaches an extreme value, and the first derivative of is 0, that is, , and the offset of the extreme point relative to the interpolation center is obtained.

[0124] (Equation 6)

[0125] where is the Hessian (i.e., the second-order partial derivative matrix) of the function at , and is the gradient of the function at .

[0126] In practical applications, if the offset calculated by Equation 6 is greater than a preset threshold, such as 0.5, it means that the interpolation point (i.e., the above interpolation center) has deviated from the original pixel-level center coordinate. At this time, re-fit with the pixel point it biases towards as the interpolation center (i.e., the sum of the interpolation center and the offset as the new interpolation center) until the calculated offset is not greater than the preset threshold to obtain better results. Finally, combine this interpolation center and the offset to determine the sub-pixel center of the light spot.

[0127] In the embodiments of the present invention, the second-order Taylor expansion interpolation method is used for sub-pixel positioning of the center of the light spot, providing a more accurate offset estimation, and a more accurate positioning effect can be obtained on the gray surface of the center of the light spot, achieving a higher positioning accuracy.

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

[0129] Specifically, by analyzing the light spot parameters of each light spot area image, the measurement data of the light spots in each light spot area image is obtained. The measurement data can also be understood as attribute information.

[0130] The measurement data may include the centroid of the light spot area, the beam diameter, the ellipticity, the light intensity distribution, the light spot tilt angle, and so on.

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

[0132] And the measurement result can be output and displayed. For example, crosshair marks of each light spot area can be displayed in the light spot image.

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

[0134] Figure 2 For the schematic diagram of applying the light spot detection method provided by the embodiments of the present invention. Refer to Figure 2 , the light spot detection method provided by the embodiments of the present invention may include:

[0135] Step 1: Input a grayscale image;

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

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

[0138] Step 2: Preprocessing;

[0139] Perform preprocessing operations on the obtained grayscale image, including denoising, removing stray light, enhancing contrast, etc., to reduce interference, ensure the accuracy of the threshold for the next step of the image, and improve the accuracy of light spot detection and positioning.

[0140] Step 3: Manual or automatic threshold.

[0141] Adopt a segmentation algorithm based on a manual or automatic threshold (according to specific application requirements) to segment the preprocessed image and extract the areas of multiple light spots.

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

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

[0144] Perform four-connected or eight-connected analysis on the preprocessed image above, calculate the number of light spots, and obtain the initial centroid positions, lengths, and widths of all light spots.

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

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

[0147] Step 6: Gaussian blurred light spot center positioning.

[0148] As analyzed above, in order to more conveniently and accurately position the light spot center, the light spot energy distribution function can be first subjected to Gaussian convolution for Gaussian blur, such as performing Gaussian blur through Formula 3 above. Furthermore, the maximum point of the Gaussian-convolved light spot energy distribution function is determined as the light spot center, such as determining the light spot center through Formula 4 above. This light spot center is also the first light spot center obtained above, and can also be understood as the preliminary light spot center.

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

[0150] Through Formula 5 above, use the second-order Taylor expansion of the preliminary light spot center obtained in Step 6 as the fitting function to fit the gray surface near the light spot center, and through Formula 6 above, calculate the offset. If the offset is not greater than a preset threshold, such as 0.5, then the preliminary light spot center obtained in Step 6 is determined as the target light spot center; while the offset is greater than the preset threshold, indicating that the interpolation point (i.e., the interpolation center above) has deviated from the original pixel-level center coordinate. At this time, re-fit with the pixel point it biases towards as the interpolation center (i.e., the sum of the interpolation center and the offset as the new interpolation center) until the calculated offset is not greater than the preset threshold, and take the interpolation center when the offset is not greater than the preset threshold as the target light spot center, or take the sum of the interpolation center when the offset is not greater than the preset threshold and the offset as the target light spot center.

[0151] Step 8: Light spot parameter analysis.

[0152] Analyze and measure the light spot parameters of each light spot region (i.e., the above light spot region images), and more measurement data of the light spots can also be obtained, such as the centroid of the light spot region, beam diameter, ellipticity, light intensity distribution, and light spot tilt angle.

[0153] Step 9: Summarize the measurement data.

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

[0155] Step 10: Mark the center.

[0156] Output and display the above-obtained measurement result. For example, display the crosshair marks in the light spot area, as Figure 3 shown.

[0157] Traditional center algorithms such as the grayscale centroid method and the Hough transform have deficiencies in detection accuracy or speed. Currently, in some major projects of space-based, ground-based, and sea-based systems, higher requirements are put forward for the detection speed, tracking accuracy, and multi-light spot detection and positioning functions of space laser communication terminals. Therefore, in order to meet the requirements of high performance and effectiveness of laser communication devices, improve the accuracy of light spot detection, and further improve the light spot detection speed, the embodiments of the present invention provide the above light spot detection method.

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

[0159] In a related technology, one way is to: select and copy multiple light spot areas in the image by frame selection, and use multiple independently running processes to analyze and measure the light spot parameters of the light spot areas respectively. This method requires manual frame selection with low automation, and multi-thread parallelism has high requirements for hardware. When processing complex images, it may also cause system jamming or crashing due to insufficient memory. In the embodiments of the present invention, the light spot areas are divided by an image segmentation algorithm and connectivity analysis, and the light spot center is determined based on the light spot energy distribution function for the light spot areas. Further, the light spot center determined based on the light spot energy distribution function is verified, which improves the accuracy of light spot detection, improves the automation degree, and avoids the high requirements for hardware caused by multi-threading and the resulting system jamming or crashing.

[0160] Another approach in the related art is as follows: After multiple filtering operations, the classical centroid method is used for binarization to calculate the centroid of the light spot, and mask image processing is employed. On the one hand, the filtering methods in this approach all use MATLAB (a mathematical calculation software) functions, resulting in poor portability and generality. The light spot detection method in the embodiments of the present invention can improve portability and generality. On the other hand, mask image processing usually requires additional storage space, and storing and processing multiple images may increase the storage and computational burden. The embodiments of the present invention avoid the storage and computational burden caused by using mask image processing.

[0161] There is also another approach in the related art: Multiple sub-images of a specified number are matched from an image containing multiple randomly arranged light spots through template matching, and then calculations are performed on the sub-images. In this approach, the functions of the vision module in Labview (Laboratory Virtual instrument Engineering Workbench, a development environment for graphical programming languages) software are used for template matching. It highly depends on the image processing framework, with poor portability and applicability. Template matching has limitations and is sensitive to image rotation, scaling, and illumination changes, which may lead to errors and thus affect the detection accuracy of the image. The embodiments of the present invention avoid template matching through the functions of the vision module in Labview software, improve portability and applicability, and avoid the errors that may be caused by template matching, further enhancing the detection accuracy.

[0162] There is another approach in the related art: Enhancement of the key target area can be achieved through phase spectrum filtering and reconstruction of the discrete information of the light spot image, and then a binarization algorithm and a centroid detection method are adopted. On the one hand, the filtering and reconstruction in this approach have a high computational complexity and may affect the processing speed, making it difficult to meet the real-time requirement. On the other hand, the extraction and processing of the phase information involved in this approach are easily affected by noise interference, resulting in unstable processing results and affecting the accuracy of light spot detection and positioning. Moreover, the inverse discrete cosine transform is used in the reconstruction process in this approach, which requires high computational accuracy. If not properly processed, it will affect the final reconstruction effect. The embodiments of the present invention avoid the influence of filtering and reconstruction on the processing speed and can better meet the real-time requirement, avoid the influence of the extraction and processing of phase information on the stability of the processing results, and further improve the detection accuracy. Furthermore, the embodiments of the present invention avoid the inability to meet the computational accuracy requirements of the inverse discrete cosine transform. Additionally, based on the specific application scenario requirements in the embodiments of the present invention, the segmentation threshold is manually set or automatically set, enabling the selected segmentation threshold to better adapt to the specific scenario and reducing false detection or missed detection in low-contrast and uneven illumination environments.

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

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

[0165] An image segmentation module 402, configured to perform image segmentation on the spot image to obtain at least one spot region image, and each spot region image contains one spot;

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

[0167] A second determination module 404, configured to use the Taylor expansion of the spot energy distribution function at the interpolation center as a fitting function, where 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 not 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 the maximum value point of the spot energy distribution function as the first spot center.

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

[0170] Optionally, the second determination module 404 is specifically configured to use the interpolation center when the offset is not greater than the preset threshold as the target 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 spot center.

[0171] Optionally, the device further includes:

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

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

[0174] Optionally, the image segmentation module 402 is specifically configured to obtain a segmentation threshold set by the user when the number of target pixel points is greater than a preset number, where the target pixel points are pixel points in the spot image whose brightness values are greater than a preset brightness threshold; when the number of target pixel points is not greater than the preset number, automatically allocate the segmentation threshold.

[0175] An embodiment of the present invention also provides an electronic device, as Figure 5 shown, including a processor 501, a communication interface 502, a memory 503, and a communication bus 504. Among them, the processor 501, the communication interface 502, and the memory 503 complete communication with each other through the communication bus 504.

[0176] The memory 503 is used to store a computer program;

[0177] The processor 501, when executing the program stored on the memory 503, implements the above-mentioned spot detection method.

[0178] The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is shown 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 may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0181] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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 provided by the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above-mentioned spot detection methods are implemented.

[0183] In another embodiment provided by the present invention, there is also provided a computer program product containing instructions, which when running on a computer, causes the computer to execute any one of the above-mentioned 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 using 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 processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. 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, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a Solid State Disk (SSD)).

[0185] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

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

[0187] The above 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 spot detection method, characterized in that Comprising: Obtain a spot image, where the spot image includes at least one laser imaging spot; Perform image segmentation on the spot image to obtain at least one spot region image, and each spot region image contains one spot; For each spot region image, determine the spot energy distribution function corresponding to the spot region image; Based on the spot energy distribution function, determine the first spot center, including: calculating the maximum point of the spot energy distribution function as the first spot center; or, performing Gaussian convolution on the spot energy distribution function to obtain a blurred spot energy distribution function; calculating the maximum point of the blurred spot energy distribution function as the first spot center; Use the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, where 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 not greater than the preset threshold, and determine the target spot center based on the interpolation center; When the offset calculated with the first spot center as the initial interpolation center is not greater than the preset threshold, use the first spot center as the target spot center.

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

3. The method according to claim 1 or 2, characterized in that, The performing image segmentation on the spot image to obtain at least one spot region image includes: Determine a segmentation threshold based on the application scenario requirements; Use the segmentation threshold to binarize the spot image; Perform connectivity analysis on the binarized spot image to obtain at least one spot region image.

4. The method according to claim 3, wherein The determining the segmentation threshold based on the application scenario requirements includes: When the number of target pixels is greater than a preset number, obtain the segmentation threshold set by the user, where the target pixels are the pixels in the spot image with a brightness value greater than a preset brightness threshold; When the number of target pixels is not greater than the preset number, automatically assign the segmentation threshold.

5. A spot detection device, characterized in that, Comprising: An acquisition module for acquiring a spot image, where the spot image includes at least one laser imaging spot; An image segmentation module for performing image segmentation on the spot image to obtain at least one spot region image, and each spot region image contains one spot; The first determination module is configured to, for each spot area image, determine the spot energy distribution function corresponding to the spot area image; and based on the spot energy distribution function, determine the first spot center, including: calculating the maximum point of the spot energy distribution function as the first spot center; or performing Gaussian convolution on the spot energy distribution function to obtain the blurred spot energy distribution function; and calculating the maximum point of the blurred spot energy distribution function as the first spot center. The second determination module is configured to use the Taylor expansion of the spot energy distribution function at the interpolation center as the fitting function, where 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 not greater than the preset threshold, and determine the target spot center based on the interpolation center. The third determination module is configured to, when the offset calculated with the first spot center as the initial interpolation center is not greater than the preset threshold, use the first spot center as the target spot center.

6. The device according to claim 5, 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 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 spot center.

7. The device according to claim 5 or 6, characterized in that, The image segmentation module is specifically configured to determine a segmentation threshold based on the 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.

8. The device according to claim 7, characterized in that The image segmentation module is specifically configured to, when the number of target pixel points is greater than a preset number, obtain the segmentation threshold set by the user, where the target pixel points are the pixel points in the spot image with a brightness value greater than a preset brightness threshold; and when the number of target pixel points is not greater than the preset number, automatically allocate the segmentation threshold.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus. The memory is used to store computer programs. The processor is configured to, when executing the program stored on the memory, implement the method steps described in any one of claims 1-4.

10. 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 the processor, it implements the method steps described in any one of claims 1-4.

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