Star map stray light processing method based on multidirectional gradient

By employing multi-directional gradient calculation and morphological processing, the problem of rapid processing and accurate segmentation of stray light under complex lighting conditions is solved. This achieves purification processing of the target region, improving the robustness, accuracy, and adaptability of target detection. It also addresses the issues of slow processing speed and inaccurate target edge information in existing technologies.

CN121074076APending Publication Date: 2025-12-05BEIJING INST OF TECH

Patent Information

Application Number
CN202510958604.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing technologies are slow to process stray light under complex lighting conditions and are not precise enough in processing target edge information, which limits their effectiveness in large-scale monitoring and rapid response scenarios.

Method used

A multi-directional gradient calculation method is adopted to calculate and normalize the multi-directional gradient value of each pixel in the star map image. Combined with adaptive threshold segmentation and morphological closing operation, the pure star map of the target region is extracted through contour filling and masking.

Benefits of technology

Accurately separating the background and target areas under strong stray light conditions improves the signal-to-noise ratio of the target area, ensures the integrity and robustness of the target area, meets the requirements of high-precision image processing, and achieves rapid stray light suppression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074076A_ABST
    Figure CN121074076A_ABST
Patent Text Reader

Abstract

The invention relates to a star map stray light processing method based on multidirectional gradient, belongs to the technical field of space situation awareness, and solves the technical problems of low processing speed and inaccurate target edge information processing when the existing method is used for processing stray light under a complex illumination condition. Comprising the following steps: performing multidirectional gradient calculation on each pixel point of an original star map image containing stray light to obtain a multidirectional gradient value of each pixel point, and performing normalization processing to obtain a normalized gradient image; carrying out adaptive threshold segmentation on the normalized gradient image to obtain a binary image; performing morphological closed operation on the binarized image to obtain a contour image after the closed operation; and carrying out contour filling on the contour image after the closed operation, and carrying out mask processing to obtain a pure star map image with a reserved target area. The influence of strong stray light on target detection is effectively eliminated, and the precision and robustness of star map image target positioning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of space situation awareness, and particularly relates to a star map stray light processing method based on multi-directional gradients. BACKGROUND

[0002] The space-based situation awareness technology is to detect, identify and track targets of interest by using a series of space-based observation means to obtain the morphological characteristics or motion information of the targets. Strong stray light in the space environment will enter the detector along with the weak light signal of the target and appear on the star map in the form of noise. Stray light is non-target signal interference light, which will reduce the quality of star map imaging and affect the detection and identification of targets. The stray light in the star map can be divided into the following three categories according to the source: non-target stray light outside the field of view, internal radiation stray light and imaging target stray light in the field of view. The general problem faced in visible light observation in the present application is the first type of stray light. In order to effectively eliminate the influence of these stray lights, existing researches mainly focus on two aspects: one is to design a light shield or optimize the optical path to suppress the generation of stray light from the source; the other is to use image processing methods to post-process the obtained image data.

[0003] However, the existing methods still have some common problems. Among them, the problems include insufficient robustness under complex lighting conditions, insufficient processing speed and insufficient accuracy in processing target edge information. Especially in practical applications, such as large-scale monitoring and fast response scenarios, these problems limit the effectiveness and practicality of existing methods. SUMMARY

[0004] In view of the above analysis, the embodiments of the present application aim to provide a star map stray light processing method based on multi-directional gradients, to solve the technical problems of slow processing speed and inaccurate processing of target edge information when existing methods process stray light under complex lighting conditions.

[0005] The purpose of the present application is mainly realized by the following technical solutions:

[0006] The present application provides a star map stray light processing method based on multi-directional gradients, comprising:

[0007] Perform multi-directional gradient calculation on each pixel point of the obtained original star map image containing stray light to obtain the multi-directional gradient value of each pixel point, and obtain a normalized gradient image after normalization processing;

[0008] Perform adaptive threshold segmentation on the normalized gradient image to obtain a binary image;

[0009] The morphological closing operation is performed on the binary image to obtain a closed contour image; the closed contour image is filled with contours and subjected to mask processing to obtain a pure star map image retaining a target region.

[0010] Further, the multi-directional gradient value of each pixel point is obtained by:

[0011] The improved Sobel operator is used to calculate the single-directional gradient value of each pixel point in the neighborhood range corresponding to each pixel point, and the single-directional gradient value includes the single-directional gradient value of each pixel point in the horizontal direction, the vertical direction, the left diagonal direction and the right diagonal direction.

[0012] Based on the single-directional gradient value of each pixel point, the multi-directional gradient value of each pixel point is calculated.

[0013] Further, a 3*3 neighborhood is selected with each pixel point as the center to calculate the single-directional gradient value of each pixel point, as follows:

[0014]

[0015] wherein, G θ (x, y) is the single-directional gradient value of the pixel point (x, y) in the direction θ, K θ (i, j) is the gradient operator corresponding to the direction θ, I(x+i, y+j) is the gray value of the neighborhood of the pixel point (x, y), and i and j are the change ranges in the horizontal and vertical directions, respectively.

[0016] θ is 0°, 45°, 90° or 135°, representing the horizontal direction, the vertical direction, the left diagonal direction and the right diagonal direction, respectively.

[0017] Further, the multi-directional gradient value of each pixel point is obtained by: G (x, y), as follows:

[0018]

[0019] wherein, G x (x, y), G y (x, y), G r (x, y), G l (x, y) are the single-directional gradient values of the pixel point in the horizontal direction, the vertical direction, the left diagonal direction and the right diagonal direction, respectively.

[0020] Further, the multi-directional gradient value of each pixel point is obtained by:

[0021]

[0022] wherein, I norm (x, y) is the normalized multi-directional gradient value of the pixel point (x, y) in the original star image; I G (x, y) is the multi-directional gradient value of the pixel point (x, y), min(I G ), max(I G ) are the minimum and maximum multi-directional gradient values of all pixel points in the original star image, and M is the maximum value of the visible gray value range.

[0023] The normalized gradient values of all pixel points in the original star image form a normalized gradient image corresponding to the original star image.

[0024] Further, the adaptive threshold T is set as follows:

[0025] T = m G +kσ G ;

[0026] wherein, m G is the gradient mean value of the normalized gradient image, σ G is the gradient standard deviation of the normalized gradient image, and k is an adjustable proportion coefficient.

[0027] Based on the normalized gradient value I norm (x, y) of each pixel point, the binary I Binary (x, y) corresponding to the pixel point is obtained by comparing the normalized gradient value with the adaptive threshold, as follows:

[0028]

[0029] wherein, 1 represents a target region, and 0 represents a background region.

[0030] The binary I Binary (x, y) corresponding to all pixel points forms a binary image corresponding to the original star image.

[0031] Further, a morphological closing operation is performed on the binary image to obtain a closed contour image, as follows:

[0032]

[0033] wherein, I close is the closed contour image, I Binary is the binary image, B is a structure element defined based on target shape and size characteristics, is an expansion operation, is an erosion operation.

[0034] Further, the contour image after the closing operation is filled with contours, and a mask processing is performed to obtain a pure star map image retaining a target region, comprising:

[0035] The contour image after the closing operation is filled with contours by using a flood fill algorithm;

[0036] The connected region pixel value of the contour is marked as 1, and other background pixel points are marked as 0 to generate a binary mask;

[0037] The binary mask and the gray value of the pixel points in the original star map image are multiplied pixel by pixel to obtain a semi-pure star map image including the target region; and the background pixel value of the semi-pure star map image including the target region is set to zero to obtain a pure star map image including the target region.

[0038] Further, the binary mask Mask(x, y) is as follows:

[0039]

[0040] Wherein, the pixel value of the target region is 1, and the pixel value of the background region is 0, A inside is the contour image after the closing operation. close The target region is inside.

[0041] Further, the binary mask and the gray value of the pixel points in the original star map image are multiplied pixel by pixel to obtain a semi-pure star map image including the target region, as follows:

[0042] I Result (x, y) = Mask(x, y) * I(x, y);

[0043] Wherein, I Result (x, y) is the semi-pure star map image, and I(x, y) is the gray value of the pixel points in the original star map image.

[0044] The background pixel value of the semi-pure star map image including the target region is set to zero to obtain a pure star map image including the target region, as follows:

[0045]

[0046] Wherein, I Result1 (x, y) is the pure star map image.

[0047] Compared with the prior art, the present application can achieve at least one of the following beneficial effects:

[0048] 1. The method is based on the target and star extraction technology of multi-directional gradient change, which can accurately separate the background and target area in strong stray light environment, and does not depend on a specific background modeling method, so it has high adaptability to different background interference;

[0049] 2. The method combines gradient calculation and morphological closing operation to realize complete extraction of the target area in complex scenes, effectively avoiding target contour breakage or information loss;

[0050] 3. The method uses a gradient-enhanced filling strategy, which not only preserves the integrity of the target area, but also naturally suppresses the transition area caused by stray light, significantly improving the signal-to-noise ratio of the target area and meeting the high-precision image processing requirements;

[0051] 4. The method realizes fast stray light suppression processing, meeting the requirements of processing speed in practical applications, especially in large-scale monitoring and rapid response scenarios, which has significant advantages;

[0052] 5. The method improves the robustness and accuracy of target detection through multi-directional gradient calculation and morphological processing, which can stably extract target information under complex lighting conditions, providing reliable technical support for space target detection and tracking tasks.

[0053] In the present application, the above-mentioned technical solutions can be combined with each other to realize more preferred combination schemes. Other features and advantages of the present application will be described in the subsequent specification, and some advantages will become apparent from the specification or by implementing the present application. The purpose and other advantages of the present application can be achieved and obtained from the specific embodiments described in the specification and the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0054] The accompanying drawings are included to illustrate the present application for the purpose of a specific embodiment, and are not considered as limiting the present application, and the same reference signs represent the same parts throughout the drawings.

[0055] Figure 1 A flow chart of a star map stray light processing method based on multi-directional gradient in an embodiment of the present application;

[0056] Figures 2(a)-2(d) A three-dimensional gray scale image of stray light images under different intensities in an embodiment of the present application;

[0057] Figure 3 A multi-directional gradient setting schematic diagram in an embodiment of the present application;

[0058] Figure 4 A four-directional gradient operator schematic diagram in an embodiment of the present application;

[0059] Fig. 5(a) is a raw star image in an embodiment of the present application;

[0060] Fig. 5(b) is a pure star image obtained by processing the raw star image in the method of the present application. DETAILED DESCRIPTION

[0061] The preferred embodiments of the present application will be described in detail with reference to the drawings, wherein the drawings form a part of the specification. The drawings, together with the present application, are used to explain the principles of the present application, and are not intended to limit the scope of the present application.

[0062] To solve the above problems, the present method proposes a stray light suppression method based on multi-directional gradient. By analyzing the gradient change of the pixels of the target image in multiple directions, combined with a series of fast and efficient image processing techniques, the stray light of the star image is eliminated, and the effective information in the star image is extracted.

[0063] The present application combines an optical camera and provides a fast and robust algorithm to process a star image containing stray light. The purpose is to eliminate the influence of strong stray light such as ground light and sunlight in the star image on target detection, and to realize accurate positioning of stars and targets in the image. As the front end of image processing, it effectively improves the accuracy and robustness of target centroid positioning and feature extraction, and provides technical support for space target detection and tracking tasks. The present application can provide technical support and reference for stray light processing scheme in space target situation awareness, and solve related engineering problems.

[0064] As shown in Fig. 1, one specific embodiment of the present application discloses a star image stray light processing method based on multi-directional gradient, which comprises the following steps: Figure 1

[0065] Step S1, multi-directional gradient calculation is performed on each pixel point of the obtained raw star image containing stray light, to obtain the multi-directional gradient value of each pixel point. After normalization processing, a normalized gradient image is obtained.

[0066] Step S2, adaptive threshold segmentation is performed on the normalized gradient image to obtain a binary image.

[0067] Step S3, morphological closing operation is performed on the binary image to obtain a closed operation profile image. The closed operation profile image is filled and masked to obtain a pure star image retaining the target region.

[0068] The present application shows the mathematical meaning of each step and its role in stray light suppression from multi-directional gradient calculation, morphological processing and mask extraction.

[0069] Step S1 comprises steps S11-S13. ​

[0070] Step S11, obtaining an original star map image containing stray light.

[0071] Due to the difficulty of obtaining spatial target image data under the influence of strong stray light in real environment, image simulation method becomes an important way to study the influence of strong stray light.

[0072] Image simulation first scales and adjusts the target through three-dimensional modeling to ensure the size and shape of the target under different observation conditions.

[0073] Then, space-based observation background such as star background, noise and other factors are added to the target image to simulate the observation conditions in the real astronomical environment. With the addition of stray light, the brightness anomaly in the non-target area of the image will cause the edge of the target to blur or disappear, so it is necessary to process the image through different intensity stray light simulation models to simulate the influence of different intensity stray light. As shown in FIG. 2, three-dimensional gray scale images of stray light images under different intensities. Figures 2(a)-2(d)

[0074] Figures 2(a)-2(d) Four groups of stray light images with different intensities and their three-dimensional gray scale images are shown, and it can be seen that the stray light of the image is due to the incidence of sunlight, which is shown in the image as gradually decreasing in intensity along the diagonal direction of the image from the upper right corner.

[0075] Figures 2(a)-2(d) For different intensity stray light display, the target and stars in the image of FIG. 2(a) are more obvious in the three-dimensional gray scale image, while the group of strong stray light images in FIG. 2(d) almost submerges the star information near the upper right corner of the image, which has a great impact on target detection and star removal.

[0076] In the simulation process, by gradually adjusting the intensity and distribution range of the stray light, the specific influence of the stray light on target detection, recognition and image quality can be evaluated, which provides a basis for subsequent optimization of image processing algorithms.

[0077] In addition, combined with the changes of different environmental noise and background factors, the inhibitory effect of stray light on the robustness and accuracy of the algorithm in the processing of spatial target image can be further analyzed, thereby providing theoretical support and technical guarantee for image processing and target recognition in practical application.

[0078] Exemplarily, the size of the original star map image is 2048x2048, and the target area accounts for about 3% of the total area. The star magnitude range is 1.4 to 4.6 (the smaller the star magnitude value, the brighter the celestial body).

[0079] ​The present application is directed to the processing of space target images under the influence of strong stray light. Exemplarily, the target is a typical double-wing model, and the target object presents a characteristic model of a central main body and two wing structures in the star map. Under the influence of strong stray light, the edges of the double-wing model can be submerged or blurred, resulting in unclear contours of the target.

[0080] In step S12, multi-directional gradient calculation is performed on each pixel point of the original star map image containing stray light, to obtain a multi-directional gradient value of each pixel point.

[0081] Due to the local high brightness of stray light in the star map image, the signal-to-noise ratio of stars and space targets in the image is reduced, and stars of higher magnitude are submerged. The diffusion area of moonlight and sunlight presents a 1 / 4 circular shape, and the influence degree gradually decreases from the center to the surrounding, with a reasonable gray transition and no sudden change.

[0082] The space target image is composed of three parts: target, background, and noise.

[0083] Stray light often presents a bright center and a dark edge, and stray light follows a Gaussian distribution.

[0084] The original star map image is represented as follows:

[0085]

[0086] where I(x, y) is the gray value of a pixel point in the original star map image, reflecting the brightness of the pixel point in the image; A is a constant, the maximum brightness value of the center of the stray light spot, which is usually the maximum brightness response value of the imaging system to the light source, representing the overall intensity of the imaging system to the point source, and reflecting the proportion of the intensity of the light source and the response of the imaging system; x and y are respectively the actual mapping positions of the point light source on the image plane in the imaging process; x0 and y0 are respectively the positions of the center of the stray light spot, which are the ideal positions of the point light source in the imaging system. If there is no imaging error, the imaging system should map the point light source to this position; and sigma is the width of the PSF (Point Spread Function), the standard deviation of the Gaussian function, reflecting the spot expansion degree of the stray light point source and the blur degree of the system.

[0087] A larger sigma value indicates a wider range of spot diffusion, indicating that the system has a more serious blur, and there is strong stray light; while a smaller sigma value indicates a clearer imaging effect. In the star map, the stray light diffusion area usually presents a larger sigma value, and the stars not submerged by stray light correspond to a smaller sigma value. The traditional method uses a fixed sigma value, and in the present application, adaptive sigma estimation is used.

[0088] Exemplarily, the specific value of A is determined by the calibration of the imaging system and the specific application, and generally corresponds to the maximum gray value of the image sensor. Exemplarily, in an 8-bit image system, A takes a value of 255; and σ takes a value of 5.0 pixels. In an 8-bit image, the maximum gray value is 255; and in a 16-bit image, the maximum gray value is 65535.

[0089] The stray light is different from the gradient characteristics of the target, as shown in Table 1.

[0090] Table 1: Difference between stray light and gradient characteristics of the target

[0091]

[0092] The stray light background generally has a smooth change, that is, the gradient changes in each direction are small and uniform, and the strong stray light presents a change in the irradiation direction, so that the effective content in the image also does not have obvious gradient changes in each direction, and the gradient direction of the stray light is unknown, and the change direction of the target cannot be predicted.

[0093] The traditional edge detection only calculates the gradients in the horizontal (0°) and vertical (90°) directions, but under the interference of strong stray light, the following problems exist:

[0094] (1) Missing detection of oblique edges: satellites, stars and other targets can have edges in the directions of 45° or 135° (such as the oblique angle of a solar panel);

[0095] (2) Interference of stray light direction: the diffusion direction of the stray light is unknown, and a single direction gradient can misjudge the halo as an effective edge.

[0096] Therefore, it is necessary to calculate the gradients in four directions for a strong stray light image.

[0097] The multi-directional gradient value of each pixel point is obtained, including:

[0098] The single-direction gradient value of each pixel point is calculated in the neighborhood range corresponding to each pixel point by using an improved Sobel operator, and the single-direction gradient value includes the single-direction gradient values of each pixel point in the horizontal direction, the vertical direction, the left diagonal direction and the right diagonal direction;

[0099] Based on the single-direction gradient values of each pixel point, the multi-directional gradient value of each pixel point is calculated.

[0100] As Figure 3As shown, the setting of the multi-directional gradient in the application is demonstrated. Compared with the traditional single-direction gradient, the method focuses on the gradient information of four main directions in the image, which are horizontal, vertical, left diagonal and right diagonal. The image is calculated, and the gradient of four directions is calculated respectively. The horizontal direction is x (0°), which is used to calculate the gradient in the horizontal direction; the vertical direction is y (90°), which is used to calculate the gradient in the vertical direction; the directions of the two diagonal lines are l and r, which are used to calculate the gradients of the left diagonal line (135°) and the right diagonal line (45°). The four directions cover the common target edge direction.

[0101] Figure 3 In the formula, img(i,j) is the gray value of the pixel point with coordinates (i,j) in the star map image; i and j are the row coordinates and column coordinates of the pixel point respectively, and in the 2048*2048 star map image, the value range of i and j is 1 to 2048.

[0102] Exemplarily, when the star map image is processed by using Matlab, the value range of i and j is generally from 1 to n, which is left-closed and right-closed, that is, the first pixel can be taken to the last one.

[0103] The introduction of the four-direction gradient in the application can more comprehensively capture the edge information in the image, especially in a complex scene, can effectively extract multi-directional edge features, and enhance the robustness of target detection.

[0104] To achieve this goal, the improved Sobel operator is used to calculate the horizontal, vertical, left diagonal and right diagonal four gradients of each pixel point in the star map image to detect the edge. The Sobel operator is a discrete difference operator, which is used to approximately calculate the gradient value of the image brightness function, and is widely used in edge detection tasks. Compared with the traditional Laplace operator, the improved Sobel operator can effectively enhance the weight of the local edge region when calculating the image gradient, especially for the region with obvious mutation (such as star point or target contour), which shows higher sensitivity. In addition, the Sobel operator is better suitable for the image with smooth background, and has significant advantages in suppressing high-frequency noise. Therefore, combined with the four-direction gradient setting, the edge information in the image can be more comprehensively and accurately extracted, and the precision and effect of target detection are improved.

[0105] The traditional Sobel operator is convolved in the horizontal and vertical directions of the image. The traditional horizontal and vertical Sobel operators are improved in the application, and the operators in the horizontal, vertical, left diagonal and right diagonal directions are improved to realize the sensitivity to the multi-directional edge. The specific setting method is as follows Figure 4 The four-direction gradient operator is shown.

[0106] Based on the improved Sobel operator, four-direction gradient operator is set to realize the background suppression and information extraction in strong light star image. Among them, Kernel-x is the horizontal operator, Kernel-y is the vertical operator, Kernel-r is the right diagonal line operator, and Kernel-l is the left diagonal line operator.

[0107] In calculating the gradient of each pixel point in multiple directions, the image is convolved by using the gradient operator to obtain the gray value change in each direction. The gradient value of each direction reflects the intensity of the gray value change in that direction. By calculating the gradient of four main directions (horizontal, vertical, right diagonal line and left diagonal line), the gray value change characteristics around the pixel are fully captured.

[0108] First, the neighborhood size of the pixel of interest is set, and a 3×3 neighborhood is selected, that is, the gray value changes of the 8 pixels around the target pixel are considered with the target pixel as the center:

[0109]

[0110] Where i and j are the horizontal and vertical coordinates of the target pixel, respectively, x (x,y) represents the gray value at point (x, y); I D (i, j) is the original star image I taking a 3×3 neighborhood centered at point (i, j);

[0111] The physical meaning of this matrix is to intercept a 3×3 neighborhood image centered at (i, j) in the image, and the purpose is to calculate the multi-directional gradient at point (i, j). Since the gradient represents the change of pixels in the image, it cannot focus on a single pixel, but uses the method of cutting the image to focus on the neighborhood of the point.

[0112] Select a 3×3 neighborhood centered at each pixel point, and calculate the single-directional gradient value of each pixel point as follows:

[0113]

[0114] Where G θ (x, y) is the single-directional gradient value of pixel point (x, y) in direction θ, K θ (i, j) is the gradient operator corresponding to direction θ, I(x+i, y+j) is the gray value of the neighborhood of pixel point (x, y), and i and j are the horizontal and vertical coordinate changes, respectively;

[0115] θ takes 0°, 45°, 90° or 135° to represent the horizontal direction, vertical direction, left diagonal line direction and right diagonal line direction, respectively.

[0116] In formula (2), i and j take values from -1 to 1, representing a 3x3 neighborhood centered at (x, y).

[0117] θ takes 0°, 45°, 90°, 135° in the present application, representing x (horizontal), y (vertical), r (right diagonal line), and l (left diagonal line) four directions, corresponding to the set operator Kernel-x, Kernel-y, Kernel-r, and Kernel-l. x and y represent the horizontal and vertical coordinates of the pixel points in the image, and the selection range is (0, 2047) (taking an image with a size of 2048x2048 as an example), which is the same below.

[0118] The single-direction gradient value of each pixel point is calculated as follows:

[0119]

[0120] wherein G x (x, y), G y (x, y), G r (x, y), and G l (x, y) are the gradient values of the pixel point (x, y) in the 0°, 45°, 90°, and 135° directions, respectively. x (i, j), k y (i, y), k r (i, j), k x (i, j) are the Kernel-x, Kernel-y, Kernel-r, and Kernel-r four-direction Sobel operators, respectively. D (x+i, y+j) is the neighborhood of the pixel point (x, y).

[0121] Since the gradient changes in four directions are considered when the star image is segmented, the contour extraction of the target is realized. Under the condition that the prior information of the gradient direction is lacking or the gradient changes of the target and the background are balanced in four directions, the same direction weight is set, which is 1. If the influence of some directions is greater, the corresponding weight adjustment can be made.

[0122] The multi-direction gradient value I G (x, y) of each pixel point is calculated as follows:

[0123]

[0124] wherein G x (x, y), G y (x, y), G r (x, y), and G l (x, y) are the single-direction gradient values of the pixel point in the horizontal direction, the vertical direction, the left diagonal line direction, and the right diagonal line direction, respectively.

[0125] Step S13, the multi-directional gradient value of each pixel point is normalized to obtain a normalized gradient image corresponding to the original star image.

[0126] The multi-directional gradient value of each pixel point is normalized to obtain a normalized gradient value of the pixel point, as follows:

[0127]

[0128] wherein, I norm (x, y) is the normalized multi-directional gradient value of the (x, y) pixel point; I G (x, y) is the multi-directional gradient value of the (x, y) pixel point, min(I G ), max(I G ) are the minimum and maximum multi-directional gradient values of all pixel points in the original star image, and M is the maximum value of the visible gray value range.

[0129] The normalized gradient values of all pixel points in the original star image form a normalized gradient image corresponding to the original star image.

[0130] At this time, G(x, y) represents the gradient change in the image. In order to facilitate observation of the processing result and realize parameter adjustment, the star image is normalized, and the extreme value of the gradient is mapped to the visible gray value range (in an 8-bit image, the visible gray value range is 0 to 255; in a 16-bit image, the visible gray value range is 0 to 65525) through linear stretching, thereby enhancing the visibility of the contour region. In an 8-bit image, I norm (x, y) is the result of projecting the gradient information into the 8-bit visible range; for example, in an 8-bit image, M takes a value of 255; in a 16-bit image, M takes a value of 65525.

[0131] The purpose of step S1 is to accurately calculate the brightness change information of the pixels around each point by calculating the gradient change of each pixel point in the star image in four directions through multi-directional gradient calculation of the original star image. Through the normalization operation of each pixel point, the extreme value of the gradient information is mapped to the visible gray value range, thereby enhancing the visibility of the contour region. The edges and contours of the original relatively blurred or not easily perceived target are more prominent in the normalized gradient image, thereby enhancing the visibility of the target contour and providing a basis for subsequent target and background differentiation and contour extraction.

[0132] Step S2, in detail.

[0133] For the whole star image, an adaptive global threshold T is defined. The threshold is based on the mean and standard deviation of the region around the pixel, and is adjusted according to a scaling factor k. The adaptive global threshold is set to achieve the binarization segmentation of the target in the image, and the contour of the target is extracted.

[0134] The adaptive threshold T is set as follows:

[0135] T = m G +kσ G Formula (7);

[0136] wherein m G is the mean of the gradient of the normalized gradient image, σ G is the standard deviation of the gradient of the normalized gradient image, and k is an adjustable scaling factor.

[0137] The normalized gradient value I norm (x, y) of each pixel point is compared with the adaptive threshold to obtain the binary I Binary (x, y) corresponding to the pixel point, as follows:

[0138]

[0139] wherein 1 represents the target region and 0 represents the background region.

[0140] The binary I Binary (x, y) corresponding to all pixel points constitutes the binarized image corresponding to the original star image.

[0141] k is an adjustable scaling factor, which is applied to change the sensitivity of the threshold in specific scenarios. Exemplarily, k takes a value of 6, and the value of k can be adjusted according to specific application requirements.

[0142] The function of step S2 is to convert the normalized gradient image into a binarized image through adaptive threshold segmentation, thereby extracting the contour of the target.

[0143] Step S3 includes steps S31-S32.

[0144] Step S31 performs morphological closing operation on the binarized image to obtain a closed contour image.

[0145] Due to stray light, noise or gradient discontinuity, the target contour may have breakpoints (non-connected boundaries) when extracted. The combination of dilation and erosion operations (closing operation) is used to repair the breakpoints in the contour, ensuring the connectivity and integrity of the target region.

[0146] The dilation expands the target boundary, fills in the broken and hole, and the erosion removes the redundant expansion to restore the true shape of the target. Through this method, small noise points can be eliminated, the boundary can be smoothed, and the regularity of the target contour can be improved, thereby laying a reliable foundation for subsequent contour filling and target extraction.

[0147] The dilation and erosion are combined (closed operation) to repair the broken points in the contour, ensuring the connectivity and integrity of the target region:

[0148] In order to repair the broken points and small holes in the target contour, morphological operations (dilation and erosion) are used to process the binary image I Binary (x, y) to perform a closed operation.

[0149] The morphological closed operation is performed on the binary image to obtain a contour image after the closed operation, as follows:

[0150]

[0151] where I close is the contour image after the closed operation, I Binary is the binary image, B is a structuring element (Structuring Element, SE) defined based on the target shape and size characteristics, is the dilation operation (Dilation), is the erosion operation (Erosion).

[0152] The custom structuring element B is determined according to the target characteristics (target shape, size) and actual requirements.

[0153] Factors to consider when customizing the structuring element B:

[0154] (1) Target shape: Select the appropriate shape of the structuring element according to the geometric shape of the target (such as circular, square, linear, etc.). For example, if the broken points and small holes in the target mainly occur in the horizontal direction, a linear structuring element can be used; if the target is circular, a circular or elliptical structuring element can be used;

[0155] (2) Target size: The size of the structuring element is determined according to the actual size of the target. Generally, the size of the structuring element should match the characteristic size of the target. If the target is small, use a smaller structuring element; if the target is large, use a larger structuring element.

[0156] Exemplarily, the shape, size and applicable scenarios of the custom structuring element B are as follows:

[0157] (1) 3x3 square structuring element, which is one of the most commonly used and simple structuring elements. It can handle pixels in all directions in dilation and erosion operations, and is suitable for target contour repair in most scenarios. The structuring element B is defined as:

[0158]

[0159] (2) Linear structuring element, used to repair breakpoints or small holes. The structuring element B is defined as:

[0160]

[0161] (3) Cross-shaped structuring element, combining horizontal and vertical linear structuring elements, suitable for repairing cross intersections or linear features in the target contour. The structuring element B is defined as:

[0162]

[0163] (4) Circular structuring element, suitable for repairing breakpoints and small holes in the target contour of a circular or approximately circular shape. The shape of the structuring element B can be approximately circular.

[0164]

[0165] (5) Ring-shaped structuring element, suitable for repairing ring-shaped or hole features in the target contour. The structuring element B is defined as:

[0166]

[0167] Application scenarios:

[0168] Example 1: When processing images with circular targets (such as stars in celestial bodies), using a circular structuring element can better adapt to the shape of the target, repairing breakpoints and small holes caused by stray light.

[0169] Example 2: When processing images with linear targets (such as solar panel wings of satellites), using a linear structuring element can more effectively fill in breakpoints, ensuring the connectivity and integrity of the target.

[0170] Through morphological segmentation of images combined with adaptive threshold segmentation and contour filling technology, the target and background can be effectively separated. By dynamically adjusting the threshold, different image features are processed to eliminate background noise and ensure that the target region is accurately extracted.

[0171] Step S32, performing contour filling on the closed contour image and performing mask processing to obtain a pure star map image that retains the target region.

[0172] In the binary closed operation image Iclose After the contour, the blank area in the target contour is filled with the target region pixel value by using the contour filling algorithm, to ensure the integrity and connectivity of the target region.

[0173] The contour image after the closing operation is filled with contours, and a mask processing is performed to obtain a pure star image image that retains the target region, including:

[0174] The contour image after the closing operation is filled with contours by using the flood filling algorithm;

[0175] The connected region pixel value of the contour is marked as 1, and other background pixels are marked as 0 to generate a binary mask;

[0176] The binary mask is multiplied with the gray value of the pixel points in the original star image pixel by pixel to obtain a semi-pure star image including the target region. The background pixel value of the semi-pure star image including the target region is set to zero to obtain a pure star image including the target region.

[0177] The algorithm is based on the flood filling technique, which starts filling from an internal pixel point in the contour image after the closing operation until it encounters a background pixel or a boundary. The filling process ensures that the internal blank of the target region is completely filled with target pixels, thereby generating a complete and noise-free target image.

[0178] The filling process:

[0179] Step 1, select the filling starting point, select a pixel point in the target contour as the filling starting point;

[0180] Step 2, starting from the filling starting point, spread to the surrounding, according to the contour extraction result, mark the connected region pixels of the target contour as 1, and mark the other background pixels as 0 to generate a binary mask.

[0181] The binary mask Mask(x, y) is as follows:

[0182]

[0183] Wherein, the target region pixel value is 1, and the background region pixel value is 0, A inside is the contour image I close after the closing operation.

[0184] Step 3, multiply the generated binary mask Mask(x, y) with the gray value I(x, y) of the pixel points in the original star image pixel by pixel to obtain a semi-pure star image, and obtain the target region mapping to the semi-pure star image I Result (x, y).

[0185] The binary mask is multiplied with the gray value of each pixel in the original star image to obtain a semi-pure star image including the target region, as follows:

[0186] I Result (x, y) = Mask(x, y) * I(x, y) Formula (16);

[0187] wherein, I Result (x, y) is the semi-pure star image, and I(x, y) is the gray value of each pixel in the original star image.

[0188] The generated semi-pure star image retains the original pixel value in the target region and sets the background region to 0.

[0189] In order to enhance the contrast between the target region and the background region, the background pixel value is set to 0.

[0190] The background pixel value of the semi-pure star image including the target region is set to 0 to obtain a pure star image including the target region, as follows:

[0191]

[0192] wherein, I Result1 (x, y) is the pure star image.

[0193] For the pixel in the background region, the value of I Result (x, y) is set to 0 to generate a pure star image I Result1 (x, y) retaining only the effective information, wherein the target region retains the pixel value in the original star image, and the pixel value in the background region is 0.

[0194] After this step, the target and the star are successfully extracted under strong stray light through contour extraction, morphological operation, and filling mapping, and a pure image retaining only the effective information is output. As shown in the star image processing result in FIG. 5, it is proved that the method in the present application is effective.

[0195] Figures 5(a)-5(b) The original star image and the processing result in the specific embodiment are compared. FIG. 5(a) is the original star image, and the box in FIG. 5(a) is the marked star and target position. As can be seen from the figure, the star information is seriously submerged. FIG. 5(b) is the processed pure star image, and the box in FIG. 5(b) is the star and target position. It can be clearly seen that the star and target contour are clear, and there is no case of being submerged by noise and stray light, proving that the method is effective.

[0196] The role of step S3 is to repair the breakpoints and small holes of the target contour through morphological closing operation and contour filling, ensure the connectivity and integrity of the target region, and generate a pure star map image that only retains the target region through mask processing.

[0197] In summary, the starlight processing method based on multi-directional gradient of the embodiment of the application has the following beneficial effects:

[0198] 1. The method based on multi-directional gradient variation target and star extraction technology can accurately separate the background and target region in a strong stray light environment, and does not depend on a specific background modeling method, so it has high adaptability to different background interference.

[0199] 2. The method combines gradient calculation and morphological closing operation to realize complete extraction of the target region in a complex scene, effectively avoiding target contour breakage or information loss.

[0200] 3. The method uses a gradient-enhanced filling strategy that not only preserves the integrity of the target region but also naturally suppresses the transition region caused by stray light, significantly improving the signal-to-noise ratio of the target region and meeting the high-precision image processing requirements.

[0201] 4. The method realizes fast stray light suppression processing, meeting the requirements of processing speed in practical applications, especially in large-scale monitoring and rapid response scenarios, with significant advantages.

[0202] 5. The method improves the robustness and accuracy of target detection through multi-directional gradient calculation and morphological processing, enabling stable extraction of target information in complex lighting conditions and providing reliable technical support for orbit space target detection and tracking tasks.

[0203] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium includes a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.

[0204] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited thereto. Any changes or replacements within the technical scope disclosed by the application can be easily thought of by those skilled in the art, and should be covered within the protection scope of the application.

Claims

1. A multi-directional gradient-based starlight scatter processing method, characterized in that, The method comprises the following steps: Multi-directional gradient calculation is performed on each pixel point of the obtained original star map image containing stray light to obtain multi-directional gradient values of each pixel point, and a normalized gradient image is obtained after normalization processing; Adaptive threshold segmentation is performed on the normalized gradient image to obtain a binary image; Morphological closing operation is performed on the binary image to obtain a closed contour image; Contour filling is performed on the closed contour image, and mask processing is performed to obtain a pure star map image retaining a target region.

2. The method of claim 1, wherein, The multi-directional gradient values of each pixel point are obtained by the following steps: A single-directional gradient value of each pixel point is calculated in a neighborhood corresponding to each pixel point by using an improved Sobel operator, and the single-directional gradient value includes a single-directional gradient value of each pixel point in a horizontal direction, a vertical direction, a left diagonal direction and a right diagonal direction; Based on the single-directional gradient values of each pixel point, a multi-directional gradient value of each pixel point is calculated.

3. The method of claim 2, wherein, A single-directional gradient value of each pixel point is calculated by selecting a 3*3 neighborhood as a center, and the calculation is as follows: wherein G θ (x, y) is the single-direction gradient value of pixel point (x, y) in direction θ, K θ (i, j) is the gradient operator corresponding to direction θ, I(x+i, y+j) is the gray value of the neighborhood of pixel point (x, y), and i and j are the change ranges in the horizontal and vertical coordinates, respectively. θ takes 0°, 45°, 90° or 135° to represent the horizontal direction, the vertical direction, the left diagonal direction and the right diagonal direction, respectively.

4. The method of claim 2, wherein, The calculation obtains the multi-directional gradient value I of each pixel point G (x, y) as follows: wherein G x (x, y), G y (x, y), G r (x, y), G l (x, y) are the horizontal, vertical, left diagonal and right diagonal gradient values of the pixel point, respectively.

5. The method of claim 1, wherein, Normalization processing is performed on the multi-directional gradient value of each pixel point to obtain a normalized gradient value of each pixel point, and the calculation is as follows: where I norm (x, y) is the normalized multi-directional gradient value of pixel point (x, y); I G (x, y) is the multi-directional gradient value of pixel point (x, y), min(I G ), max(I G ) are the minimum and maximum multi-directional gradient values of all pixel points in the original star map image, and M is the maximum value of the visible gray value range. The normalized gradient values of all pixel points in the original star map image form a normalized gradient image corresponding to the original star map image.

6. The method according to any one of claims 1 to 5, characterized in that, The adaptive threshold T is set as follows: T = m G + kσ G ; wherein m G is the mean of the gradients of the normalized gradient image, σ G is the standard deviation of the gradients of the normalized gradient image, and k is an adjustable proportionality factor. Based on the normalized gradient value I of each pixel point norm (x, y) is compared with the adaptive threshold value, to obtain the binary value I corresponding to the pixel point (x, y) Binary (x, y), as follows: Wherein, 1 represents a target region, and 0 represents a background region; All pixel points correspond to binary I Binary (x, y), which constitutes the binary image corresponding to the original star map image.

7. The method of claim 6, wherein, Morphological closing operation is performed on the binary image to obtain a closed contour image, and the calculation is as follows: where I close is the closed contour image, I Binary is the binary image, B is a structuring element defined based on the target shape and size characteristics, is the dilation operation, is the erosion operation.

8. The method of claim 7, wherein, Contour filling is performed on the closed contour image, and mask processing is performed to obtain a pure star map image retaining a target region, and the calculation comprises the following steps: A flood filling algorithm is used to perform contour filling on the closed contour image; The pixel value of a connected region of the contour is marked as 1, and other background pixel points are marked as 0 to generate a binary mask; The binary mask and the gray value of each pixel point in the original star map image are multiplied pixel by pixel to obtain a semi-pure star map image including a target region; and the background pixel value of the semi-pure star map image including the target region is set to zero to obtain a pure star map image including the target region.

9. The method of claim 8, wherein, The binary mask Mask(x, y) is as follows: Wherein, the target region pixel value is 1, the background region pixel value is 0, A inside is the contour image I after the closing operation close The target region in the image I.

10. The method of claim 8, wherein, The binary mask and the gray value of each pixel point in the original star map image are multiplied pixel by pixel to obtain a semi-pure star map image including a target region, and the calculation is as follows: I Result (x, y) = Mask(x, y) • I(x, y); where I Result (x, y) is the semi-pure star image, I(x, y) is the gray value of the pixel point in the original star image; The background pixel value of the semi-pure star map image including the target region is set to zero to obtain a pure star map image including the target region, and the calculation is as follows: where I Result1 (x, y) is the pure star image.

Citation Information

Patent Citations

  • Mathematical morphology adaptive structure element construction method

    CN113393387A

  • Image recognition system and method

    CN114092358A

  • Star point extraction algorithm adaptive to stray light interference

    CN116681757A

  • Image registration method based on multi-source homogeneous structure point features

    CN116934818A

  • Molten pool image gradient segmentation method and molten pool feature extraction method based on laser powder bed fusion monitoring

    CN117576115A

Cited By

  • Radar detection method, device and equipment based on multidirectional gradient enhancement detection

    CN121364464A

  • Radar detection method, device and equipment based on multi-directional gradient enhancement detection

    CN121364464B