CN114255349A - Real-time star point extraction method for all-day star sensor - Google Patents

Real-time star point extraction method for all-day star sensor Download PDF

Info

Publication number
CN114255349A
CN114255349A CN202111349656.0A CN202111349656A CN114255349A CN 114255349 A CN114255349 A CN 114255349A CN 202111349656 A CN202111349656 A CN 202111349656A CN 114255349 A CN114255349 A CN 114255349A
Authority
CN
China
Prior art keywords
pixel
current
row
star
connected domain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111349656.0A
Other languages
Chinese (zh)
Inventor
熊琨
缪寅宵
弯天琪
商秋芳
王震
吴跃
汤晔
沙春哲
刘莎
王蕾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aerospace Institute for Metrology and Measurement Technology
Original Assignee
Beijing Aerospace Institute for Metrology and Measurement Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aerospace Institute for Metrology and Measurement Technology filed Critical Beijing Aerospace Institute for Metrology and Measurement Technology
Priority to CN202111349656.0A priority Critical patent/CN114255349A/en
Publication of CN114255349A publication Critical patent/CN114255349A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/02Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by astronomical means

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Astronomy & Astrophysics (AREA)
  • Automation & Control Theory (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a real-time star point extraction method of a whole-day star sensor, which comprises the steps of firstly converting the format of original image data into the streaming media format of AXI Stream to realize the rate control of a pipeline process; stripping the star point image and the background image by taking a TopHat algorithm as a core; extracting effective star point areas by using the gray level mean value information of the neighborhood through a local method; finally, obtaining the accurate centroid position of the star point on the image by a connected domain marking method traversed by the sequence of the pipeline; on one hand, compared with a simple global method, the method has stronger background noise resistance and can realize stable capture of celestial bodies under the condition of high background interference in daytime; on the other hand, the all-day star sensor star point extraction method can be realized on an FPGA platform in a pipeline processing mode by means of a high-order comprehensive compiling tool.

Description

Real-time star point extraction method for all-day star sensor
Technical Field
The invention belongs to the field of absolute attitude measurement, and particularly relates to a real-time star point extraction method for an all-day star sensor.
Background
The all-day star sensor aims at solving the problem of high-precision astronomical pose measurement under all-day conditions, and the extremely low signal-to-noise ratio caused by severe sky background illumination during daytime astronomical observation is a key technical difficulty of the device. In the optical hardware, the star sensor generally adopts the design of small detection visual field and partial infrared detection spectrum band. Actual observation results show that even if angular grading field of view and short wave infrared detection spectrum are adopted, the signal-to-noise ratio of celestial body imaging is still low. In order to compensate the optical-mechanical design of a small view field, the all-day star sensor adopts a servo type star finding dynamic observation to a plurality of different celestial bodies in different directions. This requires that the extraction of the star points for each observed image must be fast in real time.
The method for extracting the star points of the star sensor in the whole day is not disclosed.
According to the related retrieval, the existing method for extracting the star points of the star sensor in the whole day is divided into two types. A class of star points is derived from a traditional star sensor, and a global threshold segmentation method is adopted to segment star points from a background. Although some improved methods may adjust the threshold value in real time according to the image statistical information, the actual extraction effect of the star points is not ideal in a complex background. The other method is characterized by gray gradient distribution of celestial body imaging light spots for target extraction, and the method needs a large amount of numerical calculation. The numerical calculation depends on embedded processors such as DSP, ARM and the like, the calculation is executed in series, the calculation is long in time consumption, and the method is poor in real-time performance. Although the multi-core embedded processor can improve the operation efficiency, the memory sharing scheduling mechanism is difficult to meet the requirement of parallel computing.
In summary, no method for extracting the star points in the complex and strong sky background in real time under the all-time condition exists at present. The existing processing method is too simple and has insufficient resistance to background interference, or has large numerical calculation amount and depends on the sequential operation execution of an embedded processor, so that the running time is too long, and the real-time observation requirement cannot be met.
Disclosure of Invention
In order to solve the problems, the invention provides a real-time star point extraction method for an all-day star sensor, which can realize stable capture of a star point area under the condition of daytime high background interference.
A real-time star point extraction method for an all-day star sensor comprises the following steps:
s1: converting the format of original star atlas data acquired by an imaging end of the star sensor into an AXI Stream media format, and then performing background denoising processing on the star atlas data after format conversion by adopting a TopHat algorithm to obtain a star atlas after background filtering;
s2: the star map after the background filtering is subjected to a box filter to obtain an average value image, each pixel of the average value image is respectively used as a central pixel, and whether the current central pixel is a star point pixel or not is judged according to whether the gray average value of the central pixel is larger than the gray average value of any oblique four neighborhoods of the central pixel or not;
s3: realizing the connected domain division of the star point pixels according to whether the row and the column of each star point pixel are adjacent or not;
s4: and acquiring coordinates of the star point areas represented by the connected domains by adopting a gravity center method.
Further, when judging whether the current center pixel is a star pixel, the method for calling the oblique four-neighbor pixels in the memory comprises the following steps:
constructing a rolling storage structure comprising seven cache lines, numbering the cache lines of the rolling storage structure according to 0-6, and storing the pixels of the current central pixel in the mean image, the first three lines of pixels of the current central pixel and the last three lines of pixels of the current central pixel in the mean image; if the current central pixel is the last pixel of the line where the current central pixel is located and the current central pixel is judged whether to be a star point pixel or not, clearing a cache line where a third pixel arranged in front of the line where the current central pixel is located, taking the next line of the line where the current central pixel is located as the line where the next central pixel is located, storing the third pixel arranged behind the line where the next central pixel is located in the cleared cache line, and marking the line number of the cache line as k;
obtaining the cache line number of the current center pixel and the oblique four-adjacent domain pixels thereof in the rolling storage structure according to the following formula:
Figure BDA0003355431630000031
Figure BDA0003355431630000032
rdown=k
where k is the cache line number storing the third line of pels arranged after the line where the current center pel is located, rmidCache line number, r, of the line in which the current center pel is locatedupCache line numbers r for the top left and top right neighbourhood pixels of the line in which the current central pixel is locateddownCache line numbers of a left lower neighborhood pixel and a right lower neighborhood pixel of a line in which the current center pixel is positioned;
obtaining the cache column number of the current center pixel and the pixels of the oblique four adjacent domains thereof in the rolling storage structure according to the following formula:
Figure BDA0003355431630000033
wherein t is the upper right neighborhood pixel and the lower right neighborhood pixel of the current center pixelCache column number of field pel, cleftCache column numbers of upper left neighborhood pixels and lower left neighborhood pixels of the current center pixel, cmidCache column number for current center pel, crightCache column numbers of a right upper neighborhood pixel and a right lower neighborhood pixel of the current center pixel;
and calling a corresponding gray average value from the rolling storage structure according to the cache line number and the cache column number of the current central pixel and the pixels of the inclined four adjacent domains of the current central pixel, and judging whether the current central pixel is a star point pixel or not according to the called gray average value.
Further, the method for dividing the connected domain of each star pixel comprises the following steps: respectively taking each star point pixel as the current star point pixel to execute the following steps:
s31: judging whether the current star point pixel is subjected to line change relative to the previous star point pixel, if not, entering the step S32, and if the line change is performed, setting the label leftLabel of the left side pixel of the current star point pixel to 0, and then entering the step S33;
s32: judging whether the row of the current star point pixel is adjacent to the row of the previous star point pixel, if so, judging that the current star point pixel and the previous star point pixel belong to the same row connected domain, setting 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, and then entering the step S34; if not, setting the label leftLabel of the left pixel of the current star pixel to 0, and then entering the step S34;
s33: judging whether the row of the current star point pixel is adjacent to the row of the previous star point pixel, if so, setting the number of blocks lastSectNum of the connected domain of the previous row as the number of the connected domains of the row of the previous star point pixel, and then entering the step S34; if not, the step S34 is executed after setting the last row connected field block number lastSectNum to 0;
s34: judging whether a left pixel label leftLabel of the current star pixel is 0, if not, updating the right boundary of a row connected domain corresponding to the left pixel label leftLabel to be the column number currPixCon of the current star pixel, and then entering the step S35; if yes, go directly to step S35;
s35: judging whether the current star point pixel belongs to a row including a row connected domain of a previous star point pixel according to a set criterion, wherein the set criterion is as follows: the block number lastSectNum of the last row of connected domains is not equal to 0, and the column number currPixCon of the current star point pixel falls between the left boundary and the right boundary of any row of connected domains contained in the row of the previous star point pixel; if not, go to step S37; if the star point image element belongs to the communication domain, recording the line communication domain to which the current star point image element belongs as A, and entering the step S36;
s36: judging whether the left pixel label leftLabel of the current star pixel is 0 or not, if so, only belonging to the row connected domain A; if not, the current star point pixel belongs to the row connected domain corresponding to the row connected domain A and the left pixel label leftLabel at the same time, whether the labels of the two row connected domains are the same or not is judged, if not, the row connected domain corresponding to the left pixel label leftLabel is assigned to the row connected domain A, and the left pixel label leftLabel of the current star point pixel is changed into the label of the row connected domain A; if the pixel labels are the same, the row connected domain A and the row connected domain corresponding to the left pixel label leftLabel are the same;
s37: judging whether a left pixel label leftLabel of the current star pixel is 0, if so, establishing a new row connected domain in the row where the current star pixel is located, and acquiring the left boundary, the right boundary and the row connected domain label of the new row connected domain formed by the current star pixel and the current row connected domain block number currSectNum of the row where the current star pixel is located.
Further, a row connected domain left boundary array leftList, a row connected domain right boundary array rightList and a row connected domain label array labelList are constructed, storage spaces of the row connected domain left boundary array leftList, the row connected domain right boundary array rightList and the row connected domain label array labelList are divided into an upper row storage space and a current row storage space, row connected domain left boundary, row connected domain right boundary and connected domain labels corresponding to a row where a previous star point pixel is located and a row connected domain row where a current star point pixel is located are respectively and correspondingly stored, and the row connected domain left boundary, the row connected domain right boundary and the connected domain labels are provided with subscripts for distinguishing that the row connected domain left boundary, the row connected domain right boundary and the connected domain labels belong to the upper row or the current row;
and if the current star point pixel changes rows relative to the previous star point pixel, taking the original 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 as a previous row storage space, emptying the previous row storage space at the moment, and taking the emptied previous row storage space as the current row storage space for storing the row connected domain left boundary, the row connected domain right boundary and the connected domain label to be generated when the current star point pixel is in the row.
Further, the switching between the lines of the two memory spaces is realized by exchanging pointers corresponding to the memory space of the previous line and the memory space of the current line.
Further, the following steps are respectively executed by taking each connected domain as the current connected domain:
multiplying the line number of each pixel of the current connected domain by the corresponding gray value, and summing all the products to obtain a first sum;
multiplying the column number of each pixel of the current connected domain by the corresponding gray value, and summing all the products to obtain a second sum value;
adding the gray values of the pixels to obtain a third sum value;
and taking 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 as the coordinates of the star point area represented by the current connected domain.
Further, 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), an end of packet flag (TLAST), a data ID field (TID), a data routing field (TDEST), and a bus ready flag (TREADY).
Further, a white TopHat method is adopted to perform background denoising processing on the star map data after format conversion.
Has the advantages that:
1. the invention provides a real-time star point extraction method of a whole-day star sensor, which comprises the steps of firstly converting the format of original image data into the streaming media format of AXI Stream to realize the rate control of a pipeline process; stripping the star point image and the background image by taking a TopHat algorithm as a core; extracting effective star point areas by using the gray level mean value information of the neighborhood through a local method; finally, obtaining the accurate centroid position of the star point on the image by a connected domain marking method traversed by the sequence of the pipeline; on one hand, compared with a simple global method, the method has stronger background noise resistance and can realize stable capture of celestial bodies under the condition of high background interference in daytime; on the other hand, the all-day star sensor star point extraction method can be realized on an FPGA platform in a pipeline processing mode by means of a high-order comprehensive compiling tool.
2. The invention provides a real-time star point extraction method of a whole-day star sensor, which comprises the steps of firstly converting the format of original image data, wherein the formats of the original image data of an image sensor or a machine core are different, and the original image data can be converted into the image Stream format of an AXI Stream bus through an FPGA.
3. The invention provides a real-time star point extraction method of an all-time star sensor, which is characterized in that in the star point extraction process, necessary hardware optimization is carried out aiming at an FPGA (field programmable gate array) platform so as to meet the requirement of correct operation of an algorithm under an embedded platform under the condition of an assembly line, specifically, a rolling storage structure is arranged, newly added data are directly stored in a newly emptied buffer line, the storage positions of the rest data are unchanged, the FPGA platform is favorably utilized for carrying out assembly line processing, the operation efficiency of the algorithm is greatly improved, centroid information can be given almost simultaneously after image input is finished, the dynamic performance of the all-time star sensor is effectively ensured, and the extraction of the star point under the all-time condition can be realized on the FPGA platform.
4. The invention provides a real-time star point extraction method of a full-time star sensor, which adopts a TopHat algorithm from image morphology to perform background denoising processing on format-converted star map data, can filter a background of low-frequency distribution from an image, and improves the signal-to-noise ratio of high-frequency distribution star points.
Drawings
FIG. 1 is a flow chart of a real-time star point extraction method of an all-day star sensor provided by the invention;
FIG. 2 is a background denoising process flow provided by the present invention;
FIG. 3 is a process of extracting local method star points provided by the present invention;
FIG. 4 is a schematic diagram of the diagonal quad-domain decision provided by the present invention;
FIG. 5 is a schematic diagram of a diagonal four-neighborhood region for rolling storage provided by the present invention;
fig. 6 is a flow of connected domain labeling and centroid location provided by the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The invention provides a real-time star point extraction method for an all-day star sensor, which realizes real-time processing of a shot star map image stream format on an FPGA platform by means of an HLS (high-order synthesis) compiling tool. The method sequentially comprises three steps of background removal, star point region segmentation and star point centroid positioning. In order to meet the requirement of embedded parallel computing, the star point extraction method is improved in hardware implementation. The method can effectively resist complex sky background interference under daytime conditions, and the flow line parallel operation of the method can meet the real-time requirement of star point extraction in dynamic observation of the star sensor all day long.
As shown in fig. 1, the method for extracting the star point of the all-day star sensor comprises the following steps:
s1: converting the format of original star atlas data acquired by an imaging end of the star sensor into an AXI Stream media format, and then performing background denoising processing on the star atlas data after format conversion by adopting a TopHat algorithm to obtain a star atlas after background filtering.
That is, the format conversion is performed on the original image data, the original image data formats of the image sensor or the movement are different, and the original image data formats need to be converted into the image Stream format of the AXI Stream bus through the FPGA. The bus is added with a signal controlled by a streaming media protocol, so that the problem of bus speed matching in the process of a pipeline can be effectively prevented. For example, the star map data comes from the imaging device or movement at the front end of the star sensor, and the output format of different components can be DVP, Cameralink, LAN and the like, and the data in the formats are output according to the fixed time sequence at the imaging end. Because the star point extraction method adopts a pipeline mode, the problem of rate matching is very easy to occur in the processing process of each step, and therefore, various output formats are required to be converted into the image Stream format of the AXI Stream bus. The bus includes a data port (TDATA), a data valid flag (TKEEP), a data type flag (TSTRB), a user defined field (TUSER), an end of packet flag (TLAST), a data ID field (TID), a data routing field (TDEST), and a bus ready flag (TREADY).
Furthermore, background denoising is carried out on format-converted star map data, namely image streaming media, and the core idea of the process is to realize the segmentation of star points and background targets by utilizing the characteristic that star points have rapid gray scale increasing distribution in local areas. The method at the core of the step is from a TopHat algorithm in image morphology, and aims to filter the background of low-frequency distribution from an image and improve the signal-to-noise ratio of high-frequency distribution star points.
As shown in fig. 2, it is a background denoising process flow of the star point extraction method. The star map background is assumed to be low frequency content with slow gray changes, while the star points are the target of high frequency changes. On the assumption that the white TopHat method can be used to filter out the background:
Figure BDA0003355431630000091
wherein the original image is denoted as f, the structural elements are denoted as b,
Figure BDA0003355431630000092
indicating an on operation.
The image data is pipelined according to the streaming media form, the pixel information enters the processing step according to the sequence of the front row and the rear row, and the whole process does not carry out full-image caching. According to the calculation formula of TopHat, the image stream is divided into two branches: firstly, carrying out corrosion operation and expansion operation in turn to finish image opening operation; the second step is to keep unchanged. The two branches are subtracted to obtain the white TopHat processing result. It should be noted that, because the imaging of the star point target by the star sensor is generally 5 × 5 to 7 × 7 pixels at present, and the background denoising template needs to be slightly larger than the target, the erosion and expansion adopted by the invention both adopt 9 × 9 rectangular structural elements, so that 8 lines of images are required in each of the two steps, in order to ensure that two branches can arrive synchronously when the subtraction operation is reached, a stream data buffer needs to be added to the branch which remains unchanged, and the buffer capacity should not be less than 16 lines of image data.
S2: and (3) passing the star map after background filtering through a box filter to obtain an average image, taking each pixel of the average image as a central pixel, and judging whether the current central pixel is a star point pixel according to whether the gray average of the central pixel is larger than the gray average of any oblique four neighborhoods of the central pixel.
It should be noted that the invention adopts a local method to extract the star point pixel on the image after the signal-to-noise ratio is improved, and the basic idea is to compare the gray distribution difference between the neighborhood and the periphery of the central pixel, for example, judge whether the self neighborhood gray average of each pixel is larger than the peripheral gray average, and if the difference is obvious, mark the pixel as the star point region. As shown in FIG. 3, the original image is filtered through a 3 × 3 box filter to obtain a mean image
Figure BDA0003355431630000101
M and N are the number of rows and columns, respectively, of the mean image. The image is used to determine the difference of gray distribution, and the original image data I is buffered by the stream dataijIs used to participate in subsequent star centroid calculations.
The core of the local method is a mean image
Figure BDA0003355431630000102
Judging the four oblique neighborhoods, namely four dark gray pixels at the periphery as shown in FIG. 4, namely the four oblique neighborhoods of the central pixel; with the current pixel element IijTaking the mean value of the 3 x 3 pixel area as the center, i.e. the gray value at the position of the mean image
Figure BDA0003355431630000103
Similarly, the gray scale mean of the upper left neighborhood in FIG. 4 can be used
Figure BDA0003355431630000104
Represents; the gray scale mean of the upper right neighborhood may be used
Figure BDA0003355431630000105
Represents; the gray scale mean of the lower left neighborhood may be used
Figure BDA0003355431630000106
Represents; the gray scale mean of the lower right neighborhood may be used
Figure BDA0003355431630000107
And (4) showing. If the mean value of the gray scale of the central area exceeds any inclined four-adjacent area
Figure BDA0003355431630000108
A certain threshold value, the gray level I of the original image at the positionijAnd rank information will be included in the star spot area.
In order to improve the processing efficiency under the FPGA platform, the invention adopts some processing and caching techniques to ensure that the image stream data is input and output in a pipeline mode. As can be seen from fig. 4, to complete the image determination of i rows and j columns, the output of the average image of i +3 rows and j +3 columns and the original image must be completed, and the image data of the latest 7 rows is stored. In order to save the storage space and the time consumed in the unloading process, a rolling storage structure is adopted.
Specifically, when judging whether the current central pixel is a star pixel, the method for calling the oblique four-neighbor pixels in the memory comprises the following steps:
as shown in fig. 5, a rolling storage structure comprising seven cache lines is constructed, the cache line numbers of the rolling storage structure are numbered according to 0-6, and the rolling storage structure is used for storing a pixel of a line where a current center pixel is located, a first three lines of pixels of the line where the current center pixel is located, and a last three lines of pixels of the line where the current center pixel is located on a mean value image; if the current central pixel is the last pixel of the line where the current central pixel is located and the current central pixel is judged whether to be a star point pixel or not, clearing a cache line where a third pixel arranged in front of the line where the current central pixel is located, taking the next line of the line where the current central pixel is located as the line where the next central pixel is located, storing the third pixel arranged behind the line where the next central pixel is located in the cleared cache line, and marking the line number of the cache line as k;
obtaining the cache line number of the current center pixel and the oblique four-adjacent domain pixels thereof in the rolling storage structure according to the following formula:
Figure BDA0003355431630000111
Figure BDA0003355431630000112
rdown=k
where k is the cache line number storing the third line of pels arranged after the line where the current center pel is located, rmidCache line number, r, of the line in which the current center pel is locatedupCache line numbers r for the top left and top right neighbourhood pixels of the line in which the current central pixel is locateddownCache line numbers of a left lower neighborhood pixel and a right lower neighborhood pixel of a line in which the current center pixel is positioned;
obtaining the cache column number of the current center pixel and the pixels of the oblique four adjacent domains thereof in the rolling storage structure according to the following formula:
Figure BDA0003355431630000121
wherein t is the cache column number of the upper right neighborhood pixel and the lower right neighborhood pixel of the current center pixel, cleftCache column numbers of upper left neighborhood pixels and lower left neighborhood pixels of the current center pixel, cmidCache column number for current center pel, crightCache column numbers of a right upper neighborhood pixel and a right lower neighborhood pixel of the current center pixel;
and calling a corresponding gray average value from the rolling storage structure according to the cache line number and the cache column number of the current central pixel and the pixels of the inclined four adjacent domains of the current central pixel, and judging whether the current central pixel is a star point pixel or not according to the called gray average value.
S3: and realizing the connected domain division of the star point pixels according to whether the row and the column of each star point pixel are adjacent.
It should be noted that the star point image information obtained by local star point extraction includes 3-dimensional information of gray scale, row number, and column number, and is sent to the present step to be processed in the order from top left to bottom right following the front and back rows along with the pipeline operation. Meanwhile, the star point pixels are not all continuous in terms of row numbers and column numbers and may be distributed intermittently or individually and independently, so that the step is intended to group the image information according to connected domains and store relevant intermediate variables thereof for centroid location.
The connected domain marking method is mainly applied to the following intermediate variables for processing:
(1) single pixel like variable
Previous star point pixel row number prepixRow
Previous star pixel column number prePixCol
Current star point pixel row number currPixRow
Current asterisk pixel column number currPixCon
Current star point pixel gray scale currPixHui
And the label of the connected domain to which the left pixel belongs is leftLabel, wherein each different connected domain has different labels, and can be numbered in sequence according to the discovery sequence, and the leftLabel 0 indicates that the left pixel does not belong to any connected domain.
(2) Line information variables
A left boundary array (comprising a current row and a last row) leftList of the row connected domain, wherein the left boundary array of the row connected domain stores column numbers of leftmost pixels of the row connected domain contained in two rows of pixels;
a row connected domain right boundary array (comprising a current row and an upper row) rightList, wherein the row connected domain right boundary array stores column numbers of rightmost pixels of each row connected domain contained in two rows of pixels;
a row connected domain label array (comprising a current row and an upper row) labelList, wherein the row connected domain label array stores the serial numbers of large connected domains to which row connected domains formed by two rows of pixels belong;
the number of blocks of the row connected domain curSectNum represents the number of the row connected domains contained in the row;
the last row of connected domain block number lastSectNum represents the number of connected domains in the last row;
(3) connected domain information variables
Latest connected field label latestSectNum
The sum sectXHui of the product of the x coordinate and the gray level
Summation secyhui of product of y-coordinate and gray scale
Sum of gray scale sectHui
The current connected region pixel number sectPixNum
The connected component labeling process is described below:
as shown in fig. 6, the connected domain division method of each star pixel comprises: respectively taking each star point pixel as the current star point pixel to execute the following steps:
s31: judging whether the current star point pixel changes lines relative to the previous star point pixel according to whether the line number currPixRow of the current star point pixel is the same as the line number prePixRow of the previous star point pixel, and if not, entering the step S32; if the line is changed, setting the label leftLabel of the left pixel of the current star pixel to 0, and then entering the step S33 (which indicates that no pixel exists on the left side of the current star pixel at this time, and no pixel selected as a star region exists);
s32: if the line change does not occur, judging whether the row of the current star point pixel is adjacent to the row of the previous star point pixel, if so (indicating that the current star point pixel possibly belongs to the same connected domain as the previous star point pixel), setting 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, setting the left pixel label leftLabel of the previous star point pixel to be 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 the No. 2 connected domain), and entering the step S34; if not, setting the label leftLabel of the left pixel of the current star pixel to 0 (namely, not marking and emptying, and simultaneously indicating that the left side of the current star pixel is not the pixel selected as the star area), and then entering the step S34;
s33: if the line change occurs, clearing the previous line storage space in the line connected domain left boundary array leftList, the line connected domain right boundary array rightList and the line connected domain label array labelList, wherein the vacated storage space is used as the current line storage space for storing the connected domain left boundary, the connected domain right boundary and the connected domain label to be generated when the line of the current star point pixel is located, and simultaneously changing the storage space originally used as the current line storage space in the line connected domain left boundary array leftList, the line connected domain right boundary array rightList and the line connected domain label array labelList into the previous line storage space, wherein the storage space originally used as the current line storage space in the line connected domain left boundary, the line connected domain right boundary and the line connected domain label corresponding to the current line is changed into the previous line connected domain left boundary, the line connected domain right boundary and the line connected domain label corresponding to the previous line; meanwhile, the storage space which originally stores the last row connected domain block number lastSectNum is emptied and used for storing the row connected domain block number to be generated in the row where the current star point pixel is located, and the storage space which originally serves as the current row connected domain block number lastSectNum corresponding to the current row is changed into the storage space of the last row connected domain block number lastSectNum;
judging whether the row of the current pixel is adjacent to the row number of the previous row stored in the previous row storage space at the moment, if so, setting the number of blocks lastSectNum of the previous row of connected domains as the number of the row connected domains contained in the row of the previous star pixel, and then entering the step S34; if not, the last row connected domain block number lastSectNum is set to 0, and then step S34 is executed;
s34: judging whether the label of the left pixel of the current star pixel is 0, if not, judging that the label of the left pixel of the current star pixel is 0 (with a label, such as 2), and then, judging the information of the current star pixel (namely the gray level I of the original image)ijAnd row and column information) to the row connected domain corresponding to the x coordinate and gray scale product, the summation quantity array secxhui, the gray scale summation quantity array sechui, and the current left pixel label (for example, the current left pixel label is 2, the current star point pixel is assigned as the row connected domain number 2), and the pixel number of the connected domain corresponding to the current left pixel label in the array of the current row connected domain sectPixNum, the pixel number of the connected domain corresponding to the current left pixel label is increased by 1 (in the case of 2, the pixel number of the row connected domain number 2 is increased by 1), and the value of the right boundary of the row connected domain corresponding to the current left pixel label in the row connected domain right boundary array rightList is updated to the column number pixcol of the current star point pixel (that is, in the case of 2, the current star point pixel is one more right of the row connected domain number 2, and the value of the right boundary of the row connected domain number 2 needs to be updated), then, the step S35 is performed (since the current star point pixel may belong to both the left side row connected domain and the upper layer row connected domain, in this step, although the current star point pixel has found the left side row connected domain to which it belongs, the step S35 is performed to determine whether the current star point pixel also belongs to the upper layer row connected domain, that is, whether the left side row connected domain and the upper layer row connected domain are actually the same large connected domain);
if the value is 0 (it indicates that the left side of the current star point pixel does not have a row connected domain related to the left side, and the step S35 needs to be performed to judge whether the left side belongs to the row connected domain of the previous row), the step S35 is directly performed;
s35: judging whether the current star point pixel belongs to a row including a row connected domain of a previous star point pixel according to a set criterion, wherein the set criterion is as follows: the block number lastSectNum of the last row connected domain is not equal to 0 (which indicates that the row where the current star point pixel is located is adjacent to the last row, and the current star point pixel may fall into the upper layer connected domain), and the column number currpixcol of the current star point pixel falls between the left boundary and the right boundary of any row connected domain contained in the row where the previous star point pixel is located; if not, go to step S37; if the star point image element belongs to the communication domain, recording the line communication domain to which the current star point image element belongs as A, and entering the step S36;
s36: judging whether the label leftLabel of the left pixel of the current star pixel is 0 or not, if the leftLabel is 0 (namely no label, which also indicates that the left side of the current star pixel has no row connected domain, the problem of fusion with an upper layer connected domain is not involved), the current star pixel only belongs to the row connected domain A, and the information (namely the gray level I of the original image) of the current star pixel is determinedijAnd row column information) to the connected domain corresponding to the row connected domain a, and adding the pixel number sectxui of the connected domain a to the array secxhui of the summation quantity array secxhui of the product of x coordinate and gray scale, the summation quantity array sechui of the product of y coordinate and gray scale, and the pixel number secpixnum of the connected domain a to the array sectxum of the current connected domain;
if the leftLabel is not 0 (namely, a mark exists, and if the left label is 2, the problem of fusion of the left communicating domain and the upper communicating domain is involved), the current star point pixel belongs to the row communicating domain corresponding to the row communicating domain A and the left pixel label leftLabel at the same time, whether the labels of the two row communicating domains are the same or not is judged, if the labels are different, the row communicating domain corresponding to the left pixel label leftLabel is assigned to the row communicating domain A, the left pixel label leftLabel of the current star point pixel is converted into the label of the row communicating domain A, and specifically, the corresponding content of the left communicating domain label in the secxhui, secyhi, sechui and secpixnum arrays is added into the data corresponding to the upper communicating domain A label; if the pixel labels are the same, the row connected domain A and the row connected domain corresponding to the left pixel label leftLabel are the same;
s37: judging whether a left pixel label leftLabel of a current star pixel is 0, if so, establishing a new row connected domain in a row where the current star pixel is located, acquiring left boundary, right boundary and number of attached row connected domain labels of the new row connected domain formed by the current pixel and current row connected domain block number SectNum of the row where the current pixel is located, and storing the part of information into a current row storage space defined by a row connected domain left boundary array leftList, a row connected domain right boundary array rightList and a row connected domain label array labelList;
so far, all judgment of searching the connected domain of the current pixel is completed, and then the connected domain of the next pixel is judged; and after the connected domain judgment of all the pixels is completed, obtaining the final secXHui, secYHui, secHui and secPixNu arrays.
Therefore, in the process of connected domain marking and centroid positioning, all pixel information (line numbers, column numbers and gray values) obtained by the star point extraction method is input, and connected domain marking is carried out according to the relative relationship of positions. The whole judgment process carries out iterative updating of the information of the full-image connected domain according to the distribution of the left connected domain and the upstream connected domain, and the method is fast and simple and is suitable for targets with arbitrary concave-convex shapes.
S4: and acquiring coordinates of the star point areas represented by the connected domains by adopting a gravity center method.
Specifically, all secxhui, secyhui and sechui are traversed, a nonempty array item is found, and assuming that there are 8 connected domains inside, the following steps are executed with each connected domain as the current connected domain:
extracting information of each pixel belonging to the current connected domain from the array sectXHui, sectYHui and sectHui, multiplying the row number of each pixel by the corresponding gray value, and summing all the products to obtain a first sum;
multiplying the column number of each pixel by the corresponding gray value, and summing all the products to obtain a second sum value;
adding the gray values of the pixels to obtain a third sum value;
and taking 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 as the coordinates of the star point region represented by the current connected domain, so as to obtain the sub-pixel subdivision positions of all the centroids.
The method for extracting the star points of the all-day star sensor is realized on an FPGA platform in a pipeline processing mode by means of a high-order comprehensive compiling tool. The method comprises the steps of firstly converting the format of original image data into the streaming media format of AXI Stream to realize the rate control of a pipeline process; stripping the star point image and the background image by taking a TopHat algorithm as a core; extracting effective star point areas by using the gray level mean value information of the neighborhood through a local method; and finally, obtaining the accurate centroid position of the star point on the image by a connected domain marking method of sequential traversal of the pipeline. In the star point extraction process, all steps are subjected to necessary hardware optimization aiming at the FPGA platform so as to meet the requirement that the algorithm is correctly carried out under the condition of an assembly line under the embedded platform.
The method realizes the extraction of the star points under the all-time condition on the FPGA platform. On one hand, compared with a simple global method, the method has stronger background noise resistance and can realize stable capture of celestial bodies under the condition of high background interference in daytime; on the other hand, the method utilizes the FPGA platform to carry out pipeline processing, thereby greatly improving the operation efficiency of the algorithm, giving the centroid information almost at the same time after the image input is finished, and effectively ensuring the dynamic performance of the star sensor all day long.
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it will be understood by those skilled in the art that various changes and modifications may be made herein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. A real-time star point extraction method of an all-day star sensor is characterized by comprising the following steps:
s1: converting the format of original star atlas data acquired by an imaging end of the star sensor into an AXI Stream media format, and then performing background denoising processing on the star atlas data after format conversion by adopting a TopHat algorithm to obtain a star atlas after background filtering;
s2: the star map after the background filtering is subjected to a box filter to obtain an average value image, each pixel of the average value image is respectively used as a central pixel, and whether the current central pixel is a star point pixel or not is judged according to whether the gray average value of the central pixel is larger than the gray average value of any oblique four neighborhoods of the central pixel or not;
s3: realizing the connected domain division of the star point pixels according to whether the row and the column of each star point pixel are adjacent or not;
s4: and acquiring coordinates of the star point areas represented by the connected domains by adopting a gravity center method.
2. The method for extracting real-time star points of a full-time star sensor as claimed in claim 1, wherein when judging whether the current central pixel is a star point pixel, the method for calling the oblique four-neighborhood pixels in the memory is as follows:
constructing a rolling storage structure comprising seven cache lines, numbering the cache lines of the rolling storage structure according to 0-6, and storing the pixels of the current central pixel in the mean image, the first three lines of pixels of the current central pixel and the last three lines of pixels of the current central pixel in the mean image; if the current central pixel is the last pixel of the line where the current central pixel is located and the current central pixel is judged whether to be a star point pixel or not, clearing a cache line where a third pixel arranged in front of the line where the current central pixel is located, taking the next line of the line where the current central pixel is located as the line where the next central pixel is located, storing the third pixel arranged behind the line where the next central pixel is located in the cleared cache line, and marking the line number of the cache line as k;
obtaining the cache line number of the current center pixel and the oblique four-adjacent domain pixels thereof in the rolling storage structure according to the following formula:
Figure FDA0003355431620000021
Figure FDA0003355431620000022
rdown=k
where k is the cache line number storing the third line of pels arranged after the line where the current center pel is located, rmidCache line number, r, of the line in which the current center pel is locatedupCache line numbers r for the top left and top right neighbourhood pixels of the line in which the current central pixel is locateddownCache line numbers of a left lower neighborhood pixel and a right lower neighborhood pixel of a line in which the current center pixel is positioned;
obtaining the cache column number of the current center pixel and the pixels of the oblique four adjacent domains thereof in the rolling storage structure according to the following formula:
Figure FDA0003355431620000023
wherein t is the cache column number of the upper right neighborhood pixel and the lower right neighborhood pixel of the current center pixel, cleftCache column numbers of upper left neighborhood pixels and lower left neighborhood pixels of the current center pixel, cmidCache column number for current center pel, crightCache column numbers of a right upper neighborhood pixel and a right lower neighborhood pixel of the current center pixel;
and calling a corresponding gray average value from the rolling storage structure according to the cache line number and the cache column number of the current central pixel and the pixels of the inclined four adjacent domains of the current central pixel, and judging whether the current central pixel is a star point pixel or not according to the called gray average value.
3. The method for extracting the real-time star points of the full-time star sensor as claimed in claim 1, wherein the connected domain division method of each star point pixel comprises the following steps: respectively taking each star point pixel as the current star point pixel to execute the following steps:
s31: judging whether the current star point pixel is subjected to line change relative to the previous star point pixel, if not, entering the step S32, and if the line change is performed, setting the label leftLabel of the left side pixel of the current star point pixel to 0, and then entering the step S33;
s32: judging whether the row of the current star point pixel is adjacent to the row of the previous star point pixel, if so, judging that the current star point pixel and the previous star point pixel belong to the same row connected domain, setting 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, and then entering the step S34; if not, setting the label leftLabel of the left pixel of the current star pixel to 0, and then entering the step S34;
s33: judging whether the row of the current star point pixel is adjacent to the row of the previous star point pixel, if so, setting the number of blocks lastSectNum of the connected domain of the previous row as the number of the connected domains of the row of the previous star point pixel, and then entering the step S34; if not, the step S34 is executed after setting the last row connected field block number lastSectNum to 0;
s34: judging whether a left pixel label leftLabel of the current star pixel is 0, if not, updating the right boundary of a row connected domain corresponding to the left pixel label leftLabel to be the column number currPixCon of the current star pixel, and then entering the step S35; if yes, go directly to step S35;
s35: judging whether the current star point pixel belongs to a row including a row connected domain of a previous star point pixel according to a set criterion, wherein the set criterion is as follows: the block number lastSectNum of the last row of connected domains is not equal to 0, and the column number currPixCon of the current star point pixel falls between the left boundary and the right boundary of any row of connected domains contained in the row of the previous star point pixel; if not, go to step S37; if the star point image element belongs to the communication domain, recording the line communication domain to which the current star point image element belongs as A, and entering the step S36;
s36: judging whether the left pixel label leftLabel of the current star pixel is 0 or not, if so, only belonging to the row connected domain A; if not, the current star point pixel belongs to the row connected domain corresponding to the row connected domain A and the left pixel label leftLabel at the same time, whether the labels of the two row connected domains are the same or not is judged, if not, the row connected domain corresponding to the left pixel label leftLabel is assigned to the row connected domain A, and the left pixel label leftLabel of the current star point pixel is changed into the label of the row connected domain A; if the pixel labels are the same, the row connected domain A and the row connected domain corresponding to the left pixel label leftLabel are the same;
s37: judging whether a left pixel label leftLabel of the current star pixel is 0, if so, establishing a new row connected domain in the row where the current star pixel is located, and acquiring the left boundary, the right boundary and the row connected domain label of the new row connected domain formed by the current star pixel and the current row connected domain block number currSectNum of the row where the current star pixel is located.
4. The method as claimed in claim 3, wherein the space for storing the left boundary array leftwards, the right boundary array rightwards and the labelList of the row connected domain is divided into a previous space and a current space, the left boundary of the row connected domain, the right boundary of the row connected domain and the label of the connected domain are respectively stored with the left boundary of the row connected domain, the right boundary of the row connected domain and the label of the connected domain corresponding to the row where the previous star point pixel is located and the current star point pixel is located, and the left boundary of the row connected domain, the right boundary of the row connected domain and the label of the connected domain have subscripts for distinguishing whether the left boundary, the right boundary and the label of the connected domain belong to the previous row or the current row;
and if the current star point pixel changes rows relative to the previous star point pixel, taking the original 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 as a previous row storage space, emptying the previous row storage space at the moment, and taking the emptied previous row storage space as the current row storage space for storing the row connected domain left boundary, the row connected domain right boundary and the connected domain label to be generated when the current star point pixel is in the row.
5. The method for extracting real-time star points of a full-time star sensor as claimed in claim 4, wherein the switching between the rows of the two storage spaces is realized by exchanging pointers corresponding to the storage spaces of the previous row and the storage space of the current row.
6. The method for extracting the real-time star points of the full-time star sensor as claimed in claim 1, wherein the following steps are respectively executed by taking each connected domain as the current connected domain:
multiplying the line number of each pixel of the current connected domain by the corresponding gray value, and summing all the products to obtain a first sum;
multiplying the column number of each pixel of the current connected domain by the corresponding gray value, and summing all the products to obtain a second sum value;
adding the gray values of the pixels to obtain a third sum value;
and taking 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 as the coordinates of the star point area represented by the current connected domain.
7. The method as claimed in claim 1, wherein the streaming media format of the AXI Stream includes data port (TDATA), data valid flag (TKEEP), data type flag (TSTRB), user defined field (TUSER), end of packet flag (TLAST), data ID field (TID), data routing field (TDEST), and bus ready flag (TREADY).
8. The method for extracting real-time star points of a full-time star sensor as claimed in claim 1, wherein a white TopHat method is adopted to perform background denoising processing on the format-converted star map data.
CN202111349656.0A 2021-11-15 2021-11-15 Real-time star point extraction method for all-day star sensor Pending CN114255349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111349656.0A CN114255349A (en) 2021-11-15 2021-11-15 Real-time star point extraction method for all-day star sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111349656.0A CN114255349A (en) 2021-11-15 2021-11-15 Real-time star point extraction method for all-day star sensor

Publications (1)

Publication Number Publication Date
CN114255349A true CN114255349A (en) 2022-03-29

Family

ID=80792495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111349656.0A Pending CN114255349A (en) 2021-11-15 2021-11-15 Real-time star point extraction method for all-day star sensor

Country Status (1)

Country Link
CN (1) CN114255349A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375695A (en) * 2022-10-27 2022-11-22 之江实验室 Method and device for detecting dark and weak star light spots of dynamic star sensor and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651904A (en) * 2016-12-02 2017-05-10 北京空间机电研究所 Wide-size-range multi-space target capture tracking method
CN107504966A (en) * 2017-07-10 2017-12-22 北京控制工程研究所 There is the method that nautical star asterism extracts under cloud environment in a kind of daytime
CN108716916A (en) * 2018-05-31 2018-10-30 北京航空航天大学 A kind of distributed parallel asterism barycenter extracting method and FPGA realization devices based on superblock
CN109949204A (en) * 2019-03-29 2019-06-28 江苏亿通高科技股份有限公司 The asterism mass center of pipeline organization extracts circuit
CN112270704A (en) * 2020-10-26 2021-01-26 吉林大学 Star point mass center extraction method based on data linked list structure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651904A (en) * 2016-12-02 2017-05-10 北京空间机电研究所 Wide-size-range multi-space target capture tracking method
CN107504966A (en) * 2017-07-10 2017-12-22 北京控制工程研究所 There is the method that nautical star asterism extracts under cloud environment in a kind of daytime
CN108716916A (en) * 2018-05-31 2018-10-30 北京航空航天大学 A kind of distributed parallel asterism barycenter extracting method and FPGA realization devices based on superblock
CN109949204A (en) * 2019-03-29 2019-06-28 江苏亿通高科技股份有限公司 The asterism mass center of pipeline organization extracts circuit
CN112270704A (en) * 2020-10-26 2021-01-26 吉林大学 Star point mass center extraction method based on data linked list structure

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
秦天沐;王伟东;王海涌;刘佳琪;: "实时星图预处理的并行流水线算法", 半导体光电, no. 02, 15 April 2017 (2017-04-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375695A (en) * 2022-10-27 2022-11-22 之江实验室 Method and device for detecting dark and weak star light spots of dynamic star sensor and medium

Similar Documents

Publication Publication Date Title
CN113450307B (en) Product edge defect detection method
CN105761288B (en) A kind of real-time asterism method for positioning mass center and device based on FPGA
CN102278990A (en) Star sensor image processing method based on FPGA
CN108716916B (en) Distributed parallel star point centroid extraction method based on superblock and FPGA implementation device
CN104143186A (en) SLIC super-pixel block optimizing method
CN114255349A (en) Real-time star point extraction method for all-day star sensor
CN113313047A (en) Lane line detection method and system based on lane structure prior
CN116091574A (en) 3D target detection method and system based on plane constraint and position constraint
CN112766102A (en) Unsupervised hyperspectral video target tracking method based on space-spectrum feature fusion
CN105405152B (en) Adaptive scale method for tracking target based on structuring support vector machines
CN105046713A (en) Morphology-based robot star point segmentation method and FPGA realization method
CN116664892A (en) Multi-temporal remote sensing image registration method based on cross attention and deformable convolution
CN113486819A (en) Ship target detection method based on YOLOv4 algorithm
CN111507340A (en) Target point cloud data extraction method based on three-dimensional point cloud data
CN110321888A (en) A kind of spaceborne infrared small target detection method based on FPGA
CN114170596A (en) Posture recognition method and device, electronic equipment, engineering machinery and storage medium
CN113435266A (en) FCOS intelligent target detection method based on extreme point feature enhancement
Ling et al. Flowacc: Real-time high-accuracy dnn-based optical flow accelerator in fpga
CN116452757A (en) Human body surface reconstruction method and system under complex scene
CN106709977A (en) Scene night view map-based automatic light source arrangement method
CN116403200A (en) License plate real-time identification system based on hardware acceleration
CN114743008B (en) Single plant vegetation point cloud data segmentation method and device and computer equipment
CN110853058A (en) High-resolution remote sensing image road extraction method based on visual saliency detection
CN113902847B (en) Monocular depth image pose optimization method based on three-dimensional feature constraint
CN112419407B (en) Cloud cluster displacement vector calculation method and device based on cloud cluster edge recognition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination