Embedded airport target capture tracking method for airborne real-time infrared spectral measurements
By combining histograms with grayscale stretching and aperture region pixel replacement in an airborne infrared spectral system, the problems of long acquisition and tracking time and matching errors in airport target acquisition and tracking were solved, achieving real-time and accurate airport target acquisition and tracking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2024-05-27
- Publication Date
- 2026-08-04
AI Technical Summary
Traditional airport target acquisition and tracking methods suffer from time consumption and matching errors in airborne infrared spectroscopy systems, especially in the complex context of stationary targets on moving platforms, making it difficult to achieve real-time and accurate target acquisition and tracking.
By combining the histogram of the previous frame's airport grayscale image to determine the grayscale stretching range, grayscale stretching is performed on the current frame to reduce the target search area. During the tracking process, pixel values in the aperture area are replaced with pixel information from the surrounding area to avoid tracking drift.
It improves the accuracy and real-time performance of airport target acquisition and tracking, ensures the accuracy of airport target tracking spectral measurement, and reduces the impact of tracking drift.
Smart Images

Figure CN118628525B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing technology, and more specifically, relates to an embedded airport target acquisition and tracking method based on airborne real-time infrared spectral measurement. Background Technology
[0002] Airborne infrared spectroscopy systems are devices that integrate infrared image processing and spectral processing. Under airborne conditions, airport targets are essentially static targets on a moving platform. The characteristics of the moving platform and the complex airport ground background present many challenges for airport target acquisition and tracking.
[0003] Traditional target capture directly uses target templates to perform full-image matching search in the input image. However, due to the complex background of airport grounds and the fact that airport targets such as airport aircraft are relatively three-dimensional, small, or clustered, full-image matching can lead to time-consuming target capture and tracking, as well as matching errors. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the purpose of this application is to provide an embedded airport target acquisition and tracking method based on airborne real-time infrared spectroscopy measurement, aiming to solve the problems of long target acquisition and tracking time and matching errors in existing airport target acquisition and tracking methods.
[0005] To achieve the above objectives, in a first aspect, this application provides an embedded airport target acquisition and tracking method based on airborne real-time infrared spectroscopy measurement. The method is applied to a DSP deployed on an airborne platform and includes the following steps:
[0006] Step S101: Obtain the airport grayscale image of the current frame based on infrared detection, and perform grayscale stretching on the airport grayscale image of the current frame by combining the histogram of the airport grayscale image of the previous frame to obtain an airport grayscale image in a preset format.
[0007] Step S102: Determine the corresponding target search area from the airport grayscale image of the preset format based on the preset airport target search range;
[0008] Step S103: Capture the airport target from the target search area and obtain the target location of the airport target;
[0009] Step S104: Based on the target position of the airport target, airport target tracking is performed to continuously measure the spectrum of the airport target. During the airport target tracking process, the position of the pre-acquired aperture region is combined with the pixel information around the aperture region to replace the pixel value of the aperture region in the tracked airport target image, thereby removing the aperture region in the tracking image in real time and avoiding tracking drift.
[0010] In an optional example, step S101 specifically includes:
[0011] Obtain the minimum and maximum thresholds corresponding to the airport grayscale image of the previous frame, and perform grayscale stretching on the airport grayscale image of the current frame based on the minimum and maximum thresholds to obtain an airport grayscale image in a preset format.
[0012] The minimum threshold and the maximum threshold are respectively: the gray value where the number of pixels exceeds the preset gray value threshold for the first time by traversing from low gray value to high gray value in the histogram of the airport gray value image of the previous frame, and the gray value where the number of pixels exceeds the preset gray value threshold for the first time by traversing from high gray value to low gray value.
[0013] In an optional example, the DSP includes a first core and a second core; while performing step S101 on the second core, the first core determines the minimum threshold and maximum threshold corresponding to the airport grayscale image of the next frame based on the histogram of the airport grayscale image of the previous frame, so that the second core can perform grayscale stretching for the next frame.
[0014] In an optional example, step S104 specifically includes:
[0015] During airport target tracking, the location of the pre-acquired aperture region is combined with the location of multiple neighboring pixels of each aperture pixel in the pre-stored aperture region. First, the pixel values of multiple neighboring pixels corresponding to the aperture pixel on the outermost layer of the aperture region are obtained. The replacement pixel value corresponding to the aperture pixel on the outermost layer is calculated, and then the pixel value of the aperture pixel on the outermost layer of the airport target image is replaced. Then, the pixel value is replaced layer by layer from the outermost layer to the innermost layer of the aperture region until the pixel value of each aperture pixel in the aperture region is replaced.
[0016] In an optional example, if any aperture pixel is on a horizontal or vertical line passing through the center of the aperture region, the positions of the multiple neighboring pixels adjacent to the aperture pixel are obtained by sequentially searching for multiple neighboring pixels along the horizontal or vertical line. Otherwise, the positions of the multiple neighboring pixels adjacent to the aperture pixel are obtained by sequentially searching for multiple diagonally adjacent pixels along the horizontal or vertical line.
[0017] In an optional example, step S102 specifically includes:
[0018] Perspective transformation is performed on the pre-acquired positioning information at both ends of the airport parking line to obtain the pixel positions of the two ends of the airport parking line in the airport image, and the target search area in the airport image is determined by combining it with the preset airport target search range.
[0019] Secondly, this application provides an embedded airport target acquisition and tracking system for airborne real-time infrared spectral measurement, the system being applied to a DSP deployed on an airborne platform, the system comprising:
[0020] The airport image acquisition module is used to acquire the airport grayscale image of the current frame based on infrared detection, and to perform grayscale stretching on the airport grayscale image of the current frame by combining the histogram of the airport grayscale image of the previous frame to obtain an airport grayscale image in a preset format.
[0021] The search area determination module is used to determine the corresponding target search area from the airport grayscale image of the preset format based on the preset airport target search range.
[0022] An airport target acquisition module is used to acquire airport targets from the target search area and obtain the target location of the airport targets;
[0023] The airport target tracking module is used to track the airport target based on its target location, continuously measure the spectrum of the airport target, and, in the process of tracking the airport target, combine the position of the pre-acquired aperture region and replace the pixel value of the aperture region in the tracked airport target image according to the pixel information around the aperture region, thereby removing the aperture region in the tracked image in real time and avoiding tracking drift.
[0024] Thirdly, this application provides an electronic device, comprising: at least one memory for storing a program; and at least one processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the method described in the first aspect or any possible implementation thereof.
[0025] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to perform the method described in the first aspect or any possible implementation thereof.
[0026] Fifthly, this application provides a computer program product that, when run on a processor, causes the processor to perform the method described in the first aspect or any possible implementation thereof.
[0027] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0028] Overall, the technical solutions conceived in this application have the following beneficial effects compared with the prior art:
[0029] This application provides an embedded airport target acquisition and tracking method based on airborne real-time infrared spectroscopy measurement. By combining the histogram of the previous frame's airport grayscale image to determine the grayscale stretching range, grayscale stretching is applied to the current frame's airport grayscale image, ensuring real-time image stretching processing while enhancing the contrast and detail of the airport grayscale image, thereby improving the accuracy of airport target acquisition and tracking. Based on a preset airport target search range, the corresponding target search area is determined, effectively narrowing the matching search area. Template matching then enables precise matching, achieving real-time and accurate airport target acquisition and tracking. Furthermore, pixel values in the aperture region of the tracked airport target image are replaced according to pixel information surrounding the aperture region, removing the aperture region from the tracked image in real-time, avoiding tracking drift, and ensuring the accuracy of airport target tracking and spectral measurement. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating the airport target acquisition and tracking method provided in an embodiment of this application;
[0031] Figure 2 This is a block diagram of the architecture of the airborne infrared spectroscopy system provided in the embodiments of this application;
[0032] Figure 3 This is a flowchart illustrating the specific workflow of inter-core interrupts for IPC provided in this application embodiment;
[0033] Figure 4 This is a flowchart of the airport target tracking algorithm provided in an embodiment of this application;
[0034] Figure 5 These are comparison images of the image adaptive stretching algorithm processing results provided in the embodiments of this application;
[0035] Figure 6 These are comparison images of the results of aperture removal provided in the embodiments of this application;
[0036] Figure 7 This is a schematic diagram of the template feature point extraction process provided in the embodiments of this application;
[0037] Figure 8 This is a schematic diagram of the real-time image preprocessing process provided in the embodiments of this application;
[0038] Figure 9 This is a schematic diagram of the target search area provided in the embodiments of this application;
[0039] Figure 10 This is a flowchart illustrating the target tracking algorithm provided in an embodiment of this application;
[0040] Figure 11 This is a target capture and tracking result diagram provided in the embodiments of this application;
[0041] Figure 12 This is a flowchart of FFT2D calculation on a DSP provided in an embodiment of this application;
[0042] Figure 13 This is an architecture diagram of the airport target acquisition and tracking system provided in the embodiments of this application;
[0043] Figure 14 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0045] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of the objects. For example, "first core" and "second core," etc., are used to distinguish different cores, not to describe a specific order of the cores.
[0046] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0047] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple neighboring pixels means two or more neighboring pixels, etc.
[0048] Next, the technical solutions provided in the embodiments of this application will be described.
[0049] This application presents an airborne infrared spectroscopy system, an embedded image processing system based on a multi-core DSP and FPGA architecture. Its features include low power consumption, miniaturization, high computational power for image processing, and suitability for real-time target acquisition and tracking under airborne conditions. The FPGA used is an XC7K410T-2FFG900, leveraging its bandwidth, processing speed, real-time performance, and scalability to perform real-time acquisition, buffering, control, and transmission of infrared images. The DSP used is a TMS320C6657, a dual-core DSP based on the KeyStone architecture with fixed-point and floating-point computing capabilities. The C66x core integrates 90 new instructions for floating-point and vector-oriented mathematical operations. Furthermore, the C66x core is backward compatible with TI's previous C6000 fixed-point and floating-point DSP cores, ensuring software algorithm portability and shortening the software development cycle. Utilizing the powerful fixed-point and floating-point computing capabilities of the DSP, real-time acquisition and tracking of airport targets is achieved, while simultaneously acquiring the airport target's spectrum.
[0050] Infrared spectroscopy measurement and processing technology involves multiple aspects, including image acquisition, image transmission, and image processing. Among these, image processing is the core of the entire process. The main workflow is as follows: the FPGA transmits the acquired real-time image data to the external DDR of the DSP via RapidIO; the DSP then transfers the real-time image data from the DDR to the on-chip L2 cache via EDMA for image analysis and processing, enabling target acquisition and tracking.
[0051] In conventional target acquisition and tracking, the target may be located anywhere within the field of view during the tracking phase, meaning it is not always centered. However, an infrared spectroscopy system needs to transmit the target position for each frame to the servo mechanism during the acquisition and tracking phase, and provide corresponding feedback and control to the servo as needed, thereby pulling the target to the center of the image. Since the image and spectrum share a single optical path, it can acquire spectral information data from the central region of the image. Only when the target remains centered for an extended period can target spectral measurement be guaranteed. This necessitates that the infrared spectroscopy measurement system possess both real-time performance and accuracy.
[0052] To address this, this application provides an embedded airport target acquisition and tracking method based on airborne real-time infrared spectroscopy measurement. This method is applied to a DSP deployed on an airborne platform. Figure 1 This is a flowchart illustrating the airport target acquisition and tracking method provided in this application embodiment, as shown below. Figure 1 As shown, the method includes the following steps:
[0053] Step S101: Obtain the airport grayscale image of the current frame based on infrared detection, and perform grayscale stretching on the airport grayscale image of the current frame by combining the histogram of the airport grayscale image of the previous frame to obtain an airport grayscale image in a preset format.
[0054] Step S102: Determine the corresponding target search area from the airport grayscale image of the preset format based on the preset airport target search range;
[0055] Step S103: Capture the airport target from the target search area and obtain the target location of the airport target;
[0056] Step S104: Based on the target position of the airport target, airport target tracking is performed to continuously measure the spectrum of the airport target. During the airport target tracking process, the position of the pre-acquired aperture region is combined with the pixel information around the aperture region to replace the pixel value of the aperture region in the tracked airport target image, thereby removing the aperture region in the tracking image in real time and avoiding tracking drift.
[0057] Here, the airborne platform can specifically be an airborne infrared spectroscopy system. Infrared images, compared to visible light images, typically exhibit low contrast, blurriness, and low signal-to-noise ratio. These factors are highly detrimental to subsequent processing such as feature extraction, recognition, and tracking. Therefore, to improve the quality of infrared images, it is necessary to suppress noise, improve the signal-to-noise ratio, and adjust contrast, enhance edges and lines. For ground-based targets at normal temperatures, the infrared long-wave detector generates a 14-bit grayscale image. In subsequent image analysis, this 14-bit grayscale image needs to be converted to an 8-bit grayscale image for image processing algorithms. Therefore, this application embodiment provides an adaptive piecewise linear image stretching algorithm for real-time infrared image systems that has low computational cost, low resource consumption, and is simple to implement.
[0058] Considering the similarity between the airport grayscale image in the previous frame and the airport grayscale image in the current frame, in order to improve the real-time performance of the current frame image stretching, this embodiment of the application combines the histogram of the airport grayscale image in the previous frame to determine the grayscale stretching range, and then performs grayscale stretching on the airport grayscale image in the current frame to obtain an airport grayscale image of a preset format. This preset format airport grayscale image can be, for example, an 8-bit grayscale image. Furthermore, grayscale stretching can enhance the contrast and details of the airport grayscale image, thereby improving the accuracy of airport target acquisition and tracking.
[0059] Furthermore, considering that airport grayscale images typically have a large range, resulting in low target acquisition efficiency and complex backgrounds that lead to large target acquisition errors, this embodiment of the application can pre-determine the approximate location of the airport target based on information such as flight information or inertial navigation information, and set the airport target search range. Then, based on the airport target search range, the corresponding target search area is determined from the airport grayscale image of a preset format, and target acquisition is performed within the target search area. For example, if it is determined that the airport target is taxiing on a taxiway, the airport target search range can be the taxiway range; or, for example, if it is determined that the airport target is parked on the apron, the airport target search range can be the apron range.
[0060] Subsequently, airport targets can be captured from the target search area using template matching to obtain their locations. A sliding window method is used to slide the template across the target search area with fixed steps. Based on a correlation metric, the similarity between each window position and the template is calculated, and the position with the most similar match is the current airport target location. After obtaining the target location, the process transitions to an airport target tracking algorithm, which tracks the airport target for an extended period and measures its spectrum. This data can then be used for the construction and analysis of a subsequent spectral database. Furthermore, before matching, the image of the target search area can undergo preprocessing such as binary segmentation and filtering.
[0061] Because the image and spectrum share the same optical path in an airborne infrared spectral system, a circular aperture exists in the center of the infrared imaging region. This aperture is a circular area with an approximate radius of about 25 pixels. During airport target tracking, the servo mechanism pulls the target to the center of the field of view. The central aperture will cover the target, causing subsequent tracking to potentially track the aperture, resulting in tracking drift and affecting target spectral measurement. Therefore, this application provides a method to reduce the impact of the aperture on the tracking algorithm.
[0062] Considering that the aperture always remains in the center of the image and its position is relatively fixed, this embodiment of the application combines the position of the aperture region obtained in advance during the airport target tracking process, and replaces the pixel value of the aperture region in the tracked airport target image according to the pixel information around the aperture region, thereby realizing the real-time removal of the aperture region in the tracked image and avoiding tracking drift.
[0063] The method provided in this application determines the grayscale stretching range by combining the histogram of the airport grayscale image of the previous frame, and then stretches the airport grayscale image of the current frame, ensuring the real-time performance of image stretching processing. It also enhances the contrast and detail of the airport grayscale image, thereby improving the accuracy of airport target acquisition and tracking. Determining the corresponding target search area based on a preset airport target search range effectively narrows the matching search area, and template matching enables precise matching, achieving real-time and accurate airport target acquisition and tracking. Furthermore, by replacing the pixel values of the aperture region in the tracked airport target image with the pixel information surrounding the aperture region, the aperture region in the tracked image is removed in real time, avoiding tracking drift and ensuring the accuracy of airport target tracking spectral measurement.
[0064] Based on the above embodiments, step S101 specifically includes:
[0065] Obtain the minimum and maximum thresholds corresponding to the airport grayscale image of the previous frame, and perform grayscale stretching on the airport grayscale image of the current frame based on the minimum and maximum thresholds to obtain an airport grayscale image in a preset format.
[0066] The minimum threshold and the maximum threshold are respectively: the gray value where the number of pixels exceeds the preset gray value threshold for the first time by traversing from low gray value to high gray value in the histogram of the airport gray value image of the previous frame, and the gray value where the number of pixels exceeds the preset gray value threshold for the first time by traversing from high gray value to low gray value.
[0067] Furthermore, the specific formula for grayscale stretching can be:
[0068]
[0069] Here, min is the minimum threshold, max is the maximum threshold, x is the grayscale value before stretching, and y is the grayscale value after stretching.
[0070] This application embodiment determines the minimum and maximum thresholds for grayscale stretching by analyzing the distribution of pixel counts in the histogram of an airport grayscale image. Compared to traditional grayscale stretching methods, this improves the grayscale stretching effect and ensures the accuracy of subsequent target capture.
[0071] Based on any of the above embodiments, the DSP includes a first core and a second core; while executing step S101 on the second core, the first core determines the minimum threshold and maximum threshold corresponding to the airport grayscale image of the next frame based on the histogram of the airport grayscale image of the previous frame, so that the second core can perform grayscale stretching of the next frame.
[0072] Furthermore, to better leverage the parallelism advantages of the dual-core DSP, inter-core register configuration using IPCs is employed to facilitate communication between the two cores. Core 0 handles image preprocessing functions such as stretching threshold updates, data reception, and result output, while core 1 performs adaptive image stretching and subsequent detection and tracking algorithms. This ensures parallel computation between the two cores. For cases where only one core performs preprocessing and detection / tracking, the dual-core processing time is reduced by the time consumed by the adaptive image stretching algorithm, guaranteeing real-time processing and preventing frame rate degradation. Here, core 0 refers to the first core, and core 1 refers to the second core.
[0073] Based on any of the above embodiments, step S104 specifically includes:
[0074] During airport target tracking, the location of the pre-acquired aperture region is combined with the location of multiple neighboring pixels of each aperture pixel in the pre-stored aperture region. First, the pixel values of multiple neighboring pixels corresponding to the aperture pixel on the outermost layer of the aperture region are obtained. The replacement pixel value corresponding to the aperture pixel on the outermost layer is calculated, and then the pixel value of the aperture pixel on the outermost layer of the airport target image is replaced. Then, the pixel value is replaced layer by layer from the outermost layer to the innermost layer of the aperture region until the pixel value of each aperture pixel in the aperture region is replaced.
[0075] It should be noted that, in order to reduce the impact of the aperture on the tracking algorithm while ensuring the authenticity of the tracked airport target image, this embodiment of the application uses the similarity between neighboring pixels to replace pixel values. However, considering that the neighboring pixels of the pixels in the center region of the aperture are also within the aperture, a method of replacing pixel values layer by layer from the outermost layer to the innermost layer of the aperture region is adopted, and the neighboring pixels of each layer of aperture pixels are obtained outward.
[0076] It is understandable that the aperture always remains in the center of the image, the position of the aperture pixel is fixed, and the positions of its multiple neighboring pixels can be stored in advance in the form of a lookup table. Based on this, the positions of the multiple neighboring pixels corresponding to the aperture pixel can be obtained directly through the lookup table, without having to repeatedly look up the positions of multiple neighboring pixels, thus saving image processing time.
[0077] Based on any of the above embodiments, if any aperture pixel is on a horizontal or vertical line passing through the center of the aperture region, the positions of the multiple neighboring pixels adjacent to the aperture pixel are specifically obtained by sequentially searching for multiple neighboring pixels along the horizontal or vertical line to the aperture pixel; otherwise, the positions of the multiple neighboring pixels adjacent to the aperture pixel are specifically obtained by sequentially searching for multiple diagonally adjacent pixels to the aperture pixel.
[0078] Specifically, the positions of multiple neighboring pixels outward from the aperture pixel can be calculated using the following formula:
[0079]
[0080]
[0081] In the above formula, pix edge ( x ), pix edge ( y () represents the x and y coordinates of the aperture stop region; pix center ( x ), pix center ( x ) represents the x and y coordinates of the center of the aperture; k takes values of 1, 2, ..., n, where n is the total number of neighboring pixels to the outside.
[0082] Specifically, for pix edge ( y )-pix center ( y ) or pix edge ( x )-pix center ( x If the value is 0, meaning the aperture pixel is on the horizontal or vertical line passing through the center of the aperture region (i.e., the center of the aperture), then the above formula is not used. Instead, multiple adjacent pixels can be searched outwards sequentially along the horizontal or vertical line.
[0083] For example, if the number of neighboring pixels is 4, and a certain aperture pixel is located to the upper left of the center of the aperture, since the image pixels are distributed in a grid pattern, the diagonal neighboring pixel to the upper left of the aperture pixel is the first neighboring pixel, the diagonal neighboring pixel to the upper left of the first neighboring pixel is the second neighboring pixel, and so on, searching outwards in sequence, the 4 neighboring pixels corresponding to the aperture pixel can be obtained.
[0084] Furthermore, when calculating the replacement pixel value corresponding to the aperture pixel, the weight value of neighboring pixels closer to the aperture pixel can be set to be larger. And to ensure that the replacement pixel value does not exceed 255, the sum of all weight values can be 1. For example, in the example above, the weight values of the four neighboring pixels, from farthest to closest, can be respectively... and
[0085] Based on any of the above embodiments, step S102 specifically includes:
[0086] Perspective transformation is performed on the pre-acquired positioning information at both ends of the airport parking line to obtain the pixel positions of the two ends of the airport parking line in the airport image, and the target search area in the airport image is determined by combining it with the preset airport target search range.
[0087] Here, the location information may be, for example, GPS information, BeiDou information, etc., and this application embodiment does not specifically limit it.
[0088] Understandably, when airport targets are parked on the tarmac, they are usually parked on the airport parking lines. Perspective transformation can be performed on the pre-acquired positioning information at both ends of the airport parking lines to obtain the pixel positions of the two ends of the airport parking lines in the airport image. Then, based on the pixel positions of the two ends of the airport parking lines in the airport image, a more precise target search area can be determined to further improve the efficiency and accuracy of airport target acquisition.
[0089] Furthermore, considering the potential for data errors, to ensure the target search area covers the entire airport target, after determining the pixel positions of the two ends of the airport parking lines in the airport image, these two pixel positions can be offset vertically to serve as the two vertices of the target search area, i.e., the rectangular region. The number of pixels offset vertically can be specifically set according to the size and orientation of the airport target in practical applications.
[0090] Based on any of the above embodiments, this application provides an embedded real-time target acquisition and tracking processing algorithm for real-time infrared spectral measurement under airborne conditions. The technical problem solved by this application is the long image processing cycle when porting traditional image analysis algorithms (image preprocessing, target detection, target tracking, etc.) into a DSP. Due to the limited internal resources of the DSP6657 (32KB each for L1P and L1D, 1024KB for L2, and 1024KB for MSMC), compared to the DSP 6678 (32KB each for L1P and L1D, 512KB for L2, and 4096KB for MSMC), the 6657 has a smaller shared memory area, resulting in less overall on-chip memory for the 6657 compared to the 6678. This leads to insufficient memory usage in the algorithm, making algorithm porting more difficult and hindering real-time image processing, thus failing to meet the requirement of 50 frames per second.
[0091] Figure 2 This is a block diagram of the architecture of the airborne infrared spectroscopy system provided in the embodiments of this application, such as... Figure 2 As shown, the details are as follows:
[0092] I. Image Preprocessing Based on Inter-Core Interrupts (IPC) for Adaptive Image Enhancement of Infrared Images
[0093] Compared to visible light images, infrared images typically exhibit low contrast, blurriness, and low signal-to-noise ratio. These factors are highly detrimental to subsequent processing such as feature extraction, recognition, and tracking. Therefore, to improve the quality of infrared images, it is necessary to suppress noise, increase the signal-to-noise ratio, and adjust contrast to enhance edges and lines. For ground-based targets at normal temperatures, the infrared long-wave detector generates 14-bit grayscale images. In subsequent image analysis, these 14-bit grayscale images need to be converted to 8-bit grayscale images for image processing algorithms. To address this, the first point of this application provides an adaptive piecewise linear image stretching algorithm for real-time infrared image systems that is computationally efficient, resource-saving, and simple to implement. The specific implementation steps are as follows:
[0094] Step 1: The FPGA transmits the image data of the current frame to the DSP via RapidIO. The DSP obtains the image data at this moment through the doorbell interrupt flag and moves it to the L2 buffer via DMA, serving as the data source for the DSP to process the image data. This image data is then used to calculate the histogram of the 14-bit real-time image.
[0095] Step 2: Using the histogram of the 14-bit real-time image, determine the minimum threshold (min) and maximum threshold (max) for piecewise linear stretching. The histogram describes the number of pixels corresponding to each grayscale value in the image.
[0096] Taking a preset grayscale threshold of 50 as an example, the method for determining the minimum threshold (min) and the maximum threshold (max) is as follows:
[0097] (1) By traversing the histogram, find the gray value where the number of pixels exceeds 50 for the first time in the direction of low gray value to high gray value as the minimum threshold min.
[0098] (2) Traverse from high grayscale value to low grayscale value and find the grayscale value with the first number of pixels exceeding 50 as the maximum threshold max.
[0099] Step 3: Update the 8-bit grayscale image using the three-segment line function. Grayscale values less than min and greater than max are directly set to 0 or 255, while grayscale values between min and max are linearly mapped to the range between 0 and 255. The specific transformation formula is as follows:
[0100]
[0101] Step 4: Transmit the two thresholds of the current image to the FPGA via RapidIO. The FPGA uses the two thresholds to perform a three-segment stretching function to convert it into an 8-bit grayscale image, which is then sent to the main controller for display and storage.
[0102] Furthermore, in order to better leverage the parallelism advantages of the DSP 6657 dual-core, register configuration in the IPC cores is used so that core 0 performs the stretching threshold update, data reception, and result output functions in the image preprocessing function, while core 1 performs the detection and tracking algorithm process. This ensures parallel computation between the two cores. For the case where one core performs preprocessing and detection and tracking functions, the dual-core processing time is reduced by the time consumed by the image adaptive stretching algorithm. Figure 3 This is a flowchart illustrating the specific workflow of inter-core interrupts for IPC provided in this application embodiment. Figure 4 This is a flowchart of the airport target tracking algorithm provided in the embodiments of this application.
[0103] During IPC communication, the cache write-back function CACHE_wbL1d() and the cache invalidation function CACHE_invL1d() are used to maintain data consistency. Specifically, when data in the cache is updated, it is promptly written back to memory; conversely, when data in memory is to be used or modified, the data in the cache must first be invalidated.
[0104] The following is a sample code example for using the function:
[0105] int C6657CacheWriteBack(void*data_buf1,int write_len_in_bytes);
[0106] int C6657CacheInvalid(void*data_buf1,int invalid_len_in_bytes);
[0107] The image adaptive stretching algorithm processing results provided in this application are compared as follows: Figure 5 As shown.
[0108] II. Algorithm for Eliminating the Impact of Aperture on Target Tracking Based on Lookup Tables
[0109] Airborne infrared spectroscopy systems are devices that integrate infrared image processing and spectral processing. Since the image and spectrum share the same optical path, there is a circular aperture in the center of the infrared imaging. This aperture is a circular area with an approximate radius of about 25 pixels. The aperture will cause target tracking errors in subsequent image tracking algorithms.
[0110] The specific reasons for the target tracking error are as follows: When the target appears in the field of view, the target is detected, and then the target is tracked in the next frame. The servo mechanism is then controlled to pull the target to the center of the field of view. The intermediate aperture will cover the target, which may cause subsequent tracking to track the aperture, thus causing tracking drift.
[0111] To avoid target obscuring by the aperture region during spectral measurement, thus causing tracking drift, this application also proposes a lookup table-based method to reduce the impact of the aperture on the tracking algorithm. The specific method is as follows:
[0112] Step 1: Since the aperture remains at the center of the image, determine the aperture boundary region according to the four-neighbor rule, and solve for each pixel within the aperture region sequentially from the outside in. Calculate the coordinates (X, Y) of each pixel.
[0113] Step Two: Based on the coordinates (X, Y) of each pixel in the aperture region calculated in Step One, automatically extend four pixels outwards from the image center point to the aperture region and then diagonally outwards. Count the four neighboring pixels of each aperture pixel. The formula is as follows:
[0114]
[0115]
[0116] In the above formula, pix edge ( x ), pix edge ( y () represents the x and y coordinates of the aperture stop region; pix center ( x ), pix center ( x ) represents the x-coordinate and y-coordinate of the center of the aperture; k takes the values 1, 2, 3, and 4.
[0117] Step 3: Calculate the new pixel value of the aperture area based on the weights of the four neighboring pixels in a ratio of 1:1:2:4. Further, using the right shift instruction, shift the pixel value to the right by 3 bits, i.e., divide by 8, to obtain the final pixel value of that point.
[0118] In step one, it is necessary to traverse and count every pixel within the aperture region of the image. In step two, the image needs to be traversed again to count the four neighboring pixels outside the aperture region. In step three, the image region needs to be traversed again to replace the pixel at the current position with the values of the four neighboring pixels. These steps consume a significant amount of time in image processing. To address this problem, this application proposes an algorithm based on a lookup table to reduce the impact of the aperture region.
[0119] Create a lookup table based on the above steps, replace steps one and two with the lookup table, and traverse the lookup table to obtain the final new image.
[0120] The comparison diagram of the aperture removal results provided in the embodiments of this application is as follows: Figure 6 As shown.
[0121] Table 1 compares the time consumption of the lookup table-based and traversal-based aperture removal algorithms.
[0122]
[0123] III. Airborne Real-Time Infrared Spectral Target Acquisition Algorithm
[0124] Airport ground backgrounds are complex, and airport targets are often three-dimensional, small, or clustered, making it difficult to directly distinguish them from the complex background. This application addresses the acquisition and tracking of airport targets using a method that takes 5ms. Figure 7 This is a schematic diagram of the template feature point extraction process provided in the embodiments of this application. Figure 8 This is a schematic diagram of the real-time image preprocessing process provided in the embodiments of this application, such as... Figure 7 and Figure 8 As shown, the specific steps are as follows:
[0125] 1. Extraction of template feature points
[0126] (1) Based on different target captures, select the corresponding landmark template information, and combine the real-time servo data and inertial navigation data transmitted through the EMIF interface to perform perspective transformation to obtain the scattered information of the landmark template.
[0127] (2) The scattered information is supplemented and thickened by linear interpolation to obtain complete target contour information.
[0128] 2. Real-time image preprocessing
[0129] (1) The real-time infrared image data transmitted by the Rapid IO interface is moved to L2 memory resources by EDMA and the image gradient magnitude is calculated.
[0130] (2) Use OTSU to calculate the segmentation threshold of the current image, perform binary segmentation on the image, and obtain the binary image of the current image. Local edge regions with low contrast will be removed because of low gradient magnitude.
[0131] (3) The median filtering algorithm is used to filter the binary image to eliminate some background information of noise gradient, and the final real-time image is obtained after preprocessing the binary image, thereby reducing the false detection rate of matching.
[0132] (4) Perform perspective transformation on the GPS information at both ends of the airport parking line to obtain the pixel positions of the two endpoints of the parking line in the image at the current position of the equipment. Then, search and match the rectangular area formed by the vertices obtained by the vertical offset of the two pixel coordinates to determine the final matching result. Figure 9 This is a schematic diagram of the target search area provided in the embodiments of this application, such as... Figure 9As shown, MHX1 and MHX2 are the two endpoints of the civil aviation parking line. MHX1 can be shifted upward by 20 pixels and MHX2 can be shifted downward by 20 pixels to serve as the two vertices of the target search area, i.e., the rectangular area.
[0133] Region-based correlation matching utilizes information obtained after binarizing image grayscale values for similarity measurement. A sliding window method is used to slide the template across the target search region with a fixed step size, and the similarity between each window position and the template is calculated according to a correlation metric. The window size can be the size of the target's bounding box.
[0134] First, perspective transformation is performed based on the target template information combined with the real-time inertial navigation data and servo data of the current device to obtain the attitude of the airport target in real time, resulting in a binary template image. The sum of the products of corresponding pixel values in the template image and the preprocessed binary image of the real-time image is calculated. The larger the product sum, the higher the degree of matching between the template image and the image to be matched at that location. The location with the largest product sum is the optimal matching location.
[0135] Rx=∑(T(x',y')*I((x',y')))
[0136] Where T represents the binary image of the template, and I represents the real-time binary image to be searched.
[0137] Table 2. Memory details of key variables in the matching algorithm.
[0138]
[0139]
[0140] Table 3. Storage locations of other important variables
[0141]
[0142] IV. Airborne Real-Time Infrared Spectral Target Tracking Algorithm
[0143] Under airborne conditions, the target size varies. To prevent the target from being obscured by the aperture region during spectral measurement, thus avoiding tracking drift, the background area around the target can be added to the tracking template. This reduces the proportion of the tracking template contaminated by the aperture region, thereby preventing tracking drift. During the tracking phase, the target's tracking bounding box is extended to a size of 100*100, so that the occlusion ratio of the aperture region is only 3 / 16. Using this method, the final tracking time is 11ms. Figure 10 This is a flowchart illustrating the target tracking algorithm provided in an embodiment of this application, as shown below. Figure 10 As shown, the airborne platform will fluctuate up and down, and the target will have changes in scale and position. The DSP needs to train scale filters and position filters. Figure 11 This is a target capture and tracking result diagram provided in the embodiments of this application, such as... Figure 11 As shown, the aperture locking onto the target indicates that the target is being tracked.
[0144] Implementation and optimization of the DSP platform:
[0145] Optimization 1: Using FFT2D instead of DFT2D. FFT2D is a two-dimensional Fast Fourier Transform, which is more efficient than DFT2D. However, manually programming FFT2D operations is not only complex but also extremely time-consuming, failing to achieve real-time processing. FFT2D and IFFT2D operations are called multiple times in this application, representing a bottleneck in real-time performance. Manual programming would not meet real-time requirements. Therefore, we first optimize FFT2D. The DSP platform has excellent built-in support for mathematical transforms such as FFT, but only provides a one-dimensional FFT function API. Based on the properties of FFT2D, we can use a one-dimensional FFT to calculate a two-dimensional FFT result. The specific algorithm steps are as follows:
[0146] (1) For the input image to be calculated, srcImg, determine the corresponding radix and rotation factor twi according to the size of the input image. Use the DSPF_sp_fftSPXSP function to perform FFT transformation on each row of the input image to obtain the FFT result in the row direction, and write the calculation result in fftBuffer.
[0147] (2) Use the DSPF_sp_mat_trans_cplx function to transpose the result fftBuffer after the row transformation, and write the transposed result into the original input image srcImg.
[0148] (3) Use the DSPF_sp_fftSPXSP function to perform FFT transformation on each row of the transposed matrix srcImg to obtain the FFT result in the column direction, and write the calculation result into fftBuffer.
[0149] (4) Use the DSPF_sp_mat_trans_cplx function to transpose the result fftBuffer after column transformation, and write the transposed result into the original input image srcImg.
[0150] The result obtained after two transformations is the FFT2D result. For the FFT operation of each row or column, the DSPF_sp_fftSPxSP function in dsplib can be called for calculation. This is a library function provided by TI, which performs hardware-level optimizations for FFT operations, fully utilizing the DSP's computing power and significantly accelerating computation. Similarly, IFFT2D can be calculated in the same way. In this calculation process, the order of row and column transformations does not affect the final result. The FFT2D calculation flowchart on the DSP provided in this embodiment is as follows: Figure 12 As shown.
[0151] Optimization 2: Use inline functions. Inline functions can be directly mapped to C6000 assembly, and their execution efficiency is comparable to assembly, far exceeding that of ordinary hand-written code. DSP provides a rich set of auxiliary library functions, such as mathlib, dsplib, and imglib, which offer a large number of commonly used inline function APIs for implementing fixed-point and floating-point operations. Programs often contain numerous time-consuming operations such as matrix multiplication, division, and vector modulus calculations. In C6657, inline functions can be used for optimization. For example, the cossp function can be used to calculate the cosine of a floating-point number for calculating the Hamming window; sqrtsp, divsp, and expsp can be used to calculate Gaussian matrices; and DSPF_sp_maxidx and DSPF_sp_maxval can be used to quickly obtain the maximum value and index of a matrix. For instance, the calculation of the Gaussian function, which takes approximately 8000µs using a simple standard C function, can be reduced to 1800µs using inline functions, significantly improving efficiency.
[0152] Optimization 3: Data Memory Reuse and Data Storage Optimization. When running the tracking algorithm on a PC platform, memory allocation and reclamation are handled entirely by the operating system. However, the memory in the DSP needs to be allocated by the developer; otherwise, memory overflow and other problems can easily occur. In the DSST tracking algorithm, the calculation, detection, and training processes of FFT2D all require the use of auxiliary matrices. Without optimization, the DSP's memory is far from sufficient, and using off-chip storage will reduce computational efficiency. After compressing the auxiliary matrices, the on-chip resources of the C6657 are sufficient for the program's memory usage. In the implementation scheme of this application, the image to be tracked is stored in the DSP's MSM (Multicore Shared Memory), and the auxiliary data required by the tracking algorithm is allocated in the CPU core's shared memory.
[0153] Table 4. Memory Details of Key Variables in the Tracking Algorithm
[0154]
[0155] Optimization 4: Compiler optimization. The C6000 compiler provides several compilation options that directly affect or control program optimization. CCS offers powerful compiler optimization instructions to perform optimizations; by selecting appropriate compilation options, code execution efficiency can be improved.
[0156] The optimization levels, from lowest to highest, are -O0, -O1, -O2, and -O3. The optimization functions at each level are as follows:
[0157] (1) Register-level optimization - O0: Includes optimization features such as control flow simplification, register allocation for variables, loop rotation, removal of unused code, simplification of expressions and statements, and expansion of calls to inline functions.
[0158] (2) Local-level optimization -O1: Includes all -O0 optimizations, with the following additions: use local copy or constant, remove unused variable assignments, and eliminate local common expressions.
[0159] (3) Function-level optimization -O2: Includes all -O1 optimizations, with the addition of: software pipelining, loop optimization, elimination of global common subexpressions, elimination of global unused variable assignments, conversion of array references in loops into pointer increments, and loop unrolling.
[0160] (4) File-level optimization -O3: Includes all -O2 optimizations, and adds: removes all uncalled functions in all files, simplifies functions with never-used return values, and performs inline optimization and SIMD (Single Instruction Multiple Data) optimization on small functions.
[0161] This application uses the -O2 level to optimize the program. The -O2 level is a high optimization level. Without using the volatile keyword, when the core reads the status register multiple times, if it finds that the contents of the status register have not changed, the core will not read the value of the status register again, but will directly use the previously read value as the result of this read. If the status register is rewritten by other cores at this time, the currently accessing core will not be able to read the changed value in the status register, which will cause the inter-core communication to fail.
[0162] Optimization 5: Other program-level optimizations, such as using shift operations to replace integer multiplication and division; optimizing loops by using larger inner loops to improve code execution efficiency; and using keywords and global variables appropriately to reduce redundant code and improve execution efficiency.
[0163] Based on any of the above embodiments, this application provides an embedded airport target acquisition and tracking system for airborne real-time infrared spectroscopy measurement. The system is applied to a DSP deployed on an airborne platform. Figure 13 This is an architecture diagram of the airport target acquisition and tracking system provided in the embodiments of this application, such as... Figure 13 As shown, the system includes:
[0164] Airport image acquisition module 1310 is used to acquire the airport grayscale image of the current frame based on infrared detection, and to perform grayscale stretching on the airport grayscale image of the current frame by combining the histogram of the airport grayscale image of the previous frame to obtain an airport grayscale image in a preset format.
[0165] The search area determination module 1320 is used to determine the corresponding target search area from the airport grayscale image of the preset format based on the preset airport target search range.
[0166] The airport target acquisition module 1330 is used to acquire airport targets from the target search area and obtain the target location of the airport targets.
[0167] The airport target tracking module 1340 is used to track the airport target based on its target location, continuously measure the spectrum of the airport target, and, in the process of tracking the airport target, combine the position of the pre-acquired aperture region and replace the pixel value of the aperture region in the tracked airport target image according to the pixel information around the aperture region, thereby removing the aperture region in the tracked image in real time and avoiding tracking drift.
[0168] It is understood that the detailed functional implementation of each of the above modules can be found in the description of the aforementioned method embodiments, and will not be repeated here.
[0169] It should be understood that the above-described device is used to execute the methods in the above embodiments. The implementation principle and technical effect of the corresponding program modules in the device are similar to those described in the above methods. The working process of the device can be referred to the corresponding process in the above methods, and will not be repeated here.
[0170] Based on the methods described in the above embodiments, this application provides an electronic device. Figure 14 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 14 As shown, the electronic device may include a processor 1410, a communications interface 1420, a memory 1430, and a communication bus 1440, wherein the processor 1410, the communications interface 1420, and the memory 1430 communicate with each other via the communication bus 1440. The processor 1410 can call logical instructions in the memory 1430 to execute the methods in the above embodiments.
[0171] Furthermore, the logical instructions in the aforementioned memory 1430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0172] Based on the methods in the above embodiments, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to execute the methods in the above embodiments.
[0173] Based on the methods in the above embodiments, this application provides a computer program product that, when run on a processor, causes the processor to execute the methods in the above embodiments.
[0174] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0175] The method steps in this application embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.
[0176] It is understood that the various numerical designations used in the embodiments of this application are merely for the convenience of description and are not intended to limit the scope of the embodiments of this application.
[0177] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An embedded airfield target acquisition tracking method for airborne real-time infrared spectral measurements, characterized in that, The method is applied to a DSP deployed on an airborne platform, and the method includes the following steps: Step S101: Obtain the airport grayscale image of the current frame based on infrared detection, and perform grayscale stretching on the airport grayscale image of the current frame by combining the histogram of the airport grayscale image of the previous frame to obtain an airport grayscale image in a preset format. Specifically, step S101 includes: Obtain the minimum and maximum thresholds corresponding to the airport grayscale image of the previous frame, and perform grayscale stretching on the airport grayscale image of the current frame based on the minimum and maximum thresholds to obtain an airport grayscale image in a preset format. The minimum threshold and the maximum threshold are respectively: the gray value where the number of pixels first exceeds the preset gray value threshold by traversing from low gray value to high gray value in the histogram of the airport gray value image of the previous frame, and the gray value where the number of pixels first exceeds the preset gray value threshold by traversing from high gray value to low gray value. Step S102: Determine the corresponding target search area from the airport grayscale image of the preset format based on the preset airport target search range; Step S103: Capture the airport target from the target search area and obtain the target location of the airport target; Step S104: Based on the target position of the airport target, airport target tracking is performed to continuously measure the spectrum of the airport target. During the airport target tracking process, the position of the pre-acquired aperture region is combined with the pixel information around the aperture region to replace the pixel value of the aperture region in the tracked airport target image, thereby removing the aperture region in the tracking image in real time and avoiding tracking drift. Specifically, step S104 includes: During airport target tracking, the location of the pre-acquired aperture region is combined with the location of multiple neighboring pixels of each aperture pixel in the pre-stored aperture region. First, the pixel values of multiple neighboring pixels corresponding to the aperture pixel on the outermost layer of the aperture region are obtained. The replacement pixel value corresponding to the aperture pixel on the outermost layer is calculated, and then the pixel value of the aperture pixel on the outermost layer of the airport target image is replaced. Then, the pixel value is replaced layer by layer from the outermost layer to the innermost layer of the aperture region until the pixel value of each aperture pixel in the aperture region is replaced.
2. The method according to claim 1, characterized in that, The DSP includes a first core and a second core; while executing step S101 on the second core, the first core determines the minimum threshold and maximum threshold corresponding to the airport grayscale image of the next frame based on the histogram of the airport grayscale image of the previous frame, so that the second core can perform grayscale stretching of the next frame.
3. The method according to claim 1, characterized in that, If any aperture pixel is on a horizontal or vertical line passing through the center of the aperture region, the positions of the multiple neighboring pixels adjacent to the aperture pixel are obtained by sequentially searching for multiple neighboring pixels along the horizontal or vertical line. Otherwise, the positions of the multiple neighboring pixels adjacent to the aperture pixel are obtained by sequentially searching for multiple diagonally adjacent pixels along the diagonal line.
4. The method according to claim 1, characterized in that, Step S102 specifically includes: Perspective transformation is performed on the pre-acquired positioning information at both ends of the airport parking line to obtain the pixel positions of the two ends of the airport parking line in the airport image, and the target search area in the airport image is determined by combining it with the preset airport target search range.
5. An embedded airport target acquisition and tracking system for airborne real-time infrared spectroscopy measurement, characterized in that, The system is applied to a DSP deployed on an airborne platform, and the system includes: The airport image acquisition module is used to acquire the airport grayscale image of the current frame based on infrared detection, and to perform grayscale stretching on the airport grayscale image of the current frame by combining the histogram of the airport grayscale image of the previous frame to obtain an airport grayscale image in a preset format. The process of obtaining the airport grayscale image in the preset format includes: Obtain the minimum and maximum thresholds corresponding to the airport grayscale image of the previous frame, and perform grayscale stretching on the airport grayscale image of the current frame based on the minimum and maximum thresholds to obtain an airport grayscale image in a preset format. The minimum threshold and the maximum threshold are respectively: the gray value where the number of pixels first exceeds the preset gray value threshold by traversing from low gray value to high gray value in the histogram of the airport gray value image of the previous frame, and the gray value where the number of pixels first exceeds the preset gray value threshold by traversing from high gray value to low gray value. The search area determination module is used to determine the corresponding target search area from the airport grayscale image of the preset format based on the preset airport target search range; The airport target acquisition module is used to acquire airport targets from the target search area and obtain the target location of the airport targets; The airport target tracking module is used to track the airport target based on its target location, continuously measure the spectrum of the airport target, and combine the pre-acquired position of the aperture region during the airport target tracking process. Based on the pixel information around the aperture region, the pixel values of the aperture region in the tracked airport target image are replaced, and the aperture region in the tracked image is removed in real time to avoid tracking drift. The step of replacing the pixel values of the aperture region in the tracked airport target image with the pixel values of the aperture region in combination with the pre-acquired location of the aperture region during airport target tracking, based on the pixel information surrounding the aperture region, includes: During airport target tracking, the location of the pre-acquired aperture region is combined with the location of multiple neighboring pixels of each aperture pixel in the pre-stored aperture region. First, the pixel values of multiple neighboring pixels corresponding to the aperture pixel on the outermost layer of the aperture region are obtained. The replacement pixel value corresponding to the aperture pixel on the outermost layer is calculated, and then the pixel value of the aperture pixel on the outermost layer of the airport target image is replaced. Then, the pixel value is replaced layer by layer from the outermost layer to the innermost layer of the aperture region until the pixel value of each aperture pixel in the aperture region is replaced.
6. An electronic device, characterized in that, include: At least one memory for storing computer programs; At least one processor is configured to execute a program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to perform the method as described in any one of claims 1-4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is run on the processor, it causes the processor to perform the method as described in any one of claims 1-4.
8. A computer program product, characterized in that, When the computer program product is run on a processor, the processor causes the processor to perform the method as described in any one of claims 1-4.