A driving design method for space photoelectric sensor against stray light interference

By embedding a median filtering algorithm and a four-connected domain labeling method into the design of the space photoelectric sensor, the problems of low point target extraction rate and inaccurate positioning caused by stray light interference are solved, and real-time and efficient point target recognition is achieved.

CN122137928APending Publication Date: 2026-06-02SHANGHAI AEROSPACE CONTROL TECH INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI AEROSPACE CONTROL TECH INST
Filing Date
2026-01-26
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Space photoelectric sensors suffer from interference in imaging signal-to-noise ratio under stray light environments, resulting in low point target extraction rate and inaccurate positioning accuracy. Existing algorithms are complex and computationally time-consuming, failing to meet real-time requirements.

Method used

In the design of the space photoelectric sensor driver, a median filtering algorithm is embedded. The background grayscale is filtered out by performing line-by-line operations through FPGA. The point target is extracted by combining four-connected domain marking and grayscale weighted centroid method.

Benefits of technology

It improves the point target extraction rate under stray light conditions, meets the real-time requirements of space photoelectric sensors, and accurately identifies and extracts point targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137928A_ABST
    Figure CN122137928A_ABST
Patent Text Reader

Abstract

The application discloses a kind of space photoelectric sensitive device anti stray light interference drive design method, it contains for capturing target celestial body image and outputting image element gray value image sensor, and with the FPGA of image sensor communication connection, its drive design method includes the following steps: S1, FPGA is configured to image sensor in space photoelectric sensitive device initialization;S2, image sensor is row by row output target celestial body image image element gray value to FPGA, and is operated by FPGA to row by row, to filter out background gray, obtain the image element gray value of target celestial body image after processing;S3, mark the target pixel gray of target celestial body image after processing, and the centroid of the target pixel gray marked is sought, to obtain point target.The present application retains halo, ghost image and the like information as background image, and can more accurately identify and extract point target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drive design technology, and in particular to a drive design method for resisting stray light interference in a space photoelectric sensor. Background Technology

[0002] Space photoelectric sensors are a type of photoelectric detection device specifically designed for the space environment. They convert received light signals into electrical signals and are therefore widely used in stellar imaging. Space photoelectric sensors extract the image centroid of point targets such as stars or spacecraft (including spacecraft, space debris, and non-cooperative targets) to achieve spacecraft attitude measurement, space debris monitoring, and non-cooperative target detection. However, during in-orbit operation, space photoelectric sensors are severely affected by stray light from sunlight, Earth's atmosphere, moonlight, and other sources, which significantly interferes with their imaging signal-to-noise ratio. This interference causes ghosting and halos in wide-field-of-view space surveillance cameras, leading to the inability to extract point targets or false alarms—a phenomenon known as "missed alarms" or "false alarms"—thus severely impacting the extraction rate of stars or spacecraft and the accuracy of their centroid positioning.

[0003] To overcome the interference of stray light on the imaging of space photoelectric sensors, traditional algorithms use the mean plus offset method to process and extract images. However, this method may miss or misextract some point targets, resulting in fewer effective point target information extracted by the space photoelectric sensor, and invalid extracted point target information. In addition, most existing image processing algorithms have problems of being too complex in time and space, resulting in complex design, long computation time, and are not conducive to FPGA implementation, and cannot meet the real-time measurement requirements of space photoelectric sensors.

[0004] Therefore, in order to address the above-mentioned shortcomings, it is urgent to develop a driving design method that can reduce the false alarm rate and missed alarm rate of space photoelectric sensitivity in stray light environments, so as to improve the accuracy of space photoelectric sensors in extracting point targets in star imaging.

[0005] The statements herein provide only background information in relation to this invention and do not necessarily constitute prior art. Summary of the Invention

[0006] The purpose of this invention is to provide a driving design method for resisting stray light interference in space photoelectric sensors. By embedding a median filtering algorithm in the driving design of space photoelectric sensors, the point target extraction rate under stray light conditions can be improved.

[0007] To achieve the above objectives, the present invention provides a driving design method for a space photoelectric sensor to resist stray light interference. The space photoelectric sensor includes an image sensor for capturing images of target celestial bodies and outputting their pixel grayscale values, and an FPGA communicatively connected to the image sensor. The driving design method for the space photoelectric sensor to resist stray light interference includes the following steps: S1, The FPGA initializes and configures the image sensor in the space photoelectric sensor; S2, the image sensor outputs the pixel grayscale values ​​of the target celestial body image to the FPGA line by line, and performs line-by-line calculations through the FPGA to filter out the background grayscale and obtain the pixel grayscale values ​​of the processed target celestial body image. The pixel grayscale value of the target celestial image is an array of row × col; S3, mark the grayscale of the target pixel in the processed target celestial image, and calculate the centroid of the marked target pixel grayscale to obtain the point target.

[0008] Optionally, the image sensor and FPGA initialized and configured in step S1 have the following characteristics: The image sensor is configured with a first cache matrix StarImage0 to cache the pixel grayscale values ​​of the target celestial body image output line by line; The FPGA is configured with a second cache matrix IM0 and a third cache matrix WindowImage.

[0009] Optionally, the first cache matrix StarImage0 is a 1×col row matrix; the second cache matrix IM0 is a 3-row, col+2-column matrix of all zeros, i.e. The third cache matrix WindowImage is a 3x3 matrix filled with zeros, i.e. .

[0010] Optionally, step S2 includes: S2.1 Calculate and filter out the background grayscale of the first row of pixels in the target celestial image to obtain the processed grayscale of the first row of pixels in the target celestial image. S2.2, determine whether the number of rows in the next processing row is less than or equal to row; if it is less than or equal to row, calculate and filter out the background gray value of the next row of pixels in the target celestial image to obtain the gray value of the next row of pixels in the processed target celestial image. S2.3, repeat S2.2 until the next processing line is row 1. Then calculate and filter the background gray value of row 1 pixel gray value of the target celestial image to obtain the gray value of row 1 pixel of the processed target celestial image, and then obtain the pixel gray value of all rows of the processed target celestial image.

[0011] Optionally, step S2.1 includes: S2.1.1, the image sensor obtains the grayscale values ​​of the first row of pixels in the target celestial body image and saves them into the first buffer matrix StarImage0, thus obtaining... ; S2.1.2, output the pixel grayscale values ​​in the first cache matrix to the FPGA and assign them to the 2nd column (2~col+1) of the 2nd row of the second cache matrix IM0, thus obtaining... ; Then, the image sensor saves the grayscale values ​​of the second row of pixels in the obtained image of the target celestial body into the first cache matrix StarImage0, thus obtaining... ; S2.1.3, output the grayscale values ​​of the second row of pixels saved in the first cache matrix StarImage0 in step S2.1.2 to the FPGA, and assign them to the 2nd to col+1st column of the 3rd row of the second cache matrix IM0, to obtain... ; S2.1.4, All pixel grayscale values ​​in the second cache matrix IM0 obtained in step S2.1.3 are processed in multiple operation blocks from the first column to the col+2 column, and the pixel grayscale values ​​captured by each operation block after the block operation are successively assigned to the third cache matrix WindowImage; The operation block includes a first operation block, a second operation block, ..., a col-th operation block; S2.1.5 Calculate the median value in each operation block of the third cache matrix WindowImage for each assignment, and obtain the background grayscale of the pixel grayscale values ​​in columns 2 to col+1 of the second row in the second cache matrix IM0. S2.1.6 Subtract the background gray values ​​from the corresponding columns in step S2.1.5 from the pixel gray values ​​in the second row of the second cache matrix IM0, and obtain the pixel gray values ​​of the first row of the processed target celestial image.

[0012] Optionally, in step S2.1.4, the first operation block contains the pixel grayscale values ​​of the first, second, and third columns in all rows of the second cache matrix IM0; the second operation block contains the pixel grayscale values ​​of the second, third, and fourth columns in all rows of the second cache matrix IM0; ...; the col-th operation block contains the pixel grayscale values ​​of the col-th, col+1-th, and col+2-th columns in all rows of the second cache matrix IM0; that is, each operation block contains 3 rows and 3 columns, for a total of 9 pixel grayscale values, and the subsequent operation block is obtained by shifting one column to the right based on the previous operation block.

[0013] Optionally, step S2.2 includes: S2.2.1, Perform a shift operation on the second cache matrix IM0 in step S2.1.3, shifting and assigning the gray values ​​of all second row pixels in the second cache matrix IM0 to the first row, and shifting and assigning the gray values ​​of all third row pixels in the second cache matrix IM0 to the second row; S2.2.2, the image sensor saves the grayscale values ​​of the third row of pixels in the obtained target celestial image into the first buffer matrix StarImage0, thus obtaining... ; S2.2.3, Output the grayscale values ​​of the third row of pixels saved in the first cache matrix StarImage0 in step S2.2.2 to the FPGA, and assign them to the 2nd to col+1th columns of the 3rd row of the second cache matrix IM0 in step S2.2.1, to obtain... ; S2.2.4, according to the operation method in step S2.1.4, capture the pixel grayscale values ​​of each operation block in the second cache matrix IM0 obtained in step S2.2.3, and assign them to the third cache matrix WindowImage one by one; S2.2.5, follow the steps S2.1.5 and S2.1.6 to obtain the grayscale values ​​of the next row of pixels in the processed target celestial image.

[0014] Optionally, step S3 includes: S3.1, The grayscale of the target pixels in the processed target celestial body image is marked using the four-connected-domain labeling method; S3.2, obtain the centroid of the grayscale of the marked target pixel according to the grayscale weighted centroid method.

[0015] Optionally, the formula for calculating the centroid is: In the formula, The x-coordinate representing the centroid. The ordinate of the centroid; x i y i g i These represent the x-coordinate, y-coordinate, and grayscale value of the pixels of each target celestial body that makes up the image of the target celestial body.

[0016] In summary, compared with the prior art, the present invention has the following beneficial effects: 1. The present invention provides a driving design method for resisting stray light interference in a space photoelectric sensor, which fully preserves information such as halo and ghost image as background image, and can more accurately identify and extract point targets.

[0017] 2. The present invention provides a driving design method for resisting stray light interference in a space photoelectric sensor, which can be implemented based on FPGA and can meet the real-time measurement requirements of a single space photoelectric sensor. Attached Figure Description

[0018] Figure 1 This invention illustrates the connection relationship between the FPGA and the image sensor. Figure 2(a) shows a celestial image captured by the camera at a 46° field of view; Figure 2(b) shows a celestial image captured by the camera at a 32° field of view. Figure 3(a) shows the background image obtained by the filtering algorithm of the present invention under a 46° field of view; Figure 3(b) shows the background image obtained by the filtering algorithm of the present invention under a 32° field of view. Figure 4(a) shows the point target extracted by the driving design method of the present invention under a 46° field of view; Figure 4(b) shows the point target extracted by the driving design method of the present invention under a 32° field of view. Figure 5 This is a schematic diagram of the four-connected domain criterion. Detailed Implementation

[0019] The following will be combined with the appendix Figures 1-5 The present invention will be further described in detail through preferred embodiments. The advantages and features of the present invention will become clearer from the following description. It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions, only for the purpose of conveniently and clearly illustrating the embodiments of the present invention. Please refer to the accompanying drawings to make the objectives, features, and advantages of the present invention more apparent and understandable. It should be understood that the structures, proportions, sizes, etc., depicted in the accompanying drawings are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the implementation conditions of the present invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportional relationships, or adjustments to the size, without affecting the effects and objectives achieved by the present invention, should still fall within the scope of the technical content disclosed in the present invention.

[0020] The space photoelectric sensor of the present invention comprises: an image sensor for capturing images of target celestial bodies (including stars or spacecraft) and outputting pixel grayscale values ​​of the target celestial body image; and an FPGA (Field Programmable Gate Array) communicatively connected to the image sensor for processing the pixel grayscale values ​​of the image to perform background removal, point target extraction and recognition, and to form the processed pixel grayscale values ​​of the target celestial body image.

[0021] Specifically, such as Figure 1As shown, the FPGA generates the control signals required by the image sensor, initializes and configures the image sensor through SPI (Serial Peripheral Interface), and the image sensor sends the pixel grayscale values ​​of the image to the FPGA for further processing through the LVDS (Low Voltage Differential Signaling) data channel.

[0022] The image sensor can present the pixel grayscale values ​​of the target celestial body image in an array of rows × columns.

[0023] This invention provides a driving design method for a space photoelectric sensor to resist stray light interference, comprising the following steps: Step S1: The FPGA initializes and configures the image sensor in the spatial photoelectric sensor. The image sensor is configured with a first cache matrix StarImage0 to cache the pixel grayscale values ​​of the target celestial image output line by line; the FPGA is configured with a second cache matrix IM0 and a third cache matrix WindowImage. Wherein, the first cache matrix StarImage0 is a 1×col row matrix; the second cache matrix IM0 is a 3-row, col+2-column matrix of all zeros, i.e. The third cache matrix WindowImage is a 3x3 matrix filled with zeros, i.e. .

[0024] Step S2: The image sensor outputs the pixel grayscale values ​​of the target celestial body image to the FPGA line by line, and performs line-by-line calculations through the FPGA to filter out the background grayscale values ​​and obtain the pixel grayscale values ​​of the processed target celestial body image. Step S2 includes: S2.1 Calculate and filter out the background grayscale of the first row of pixels in the target celestial image to obtain the processed grayscale of the first row of pixels in the target celestial image. Specifically, step S2.1 includes: S2.1.1, the image sensor obtains the grayscale values ​​of the first row of pixels in the target celestial body image and saves them into the first buffer matrix StarImage0, thus obtaining... ; S2.1.2, output the pixel grayscale values ​​in the first cache matrix to the FPGA and assign them to the 2nd row and 2nd to col+1st column of the second cache matrix IM0, denoted as IM0 (2,2:col+1), thus obtaining... ; Then, the image sensor saves the grayscale values ​​of the second row of pixels in the obtained image of the target celestial body into the first cache matrix StarImage0, thus obtaining... ; S2.1.3, output the grayscale values ​​of the second row of pixels saved in the first cache matrix StarImage0 in step S2.1.2 to the FPGA, and assign them to the 2nd to col+1st columns of the 3rd row of the second cache matrix IM0, denoted as IM0 (3,2:col+1), to obtain... ; S2.1.4, All cell grayscale values ​​in the second cache matrix IM0 obtained in step S2.1.3 are processed in the manner of operation blocks from the first column to the last column (i.e., the col+2th column), wherein the operation block includes the first operation block, the second operation block, ..., the colth operation block; The first operation block contains the pixel grayscale values ​​of the first, second, and third columns in all rows of the second cache matrix IM0; the second operation block contains the pixel grayscale values ​​of the second, third, and fourth columns in all rows of the second cache matrix IM0; ...; the col-th operation block contains the pixel grayscale values ​​of the col-th, col+1-th, and col+2-th columns in all rows of the second cache matrix IM0; that is, each operation block contains 3 rows and 3 columns, totaling 9 pixel grayscale values, and each subsequent operation block is obtained by shifting one column to the right based on the previous operation block; The gray values ​​of all pixels captured by the first operation block, the second operation block, ..., the col operation block in sequence (3 rows and 3 columns, a total of 9 pixel gray values) are successively assigned to the third cache matrix WindowImage.

[0025] S2.1.5 Calculate the median value in each operation block of the third cache matrix WindowImage for each assignment, and obtain the background grayscale of the pixel grayscale values ​​in columns 2 to col+1 of the second row in the second cache matrix IM0. The median value is the gray value of the pixel in the middle of a certain operation block, arranged by value size.

[0026] S2.1.6 Subtract the background gray values ​​from the corresponding columns in step S2.1.5 in the second row of the second cache matrix IM0 from the gray values ​​of the pixels in columns 2 to col+1 in the second row to obtain the gray values ​​of the first row of the processed target celestial image. S2.2, determine whether the number of rows in the next processing row is less than or equal to row; if it is less than or equal to row, calculate and filter the background gray value of the next row of pixels in the target celestial image to obtain the gray value of the next row of pixels in the processed target celestial image; the following explanation is based on the second row.

[0027] Specifically, step S2.2 includes: S2.2.1, Perform a shift operation on the second cache matrix IM0 in step S2.1.3, shifting and assigning the gray values ​​of all second row pixels in the second cache matrix IM0 to the first row, and shifting and assigning the gray values ​​of all third row pixels in the second cache matrix IM0 to the second row; S2.2.2, the image sensor saves the grayscale values ​​of the third row of pixels in the obtained target celestial image into the first buffer matrix StarImage0, thus obtaining... ; S2.2.3, Output the grayscale values ​​of the third row of pixels saved in the first cache matrix StarImage0 in step S2.2.2 to the FPGA, and assign them to the 2nd to col+1st columns of the 3rd row of the second cache matrix IM0 in step S2.2.1, denoted as IM0 (3,2:col+1), to obtain... ; S2.2.4, according to the operation method in step S2.1.4, capture the pixel grayscale values ​​of each operation block in the second cache matrix IM0 obtained in step S2.2.3, and assign them to the third cache matrix WindowImage one by one; S2.2.5 Calculate the median value assigned to each operation block of the third cache matrix WindowImage, and obtain the background grayscale of the pixel grayscale values ​​in columns 2 to col+1 of the second row in the second cache matrix IM0. S2.2.6, Subtract the background gray value from the corresponding column in step S2.2.5 from the pixel gray value in the second row of the second cache matrix IM0 in the second row to the pixel gray value in the column (2~col+1) in the second cache matrix IM0, so as to obtain the pixel gray value of the second row of the processed target celestial image. S2.3, repeat S2.2 until the next processing line is row 1. Then calculate and filter the background gray value of row 1 pixel gray value of the target celestial image to obtain the gray value of row 1 pixel of the processed target celestial image, and then obtain the pixel gray value of all rows of the processed target celestial image.

[0028] Step S3: Mark the grayscale of the target pixels in the processed target celestial image, and calculate the centroid of the marked target pixel grayscale to obtain the point target.

[0029] Step S3 includes: S3.1, a four-connected-domain labeling method is used to label the grayscale of target pixels in the processed target celestial body image (only pixels with significantly higher grayscale than the background and spatially connected are identified as targets and thus labeled). This four-connected-domain labeling method is as follows: Figure 5As shown; wherein, the four-connected-domain labeling method is an existing image processing method, and its specific labeling process will not be described in detail.

[0030] S3.2, the centroid of the grayscale of the marked target pixel is obtained according to the grayscale weighted centroid method. Centroid ( , The formula for calculating ) is: In the formula, x i y i g i These represent the x-coordinate, y-coordinate, and grayscale value of the pixels of each target celestial body that makes up the image of the target celestial body.

[0031] Using the above-mentioned drive design method for resisting stray light interference of space photoelectric sensors, the target celestial body images actually captured by the camera under different fields of view as shown in Figures 2(a) and 2(b) are processed to obtain the background image obtained by the filtering algorithm as shown in Figures 3(a) and 3(b), and the point target as shown in Figures 4(a) and 4(b).

[0032] Specifically, Figure 2(a) shows a real celestial image taken with a CMV4000 image sensor camera under a 46° field of view, and Figure 2(b) shows a real celestial image taken with a domestically produced image sensor camera under a 32° field of view; both arrays are 2048×2048. Both celestial images are affected by moonlight and exhibit ghosting and halos. However, the drive design method of this space photoelectric sensor to resist stray light interference fully preserves information such as halos and ghosting as background images, and effectively identifies and extracts point targets.

[0033] In summary, the driving design method for resisting stray light interference in a spatial photoelectric sensor provided by this invention fully preserves information such as halos and ghost images as background images, and can more accurately identify and extract point targets.

[0034] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0035] In the description of this invention, it should be understood that the terms "center," "height," "thickness," "upper," "lower," "vertical," "horizontal," "top," "bottom," "inner," "outer," "axial," "radial," and "circumferential," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0036] In the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0037] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0038] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A driving design method for a space photoelectric sensor to resist stray light interference, the space photoelectric sensor comprising an image sensor for capturing images of target celestial bodies and outputting their pixel grayscale values, and an FPGA communicatively connected to the image sensor, characterized in that, The driving design method for this space photoelectric sensor to resist stray light interference includes the following steps: S1, The FPGA initializes and configures the image sensor in the space photoelectric sensor; S2, the image sensor outputs the pixel grayscale values ​​of the target celestial body image to the FPGA line by line, and performs line-by-line calculations through the FPGA to filter out the background grayscale and obtain the pixel grayscale values ​​of the processed target celestial body image. The pixel grayscale value of the target celestial image is an array of row × col; S3, mark the grayscale of the target pixel in the processed target celestial image, and calculate the centroid of the marked target pixel grayscale to obtain the point target.

2. The driving design method for resisting stray light interference in a space photoelectric sensor as described in claim 1, characterized in that, The image sensor and FPGA initialized and configured in step S1 have the following characteristics: The image sensor is configured with a first cache matrix StarImage0 to cache the pixel grayscale values ​​of the target celestial body image output line by line; The FPGA is configured with a second cache matrix IM0 and a third cache matrix WindowImage.

3. The driving design method for resisting stray light interference in a space photoelectric sensor as described in claim 2, characterized in that, The first cache matrix StarImage0 is a 1×col row matrix; the second cache matrix IM0 is a 3-row, col+2-column matrix of all zeros. The third cache matrix WindowImage is a 3x3 matrix filled with zeros, i.e. .

4. The driving design method for resisting stray light interference in a space photoelectric sensor as described in claim 3, characterized in that, Step S2 includes: S2.1 Calculate and filter out the background grayscale of the first row of pixels in the target celestial image to obtain the processed grayscale of the first row of pixels in the target celestial image. S2.2, determine whether the number of rows in the next processing row is less than or equal to row; if it is less than or equal to row, calculate and filter out the background gray value of the next row of pixels in the target celestial image to obtain the gray value of the next row of pixels in the processed target celestial image. S2.3, repeat S2.2 until the next processing line is row 1. Then calculate and filter the background gray value of row 1 pixel gray value of the target celestial image to obtain the gray value of row 1 pixel of the processed target celestial image, and then obtain the pixel gray value of all rows of the processed target celestial image.

5. The driving design method for resisting stray light interference in a space photoelectric sensor as described in claim 4, characterized in that, Step S2.1 includes: S2.1.1, the image sensor obtains the grayscale values ​​of the first row of pixels in the target celestial body image and saves them into the first buffer matrix StarImage0, thus obtaining... ; S2.1.2, output the pixel grayscale values ​​in the first cache matrix to the FPGA and assign them to the 2nd column (2~col+1) of the 2nd row of the second cache matrix IM0, thus obtaining... ; Then, the image sensor saves the grayscale values ​​of the second row of pixels in the obtained image of the target celestial body into the first cache matrix StarImage0, thus obtaining... ; S2.1.3, output the grayscale values ​​of the second row of pixels saved in the first cache matrix StarImage0 in step S2.1.2 to the FPGA, and assign them to the 2nd to col+1st column of the 3rd row of the second cache matrix IM0, to obtain... ; S2.1.4, All pixel grayscale values ​​in the second cache matrix IM0 obtained in step S2.1.3 are processed in multiple operation blocks from the first column to the col+2 column, and the pixel grayscale values ​​captured by each operation block after the block operation are successively assigned to the third cache matrix WindowImage; The operation block includes a first operation block, a second operation block, ..., a col-th operation block; S2.1.5 Calculate the median value in each operation block of the third cache matrix WindowImage for each assignment, and obtain the background grayscale of the pixel grayscale values ​​in columns 2 to col+1 of the second row in the second cache matrix IM0. S2.1.6 Subtract the background gray values ​​from the corresponding columns in step S2.1.5 from the pixel gray values ​​in the second row of the second cache matrix IM0, and obtain the pixel gray values ​​of the first row of the processed target celestial image.

6. The driving design method for resisting stray light interference in a space photoelectric sensor as described in claim 5, characterized in that, In step S2.1.4, the first operation block contains the pixel grayscale values ​​of the first, second, and third columns in all rows of the second cache matrix IM0; the second operation block contains the pixel grayscale values ​​of the second, third, and fourth columns in all rows of the second cache matrix IM0; ...; the col-th operation block contains the pixel grayscale values ​​of the col-th, col+1-th, and col+2-th columns in all rows of the second cache matrix IM0; that is, each operation block contains 3 rows and 3 columns, a total of 9 pixel grayscale values, and the subsequent operation block is obtained by shifting one column to the right based on the previous operation block.

7. The driving design method for resisting stray light interference in a space photoelectric sensor as described in claim 5, characterized in that, Step S2.2 includes: S2.2.1, Perform a shift operation on the second cache matrix IM0 in step S2.1.3, shifting and assigning the gray values ​​of all second row pixels in the second cache matrix IM0 to the first row, and shifting and assigning the gray values ​​of all third row pixels in the second cache matrix IM0 to the second row; S2.2.2, the image sensor saves the grayscale values ​​of the third row of pixels in the obtained target celestial image into the first buffer matrix StarImage0, thus obtaining... ; S2.2.3, Output the grayscale values ​​of the third row of pixels saved in the first cache matrix StarImage0 in step S2.2.2 to the FPGA, and assign them to the 2nd to col+1th columns of the 3rd row of the second cache matrix IM0 in step S2.2.1, to obtain... ; S2.2.4, according to the operation method in step S2.1.4, capture the pixel grayscale values ​​of each operation block in the second cache matrix IM0 obtained in step S2.2.3, and assign them to the third cache matrix WindowImage one by one; S2.2.5, follow the steps S2.1.5 and S2.1.6 to obtain the grayscale values ​​of the next row of pixels in the processed target celestial image.

8. The driving design method for resisting stray light interference in a space photoelectric sensor as described in claim 7, characterized in that, Step S3 includes: S3.1, The grayscale of the target pixels in the processed target celestial body image is marked using the four-connected-domain labeling method; S3.2, obtain the centroid of the grayscale of the marked target pixel according to the grayscale weighted centroid method.

9. The driving design method for resisting stray light interference in a space photoelectric sensor as described in claim 8, characterized in that, The formula for calculating the centroid is: In the formula, The x-coordinate representing the centroid. The ordinate of the centroid; x i y i g i These represent the x-coordinate, y-coordinate, and grayscale value of the pixels of each target celestial body that makes up the image of the target celestial body.