A real-time star point extraction method for all-day star sensor

Through the TopHat algorithm and oblique four-neighborhood judgment combined with rolling storage structure and connected domain labeling, the star point extraction problem of the all-day star sensor under complex background is solved, pipeline processing on the FPGA platform is realized, and background noise immunity is improved. The accuracy and operating efficiency meet the real-time observation needs of all-day star sensors.

CN114255349BActive Publication Date: 2024-10-11BEIJING AEROSPACE INST FOR METROLOGY & MEASUREMENT TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111349656.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-15
Publication Date
2024-10-11
Estimated Expiration
2041-11-15

AI Technical Summary

Technical Problem

Existing all-day star sensors cannot achieve real-time extraction of star points under complex and strong sky backgrounds. Existing methods have insufficient background interference resistance and rely on sequential operations, which results in too long running times and cannot meet the needs of real-time observation.

Method used

The TopHat algorithm is used to perform background denoising on the star map data, and the average gray level of the oblique four neighborhoods is used to determine the star point pixels. The rolling storage structure and connected domain marking method are used to achieve accurate extraction of the star point area, combined with the AXI Stream streaming media format. And pipeline processing on the FPGA platform improves the efficiency and real-time performance of the algorithm.

Benefits of technology

In the case of high background interference during the day, the stable capture of the star point area is achieved, the signal-to-noise ratio is improved, and the dynamic observation needs of the all-day star sensor are met through pipeline parallel processing. The center of mass information can be obtained almost immediately after the image input is completed. given simultaneously.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114255349B_ABST
    Figure CN114255349B_ABST
Patent Text Reader

Abstract

The invention provides a real-time star point extraction method for an all-day star sensor. Firstly, the format of original image data is converted into a streaming media format of AXI Stream to realize the rate control of a pipeline process; the star point image and the background image are separated by using a TopHat algorithm as the core; the effective star point area is extracted by a local method using grayscale mean information of a neighborhood; finally, the accurate centroid position of the star point on the image is obtained by a connected domain marking method of pipeline sequential traversal; on the one hand, compared with a simple global method, the method has stronger resistance to background noise and can realize the stable capture of celestial bodies under the condition of high background interference during the day; on the other hand, the star point extraction method for an all-day star sensor of the invention can also be realized in the form of pipeline processing on an FPGA platform with the help of a high-order comprehensive compilation tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of absolute attitude measurement, and in particular relates to a real-time star point extraction method for an all-day star sensor. Background Art

[0002] The all-day star sensor is designed to solve the problem of high-precision astronomical attitude measurement under all-day conditions. The extremely low signal-to-noise ratio caused by the intense sky background illumination during daytime astronomical observations is the key technical difficulty of the device. In terms of optical and mechanical hardware, all-day star sensors generally adopt a design of small detection field of view and partial infrared detection spectrum. Actual observation results show that even with the use of angularly graded field of view and short-wave infrared detection spectrum, the signal-to-noise ratio of celestial body imaging is still low. In order to compensate for the small field of view of the optical and mechanical design, the all-day star sensor uses a servo-type star search to dynamically observe different celestial bodies in multiple directions. This requires that the star point extraction of each observation image must be real-time and fast.

[0003] There is no published patent on the star point extraction method applicable to all-day star sensors.

[0004] According to relevant searches, the star point extraction methods of all-day star sensors are currently divided into two categories. One category is inherited from traditional star sensors, which uses a global threshold segmentation method to segment star points from the background. Although some improved methods adjust the threshold in real time according to image statistical information, the actual extraction effect of star points under complex backgrounds is not ideal. Another method uses the gray gradient distribution of celestial imaging spots as a feature for target extraction. This type of method requires a large amount of numerical calculations. Numerical calculations rely on embedded processors such as DSP and ARM, and the calculations are executed serially, which takes a long time and the method has poor real-time performance. Although the use of multi-core embedded processors can improve computing efficiency, the memory sharing scheduling mechanism is difficult to meet the needs of parallel computing.

[0005] In summary, there is currently no method for real-time extraction of star points in a complex and strong sky background under all-day conditions. Existing processing methods are either too simple and lack resistance to background interference, or have large numerical calculations and rely on the sequential execution of embedded processors, resulting in long running times and unable to meet real-time observation needs. Summary of the invention

[0006] In order to solve the above problems, the present invention provides a real-time star point extraction method for a star sensor at all times, which can achieve stable capture of the star point area under the condition of high background interference during the day.

[0007] A method for extracting star points in real time from a star sensor all day long comprises the following steps:

[0008] S1: After converting the format of the original star map data obtained by the star sensor imaging end into the streaming media format of AXI Stream, the TopHat algorithm is used to perform background denoising on the star map data after format conversion to obtain the star map after background filtering;

[0009] S2: After the background is filtered out, the star image is passed through a box filter to obtain a mean image. Each pixel of the mean image is used as the central pixel. The central pixel is judged to be a star point pixel according to whether the grayscale mean of the central pixel is greater than the grayscale mean of any of its four oblique neighbors.

[0010] S3: dividing the connected domain of the star point pixels according to whether the rows and columns of the star point pixels are adjacent;

[0011] S4: Use the centroid method to obtain the coordinates of the star point area represented by each connected domain.

[0012] Furthermore, when judging whether the current central pixel is a star point pixel, the calling method of its four oblique neighboring pixels in the memory is as follows:

[0013] Construct a rolling storage structure including seven cache lines, and the cache line numbers of the rolling storage structure are numbered from 0 to 6, and the rolling storage structure is used to store the pixels of the row where the current central pixel is located, the pixels of the first three rows of the row where the current central pixel is located, and the pixels of the last three rows of the row where the current central pixel is located on the mean image; wherein, if the current central pixel is the last pixel of its row and the current central pixel has completed the judgment of whether it is a star point pixel, the cache line where the pixels of the third row before the row where the current central pixel is located is cleared, and the next row of the row where the current central pixel is located is used as the row where the next central pixel is located, and the pixels of the third row after the row where the next central pixel is located are also stored in the cleared cache line, and the row number of the cache line is recorded as k;

[0014] Obtain the cache row number of the current central pixel and its four oblique neighboring pixels in the rolling storage structure according to the following formula:

[0015]

[0016]

[0017] r down =k

[0018] Where k is the cache row number that stores the third row of pixels behind the row where the current center pixel is located, r mid is the cache row number of the row where the current center pixel is located, r up is the cache row number of the upper left neighbor pixel and the upper right neighbor pixel of the row where the current center pixel is located, r downThe cache row number of the lower left neighboring pixel and the lower right neighboring pixel of the row where the current center pixel is located;

[0019] Obtain the cache column number of the current central pixel and its four oblique neighboring pixels in the rolling storage structure according to the following formula:

[0020]

[0021] Among them, t is the cache column number of the upper right neighbor pixel and the lower right neighbor pixel of the current center pixel, c left is the cache column number of the upper left neighbor pixel and the lower left neighbor pixel of the current center pixel, c mid is the cache column number of the current center pixel, c right The cache column number of the upper right neighboring pixel and the lower right neighboring pixel of the current center pixel;

[0022] The corresponding grayscale mean is called from the rolling storage structure according to the cache row number and cache column number of the current central pixel and its four oblique neighboring pixels, and whether the current central pixel is a star point pixel is determined according to the called grayscale mean.

[0023] Furthermore, the connected domain division method of each star point pixel is: taking each star point pixel as the current star point pixel and performing the following steps:

[0024] S31: Determine whether the current star point pixel has a line break relative to the previous star point pixel. If not, proceed to step S32. If it has, set the left pixel label leftLabel of the current star point pixel to 0 and then proceed to step S33.

[0025] S32: Determine whether the column where the current star point pixel is located is adjacent to the column where the previous star point pixel is located. If so, the current star point pixel and the previous star point pixel belong to the same row connected domain, and the left pixel label leftLabel of the current star point pixel is set to be the same as the left pixel label leftLabel of the previous star point pixel, and then enter step S34; if not, set the left pixel label leftLabel of the current star point pixel to 0 and then enter step S34;

[0026] S33: Determine whether the row where the current star point pixel is located is adjacent to the row where the previous star point pixel is located. If so, set the number of connected domain blocks in the previous row lastSectNum to the number of connected domains in the row where the previous star point pixel is located before entering step S34; if not, set the number of connected domain blocks in the previous row lastSectNum to 0 before entering step S34;

[0027] S34: Determine whether the left pixel label leftLabel of the current star point pixel is 0. If not, update the right boundary of the row connected domain corresponding to the current left pixel label leftLabel to the column number curPixCol of the current star point pixel, and then go to step S35; if it is 0, directly go to step S35;

[0028] S35: judging whether the current star point pixel belongs to the row where the previous star point pixel is located, including the row connected domain, according to the set criterion, wherein the set criterion is: the number of blocks of the row connected domain in the previous row lastSectNum is not equal to 0 and the column number curPixCol of the current star point pixel falls between the left boundary and the right boundary of any row connected domain included in the row where the previous star point pixel is located; if it does not belong, proceed to step S37; if it does, record the row connected domain to which the current star point pixel belongs as A, and proceed to step S36;

[0029] S36: Determine whether the left pixel label leftLabel of the current star point pixel is 0. If it is 0, the current star point pixel only belongs to the row connected domain A; if it is not 0, the current star point pixel belongs to both the row connected domain A and the row connected domain corresponding to the current left pixel label leftLabel, and determine whether the labels of the two row connected domains are the same. If they are not the same, the row connected domain corresponding to the current left pixel label leftLabel is attributed to the row connected domain A, and the left pixel label leftLabel of the current star point pixel is converted to the label of the row connected domain A; if they are the same, the row connected domain A and the row connected domain corresponding to the current left pixel label leftLabel are the same connected domain;

[0030] S37: Determine whether the left pixel label leftLabel of the current star point pixel is 0. If it is 0, the current star point pixel does not belong to the existing row connected domain. A new row connected domain is established in the row where the current star point pixel is located, and the left boundary, right boundary, row connected domain label of the new row connected domain formed by the current star point pixel and the row connected domain block number curSectNum of the row where the current star point pixel is located are obtained.

[0031] Further, construct the row connected domain left bound array leftList, the row connected domain right bound array rightList, and the row connected domain label array labelList, and divide the storage space of the row connected domain left bound array leftList, the row connected domain right bound array rightList, and the row connected domain label array labelList into the previous row storage space and the current row storage space, respectively storing the row connected domain left bound, the row connected domain right bound, and the connected domain label corresponding to the row where the previous star point pixel is located and the row where the current star point pixel is located, and the row connected domain left bound, the row connected domain right bound, and the connected domain label have subscripts for distinguishing whether they belong to the previous row or the current row;

[0032] If the current star point pixel changes to a new line relative to the previous star point pixel, the original current line storage space in the line connected domain left bound array leftList, the line connected domain right bound array rightList, and the line connected domain label array labelList is used as the previous line storage space, and the previous line storage space is cleared at this time. The cleared previous line storage space is used as the current line storage space, which is used to store the line connected domain left bound, line connected domain right bound, and connected domain label that will be generated for the line where the current star point pixel is located.

[0033] Furthermore, the switching between the rows to which the two storage spaces belong is achieved by exchanging the pointers corresponding to the previous row storage space and the current row storage space.

[0034] Furthermore, each connected domain is taken as the current connected domain and the following steps are performed:

[0035] Multiply the row number of each pixel in the current connected domain by its corresponding grayscale value, and then sum all the products to obtain the first sum value;

[0036] Multiply the column number of each pixel in the current connected domain by its corresponding grayscale value, and then sum all the products to obtain the second sum value;

[0037] Add the grayscale values ​​of each pixel to obtain the third sum value;

[0038] The ratio of the first sum value to the third sum value and the ratio of the second sum value to the third sum value are used as the coordinates of the star point area represented by the current connected domain.

[0039] Furthermore, the streaming media format of the AXI Stream includes a data port (TDATA), a data valid flag (TKEEP), a data type flag (TSTRB), a user-defined field (TUSER), a data packet end flag (TLAST), a data ID field (TID), a data routing field (TDEST) and a bus ready flag (TREADY).

[0040] Furthermore, the white TopHat method is used to perform background denoising on the star map data after format conversion.

[0041] Beneficial effects:

[0042] 1. The present invention provides a real-time star point extraction method for a star sensor at all times. First, the format of the original image data is converted into the streaming media format of AXI Stream to realize the rate control of the pipeline process; the star point image and the background image are separated with the TopHat algorithm as the core; the effective star point area is extracted by the local method using the grayscale mean information of the neighborhood; finally, the accurate centroid position of the star point on the image is obtained by the connected domain marking method of pipeline sequential traversal; on the one hand, compared with the simple global method, the method has stronger background noise resistance and can realize the stable capture of celestial bodies under the condition of high background interference during the day; on the other hand, the star point extraction method for the star sensor at all times of the present invention can also be realized in the form of pipeline processing on an FPGA platform with the help of a high-order comprehensive compilation tool.

[0043] 2. The present invention provides a real-time star point extraction method for a star sensor throughout the day. First, the format of the original image data is converted. The original image data formats of the image sensor or the movement are different. They can be converted into the image stream format of the AXIStream bus through FPGA. Since the bus itself has a signal controlled by a streaming media protocol, the bus speed matching problem that occurs in the pipeline process can be effectively prevented.

[0044] 3. The present invention provides a real-time star point extraction method for a star sensor at all times of the day. In the process of star point extraction, necessary hardware optimization is performed on the FPGA platform to ensure that the algorithm is correctly performed under pipeline conditions on the embedded platform. Specifically, a rolling storage structure is set, and the newly added data is directly stored in the latest cleared buffer row, and the storage location of the remaining data remains unchanged, which is conducive to pipeline processing using the FPGA platform and greatly improves the operation efficiency of the algorithm. The centroid information can be given almost simultaneously after the image input is completed, effectively ensuring the dynamic performance of the all-day star sensor, so that the present invention can realize the extraction of star points under all-day conditions on the FPGA platform.

[0045] 4. The present invention provides a real-time star point extraction method for a star sensor throughout the day, which uses the TopHat algorithm from image morphology to perform background denoising on the format-converted star map data, thereby filtering out the low-frequency distributed background from the image and improving the signal-to-noise ratio of high-frequency distributed star points. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 The present invention provides a real-time star point extraction method flow for a star sensor all day long;

[0047] Figure 2 Background denoising process provided by the present invention;

[0048] Figure 3 The local method star point extraction process provided by the present invention;

[0049] Figure 4 A schematic diagram of the oblique four-neighborhood decision provided by the present invention;

[0050] Figure 5 A schematic diagram of the oblique four-neighborhood in the case of rolling storage provided by the present invention;

[0051] Figure 6 The present invention provides a connected domain labeling and centroid positioning process. DETAILED DESCRIPTION

[0052] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0053] The present invention provides a real-time star point extraction method for an all-day star sensor, which uses the HLS (high-level synthesis) compilation tool to realize real-time processing of the captured star map image stream format on an FPGA platform. The method successively goes through three steps: background removal, star point region segmentation, and star point centroid positioning. In order to adapt to the needs of embedded parallel computing, the star point extraction method has been improved in hardware implementation. This method can effectively resist the complex sky background interference under daytime conditions, and the pipeline parallel operation of the method can meet the real-time requirements of star point extraction for dynamic observation of all-day star sensors.

[0054] like Figure 1 As shown, the all-day star sensor star point extraction method includes the following steps:

[0055] S1: After converting the format of the original star map data obtained by the star sensor imaging end into the streaming media format of AXI Stream, the TopHat algorithm is used to perform background denoising on the star map data after format conversion to obtain the star map after background filtering.

[0056] That is to say, the present invention first converts the format of the original image data. The original image data formats of the image sensor or the movement are different, and need to be converted into the image stream format of the AXI Stream bus through FPGA. The bus adds a signal controlled by the streaming protocol, which can effectively prevent the bus speed matching problem that occurs in the pipeline process. For example, the star map data comes from the front-end imaging device or movement of the star sensor. The output formats of different components may be DVP, Cameralink, LAN, etc., and the data in these formats are output according to the fixed timing of the imaging end. Since the star point extraction method adopts the pipeline mode, the rate matching problem is very likely to occur in the processing process of each step. For this reason, various output formats must be converted into the image stream format of the AXI Stream bus first. The bus includes a data port (TDATA), a data valid flag (TKEEP), a data type flag (TSTRB), a user-defined field (TUSER), a data packet end flag (TLAST), a data ID field (TID), a data routing field (TDEST) and a bus ready flag (TREADY).

[0057] Furthermore, the star map data after format conversion, that is, the image streaming media, is subjected to background denoising. The core idea of ​​the process is to use the characteristics of the star points with fast grayscale increasing distribution in the local area to achieve the segmentation of star points and background targets. The core method of this step comes from the TopHat algorithm in image morphology, which aims to filter out the low-frequency background from the image and improve the signal-to-noise ratio of high-frequency star points.

[0058] like Figure 2 The figure shows the background denoising process of the star point extraction method. The star image background is assumed to be low-frequency content with slow grayscale changes, while the star points are targets with high-frequency changes. Under this assumption, the white TopHat method can be used to filter out the background:

[0059]

[0060] Among them, the original image is denoted as f, the structural element is denoted as b, Represents the opening operation.

[0061] The image data is pipelined in the form of streaming media, and the pixel information enters the processing step in the order of rows first and columns later. The whole process will not be cached for the entire image. According to the calculation formula of TopHat, the image stream is divided into two branches: one performs corrosion and expansion operations in this way to complete the image opening operation; the other remains unchanged. The two branches are subtracted to obtain the processing result of white TopHat. It should be noted that since the current imaging of star point targets by star sensors is generally 5*5~7*7 pixels, the background denoising template needs to be slightly larger than the target, the corrosion and expansion used in the present invention both use 9×9 rectangular structural elements, so the above two steps each require 8 lines of images. In order to ensure that the two branches can arrive synchronously when the subtraction operation is reached, it is necessary to add a stream data cache to the unchanged branch, and the cache capacity should not be less than 16 lines of image data.

[0062] S2: After the background is filtered out, the star image is passed through a box filter to obtain a mean image. Each pixel of the mean image is used as the central pixel. Whether the current central pixel is a star point pixel is determined based on whether the grayscale mean of the central pixel is greater than the grayscale mean of any of its four oblique neighbors.

[0063] It should be noted that the present invention uses a local method to extract star point pixels on the image after the signal-to-noise ratio is improved. The basic idea is to compare the grayscale distribution difference between the central pixel neighborhood and the surrounding areas, such as judging whether the grayscale mean of each pixel's own neighborhood is greater than the grayscale mean of the surrounding pixels. If the difference is obvious, the pixel is recorded as a star point area. Figure 3 As shown, the original image is filtered by a 3×3 box filter to obtain a mean image. M and N are the number of rows and columns of the mean image, respectively. This image is used to determine the grayscale distribution difference, and the original image data I ij It is used to participate in the subsequent star point centroid calculation.

[0064] The core of the local method is the mean image The oblique four-neighborhood judgment of Figure 4 The four dark gray pixels around the center pixel are the four oblique neighbors of the center pixel. ij Take the mean of the 3×3 pixel area centered, that is, the grayscale value at that position of the mean image Similarly, Figure 4 The grayscale mean of the upper left neighborhood can be used Indicates; the grayscale mean of the upper right neighborhood can be used Indicates; the grayscale mean of the lower left neighborhood can be used Indicates; the grayscale mean of the lower right neighborhood can be used If the grayscale mean of the central area exceeds any of the four oblique neighbors A certain threshold, then the original image grayscale I at that position ij and row and column information will be counted within the star point area.

[0065] In order to improve the processing efficiency under the FPGA platform, the present invention adopts some processing and caching techniques to ensure that the image stream data is input and output in a pipeline manner. Figure 4 It can be seen that to complete the image judgment of row i and column j, the output of the mean image and the original image of row i+3 and column j+3 must have been completed, and the image data of the most recent 7 rows must be stored. In order to save storage space and the time spent on the transfer process, a rolling storage structure is adopted.

[0066] Specifically, when judging whether the current central pixel is a star point pixel, the calling method of its four oblique neighboring pixels in the memory is as follows:

[0067] like Figure 5 As shown, a rolling storage structure including seven cache lines is constructed, and the cache line numbers of the rolling storage structure are numbered from 0 to 6, and the rolling storage structure is used to store the pixels of the row where the current center pixel is located, the first three rows of pixels of the row where the current center pixel is located, and the last three rows of pixels; wherein, if the current center pixel is the last pixel of its row and the current center pixel has completed the judgment of whether it is a star point pixel, the cache line where the pixels of the third row before the row where the current center pixel is located is cleared, and the next row of the row where the current center pixel is located is used as the row where the next center pixel is located, and the pixels of the third row after the row where the next center pixel is located are also stored in the cleared cache line, and the row number of the cache line is recorded as k;

[0068] Obtain the cache row number of the current central pixel and its four oblique neighboring pixels in the rolling storage structure according to the following formula:

[0069]

[0070]

[0071] r down =k

[0072] Where k is the cache row number that stores the third row of pixels behind the row where the current center pixel is located, r mid is the cache row number of the row where the current center pixel is located, r up is the cache row number of the upper left neighbor pixel and the upper right neighbor pixel of the row where the current center pixel is located, r down The cache row number of the lower left neighboring pixel and the lower right neighboring pixel of the row where the current center pixel is located;

[0073] Obtain the cache column number of the current central pixel and its four oblique neighboring pixels in the rolling storage structure according to the following formula:

[0074]

[0075] Among them, t is the cache column number of the upper right neighbor pixel and the lower right neighbor pixel of the current center pixel, c left is the cache column number of the upper left neighbor pixel and the lower left neighbor pixel of the current center pixel, c mid is the cache column number of the current center pixel, c right The cache column number of the upper right neighboring pixel and the lower right neighboring pixel of the current center pixel;

[0076] The corresponding grayscale mean is called from the rolling storage structure according to the cache row number and cache column number of the current central pixel and its four oblique neighboring pixels, and whether the current central pixel is a star point pixel is determined according to the called grayscale mean.

[0077] S3: The connected domain of the star point pixels is divided according to whether the rows and columns of the star point pixels are adjacent.

[0078] It should be noted that the star point image information obtained by the local method star point extraction contains grayscale, row number, and column number 3D information, which is sent to this step for processing in the order of row first, column second, and from upper left to lower right with the pipeline operation. At the same time, the star point pixels are not all continuous in terms of row number and column number, and may be intermittent or independently distributed. Therefore, this step is intended to group these image information according to the connected domain and store the related intermediate variables for centroid positioning.

[0079] This connected domain labeling method is mainly applied to the following intermediate variables for processing:

[0080] (1) Single pixel variable

[0081] The row number of the previous star pixel prePixRow

[0082] The column number of the previous star pixel prePixCol

[0083] Current star point pixel row number curPixRow

[0084] Current star point pixel column number curPixCol

[0085] Current star point pixel grayscale curPixHui

[0086] The label of the connected domain to which the left pixel belongs is leftLabel, wherein each different connected domain has a different label, which can be numbered in sequence according to the order of discovery. leftLabel=0 indicates that the left pixel does not belong to any connected domain.

[0087] (2) Row information variable

[0088] The left boundary array of the row connected domain (including the current row and the previous row) leftList, wherein the left boundary array of the row connected domain stores the column numbers of the leftmost pixels of each row connected domain contained in two rows of pixels;

[0089] The right boundary array of the row connected domain (including the current row and the previous row) rightList, wherein the right boundary array of the row connected domain stores the column numbers of the rightmost pixels of each row connected domain contained in the two rows of pixels;

[0090] The row connected domain label array (including the current row and the previous row) labelList, where the row connected domain label array stores the number of the large connected domain to which each row connected domain formed by two rows of pixels belongs;

[0091] The number of connected domain blocks in this row, curSectNum, indicates the number of connected domains in this row;

[0092] The number of connected domain blocks in the previous row, lastSectNum, indicates the number of connected domains in the previous row;

[0093] (3) Connectivity domain information variable

[0094] The latest connected domain number latestSectNum

[0095] The sum of the x-coordinate and the grayscale product is sectXHui

[0096] The sum of the y coordinate and the grayscale is sectYHui

[0097] Grayscale summation sectHui

[0098] The number of pixels in the current connected area is sectPixNum

[0099] The following describes the connected domain labeling process:

[0100] like Figure 6 As shown in the figure, the method for dividing the connected domain of each star point pixel is: take each star point pixel as the current star point pixel and perform the following steps:

[0101] S31: judging whether the current star point pixel has changed lines relative to the previous star point pixel according to whether the row number curPixRow of the current star point pixel is the same as the row number prePixRow of the previous star point pixel, if not, proceeding to step S32; if it has changed lines, setting the left pixel label leftLabel of the current star point pixel to 0 and then proceeding to step S33 (indicating that at this time there is no pixel on the left side of the current star point pixel, let alone a pixel selected as a star point area);

[0102] S32: If no line break occurs, then determine whether the column where the current star point pixel is located is adjacent to the column where the previous star point pixel is located. If they are adjacent (indicating that the current star point pixel may belong to the same connected domain as the previous star point pixel), then set the left pixel label leftLabel of the current star point pixel to be the same as the left pixel label leftLabel of the previous star point pixel (for example, the left pixel label leftLabel of the previous star point pixel is set to 2, indicating that the left pixel of the previous star point pixel, the previous star point pixel and the current star point pixel all belong to connected domain No. 2), and enter step S34; if they are not adjacent, then set the left pixel label leftLabel of the current star point pixel to 0 (i.e., do not mark, clear, and at the same time indicate that the left side of the current star point pixel is not the pixel selected as the star point area), and then enter step S34;

[0103] S33: If a line break occurs, the storage space of the previous line in the row connected domain left boundary array leftList, the row connected domain right boundary array rightList, and the row connected domain label array labelList is cleared, and the vacated storage space is used as the current row storage space to store the connected domain left boundary, connected domain right boundary and connected domain label to be generated in the row where the current star point pixel is located. At the same time, the storage space originally used as the current row storage space in the row connected domain left boundary array leftList, the row connected domain right boundary array rightList, and the row connected domain label array labelList is cleared. As the storage space of the previous row, the storage space originally used as the left boundary of the row connected domain, the right boundary of the row connected domain and the number of the row connected domain corresponding to the current row is changed to the left boundary of the row connected domain, the right boundary of the row connected domain and the number of the row connected domain corresponding to the previous row; at the same time, the storage space originally used to store the number of row connected domain blocks lastSectNum of the previous row is cleared, and it is used to store the number of row connected domain blocks to be generated for the row where the current star point pixel is located, and the storage space originally used as the number of row connected domain blocks lastSectNum of the current row corresponding to the current row is changed to the storage space of the number of row connected domain blocks lastSectNum of the previous row;

[0104] Determine whether the row where the current pixel is located is adjacent to the row number of the previous row stored in the previous row storage space at this time. If so, the number of blocks of the row connected domain of the previous row lastSectNum is set to the number of row connected domains contained in the row where the previous star pixel is located, and then enter step S34; if not, the number of blocks of the row connected domain of the previous row lastSectNum is set to 0, and then enter step S34;

[0105] S34: Determine whether the pixel number to the left of the current star point pixel is 0. If it is not 0 (marked, for example, 2), the information of the current star point pixel (i.e., the grayscale I ijand row and column information) are added to the sum array of x-coordinate and grayscale product sectXHui, the sum array of y-coordinate and grayscale product sectYHui, the grayscale sum array sectHui and the row connected domain corresponding to the current left pixel number (for example, if the current left pixel number is 2, then the current star point pixel is attributed to row connected domain No. 2), and the number of pixels in the current row connected area pixel number sectPixNum, the number of pixels in the connected domain corresponding to the current left pixel number is increased by 1 (still taking 2 as an example, the number of pixels in row connected domain No. 2 is increased by 1), and the right boundary array rightList of the row connected domain is also added. The value of the right boundary of the row connected domain corresponding to the previous left pixel number is updated to the column number curPixCol of the current star point pixel (that is, still taking 2 as an example, the current star point pixel is a pixel on the right of the row connected domain No. 2, and the value of the right boundary of the row connected domain No. 2 needs to be updated), and then step S35 is entered (because the current star point pixel may belong to both the left row connected domain and the upper row connected domain, so in this step, although the current star point pixel has found the left row connected domain to which it belongs, step S35 is still entered to determine whether the current star point pixel also belongs to the upper row connected domain, that is, to determine whether the left row connected domain and the upper row connected domain are actually the same large connected domain);

[0106] If it is 0 (it means that there is no row connected domain related to the left side of the current star point pixel, and it is necessary to enter step S35 to determine whether it belongs to the row connected domain of the previous row), then directly enter step S35;

[0107] S35: judging whether the current star point pixel belongs to the row where the previous star point pixel is located, including the row connected domain, according to the set criterion, wherein the set criterion is: the number of blocks of the row connected domain in the previous row lastSectNum is not equal to 0 (indicating that the row where the current star point pixel is located is adjacent to the previous row, and the current star point pixel may fall into the upper connected domain), and the column number curPixCol of the current star point pixel falls between the left boundary and the right boundary of any row connected domain included in the row where the previous star point pixel is located; if it does not belong, proceed to step S37; if it belongs, the row connected domain to which the current star point pixel belongs is recorded as A, and proceed to step S36;

[0108] S36: Determine whether the pixel label leftLabel on the left side of the current star point pixel is 0. If leftLabel is 0 (i.e., no label, which also indicates that there is no row connected domain on the left side of the current star point pixel, and the problem of fusion with the upper connected domain is not involved), the current star point pixel only belongs to the row connected domain A, and the information of the current star point pixel (i.e., the grayscale I of the original image) is converted into ijand row and column information) are added to the connected domain corresponding to the x-coordinate and grayscale product sum array sectXHui, the y-coordinate and grayscale product sum array sectYHui, the grayscale sum array sectHui and the row connected domain A, and the number of pixels in the current connected area is added to the array sectPixNum, and the number of pixels in the connected domain A is increased by 1;

[0109] If leftLabel is not 0 (that is, it is marked, assuming it is 2, which involves the fusion problem of the left connected domain and the upper connected domain), the current star point pixel belongs to both the row connected domain A and the row connected domain corresponding to the current left pixel label leftLabel, and it is determined whether the labels of the two row connected domains are the same. If they are not the same, the row connected domain corresponding to the current left pixel label leftLabel is attributed to the row connected domain A, and the left pixel label leftLabel of the current star point pixel is transformed into the label of the row connected domain A. Specifically, the corresponding content of the left connected domain label in the sectXHui, sectYHui, sectHui, and sectPixNum arrays is added to the data corresponding to the label of the upper connected domain A; if they are the same, the row connected domain A and the row connected domain corresponding to the current left pixel label leftLabel are the same connected domain;

[0110] S37: Determine whether the left pixel label leftLabel of the current star point pixel is 0. If it is 0, the current star point pixel does not belong to the existing row connected domain. A new row connected domain is established in the row where the current star point pixel is located, and the left boundary, right boundary, row connected domain label of the new row connected domain formed by the current pixel and the row connected domain block number curSectNum of the row where the current pixel is located are obtained. This part of information is also stored in the current row storage space defined by the row connected domain left boundary array leftList, the row connected domain right boundary array rightList, and the row connected domain label array labelList;

[0111] At this point, all the judgments for finding the connected domain to which the current pixel belongs are completed, and then the connected domain of the next pixel is judged; after completing the judgment of the connected domains of all pixels, the final sectXHui, sectYHui, sectHui, and sectPixNum arrays are obtained.

[0112] It can be seen that in the process of connected domain marking and centroid positioning, the present invention inputs all pixel information (row number, column number, grayscale value) obtained by the star point extraction method, and the connected domain is marked according to the relative relationship of the position. The entire judgment process iteratively updates the connected domain information of the entire image according to the distribution of the connected domains of the left and upper rows. The method is fast and simple and is applicable to targets with arbitrary concave and convex shapes.

[0113] S4: Use the centroid method to obtain the coordinates of the star point area represented by each connected domain.

[0114] Specifically, traverse all sectXHui, sectYHui and sectHui, find non-empty array items, assume that there are 8 connected domains, and take each connected domain as the current connected domain to perform the following steps:

[0115] Extract the information of each pixel belonging to the current connected domain from the sectXHui, sectYHui and sectHui arrays, multiply the row number of each pixel by its corresponding grayscale value, and then sum all the products to obtain the first sum value;

[0116] Multiply the column number of each pixel by its corresponding grayscale value, and then sum all the products to obtain the second sum value;

[0117] Add the grayscale values ​​of each pixel to obtain the third sum value;

[0118] The ratio of the first sum value to the third sum value and the ratio of the second sum value to the third sum value are used as the coordinates of the star point area represented by the current connected domain, so as to obtain the sub-pixel subdivision positions of all centroids.

[0119] This all-day star sensor star point extraction method can be implemented in the form of pipeline processing on the FPGA platform with the help of high-level comprehensive compilation tools. This method first converts the format of the original image data into the streaming media format of AXI Stream to achieve rate control of the pipeline process; the star point image and the background image are separated with the TopHat algorithm as the core; the grayscale mean information of the neighborhood is used to extract the effective star point area by local method; finally, the connected domain marking method of pipeline sequential traversal is used to obtain the accurate centroid position of the star point on the image. In the process of star point extraction, each step has carried out necessary hardware optimization for the FPGA platform to meet the correct execution of the algorithm under pipeline conditions on the embedded platform.

[0120] This method realizes the extraction of star points under all-day conditions on the FPGA platform. On the one hand, compared with simple global methods, this method has stronger resistance to background noise and can achieve stable capture of celestial bodies under high background interference during the day; on the other hand, this method uses the FPGA platform for pipeline processing, which greatly improves the operation efficiency of the algorithm. The centroid information can be given almost at the same time after the image input is completed, effectively ensuring the dynamic performance of the all-day star sensor.

[0121] Of course, the present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may certainly make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.

Claims

1. A real-time star point extraction method for a star sensor throughout the day, characterized in that: The following steps are involved: S1: After converting the format of the original star map data obtained by the star sensor imaging end into the streaming media format of AXI Stream, the TopHat algorithm is used to perform background denoising on the star map data after format conversion to obtain the star map after background filtering; S2: After the background is filtered out, the star image is passed through a box filter to obtain a mean image. Each pixel of the mean image is used as the central pixel. The central pixel is judged to be a star point pixel according to whether the grayscale mean of the central pixel is greater than the grayscale mean of any of its four oblique neighbors. S3: dividing the connected domain of the star point pixels according to whether the rows and columns of the star point pixels are adjacent; S4: Use the centroid method to obtain the coordinates of the star point area represented by each connected domain; When judging whether the current central pixel is a star point pixel, the calling method of its four oblique neighboring pixels in the memory is as follows: Construct a rolling storage structure including seven cache lines, and the cache line numbers of the rolling storage structure are numbered from 0 to 6, and the rolling storage structure is used to store the pixels of the row where the current central pixel is located, the pixels of the first three rows of the row where the current central pixel is located, and the pixels of the last three rows of the row where the current central pixel is located on the mean image; wherein, if the current central pixel is the last pixel of its row and the current central pixel has completed the judgment of whether it is a star point pixel, the cache line where the pixels of the third row before the row where the current central pixel is located is cleared, and the next row of the row where the current central pixel is located is used as the row where the next central pixel is located, and the pixels of the third row after the row where the next central pixel is located are also stored in the cleared cache line, and the row number of the cache line is recorded as k; Obtain the cache row number of the current central pixel and its four oblique neighboring pixels in the rolling storage structure according to the following formula: r down =k Where k is the cache row number that stores the third row of pixels behind the row where the current center pixel is located, r mid is the cache row number of the row where the current center pixel is located, r up is the cache row number of the upper left neighbor pixel and the upper right neighbor pixel of the row where the current center pixel is located, r down The cache row number of the lower left neighboring pixel and the lower right neighboring pixel of the row where the current center pixel is located; Obtain the cache column number of the current central pixel and its four oblique neighboring pixels in the rolling storage structure according to the following formula: Among them, t is the cache column number of the upper right neighbor pixel and the lower right neighbor pixel of the current center pixel, c left is the cache column number of the upper left neighbor pixel and the lower left neighbor pixel of the current center pixel, c mid is the cache column number of the current center pixel, c right The cache column number of the upper right neighboring pixel and the lower right neighboring pixel of the current center pixel; The corresponding grayscale mean is called from the rolling storage structure according to the cache row number and cache column number of the current central pixel and its four oblique neighboring pixels, and whether the current central pixel is a star point pixel is determined according to the called grayscale mean.

2. A method for extracting star points from a star sensor in real time according to claim 1, characterized in that: The connected domain division method of each star point pixel is: take each star point pixel as the current star point pixel and perform the following steps: S31: Determine whether the current star point pixel has a line break relative to the previous star point pixel. If not, proceed to step S32. If it has, set the left pixel label leftLabel of the current star point pixel to 0 and then proceed to step S33. S32: Determine whether the column where the current star point pixel is located is adjacent to the column where the previous star point pixel is located. If so, the current star point pixel and the previous star point pixel belong to the same row connected domain, and the left pixel label leftLabel of the current star point pixel is set to be the same as the left pixel label leftLabel of the previous star point pixel, and then enter step S34; if not, set the left pixel label leftLabel of the current star point pixel to 0 and then enter step S34; S33: Determine whether the row where the current star point pixel is located is adjacent to the row where the previous star point pixel is located. If so, set the number of connected domain blocks in the previous row lastSectNum to the number of connected domains in the row where the previous star point pixel is located before entering step S34; if not, set the number of connected domain blocks in the previous row lastSectNum to 0 before entering step S34; S34: Determine whether the left pixel label leftLabel of the current star point pixel is 0. If not, update the right boundary of the row connected domain corresponding to the current left pixel label leftLabel to the column number curPixCol of the current star point pixel, and then go to step S35; if it is 0, directly go to step S35; S35: judging whether the current star point pixel belongs to the row where the previous star point pixel is located, including the row connected domain, according to the set criterion, wherein the set criterion is: the number of blocks of the row connected domain in the previous row lastSectNum is not equal to 0 and the column number curPixCol of the current star point pixel falls between the left boundary and the right boundary of any row connected domain included in the row where the previous star point pixel is located; if it does not belong, proceed to step S37; if it does, record the row connected domain to which the current star point pixel belongs as A, and proceed to step S36; S36: Determine whether the left pixel label leftLabel of the current star point pixel is 0. If it is 0, the current star point pixel only belongs to the row connected domain A; if it is not 0, the current star point pixel belongs to both the row connected domain A and the row connected domain corresponding to the current left pixel label leftLabel, and determine whether the labels of the two row connected domains are the same. If they are not the same, the row connected domain corresponding to the current left pixel label leftLabel is attributed to the row connected domain A, and the left pixel label leftLabel of the current star point pixel is converted to the label of the row connected domain A; if they are the same, the row connected domain A and the row connected domain corresponding to the current left pixel label leftLabel are the same connected domain; S37: Determine whether the left pixel label leftLabel of the current star point pixel is 0. If it is 0, the current star point pixel does not belong to the existing row connected domain. A new row connected domain is established in the row where the current star point pixel is located, and the left boundary, right boundary, row connected domain label of the new row connected domain formed by the current star point pixel and the row connected domain block number curSectNum of the row where the current star point pixel is located are obtained.

3. A method for extracting star points from a star sensor in real time throughout the day as claimed in claim 2, characterized in that: Construct the row connected domain left bound array leftList, the row connected domain right bound array rightList, and the row connected domain label array labelList, and divide the storage space of the row connected domain left bound array leftList, the row connected domain right bound array rightList, and the row connected domain label array labelList into the previous row storage space and the current row storage space, respectively storing the row connected domain left bound, the row connected domain right bound, and the connected domain label corresponding to the row where the previous star point pixel is located and the row where the current star point pixel is located, and the row connected domain left bound, the row connected domain right bound, and the connected domain label have subscripts for distinguishing whether they belong to the previous row or the current row; If the current star point pixel changes to a new line relative to the previous star point pixel, the original current line storage space in the line connected domain left bound array leftList, the line connected domain right bound array rightList, and the line connected domain label array labelList is used as the previous line storage space, and the previous line storage space is cleared at this time. The cleared previous line storage space is used as the current line storage space, which is used to store the line connected domain left bound, line connected domain right bound, and connected domain label that will be generated for the line where the current star point pixel is located.

4. A method for extracting star points from a star sensor in real time throughout the day as claimed in claim 3, characterized in that: Switching between rows to which the two storage spaces belong is achieved by exchanging the pointers corresponding to the previous row storage space and the current row storage space.

5. A method for extracting star points from a star sensor in real time according to claim 1, characterized in that: Take each connected domain as the current connected domain and perform the following steps: Multiply the row number of each pixel in the current connected domain by its corresponding grayscale value, and then sum all the products to obtain the first sum value; Multiply the column number of each pixel in the current connected domain by its corresponding grayscale value, and then sum all the products to obtain the second sum value; Add the grayscale values ​​of each pixel to obtain the third sum value; The ratio of the first sum value to the third sum value and the ratio of the second sum value to the third sum value are used as the coordinates of the star point area represented by the current connected domain.

6. A method for extracting star points from a star sensor in real time throughout the day as claimed in claim 1, characterized in that: The streaming media format of the AXIStream includes a data port (TDATA), a data valid flag (TKEEP), a data type flag (TSTRB), a user-defined field (TUSER), a data packet end flag (TLAST), a data ID field (TID), a data routing field (TDEST), and a bus ready flag (TREADY).

7. A method for extracting star points from a star sensor in real time throughout the day as claimed in claim 1, characterized in that: The white TopHat method is used to perform background denoising on the star map data after format conversion.

Citation Information

Patent Citations

  • Wide-size-range multi-space target capture tracking method

    CN106651904A

  • Method for star point extracting of navigational star in cloud environment in daytime

    CN107504966A

  • Distributed parallel star point centroid extraction method based on super-block and FPGA (field programmable gate array) implementation device

    CN108716916A

  • A star point centroid extraction circuit of an assembly line structure

    CN109949204A

  • Star point centroid extraction method based on data linked list structure

    CN112270704A