A small target detection method based on fourier transform
By using a small target detection method based on Fourier transform and training with spectral data and a coding model, the problem of false detection of distant and weak targets in infrared images is solved, and high-accuracy detection is achieved in complex backgrounds.
Patent Information
- Application Number
- CN202310308840.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-03-28
AI Technical Summary
In infrared images, the detection of small targets at a distance is easily affected by noise, resulting in a high probability of false detection. Existing technologies are unable to effectively separate small targets from noise.
A small target detection method based on Fourier transform is adopted. By acquiring and processing temporally continuous grayscale images, spectral data is generated and an encoding model is trained. The Fourier transform is used to extract motion frequency characteristics for small target detection, and outliers are removed to increase robustness.
It improves the detection accuracy of small infrared targets in complex backgrounds, achieving a detection accuracy of 75% with an error within two pixels, and effectively eliminates background noise interference.
Smart Images

Figure CN116363424B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of infrared image processing, specifically relating to a small target detection method based on Fourier transform. Background Technology
[0002] Detecting small, weak targets at extremely long ranges is of high value in battlefield environments. With the increasing prevalence of stealth equipment, radar detection of targets has become more difficult. Currently, there is a significant demand for early target detection and tracking on the battlefield. The technology for detecting small infrared targets using visual sensors is still immature, and small targets are significantly affected by noise. Therefore, a detection algorithm capable of separating small targets from noise is needed.
[0003] In infrared images, distant, small targets occupy only a few pixels, lack significant shape and structural features in a single channel, and have weak intensity. In complex background environments, the detection of small targets is easily interfered with by image noise. Since both small targets and noise are high-brightness points, ordinary single-frame detection algorithms cannot distinguish between noise and small targets. The complex background in battlefield environments further increases the probability of false detections. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] The technical problem to be solved by this invention is how to provide a small target detection method based on Fourier transform to solve the problem of high false detection probability of distant and weak targets in infrared images.
[0006] (II) Technical Solution
[0007] To address the aforementioned technical problems, this invention proposes a small target detection method based on Fourier transform, which includes the following steps:
[0008] S1. Collect a dataset, which consists of grayscale images that are continuous over time;
[0009] S2. Randomly select a continuous image from different scenes, and perform Fourier transform on the continuous image according to the pixels to generate spectrum data.
[0010] S3. Generate labels for the corresponding pixels of multiple frames of images. The labels are one-hot encoded and their length is the number of image frames. If the corresponding pixel in the current frame appears, the target label is 1; otherwise, the target label is 0.
[0011] S4. Input the spectrum data and labels into the coding model for training until the model converges;
[0012] S5. Capture multiple frames of images using a camera, perform grayscale processing on the multiple frames of images, and stitch them together according to channels, where channels refer to the time sequence of the multiple frames of images.
[0013] S6. Load the encoding model, input the image for inference, and obtain the inference result of the image; the output information is one-hot encoding, the length is the number of images, 1 is when the target appears in the current pixel of the current frame, and 0 is when it does not appear.
[0014] S7. Based on the output results, cluster the pixels that contain 1 in each frame of the image according to the distance, remove outliers, and increase robustness.
[0015] S8. Output the clustered pixel coordinates and frame number in the order of the images;
[0016] S9. Based on the output coordinate information and frame number, read the corresponding image and process the corresponding coordinate points.
[0017] (III) Beneficial Effects
[0018] This invention proposes a small target detection method based on Fourier transform. This invention leverages the characteristic of using Fourier transform to extract motion frequencies for small target detection.
[0019] 1) The resolution of the time domain and frequency domain are inversely proportional. High-frequency signals, such as pulse signals, step signals, and periodic signals, gradually decrease. Small targets exhibit motion characteristics; in consecutive frames, the target appears in only a few frames, presenting a pulse signal pattern. For most of the background, the highlighted area is relatively large compared to the target, presenting a step signal pattern.
[0020] 2) The small target has autonomous motion characteristics relative to the background. Since the background is stationary, it presents a motion opposite to that of the camera. The small target has autonomous motion, and the motion it presents is different from that of the background.
[0021] Compared with single-frame detection algorithms, this invention can detect small infrared targets in complex backgrounds with an accuracy of 75% with an error within two pixels. Traditional single-frame detection algorithms cannot remove background noise and are greatly affected by noise interference, thus failing to meet the requirements. Attached Figure Description
[0022] Figure 1 This is a flowchart of the infrared small target detection process of the present invention;
[0023] Figure 2 This is a schematic diagram of the encoding model network (the encoding part in the transformer). Detailed Implementation
[0024] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0025] The purpose of this invention is to provide an algorithm for detecting weak infrared targets against complex backgrounds. This invention can effectively eliminate complex noise and detect weak infrared targets.
[0026] This invention is mainly divided into two parts: model training and inference, and its process is as follows:
[0027] S1. Collect the dataset, which consists of grayscale images that are continuous over time. Classify the images according to scene and sort them according to time.
[0028] S2. Randomly select a continuous segment of images from different scenes, and perform Fourier transform on the continuous images according to pixels to generate spectral data.
[0029] S3. Generate labels for the corresponding pixels of multiple frames of images (these labels are used for model training, i.e., which frames contain the small target at the current pixel position). The labels are one-hot encoded, and their length is the number of image frames. The pixel in the current frame is labeled 1 if the target is present and 0 if it is absent. Here, multiple frames of images are treated as a set of data (assuming the number of frames is n). The image dimensions are w and h. The n frames are first read using Opnecv, and then concatenated into an n*h*w matrix in chronological order. The matrix is then processed for each channel's n points in row-matrix order, where n represents the time order. The pixel in the row-matrix is labeled 1 if the small target is present and 0 if it is absent.
[0030] S4. Input the spectrum data and labels into the encoding model (the encoder part of the transformer) for training until the model converges. The training process involves inputting the spectrum data into the model, encoding it, and outputting a 1*n vector representing the probability of the small target appearing at each time step. The labels and output results are then substituted into the cross-entropy loss function for calculation, and the model is generated iteratively through gradient backpropagation.
[0031] S5. Capture multiple frames of images using a camera, perform grayscale processing on the multiple frames of images, and stitch them together according to channels, where channels refer to the time sequence of the multiple frames of images.
[0032] S6. Load the encoding model. Input images (multiple frames of images are preprocessed first; the images are first stitched together in chronological order, then Fourier transform is performed according to pixel coordinates to generate corresponding spectral data, and finally input into the encoding model) for inference to obtain the inference results of the images. The output information is one-hot encoding, the length of which is the number of images. A value of 1 indicates the target is present in the current frame, and 0 indicates it is not present (input n frames of images with dimensions h and w, output h*w corresponding one-hot encodings).
[0033] S7. Based on the output results, cluster the pixels that contain 1 in each frame of the image according to the distance, remove outliers, and increase robustness.
[0034] S8. Output the clustered pixel coordinates and frame number (the number of times a small target appears in a pixel) in the order of the images.
[0035] S9. Based on the output coordinate information and frame number, read the corresponding image and process the corresponding coordinate points.
[0036] This invention utilizes the characteristic of extracting motion frequencies using Fourier transform for small target detection:
[0037] 1) The resolution of the time domain and frequency domain are inversely proportional. High-frequency signals, such as pulse signals, step signals, and periodic signals, gradually decrease. Small targets exhibit motion characteristics; in consecutive frames, the target appears in only a few frames, presenting a pulse signal pattern. For most of the background, the highlighted area is relatively large compared to the target, presenting a step signal pattern.
[0038] 2) The small target has autonomous motion characteristics relative to the background. Since the background is stationary, it presents a motion opposite to that of the camera. The small target has autonomous motion, and the motion it presents is different from that of the background.
[0039] Compared with single-frame detection algorithms, this invention can detect small infrared targets in complex backgrounds with an accuracy of 75% with an error within two pixels. Traditional single-frame detection algorithms cannot remove background noise and are greatly affected by noise interference, thus failing to meet the requirements.
[0040] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method of small target detection based on Fourier transform, characterized in that, The method comprises the following steps: S1, collecting a data set, the data set being a time-continuous grayscale picture; S2, randomly extracting a continuous picture under different scenes, and performing Fourier transform on the continuous picture according to pixel points to generate frequency spectrum data; S3, generating a label for the pixel points corresponding to the multiple pictures, the label being a one-hot encoding, the length of the label being the number of picture frames, and the target label 1 appearing in the current frame corresponding to the pixel and the target label 0 not appearing; S4, inputting the frequency spectrum data and the label into an encoding model for training until the model converges; S5, collecting multiple pictures through a camera, performing grayscale processing on the multiple pictures, and splicing according to channels, where the channel is the time sequence of the multiple pictures; S6, loading the encoding model, inputting the picture for inference, and obtaining an inference result of the picture; The output information is one-hot encoding, the length is the number of pictures, the target appearing in the current frame corresponding to the pixel is 1, and the target not appearing is 0; S7, according to the output result, clustering the pixel points appearing 1 in each frame of picture according to the distance, eliminating abnormal points, and increasing the robustness; S8, outputting the pixel point coordinates and the number of frames after clustering according to the order of the pictures; S9, according to the output coordinate information and the number of frames, reading the corresponding picture to process the corresponding coordinate points. The step S3 specifically comprises: multiple pictures as a group of data, assuming that the number of frames is n, the length and width of the picture are w and h, n frames of pictures are read through opnecv first, then spliced into an n*h*w matrix according to the order, and each channel n points are processed according to the order of row first and column second, where n is the time sequence, the small target label 1 appears, and the label 0 does not appear. The step S1 further comprises: classifying the pictures according to the scene and sorting them according to the time sequence.
2. The Fourier transform-based small object detection method of claim 1, wherein, In the step S2, the small target has a motion characteristic, and the corresponding pixel of the continuous frame picture only appears the target in individual frames, showing a pulse signal mode.
3. The Fourier transform-based small object detection method of claim 1, wherein, The label in the step S3 is used for model training, that is, which frames of the current pixel position appear the small target.
4. The Fourier transform-based small object detection method of claim 1, wherein, In the step S4, the encoding model is the encode part in the transformer.
5. The Fourier transform-based small object detection method of claim 1, wherein, The training of the step S4 specifically comprises: in the training process, the frequency spectrum data is input into the model, the model outputs a 1*n vector after encoding, representing the probability of the small target appearing at each time, the label and the output result are brought into a cross-entropy loss function for calculation, and the model is generated through gradient reverse iteration.
6. The Fourier transform-based small object detection method of claim 5, wherein, In the step S6, the input picture for inference specifically comprises: multiple pictures are preprocessed first, the pictures are spliced according to the time sequence, then Fourier transform is performed according to the pixel coordinates to generate corresponding frequency spectrum data, and finally the encoding model is input for inference.
7. The Fourier transform-based small object detection method of claim 6, wherein, In the step S6, n frames of pictures with length and width h and w are input, and h*w corresponding one-hot encodings are output.
8. The Fourier transform-based small object detection method of claim 7, wherein, The method is used for detecting infrared small targets in a complex background.
9. The Fourier transform-based small object detection method of claim 1, wherein,
Citation Information
Patent Citations
Radar moving target multi-frame joint detection method based on graph space-time network
CN111123257A