Next Article in Journal
Enhancing the Nutritional Value and Preservation Quality of Strawberries through an Optimized Osmotic Dehydration Process
Previous Article in Journal
Research on the Characteristics of Seepage Failure in the Surrounding Rock (Coal) of the Goafs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Grayscale Iterative Star Spot Extraction Algorithm Based on Image Entropy

Aircraft Optical Imaging Monitoring and Measurement Technology Laboratory, Xi’an Institute of Optics and Precision Mechanics, Chinese Academy of Sciences, Xi’an 710119, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(20), 9207; https://doi.org/10.3390/app14209207
Submission received: 13 September 2024 / Revised: 4 October 2024 / Accepted: 8 October 2024 / Published: 10 October 2024

Abstract

:
Star trackers are susceptible to interference from stray light, such as sunlight, moonlight, and Earth atmosphere light, in the space environment, resulting in an overall improvement in the star image grayscale, poor background uniformity, low star extraction rate, and high number of false star spots. In response to these challenges, this paper proposes a grayscale iterative star spot extraction algorithm based on image entropy. The implementation of the algorithm is mainly divided into two steps: (1) The algorithm conducts multiple grayscale iterations, effectively utilizing the prior information on the local contrast of star spots to filter out stray light backgrounds to a certain extent. (2) By establishing an inner–outer template, the image entropy algorithm is employed to obtain the real star targets to be extracted, which further suppresses the background clutter and noise. Numerical simulations and experimental results demonstrate that, compared to traditional detection algorithms, this algorithm can effectively suppress background stray light, enhance star extraction rates, and reduce the number of false star spots, and it exhibits superior detection performance in complex backgrounds across various scenarios.

1. Introduction

Star trackers are key components for the autonomous attitude determination of aerospace vehicles, characterized by high-precision attitude determination, high autonomy, and low power consumption, with broad application prospects [1,2,3]. Star trackers estimate the spacecraft’s attitude, such as deep space probes and planetary explorers, by extracting the positions of star spots in star images [4,5,6]. Star spot extraction, as a crucial and fundamental step in star tracker design, determines the effectiveness and accuracy of star image recognition, attitude calculation, and target tracking [7,8,9,10,11]. During the positioning process, star trackers often face challenges in distinguishing star spot targets from background light interference caused by sunlight, moonlight, cosmic rays, and atmospheric light, leading to ineffective star sensor attitude data and the inability to extract the desired targets [12,13,14,15,16]. Therefore, suppressing stray light interference and accurately extracting spot position in star trackers have become important research topics.
The existing star spot extraction methods roughly fall into two categories: single-frame-based and multi-frame-based [17,18]. Single-frame algorithms include local information-based and non-local information-based algorithms, and multi-frame algorithms include correlation verification multi-frame algorithms and direct calculation multi-frame algorithms [19,20,21,22,23]. Multi-frame algorithms, such as background subtraction, use multiple frames to jointly differentiate between targets and background in images, which can reduce stray light interference to a certain extent [24]. However, such methods require caching multiple frames, occupying a large amount of storage space, which is a major drawback in space missions. Traditional single-frame algorithms have poor adaptability in determining thresholds locally, making it difficult to distinguish between targets and background in the presence of background stray light [25]. To address background light interference in single-frame images and improve target detection rates in on-orbit hardware platforms, two main effective methods are currently utilized: morphological filtering and background estimation.
Theoretically, the background estimation method is simple in principle and easy to implement. For example, the authors of [26] used a small window to traverse the original image and selected the gray intermediate value of several pixels around the central pixel as the grayscale value of the current position (GVCP). After the difference, the position of the target can be clearly seen. The max–mean filter and the max–median filter algorithm divide the filtering template into multiple directions, calculate the filtering results, and take the maximum value in each direction as GVCP, which in essence makes use of the difference between the background edge and the target in the directional information to achieve the purpose of suppressing the edge [27]. However, when the background in the field of view of the detector is very complex, the background obtained by the traditional filtering method is likely to be inaccurate. In this case, after the next difference, it is easy to obtain a large number of false targets, which is not conducive to the detection of real dim and small targets. The morphological method is also convenient to implement and has good parallelism and fast processing speed. For example, in [28,29,30], the authors improved the structural window of the traditional Top-Hat algorithm, which quickly gained widespread application. However, determining the optimal size of the structural window is the primary challenge faced by morphological methods in practical applications.
In summary, several commonly used methods in current hardware platforms have their limitations. To overcome these challenges, this paper proposes a new grayscale iterative star spot extraction algorithm based on image entropy. In contrast to the existing pixel-to-object extraction algorithms, this algorithm belongs to an object-to-pixel star spot extraction method in the presence of a stray light background. The main contributions can be summarized as follows:
(1)
Based on the star spot imaging model, three types of background stray light distribution models in star images are analyzed in detail. A grayscale iterative image preprocessing algorithm is proposed, which fully utilizes prior information regarding the local contrast of star spot targets, effectively filtering out background noise to a certain extent.
(2)
After image preprocessing, using the algorithm proposed in this paper, we establish a sliding window for star spot extraction based on inner–outer templates to traverse the star image and extract star spots using the image entropy algorithm. This method treats N neighboring pixels of a star spot as a single entity, directly matching all pixels of the star spot with the target. This represents a significant breakthrough compared to the existing pixel-to-object extraction methods.
(3)
Numerical simulations and experimental results demonstrate that, compared to traditional detection algorithms, this method exhibits superior resistance to stray light, increases star spot extraction rates, reduces the number of false stars, and shows good robustness (see Section 6 and Section 7).
The content of this paper is arranged as follows: In Section 2, we provide a detailed introduction to the star spot imaging model. In Section 3, we analyze the mechanism for star image background stray light. In Section 4, we propose a grayscale iterative image preprocessing method. In Section 5, we establish a numerical method to extract star spots from the preprocessed star image. In Section 6 and Section 7, we implement a series of numerical simulations and experiments. Finally, we conclude in Section 8.

2. Star Spot Imaging Model

When the star image does not contain any background light or noise, the grayscale value of its background pixels should theoretically be 0. Stars have varying intensities of starlight, which is reflected in the different sizes and brightness of star spots on the star image. The stronger the starlight of a star is, the brighter and larger the star spot it projects on the star image. Conversely, the weaker the starlight of a star is, the darker and smaller the star spot it projects on the star image. The energy distribution of stars on the focal plane of a star tracker can be approximated by a two-dimensional Gaussian function model [31] as follows:
f x , y = E 0 2 π σ x σ y e x p 1 2 1 ρ 2 x x 0 σ x 2 2 ρ x σ x y σ y + y y 0 σ y 2
where f x , y is the energy distribution function of the star spot, E 0 is the total energy of the star spot on the focal plane, x 0 , y 0 is the true center coordinates of the star spot, σ x and σ y are the Gaussian radii corresponding to the Gaussian surface model in the x-axis and y-axis directions, and ρ is the correlation coefficient. For simplicity in calculation, it is generally assumed that σ x = σ y = σ and ρ = 0; thus, the equation can be simplified as follows:
f x , y = E 0 2 π σ 2 e x p ( x x 0 ) 2 + ( y y 0 ) 2 2 σ 2
where σ stands for the Gaussian radius.

3. Analysis of Mechanism for Star Image Background Stray Light

When a star tracker operates in space, it often suffers from stray light interference. Research has shown that the grayscale values in the background light areas are not exactly the same but fluctuate within a small range. There are mainly two types of stray light in star images [32]: (1) stray light generated by illuminating devices, whose grayscale values follow a uniform or linearly distributed decay within the range of stray light; (2) stray light caused by moonlight glow, for which the grayscale distribution is similar to a Gaussian model of star spots but with a larger range. If the grayscale value of the stray light is too high, causing the star image to saturate, star spots will be completely obscured and cannot be extracted. It is recommended to change the line of sight direction and re-shoot the star image. The background light objects studied in this paper are all unsaturated.
In order to systematically study the background stray light in star images, real star images containing background stray light are analyzed. Three types of distribution models of stray light are studied [33,34]: uniform distribution model, linear distribution model, and Gaussian distribution model. The grayscale matrices of the three model images are all 512 × 512, denoted as I x , I y and I j , respectively. The following are the simulation equations for the three types of background stray light:
(1) Uniform distribution of background stray light: this type of background stray light fills the entire star image, with a relatively uniform grayscale distribution. The calculation equation is as follows:
I x = g m a x + α · r a n d
where I x represents the grayscale values of the background with uniform stray light, g m a x is the maximum grayscale value of the stray light, α is the upper limit of the range of grayscale value fluctuations, and r a n d is a random distribution function in the range [0, 1].
(2) Linear distribution of background stray light: this type of stray light generally starts from one end of the star image and gradually decays in grayscale values as it extends toward the other end. The calculation equation is as follows:
I y = A × G g m a x g m i n N B × B + α · r a n d
where I y represents the grayscale values of the background with linearly distributed stray light; g m a x and g m i n are the maximum and minimum grayscale values of the stray light, respectively; A is a column vector with 512 elements; G and B are row vectors with 512 elements; and N B is the number of elements in vector B . The definitions of A and B are as follows:
G = [ g m a x   g m a x     g m a x ] 1 × 512 A = [ 1   1     1 ] 1 × 512 T B = [ 1   2     512 ] 1 × 512
(3) Gaussian distribution of background stray light: this type of stray light appears from one end of the star image and rapidly decays to 0 following a Gaussian distribution, occupying half of the star image. The calculation equation is as follows:
I j = A × Y
where Y represents the Gaussian distribution function along the image plane x-axis direction. In this Gaussian background stray light, the specific parameters and characteristics of the Gaussian distribution function can be determined based on the desired characteristics of the stray light in the image.

4. Image Preprocessing Based on Grayscale Iteration

Accurately detecting star spots in star images is the foundation for star trackers to extract star spot centroids, solve star attitudes, and extract targets. Due to the interference of stray light, the overall grayscale of star images captured by star trackers increases, resulting in poor background uniformity, leading to low star spot extraction rates and a high number of false star spots. To address this issue, this paper proposes a grayscale iterative image preprocessing algorithm that effectively filters out background noise and enhances the local contrast of the targets.
When the star tracker acquires a star image containing stray light, let the grayscale values of each pixel in the star image be denoted as f n ( x , y ) . The average grayscale value A v g of the star image is calculated using the following equation:
A v g = 1 N f n ( x , y ) N
where f n ( x , y ) represents the grayscale value of each pixel in the star image, and N is the number of pixels in the star image with non-zero grayscale values. Subtracting the average grayscale value A v g from the grayscale value of all pixels yields a new image denoted as f n * x , y , with the equation as follows:
f n * x , y = f n x , y A v g
After the aforementioned steps, image regions with grayscale values less than A v g are eliminated from the stray light background. To maintain the reliability of star spot information as much as possible, the entire star image undergoes grayscale stretching, with the calculation equation as follows:
f n i x , y = f n * x , y × 2 j 1 M a x
where f n i x , y represents the grayscale value of the star image after the i -th iteration, M a x is the maximum grayscale value in the image, and j is the pixel bit width.
Grayscale iteration can effectively remove background stray light, and its removal extent and the accuracy of star spot extraction are related to the number of iterations of this algorithm. Before the iteration starts, due to the interference of background stray light, it is almost impossible to extract connected regions or only a few connected regions can be extracted. As the number of iterations increases, the background is gradually removed, and the number of connected regions that can be extracted also increases. However, during this process, a large number of false star spots may appear. Therefore, it is stipulated that when the number of extracted connected regions reaches the maximum value, the iteration continues, and the noise will be gradually removed, causing the number of connected regions to decrease gradually. However, when the number of extracted connected regions is equal to the number of star spots that can be retained, if the iteration continues, it will gradually remove the dim and fainter star spots, leading to the loss of star spots. Therefore, when the following conditions are met, the iteration should be stopped:
N i N m a x N m i n N i N i 1 i = 0 , 1 ,
where N i represents the number of connected regions extracted after the i -th iteration; specifically, N 0 is the number of connected regions when the star image has not undergone grayscale iteration. To ensure that the extracted star spot information is sufficient for star image recognition, the stopping condition of the iteration needs to satisfy N i greater than N m i n to prevent extracting only a small number of star spots for two consecutive iterations, while there are still other star spots that can be extracted in the star image, leading to errors and omissions in the star spot information. Based on prior information, star spots typically occupy only 3 × 3 pixels on the focal plane. Therefore, when the number of pixels in a connected region exceeds this threshold, the connected region should be excluded. When the number of pixels in a connected region is 1, it is generally considered noise and should be excluded. After grayscale iteration, star spot extraction is carried out using an inner–outer template star spot extraction algorithm based on image entropy.

5. Inner–Outer Template Star Spot Extraction Algorithm Based on Image Entropy

5.1. Establishment of Star Spot Extraction Template

In this study, we used a rectangle as the inner template for the sliding window of star spot extraction. Based on the distribution model of star spots and relevant research, its size is typically set as 3 × 3 pixels, which can be represented by the following matrix:
Z = 1 1 1 1 1 1 1 1 1
To implement the algorithm below, we extended the inner template and established an outer template. The expansion factor should be large enough to ensure that the inner and outer templates are separated by more than 2 pixels in the radial direction. However, the radial difference between the inner and outer templates should not be too large, as multiple star spots may be included simultaneously within the star spot extraction sliding window composed of the inner–outer templates. Based on the actual distribution of star spots in the star image, we set the radial distance between the inner and outer templates to be 4 pixels. The inner and outer templates had the same central axis in both the horizontal and vertical directions. The inner template size was 3 × 3 pixels, and the outer template size was 7 × 7 pixels. These two templates were combined to form the sliding window for star spot extraction, as shown in Figure 1.

5.2. Star Spot Extraction Based on Image Entropy

Information entropy can reflect the amount of information contained in a source and is commonly used to represent the global characteristics of information sources [35]. It is widely applied in areas such as target detection, image restoration, and matching. For images, image entropy reflects the degree of dispersion of grayscale distribution, and it is directly proportional to the uniformity of the grayscale distribution. The image entropy is the expected value of the information content contained in all states and is a global concept. Its definition is as follows [36]:
H = i = 1 q P i log   P i
where H is the image entropy, and q is the number of grayscale levels for all pixels in the local range, and in this paper, the pixel bit depth is 8, so q is 255; P i is the probability density function of grayscale level i . The logarithm involved in this equation is the base-2 logarithm.
Local entropy reflects the degree of grayscale confusion in a local area of the image. A more complex distribution of grayscale values in the image results in a higher entropy value, while a smoother image background leads to a lower entropy value [37]. When bright star spots appear on a smooth background, they can cause significant changes in the local grayscale distribution. Therefore, the local entropy operator can be used to reflect local grayscale variations in the image and can be used for star spot detection. In a star image, the entire image is scanned using a sliding window composed of an inner template and an outer template for star spot detection. By calculating the image entropy-related value at the current position, whether there are star spots present in the inner template at that position can be determined. In order to create a significant difference in entropy values between regions with star spots and regions without star spots, a low-threshold binary image processing can be applied to the image beforehand. The star spot extraction process based on image entropy is as follows:
  • A star spot extraction sliding window composed of an inner template and an outer template is established to scan the entire image, with the centers of the inner and outer templates aligned, as shown in Figure 2.
  • If the mean and maximum grayscale values of the pixels in the inner template region reach the set threshold, it is considered that a star exists in that region; otherwise, the star spot extraction sliding window scans the next position.
  • If the assumed star spots are present in the scanning window, the following values are calculated separately:
(1) The image entropy of the region W 2 covered by the outer template: I m g E n t r o g y ( W 2 ) = H ( W 2 ) ;
(2) The region W 3 is covered by the outer template but not by the inner template, W 3 = W 2 W 1 , and the image entropy of this part is I m g E n t r o g y ( W 3 ) = H ( W 3 ) .
4.
The difference in image entropy between region W 2 and region W 3 is calculated as follows:
H W 3 H W 2 = I m g E n t r o g y W 3 I m g E n t r o g y ( W 2 )
If there are complete star spots in the inner template region, the difference in image entropy between region W 2 and region W 3 will be significant. If the difference in image entropy reaches a threshold value, it is considered that there are star spots in that region.
Figure 3 shows the difference in image entropy as the star spot extraction sliding window scans different positions in the star image. From Figure 3, it can be observed that when the scanning window contains a background region, the difference in image entropy is smaller than when the scanning window is over a region with complete star spots. Therefore, the position of the star spot targets can be determined by selecting the regions where the difference in image entropy exceeds a threshold value.
After star spot extraction based on image entropy, the squared weighted centroid method is employed in this study to calculate the centroid of the star spot ( x 0 , y 0 ) , with the following equation [38]:
x 0 = x = 1 m y = 1 n I 2 ( x , y ) · x x = 1 m y = 1 n I 2 ( x , y ) y 0 = x = 1 m y = 1 n I 2 ( x , y ) · y x = 1 m y = 1 n I 2 ( x , y )
where I ( x , y ) represents the pixel grayscale value of the image region containing the target, with x = 1 , 2 , , m , y = 1 , 2 , , n .
Once the coordinates of the star spot centroid are calculated, they are transformed into image plane coordinates X i , Y i according to Equation (10) [39].
X i , Y i = x 0 , y 0 N x 2 , N y 2
where N x , N y represents the resolution of the image. Thus, we obtained the complete star spot extraction algorithm. For the convenience of labeling, we call it the image entropy-based grayscale iterative (IEGI) star spot extraction algorithm. The extraction process is illustrated in Figure 4.

6. Numerical Simulation and Analysis

A series of numerical simulations are implemented to verify the detection capability of the IEGI algorithm. To realistically simulate the on-orbit working environment, we added background stray light with a uniform distribution model, linear distribution model, and Gaussian distribution model to clean star images. The parameters of these models are shown in Table 1, the simulated camera parameters are presented in Table 2, and the distribution of the star images is illustrated in Figure 5. In the case of the three types of background star maps mentioned above, the detection capability of the IEGI algorithm is compared with the max–mean filter algorithm, the max–median filter algorithm, and the Top-Hat transform algorithm. For the three types of stray light, the number of iterations of the IEGI algorithm is 1, 8, and 5, respectively. In this paper, the values of thresholds T1 and T2 of the IEGI algorithm are set to 1.5 and 1.8, respectively. The number of correctly extracted star spots, the number of false star spots, and the running time are used as extraction capability indexes. A higher number of correctly extracted star spots and a lower number of false star spots indicate stronger detection capability. The results of the star spot extraction by the four algorithms are shown in Table 3, where green circles represent correctly extracted star spots and red squares indicate false star spots. The mean number of correctly extracted star spots and false star spots from 100 repetitions of the simulation experiment are shown in Figure 6 and Figure 7, respectively. The running times of various algorithms are shown in Table 4. The simulation platform was a Windows 10 system with MATLAB software (R2020a).
Figure 5a shows a simulated star image with the line-of-sight direction at (313.7764, −0.1315), containing 132 star spots with a brightness above 7.5 Mv. Figure 5b presents a simulated star image with uniformly distributed stray light, where the stray light grayscale values follow a uniform distribution within the range [190, 200]. Star spots with maximum grayscale values below 200 are completely obscured. Star spots with grayscale values above 200 are retained and can be discerned with the naked eye. Figure 5c depicts a simulated star image with linearly distributed stray light, where the stray light grayscale values follow a linear distribution within the range [200, 60], causing star spots on the left side of the image to be completely obscured. Figure 5d illustrates a simulated star image with Gaussian-distributed stray light, where the stray light grayscale values follow a Gaussian distribution within the range [200, 0]. The background grayscale values are similar to those in Figure 5c, but more star spots are retained.
As can be seen from Table 3, for uniformly distributed stray light, the max–mean filter algorithm effectively extracts the star spots from the star images without any false star spots. However, for linearly distributed stray light and Gaussian-distributed stray light, the max–mean filter algorithm results in a significant number of missing star spots in the areas with higher grayscale values on the left side, and there are a few false star spots. For all three types of stray light, the max–median filter algorithm results in the extraction of star spots with a significant number of missing star spots and a considerable number of false star spots. For the uniformly distributed stray light star images, the Top-Hat algorithm effectively extracts the star spots. However, for the linearly distributed and Gaussian distributed stray light star images, the Top-Hat algorithm results in missing star spots in the areas with higher grayscale values on the left side. Additionally, there are a few false star spots present in the extraction results for all three types of stray light. As shown in the fifth row of Table 3, for the three types of simulated star images with stray light in Figure 5, the IEGI algorithm successfully extracts most of the star spots from the original star images without any false star spots. From Table 3, it can be qualitatively observed that, compared to the other three small target detection algorithms, the IEGI algorithm has the greatest number of green circles and the fewest red squares in its extraction results. This indicates that it has the highest number of correctly extracted star spots and the lowest number of false star spots.
From Figure 6, it can be quantitatively observed that the IEGI algorithm achieves the highest number of correctly extracted star spots for three types of stray light simulated star images, with values of 132, 130, and 131, respectively, which are closest to the actual number of star spots. For uniformly distributed stray light, the max–mean filtering algorithm and the Top-Hat algorithm show star spot detection results that are close to the IEGI algorithm. However, for star images with the linear distribution and Gaussian distribution of stray light, these two algorithms yield a smaller number of correctly extracted star spots, resulting in the omission of many star spots. For the three types of star images with different types of stray light, the max–median filtering algorithm has the lowest number of correctly extracted star spots. From Figure 7, it can be observed that for the three types of simulated star images with different types of stray light, the IEGI algorithm shows no false star spots in the extraction results, while the other three detection algorithms have a significant number of false star spots.
From Table 4, we observe that the IEGI algorithm requires implementing multiple iterations before obtaining a satisfactory solution, and the reconstruction time is the longest among the competing algorithms. In the future, the proposed star point extraction algorithm should be further studied to improve the computing efficiency.
In conclusion, from the perspective of removing stray light backgrounds and accurately extracting star spots, the IEGI algorithm proposed in this paper demonstrates the effective removal of stray light backgrounds with three different distribution models, yielding consistent extraction results. The algorithm is capable of accurately extracting star spots with maximum grayscale values greater than the maximum grayscale values of the stray light. The IEGI algorithm outperforms the other three traditional detection algorithms.

7. Experiment and Analysis

To further validate the target detection capability of the IEGI algorithm under stray light interference, a series of experiments were conducted outdoors, collecting multiple real-life images containing stray light conditions. The camera parameters are shown in Table 2. The real-life star images are shown in Figure 8. In Figure 8a, there is a large area of stray light in the lower left corner. In Figure 8b, there are large areas of stray light on the left and bottom sides. In Figure 8c, there is a large area of stray light at the bottom, and there are also large cloud layers blocking the star spots. These factors make the detection of star spot targets challenging. For the purpose of facilitating a comparison of extraction effectiveness, we analyzed the right ascension and declination of the three different operational conditions’ lines of sight. Based on a star catalog, the actual star image corresponding to this orientation was obtained, as shown in Figure 9. In response to the captured real-life star images, we utilized the max–mean filtering algorithm, the max–median filtering algorithm, the Top-Hat algorithm, and the IEGI algorithm for star spot extraction, with the detection results presented in Table 5. For the three types of stray light conditions in Figure 8, the number of iterations of the IEGI algorithm was 8, 9, and 13, respectively. The corresponding grayscale value distribution of the detection results is shown in Table 6, and the comparison of the correct number of star spots, the number of false star spots, and the detection rate ( D R ) and error rate ( E R ) in their extraction results are presented in Figure 10 and Figure 11, and Table 7, respectively. The calculation formulas for the detection rate and error rate are as follows:
D R = N t N s u m × 100 %
E R = N E N s u m × 100 %
where N t is the number of correctly detected star spots, N E is the number of falsely detected star spots, and N s u m is the total number of actual star spots.
Table 5 shows that, for the three types of stray light conditions in Figure 8, the max–mean filtering algorithm and max–median filtering algorithm extract very few correct star spots. Particularly, in the regions with stray light distribution, all star spots are missing, and there are some false star spots present. In the star spot extraction results of the Top-Hat algorithm, there are a large number of false star spots in the regions with stray light distribution, which poses significant challenges for subsequent sky area identification and target recognition. From the last row of Table 5, it is evident that the IEGI algorithm extracts the highest number of correct star spots and the lowest number of false star spots through multiple grayscale iterations and star spot extraction based on image entropy. It effectively extracts the target star spots in regions with stray light distribution.
From Table 6, it can be visually observed that the photographed star image contains extensive background stray light with higher grayscale values compared to the true star image. This has led to some genuine star spots being submerged and unable to be accurately separated from the background. In the star spot extraction results of the max–mean filtering algorithm and the max–median filtering algorithm, only a small number of pixels have grayscale values, indicating a low number of extracted star spots. This is consistent with the analysis results in Table 5. In the background stray light regions, the Top-Hat algorithm’s extraction results show a large number of pixels with higher grayscale values compared to the ground truth, indicating the presence of false star spots. From the last row of Table 6, it can be observed that the IEGI algorithm exhibits the highest similarity with the grayscale histogram of the ground truth, effectively extracting the star spots in the target celestial region.
From Figure 10, it can be quantitatively observed that the number of correctly extracted star spots by the max–mean and max–median filtering algorithms is notably lower compared to the Top-Hat and the IEGI algorithms under the three practical conditions depicted in Figure 8. Among them, the IEGI algorithm extracted the highest number of correct star spots, with 93, 67, and 87, respectively. From Figure 11, it can be quantitatively observed that the Top-Hat algorithm exhibits a substantially higher number of false star spots compared to the other three detection algorithms. The number of false star spots in the other three algorithms is relatively small. It can be seen from Table 7 that only the results extracted by the IEGI algorithm indicate a high detection rate while maintaining a low error rate. From Figure 10 and Figure 11, and Table 7, it can be concluded that although the max–mean filtering algorithm and the max–median filtering algorithm have a small number of false star spots in their extraction results, they extract fewer correct star spots. On the other hand, the Top-Hat algorithm, while extracting a number of correct star spots close to the IEGI algorithm, has a significant number of false star spots. Among the four algorithms, only the IEGI algorithm is able to achieve a large number of correctly extracted star spots while maintaining a small number of false star spots. This is consistent with the qualitative analysis results in Table 5 and Table 6.
In conclusion, for the three different practical conditions depicted in Figure 8, the IEGI algorithm extracts the largest number of correct star spots with only a small number of false star spots. Under various real-life stray light conditions, the algorithm proposed in this paper demonstrates superior star spot detection performance compared to the other three detection algorithms, making it highly valuable for engineering applications.

8. Conclusions

To address issues such as the low star spot extraction rate and a high number of false star spots when the star tracker is affected by stray light during on-orbit operation, a grayscale iterative star spot extraction algorithm based on image entropy was proposed. Using this method, we first eliminated some background stray light through multiple iterations of grayscale transformations, enhancing the contrast of the star spot targets. Next, inner–outer star spot extraction templates were constructed, and then the extraction of star spots was carried out based on image entropy, which further suppressed the background clutter and noise. Based on the simulated and real star images, the algorithm was verified in numerical simulations and experiments. Compared to the max–mean and the max–median filtering algorithm, the detection rate of the IEGI algorithm increased by over 45%, and compared to the Top-Hat algorithm, the error rate decreased by over 50%. Compared to other star spot extraction algorithms presented in this paper, the proposed algorithm can achieve a higher number of correctly extracted star spots and a lower number of false star spots under different background noise interference conditions. Our work provides an alternative approach for star spot extraction, which should be further investigated in the future.

Author Contributions

All the authors contributed to this study. Conceptualization, Q.Z. and J.L.; investigation, Q.Z. and D.Z.; methodology, Q.Z. and J.F.; resources, J.L. and D.Z.; software, Q.Z. and J.L.; validation, Q.Z. and J.L.; funding acquisition, Q.Z. and J.L.; writing—original draft preparation, Q.Z.; writing—review and editing, Q.Z. and J.L.; visualization, D.Z. and J.F.; supervision, D.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Basic Research Plan in Shaanxi province of China under Grant No. 2022JQ-706.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in the study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Tian, L.; Jiang, J.; Yang, J.; Ma, Y. Attitude modeling of star trackers under complex vibration conditions. Measurement 2024, 226, 114087. [Google Scholar] [CrossRef]
  2. Panousopoulos, V.; Papaloukas, E.; Leon, V.; Soudris, D.; Koumandakis, E.; Lentaris, G. HW/SW co-design on embedded SoC FPGA for star tracking optimization in space applications. J. Real-Time Image Process. 2024, 21, 16. [Google Scholar] [CrossRef]
  3. Mahi, Z.; Karoui, M.S.; Keche, M. A new star detection approach for a satellite-onboard star tracker. Adv. Space Res. 2023, 72, 2336–2350. [Google Scholar] [CrossRef]
  4. Carreau, M. NASA Addressing Two Issues with Twin Voyager Spacecraft. Aerosp. Dly. Def. Rep. 2023, 286, 7. [Google Scholar]
  5. Bacidore, M. NASA’s Mars Rover Perseverance uses Northrop Grumman technology. Control Des. Mach. Build. 2021, 25. [Google Scholar]
  6. Du, N.; Wu, S.; Chen, Z.; Zhang, K.; Liu, G. Attitude Guidance Algorithms for Agile Satellite Dynamic Imaging. Guid. Navig. Control 2022, 2, 2250022. [Google Scholar] [CrossRef]
  7. Gao, R.; Wang, Y.; Cui, Z.; Liu, H.; Liu, A.; Qian, X.; Wang, X.; Yao, Z.; Yang, Q.; Jia, J.; et al. On-ground demonstration of laser-link construction for space-based detection of gravitational waves. Opt. Lasers Eng. 2023, 160, 107287. [Google Scholar] [CrossRef]
  8. Zhang, C. Fast Star Matching Method Based on Double K-Vector Lookup Tables for Multi-Exposure Star Trackers. Sensors 2021, 21, 3176. [Google Scholar] [CrossRef]
  9. Marcelino, G.M.; Schulz, V.H.; Seman, L.O.; Bezerra, E.A. Centroid determination hardware algorithm for star trackers. Int. J. Sens. Netw. 2020, 32, 1. [Google Scholar] [CrossRef]
  10. Wang, S.; Li, Y.; Du, L.; Fan, Y. An algorithm of rapid extraction star point and diffuse plaque in star image. Proc. SPIE-Int. Soc. Opt. Eng. 2014, 9142, 5545–5550. [Google Scholar]
  11. Forero, D.; Esteban, S.; Rodríguez-Polo, Ó. Framework to Emulate Spacecraft Orbital Positioning Using GNSS Hardware in the Loop. Sensors 2023, 23, 885. [Google Scholar] [CrossRef]
  12. Trinchera, A. CMB as thermal radiation from cosmic dust grains in equilibrium with the redshifted starlight. J. Phys. Conf. Ser. 2022, 2197, 012026. [Google Scholar] [CrossRef]
  13. Yun, Z.; Zhang, J.; Zhang, Y.; Ren, T.; Chen, S.; Zhao, B.; Zhang, J.; Lin, G.; Zhang, G. Research on compensation method for starlight emission accuracy based on star point focal length traversal. Opt. Commun. 2024, 567, 130664. [Google Scholar] [CrossRef]
  14. Wang, Y.F.; Li, L.Y. Stray light suppression of star photoelectric detection system for space target in daytime. Guangxue Jingmi Gongcheng/Opt. Precis. Eng. 2011, 19, 2854–2861. [Google Scholar]
  15. Romoli, A.; Gambicorti, L.; Simonetti, F.; Marchi, A.Z. A star tracker insensitive to stray light generated by radiation sources close to the field of view. SPIE 2017, 10566, 105660S. [Google Scholar]
  16. Yan, Y.D.; Chen, L.Y.; Cang, Y.P.; He, J.H. Stray light reduction analysis in single star simulator. Opto-Electron. Eng. 2007, 34, 21. [Google Scholar]
  17. Sun, T.; Xing, F.; You, Z.; Wang, X.; Li, B. Deep coupling of star tracker and MEMS-gyro data under highly dynamic and long exposure conditions. Meas. Sci. Technol. 2014, 25, 085003. [Google Scholar] [CrossRef]
  18. Zheng, T.; Ying, D. Star spot centroid extraction algorithm with a single scan and its FPGA verification. Mod. Electron. Tech. 2018, 41, 19–23. [Google Scholar]
  19. Cao, Y.; Liu, R.M.; Yang, J. Small Target Detection Using Two-Dimensional Least Mean Square (TDLMS) Filter Based on Neighborhood Analysis. Int. J. Infrared Millim. Waves 2008, 29, 188–200. [Google Scholar] [CrossRef]
  20. Shi, Y.; Wei, Y.; Yao, H.; Pan, D.; Xiao, G. High-Boost-Based Multiscale Local Contrast Measure for Infrared Small Target Detection. IEEE Geosci. Remote Sens. Lett. 2017, 15, 33–37. [Google Scholar] [CrossRef]
  21. Wang, B.; Xu, W.; Zhao, M.; Wu, H. Antivibration pipeline-filtering algorithm for maritime small target detection. Opt. Eng. 2014, 53, 113109. [Google Scholar] [CrossRef]
  22. Reed, I.S.; Gagliardi, R.M.; Shao, H.M. Application of Three-Dimensional Filtering to Moving Target Detection. IEEE Trans. Aerosp. Electron. Syst. 1983, AES-19, 898–905. [Google Scholar] [CrossRef]
  23. Barniv, Y.; Kella, O. Dynamic Programming Solution for Detecting Dim Moving Targets Part II: Analysis. IEEE Trans. Aerosp. Electron. Syst. 1987, 23, 776–788. [Google Scholar] [CrossRef]
  24. Lee, D.S. Effective Gaussian Mixture Learning for Video Background Subtraction. IEEE Comput. Soc. 2005, 27, 827–832. [Google Scholar]
  25. Hamdulla, A.; Wu, W. Point Target Detection Technology Based on Multi-Scale Local Gradient. J. Univ. Electron. Sci. Technol. China 2019, 48, 11. [Google Scholar]
  26. Yang, W.; Shen, Z. Small target detection and preprocessing technology in infrared image sequences. Infrared Laser Eng. 1998, 27, 6. [Google Scholar]
  27. Hanji, G.; Latte, M.V. A Novel Mean Median Filter for Noise and Artifacts Suppression from Digital Images. Int. J. Comput. Appl. 2015, 114, 20–26. [Google Scholar] [CrossRef]
  28. Bai, X.; Zhou, F. Analysis of new top-hat transformation and the application for infrared dim small target detection. Pattern Recognit. 2010, 43, 2145–2156. [Google Scholar] [CrossRef]
  29. Bai, X.; Zhou, F.; Xie, Y.; Jin, T. New Top-Hat Transformation and Application on Infrared Small Target Detection. J. Data Acquis. Process. 2009, 24, 643–649. [Google Scholar] [CrossRef]
  30. Liu, Y.; Tang, X.; Li, Z. A New Top Hat Local Contrast based Algorithm for Infrared Small Target Detection. Infrared Technol. 2015, 37, 544–552. [Google Scholar]
  31. Ay, F.; Ince, G.; Kamasak, M.E.; Eki, K.Y. Classification of pulsars with Dirichlet process Gaussian mixture model. Mon. Not. R. Astron. Soc. 2020, 493, 713–722. [Google Scholar] [CrossRef]
  32. He, Y.; Wang, H.; Feng, L.; You, S. A Novel Method of Eliminating Stray Light Interference for Star Sensor. IEEE Sensors J. 2020, 20, 8586–8596. [Google Scholar] [CrossRef]
  33. Yu, M.; Gao, J.; Zhang, J.; Xu, N. Suppression of the stray light of 2-dimensional gratings combined with an array of periodic slit. Acta Phys. Sin. 2013, 62, 204208. [Google Scholar]
  34. Liu, S.; Zhang, J.; Sun, G.; Zhang, G.; Chen, S.; Chen, J. Research on evaluation index of stray light suppression ability of star sensor based on signal-to-noise ratio. Opt. Commun. 2023, 530, 129175. [Google Scholar] [CrossRef]
  35. Jia, H.; Yin, Q.; Lu, M. Weighted guided image filtering with entropy evaluation weighting. Comput. Graph. 2023, 117, 114–123. [Google Scholar] [CrossRef]
  36. Jia, B.; Xu, J.; Xing, H.; Wu, P. Remote Sensing Image Fusion Based on Morphological Convolutional Neural Networks with Information Entropy for Optimal Scale. Sensors 2022, 22, 7339. [Google Scholar] [CrossRef]
  37. Yazid, H.; Basah, S.N.; Rahim, S.A.; Safar, M.J.A.; Basaruddin, K.S. Performance analysis of entropy thresholding for successful image segmentation. Multimed. Tools Appl. 2022, 81, 6433–6450. [Google Scholar] [CrossRef]
  38. Zeng, Y.; Dong, X.; Zhang, F.; Zhou, D. A stable decoding algorithm based on circular coded target. ICIC Express Lett. 2018, 12, 221–228. [Google Scholar]
  39. Wang, J.; Chun, J. Attitude Determination Using a Single-Star Sensor and a Star-Density Table. J. Guid. Control Dyn. 2006, 29, 1329–1338. [Google Scholar] [CrossRef]
Figure 1. (a) Inner template; (b) outer template; (c) the combined extraction sliding window of star spots.
Figure 1. (a) Inner template; (b) outer template; (c) the combined extraction sliding window of star spots.
Applsci 14 09207 g001
Figure 2. Composition of the sliding window for star spot extraction.
Figure 2. Composition of the sliding window for star spot extraction.
Applsci 14 09207 g002
Figure 3. Different positions of the star spot extraction window in the star image: (a) presence of partial star spots within the inner template; (b) presence of complete star spots within the inner template; (c) absence of star spots within the inner template.
Figure 3. Different positions of the star spot extraction window in the star image: (a) presence of partial star spots within the inner template; (b) presence of complete star spots within the inner template; (c) absence of star spots within the inner template.
Applsci 14 09207 g003
Figure 4. Flowchart of star spot extraction process based on the IEGI algorithm.
Figure 4. Flowchart of star spot extraction process based on the IEGI algorithm.
Applsci 14 09207 g004
Figure 5. Simulated star images: (a) simulated star image without stray light; (b) simulated star image with uniformly distributed stray light; (c) simulated star image with linearly distributed stray light; (d) simulated star image with Gaussian distributed stray light.
Figure 5. Simulated star images: (a) simulated star image without stray light; (b) simulated star image with uniformly distributed stray light; (c) simulated star image with linearly distributed stray light; (d) simulated star image with Gaussian distributed stray light.
Applsci 14 09207 g005
Figure 6. The correct number of star spot extractions under different stray light conditions.
Figure 6. The correct number of star spot extractions under different stray light conditions.
Applsci 14 09207 g006
Figure 7. The number of false star spots under different stray light conditions.
Figure 7. The number of false star spots under different stray light conditions.
Applsci 14 09207 g007
Figure 8. Real star image captured with the camera. (a) stray light condition 1; (b) stray light condition 2; (c) stray light condition 3.
Figure 8. Real star image captured with the camera. (a) stray light condition 1; (b) stray light condition 2; (c) stray light condition 3.
Applsci 14 09207 g008
Figure 9. Real star spot distribution corresponding to the captured star images.
Figure 9. Real star spot distribution corresponding to the captured star images.
Applsci 14 09207 g009
Figure 10. The number of correctly extracted star spots by different algorithms under different conditions.
Figure 10. The number of correctly extracted star spots by different algorithms under different conditions.
Applsci 14 09207 g010
Figure 11. The number of false star spots detected by different algorithms under different conditions.
Figure 11. The number of false star spots detected by different algorithms under different conditions.
Applsci 14 09207 g011
Table 1. Parameters of different models of background stray light.
Table 1. Parameters of different models of background stray light.
Uniform Distribution ModelLinear Distribution ModelGaussian Distribution Model
g m a x = 190 α = 10 g m a x = 190 g m i n = 50 N B = 618 α = 10 Y ~ ( 300 , 16,000 )
Table 2. Camera parameters.
Table 2. Camera parameters.
ParametersValues
Image resolution512 × 512
Field of view7.5°
Focal length/mm78.1 mm
Table 3. Star spot extraction results.
Table 3. Star spot extraction results.
Uniformly Distributed Stray LightLinearly Distributed Stray LightGaussian Distributed Stray Light
Max–meanApplsci 14 09207 i001Applsci 14 09207 i002Applsci 14 09207 i003
Max–medianApplsci 14 09207 i004Applsci 14 09207 i005Applsci 14 09207 i006
Top-HatApplsci 14 09207 i007Applsci 14 09207 i008Applsci 14 09207 i009
IEGIApplsci 14 09207 i010Applsci 14 09207 i011Applsci 14 09207 i012
Table 4. Running time(s).
Table 4. Running time(s).
Max–MeanMax–MedianTop-HatIEGI
Uniformly distributed stray light0.120.180.230.69
Linearly distributed stray light0.190.170.241.04
Gaussian-distributed stray light0.180.180.260.98
Table 5. Star spot extraction results.
Table 5. Star spot extraction results.
(a)(b)(c)
Max–meanApplsci 14 09207 i013Applsci 14 09207 i014Applsci 14 09207 i015
Max–medianApplsci 14 09207 i016Applsci 14 09207 i017Applsci 14 09207 i018
Top-HatApplsci 14 09207 i019Applsci 14 09207 i020Applsci 14 09207 i021
IEGIApplsci 14 09207 i022Applsci 14 09207 i023Applsci 14 09207 i024
Table 6. Grayscale histogram of the star spot extraction results.
Table 6. Grayscale histogram of the star spot extraction results.
(a)(b)(c)
Ground truthApplsci 14 09207 i025Applsci 14 09207 i026Applsci 14 09207 i027
Real star imageApplsci 14 09207 i028Applsci 14 09207 i029Applsci 14 09207 i030
Max–meanApplsci 14 09207 i031Applsci 14 09207 i032Applsci 14 09207 i033
Max–medianApplsci 14 09207 i034Applsci 14 09207 i035Applsci 14 09207 i036
Top-HatApplsci 14 09207 i037Applsci 14 09207 i038Applsci 14 09207 i039
IEGIApplsci 14 09207 i040Applsci 14 09207 i041Applsci 14 09207 i042
Table 7. Detection rate and error rate by different algorithms under different conditions.
Table 7. Detection rate and error rate by different algorithms under different conditions.
Max–MeanMax–MedianTop-HatIEGI
Detection RateError RateDetection RateError RateDetection RateError RateDetection RateError Rate
(a)7.782.2211.115.5646.11141.1151.6710.56
(b)10.261.7113.686.8448.7253.8557.273.42
(c)13.33014.002.6739.3333.3358.006.00
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhao, Q.; Liao, J.; Zhang, D.; Feng, J. Grayscale Iterative Star Spot Extraction Algorithm Based on Image Entropy. Appl. Sci. 2024, 14, 9207. https://doi.org/10.3390/app14209207

AMA Style

Zhao Q, Liao J, Zhang D, Feng J. Grayscale Iterative Star Spot Extraction Algorithm Based on Image Entropy. Applied Sciences. 2024; 14(20):9207. https://doi.org/10.3390/app14209207

Chicago/Turabian Style

Zhao, Qing, Jiawen Liao, Derui Zhang, and Jia Feng. 2024. "Grayscale Iterative Star Spot Extraction Algorithm Based on Image Entropy" Applied Sciences 14, no. 20: 9207. https://doi.org/10.3390/app14209207

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop