Star point extraction method and device under stray light background and medium
Through median filtering and multi-scale grayscale morphology algorithm combined with image segmentation method, the non-uniform background in astronomical images is used to process expansion and corrosion structural elements, solving the problem of star point extraction difficulty caused by stray light, and significantly improving star point extraction Accuracy and robustness.
Patent Information
- Application Number
- CN202411125348.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-26
AI Technical Summary
In astronomical image processing, the non-uniform background caused by stray light reduces the image quality and increases the difficulty of star dot extraction. Traditional preprocessing methods are difficult to deal with complex stray backgrounds, resulting in poor star dot extraction performance.
The median filtering process and multi-scale grayscale morphology algorithm are used to process the star map containing a non-uniform background by expanding and corroding structural elements. The star dots are extracted in combination with the image segmentation method, and the structural elements of different shapes and sizes are used to match the star dots. The structure of the region, enhances background suppression ability and star point retention rate.
Effectively suppress high-frequency noise, smooth the non-uniform background, significantly improve the grayscale difference between star points and background, enhance the robustness and accuracy of the algorithm, separate star points and background more accurately, and improve star points extraction accuracy.
Smart Images

Figure CN119027322A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device and medium for extracting star points under a stray light background. Background Art
[0002] With the advancement of space exploration technology, the use and monitoring of outer space has become increasingly important. The space-based space target monitoring system has a large monitoring field of view, good real-time monitoring effect on the satellite, and good wartime survivability, and will become an important development direction for future space target monitoring.
[0003] In astronomical image processing, star point extraction is an important part of the space-based space target monitoring system. By extracting star points, satellites, space debris and other targets can be identified and tracked, helping to classify targets and calculate orbits. Due to the influence of image components, current, and reflected light from the external environment, the stray light in the space environment causes a very serious non-uniform distribution of the star map background. The stray light and non-uniform background in the star map not only reduce the image quality, but also increase the difficulty of star point extraction. Traditional preprocessing methods have difficulty in handling complex stray light backgrounds, resulting in poor star point extraction performance. Summary of the invention
[0004] The purpose of this application is to provide a method, device and medium for extracting star points under a stray light background, which can improve the accuracy of star point extraction.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides a method for extracting star points under a stray light background, comprising:
[0007] Get a star map with stray light background;
[0008] Performing median filtering on the star map containing stray light background to obtain a star map containing non-uniform background;
[0009] Based on a multi-scale grayscale morphological algorithm, the star map containing the non-uniform background is processed by using an expansion structure element and an erosion structure element to obtain a corrected star map; the expansion structure element is composed of a circular structure element nested in the middle of a square structure element; the erosion structure element is composed of a circular structure element inscribed in a square structure element; the diameter of the circular structure element of the expansion structure element is smaller than the side length of the square structure element of the expansion structure element; the side length of the square structure element of the expansion structure element is smaller than the side length of the square structure element of the erosion structure element;
[0010] The star points in the corrected star map are segmented and extracted by using an image segmentation method to obtain a star point image.
[0011] Optionally, based on a multi-scale grayscale morphological algorithm, the star map containing the non-uniform background is processed by using an expansion structure element and an erosion structure element to obtain a corrected star map, specifically including:
[0012] Using a dilation structure element to perform a dilation operation on the star image containing the non-uniform background to obtain a first processed image;
[0013] Performing a grayscale erosion operation on the first processed image using an erosion structure element to obtain a second processed image;
[0014] performing a dilation operation on the second processed image by using an eroded structure element to obtain a third processed image;
[0015] The third processed image is corrected using the star map containing the non-uniform background to obtain a corrected star map.
[0016] Optionally, a dilation structure element is used to perform a dilation operation on the star map containing the non-uniform background to obtain a first processed image, which is expressed as:
[0017]
[0018] Among them, F 1 (x,y) is the pixel in the first processed image, is the dilation operation, max is the maximum value operation, f(x,y) is the pixel in the star map with non-uniform background, B io is the expansion structural element, B io (m,n) is the pixel in the dilated structure element, D f is the domain of f(x,y), For B io The domain of (m,n), x and m are the horizontal coordinates of the pixel, and y and n are the vertical coordinates of the pixel.
[0019] Optionally, a grayscale erosion operation is performed on the first processed image using an erosion structure element to obtain a second processed image, which is expressed as:
[0020]
[0021] Among them, F 2 (x, y) is the pixel in the second processed image, Θ is the erosion operation, min is the minimum operation, B m is the corrosion structural element, B m (m,n) is the pixel in the eroded structure element, F 1 The domain of (x,y), D Bm For B mThe domain of (m,n).
[0022] Optionally, the second processed image is expanded by using an eroded structure element to obtain a third processed image, which is expressed as:
[0023]
[0024] Among them, F 3 (x,y) is the pixel in the third processed image, F 2 The domain of (x,y).
[0025] Optionally, the third processed image is corrected using the star map containing the non-uniform background to obtain a corrected star map, which is expressed as:
[0026] F 4 (x,y)=f(x,y)-min[F 3 (x,y),f(x,y)]
[0027] Among them, F 4 (x,y) is the pixel in the corrected star map.
[0028] Optionally, the radius of the circular structuring element of the expanded structuring element is 11, the side length of the square structuring element of the expanded structuring element is 29, and the radius of the circular structuring element of the eroded structuring element is 20; the value of the circular structuring element of the expanded structuring element is 0, and the remaining value is 1; the value of the circular structuring element of the eroded structuring element is 1, and the remaining value is 0.
[0029] Optionally, using an image segmentation method to segment and extract star points in the corrected star map to obtain a star point image specifically includes:
[0030] Adaptive threshold segmentation is used to segment the star points and the background in the corrected star map, and a four-connectivity criterion is used to determine the star point boundaries, and the star points are clustered to obtain a star point image.
[0031] In a second aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the star point extraction method under the stray light background.
[0032] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for extracting star points under the stray light background.
[0033] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0034] The present application provides a method, device and medium for extracting star points under a stray light background. By performing median filtering on a star map containing a stray light background, high-frequency noise and impulse noise can be effectively suppressed, and the non-uniform background in the image can be smoothed, so that the grayscale value difference between the star point area and the background area is more obvious. The star map containing the non-uniform background is processed by using an expansion structure element and an erosion structure element based on a multi-scale grayscale morphological algorithm. The design of the dual structure element fully utilizes the grayscale difference information between the star point area and the background area. By using structure elements of different shapes and sizes to match the structure of the star point area, the smoothing characteristics of the circular structure element and the coverage of the square structure element are fully utilized, thereby enhancing the background suppression ability and the retention rate of the star points, and can more accurately separate the star points and the background, thereby improving the robustness and accuracy of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A flow chart of a method for extracting star points under stray light background provided in an embodiment of the present application;
[0037] Figure 2 A schematic diagram of an experimental platform and a simulated star map provided in an embodiment of the present application;
[0038] Figure 3 The original star map with stray light background and its three-dimensional grayscale distribution map provided in the embodiment of the present application;
[0039] Figure 4 A star map with a non-uniform background and a three-dimensional grayscale distribution map thereof provided in an embodiment of the present application after median filtering;
[0040] Figure 5 A schematic diagram of an expansion structural element and an erosion structural element provided in an embodiment of the present application;
[0041] Figure 6 The non-uniform background image and its three-dimensional grayscale distribution image processed by morphological operation provided in the embodiment of the present application;
[0042] Figure 7 The star point map and its three-dimensional grayscale distribution map processed by morphological operation provided in the embodiment of the present application;
[0043] Figure 8This is a star point image that has been processed through image segmentation and provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0046] In an exemplary embodiment, the present application provides a method for extracting star points under a stray light background, which is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, Figure 1 As shown, the method includes the following steps 1 to 4.
[0047] Step 1: Get a star map with stray light background.
[0048] In this embodiment, a semi-physical simulation star map experiment is used to generate a simulated star map to simulate a star map with stray light background. Specifically, the star map is generated by a star map simulator device, and the camera directly captures and images the star map, so as to perform subsequent data processing. The experimental platform and the star map are as follows. Figure 2 shown.
[0049] The star catalog used in the star map simulation is the Tycho 2 star catalog. The number of CMOS array pixels is 2048×2048, the size of a pixel is 4.84μm×4.84μm, and the magnitude threshold is 5.0. The focal length of the collimator is 1300mm, and the diameter of the star point on the graticule is 0.1mm. The image sequence used in the experiment is a sequence taken in random scanning mode. The external light input is controlled to simulate star maps with stray light backgrounds of different signal-to-noise ratios. The original star map with stray light background and its three-dimensional grayscale distribution are shown in the figure. Figure 3 shown.
[0050] Step 2: Perform median filtering on the star map containing stray light background to obtain a star map containing non-uniform background.
[0051] The star map with stray light background obtained by semi-physical simulation is processed by median filtering to obtain a star map with non-uniform background. The obtained star map with non-uniform background and its three-dimensional grayscale distribution are shown in Figure 4As shown in the figure. Median filtering can effectively suppress high-frequency noise and impulse noise, and smooth the non-uniform background in the image, making the grayscale value difference between the star point area and the background area more obvious, thereby improving the accuracy and robustness of subsequent morphological operations. This processing method can not only retain the edge information of the star point, but also enhance the contrast between the star point and the background, making the star point detection more accurate and reliable.
[0052] Step 3: Based on a multi-scale grayscale morphological algorithm, the star map containing the non-uniform background is processed by using an expansion structure element and an erosion structure element to obtain a corrected star map.
[0053] In this embodiment, two different but related structural elements are designed for dilation operation and erosion operation respectively. Figure 5 As shown. Expanded structural element B io A circular structural element B i Nested in a square structural element B o The middle composition, in which the circular structural element B i The radius is 11, and the square structure element B o The side length is 29, such as Figure 5 As shown in part (a) of the figure. Corrosion structural element B m It is composed of a circular structure element inscribed in a square structure element, where the radius of the circular structure element is 20, such as Figure 5 The above structure makes full use of the smoothness of the circular structure element and the coverage of the square structure element to improve the accuracy and robustness of the morphological dilation operation.
[0054] In addition, the value of the circular structure element of the expansion structure element is 0, and the remaining value is 1; the value of the circular structure element of the erosion structure element is 1, and the remaining value is 0. The structure element is essentially a small matrix used to determine the shape and range of the expansion and erosion operations, and the value of the structure element is a Boolean value or a mask. In the structure element, the pixel with a value of 1 represents the operation area, and the pixel with a value of 0 represents the non-operation area. The expansion operation will extend the 1 in the structure element to the target area in the image, making the object in the image larger. In a binary image, the expansion operation means aligning the center of the structure element to each pixel in the target area, and if any 1 in the structure element covers the 1 in the target area, the pixel in the target area is set to 1. The erosion operation applies the 1 in the structure element to the target area in the image, making the object in the image smaller. In a binary image, the erosion operation means aligning the center of the structure element to each pixel in the target area, and if any 1 in the structure element covers the 0 in the target area, the pixel in the target area is set to 0.
[0055] To protect the star point area, first use the structural element Bio The star image with non-uniform background is expanded to obtain the first processed image, which is expressed as follows:
[0056]
[0057] Among them, F 1 (x,y) is the pixel in the first processed image, is the dilation operation, max is the maximum value operation, f(x,y) is the pixel in the star map with non-uniform background, B io is the expansion structural element, B io (m,n) is the pixel in the dilated structure element, D f is the domain of f(x,y), For B io (m,n) is the domain of the pixel, where x and m are the horizontal coordinates of the pixel, and y and n are the vertical coordinates of the pixel. io The dilation operation is used to protect the star point area and replace the pixels in the star point area with the pixels in the surrounding background area.
[0058] Then, using the size ratio B io Slightly larger structural element B m Perform grayscale corrosion operation on the second processed image to obtain the second processed image. The expression is as follows:
[0059]
[0060] Among them, F 2 (x, y) is the pixel in the second processed image, Θ is the erosion operation, min is the minimum operation, B m is the corrosion structural element, B m (m,n) is the pixel in the eroded structure element, F 1 The domain of (x,y), For B m The domain of (m,n).
[0061] After the above morphological operations, the size is smaller than B i The star point is retained, and the remaining size is larger than B i The star points still exist in the non-uniform background. After the erosion operation using the large-sized structure element, the lost large-sized star points are retrieved. io With B m Due to the size difference, the non-uniform background area becomes smaller after two operations. m The second processed image is dilated to restore the size of the non-uniform background to obtain the third processed image, which is expressed as follows:
[0062]
[0063] Among them, F 3 (x,y) is the pixel in the third processed image, F 2 The domain of (x,y).
[0064] Finally, due to the use of structural element B io When performing the dilation operation, the pixels in the non-star point area have uncertainty, which may result in negative values when removing the non-uniform background. Therefore, the expression for correcting the stray light non-uniform background star map is as follows:
[0065] F 4 (x,y)=max[f(x,y)-F 3 (x,y),0]=max[f(x,y)-F 3 (x,y),f(x,y)-f(x,y)]
[0066] Further expressed as:
[0067] F 4 (x,y)=f(x,y)-min[F 3 (x,y),f(x,y)]
[0068] Among them, F 4 (x, y) is the pixel in the corrected star map, which includes the non-uniform background map and the star point map. The non-uniform background map and the star point map and the corresponding three-dimensional grayscale distribution are as follows: Figure 6 and Figure 7 shown.
[0069] Step 4: Use an image segmentation method to segment and extract the star points in the corrected star map to obtain a star point image.
[0070] After obtaining the corrected star map, in order to verify the denoising effect and the retention effect of the star points, the image segmentation method is used to segment and extract the star points, and the segmentation results are compared with the real star map that does not contain non-uniform background. The purpose of image segmentation is: first, to separate the star points from the background; second, to separate the star points from each other.
[0071] Compared with the fixed threshold, the adaptive threshold can be flexibly selected to adapt to the image according to the different pixel points of the image, and the final segmentation effect is good and fast, with good real-time performance. Adaptive threshold segmentation can complete the segmentation of star points and background, where the selection rules of threshold T are as follows:
[0072] T=μ+kσ
[0073] Among them, μ is the mean value of the input image, σ is the standard deviation of the input image, and k is the average grayscale of the non-uniform background.
[0074] In order to separate the star points, it is necessary to determine the star point boundaries and complete the clustering of the star points. The scope of application of four-connectivity is convex targets, and the scope of application of eight-connectivity is concave targets. Because the star points in the camera will be processed by defocusing, and finally a light spot will be formed on the imaging surface, which proves that it is a convex target, so the four-connectivity criterion is used. The star point image finally obtained by segmentation and extraction is as follows Figure 8 shown.
[0075] In summary, compared with the prior art, the design of the dual structural elements of the present application makes full use of the grayscale difference information between the star point area and the background area, and uses structural elements of different shapes and sizes to match the structure of the star point area, thereby enhancing the background suppression ability and the retention rate of the star points. Specifically, the expansion operation uses structural elements that can effectively suppress background noise, while the corrosion operation uses structural elements that can retain the details of the star points. This combination can more accurately separate the star points and the background, and improve the robustness and accuracy of the algorithm. The algorithm based on grayscale morphology greatly saves algorithm time consumption due to its simple algorithm structure, linear time complexity, efficient implementation, and no global optimization. Therefore, the present application can significantly suppress background noise, greatly improve the accuracy of star point extraction, and has a faster processing speed.
[0076] In an exemplary embodiment, the present application further provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0077] In an exemplary embodiment, the present application further provides a computer-readable storage medium storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0078] In an exemplary embodiment, the present application further provides a computer program product, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0079] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant legal provisions.
[0080] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0081] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0082] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0083] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for extracting star points under stray light background, characterized in that: include: Get a star map with stray light background; Performing median filtering on the star map containing stray light background to obtain a star map containing non-uniform background; Based on a multi-scale grayscale morphological algorithm, the star map containing the non-uniform background is processed by using an expansion structure element and an erosion structure element to obtain a corrected star map; the expansion structure element is composed of a circular structure element nested in the middle of a square structure element; the erosion structure element is composed of a circular structure element inscribed in a square structure element; the diameter of the circular structure element of the expansion structure element is smaller than the side length of the square structure element of the expansion structure element; the side length of the square structure element of the expansion structure element is smaller than the side length of the square structure element of the erosion structure element; The star points in the corrected star map are segmented and extracted by using an image segmentation method to obtain a star point image.
2. The method for extracting star points under stray light background according to claim 1, characterized in that: Based on a multi-scale grayscale morphological algorithm, the star map containing a non-uniform background is processed by using an expansion structure element and an erosion structure element to obtain a corrected star map, specifically including: Using a dilation structure element to perform a dilation operation on the star image containing the non-uniform background to obtain a first processed image; Performing a grayscale erosion operation on the first processed image using an erosion structure element to obtain a second processed image; performing a dilation operation on the second processed image by using an eroded structure element to obtain a third processed image; The third processed image is corrected using the star map containing the non-uniform background to obtain a corrected star map.
3. The method for extracting star points under stray light background according to claim 2, characterized in that: The star map with the non-uniform background is expanded by using the expansion structure element to obtain a first processed image, which is expressed as: Wherein, F1(x,y) is the pixel in the first processed image, is the dilation operation, max is the maximum value operation, f(x,y) is the pixel in the star map with non-uniform background, B io is the expansion structural element, B io (m,n) is the pixel in the dilated structure element, D f is the domain of f(x,y), For B io The domain of (m,n), x and m are the horizontal coordinates of the pixel, and y and n are the vertical coordinates of the pixel.
4. The method for extracting star points under stray light background according to claim 3, characterized in that: The grayscale erosion operation is performed on the first processed image using an erosion structure element to obtain a second processed image, which is expressed as: Where F2(x,y) is the pixel in the second processed image, Θ is the erosion operation, min is the minimum operation, and B m is the corrosion structural element, B m (m,n) is the pixel in the eroded structure element, is the domain of F1(x,y), For B m The domain of (m,n).
5. The method for extracting star points under stray light background according to claim 4, characterized in that: The second processed image is expanded by using the eroded structure element to obtain a third processed image, which is expressed as: Wherein, F3(x,y) is the pixel in the third processed image, is the domain of F2(x,y).
6. The method for extracting star points under stray light background according to claim 5, characterized in that: The third processed image is corrected using the star map containing the non-uniform background to obtain a corrected star map, which is expressed as: F4(x,y)=f(x,y)-min[F3(x,y),f(x,y)] Among them, F4(x,y) is the pixel in the corrected star map.
7. The method for extracting star points under stray light background according to claim 1, characterized in that: The radius of the circular structure element of the expansion structure element is 11, the side length of the square structure element of the expansion structure element is 29, and the radius of the circular structure element of the erosion structure element is 20; the value of the circular structure element of the expansion structure element is 0, and the remaining value is 1; the value of the circular structure element of the erosion structure element is 1, and the remaining value is 0.
8. The method for extracting star points under stray light background according to claim 1, characterized in that: The star points in the corrected star map are segmented and extracted using an image segmentation method to obtain a star point image, which specifically includes: Adaptive threshold segmentation is used to segment the star points and the background in the corrected star map, and a four-connectivity criterion is used to determine the star point boundaries, and the star points are clustered to obtain a star point image.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for extracting star points under a stray light background according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the star point extraction method under stray light background described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Target detection method and device based on multi-scale morphological operator, and medium
CN120032135A
Star map stray light processing method based on multidirectional gradient
CN121074076A
