Method for detecting weak and small moving target under complex background based on phase trajectory pre-judgment
By using a motion object detection method based on phase trajectory prediction in complex backgrounds, the problem of confusion between weak motion objects and noise is solved, and high-accurate object detection is achieved.
Patent Information
- Application Number
- CN202411711566.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In complex backgrounds, weak motion target detection is difficult to effectively distinguish between target and noise, especially when the target and background are small.
The motion object detection method based on phase trajectory prediction is adopted. By acquiring real-time image data, adding frames and windows, the foreground data is detected using sparse foreground component matrix and phase trajectory prediction algorithm, and the weak motion object detection results and motion trajectory are output.
Effectively filter noise and interference, improve detection accuracy, and reduce the impact of complex backgrounds on detection, especially suitable for detection of weak moving targets.
Smart Images

Figure CN119648996A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of target detection technology, and in particular to a method, device, equipment and medium for detecting weak moving targets in a complex background based on phase trajectory prediction. Background Art
[0002] Motion target detection is one of the core research contents in the security field, and the complex and changing background will cause serious interference to the detection work. In particular, when the target itself is relatively weak and the target's own shape, movement speed and other aspects are not much different from the changing background, the interference of background noise will become particularly serious.
[0003] Hauberg et al. proposed a scalable robust principal component analysis method based on Gaussian mean (GrassmannAverages for RPCA, GA). The original method performed well in solving data outliers and scalability, and had high operating efficiency. It was applied to the detection of moving targets based on robust principal component analysis technology. Since this method can effectively detect data outliers, it is more effective in removing ordinary noise in target detection tasks. However, when the background noise is more complex, the operating results of this method will become less ideal. In the same document, the team also proposed another more efficient robust principal component analysis solution method, namely, a scalable robust principal component analysis method based on Gaussian median (GrassmannMedian for RPCA, GM). In general, this method has higher operating efficiency and worse operating results than the Gaussian mean (GA) method. Comparison experiments have shown that this method is also prone to the problem of confusion between targets and noise in moving target detection tasks. Summary of the invention
[0004] The main purpose of this application is to provide a method, device, equipment and medium for detecting weak moving targets in a complex background based on phase trajectory prediction, aiming to solve the problem of moving target detection when the background is complex and changing, the target is relatively weak, or the target and the background are easily confused.
[0005] To achieve the above-mentioned purpose, the present application provides a method for detecting weak and small moving targets in a complex background based on phase trajectory prediction, including: obtaining real-time image data to be processed, and determining a total matrix to be processed based on the real-time image data; performing frame division and windowing processing on the total matrix to be processed to obtain each matrix to be processed, and using a preset matrix segmentation algorithm to segment each matrix to be processed to obtain each sparse foreground component matrix, and obtaining each frame in the sparse foreground component matrix; using a preset motion target detection algorithm based on phase trajectory prediction to detect the foreground data of each frame, and obtaining a weak and small moving target detection result and a motion trajectory based on the foreground data of each frame; outputting the weak and small moving target detection result and the motion trajectory.
[0006] Optionally, the use of a preset motion target detection algorithm based on phase trajectory prediction to detect the foreground data of each of the frames includes: searching each of the sparse foreground component matrices based on a preset extremely sparse criterion to obtain the center points of the current frame and two adjacent frames in each of the frames; filtering out part of the center points in the current frame and two adjacent frames according to preset conditions to obtain the remaining multiple center points as target points, and performing neighborhood clustering on each of the target points to obtain a predefined phase, phase size, phase and phase weight, and determining the current frame based on the phase, the phase size and the phase weight. A plurality of groups of one-to-one corresponding phase center points in a frame and two adjacent frames, wherein each phase center point is the center point, and the phase center point corresponds to the phase one-to-one; processing each group of phase center points based on a preset first formula to obtain each group of phase differences, and processing each group of phase differences based on a preset second formula to obtain each phase angle; retaining the phases corresponding to each phase difference angle less than a first preset threshold in the current frame, and filtering out each phase corresponding to each phase difference angle greater than a second preset threshold, to obtain foreground data in the current frame.
[0007] Optionally, filtering out some center points in the current frame and two adjacent frames according to preset conditions includes: determining whether the current frame is the first frame in each of the sparse foreground component matrices; if the current frame is the first frame, retaining each of the center points of the current frame; if the current frame is not the first frame, performing a neighborhood search on each of the center points, and determining during the neighborhood search whether the current center point belongs to the neighborhood search range of the previous center point; if the current center point belongs to the neighborhood search range of the previous center point, retaining the current center point; if the current center point does not belong to the neighborhood search range of the previous center point, filtering out the current center point.
[0008] Optionally, taking the center point as the phase center point, performing neighborhood clustering on each of the target points to obtain predefined phase, phase size, phase and phase weight, including: performing neighborhood clustering on each of the target points, taking the clustering result as the phase, taking the points included in the clustering result as the phase size, taking the phase center point coordinates as the phase, and taking the average value of the points included in the clustering result as the phase weight.
[0009] Optionally, determining multiple groups of one-to-one corresponding phase center points in the current frame and two adjacent frames based on the phase, the phase size and the phase weight includes: judging whether the absolute value of the phase difference of each corresponding phase center point in two adjacent frames is less than a preset value; if the absolute value is less than a first preset value, determining that the two phase center points in the two adjacent frames match; if the absolute value is greater than or equal to the first preset value and less than or equal to a second preset value, performing neighborhood clustering on all phase center points in the subsequent frame with the phase of the phase center point in the previous frame of the two adjacent frames as the center, obtaining the phase size and phase weight of all phase center points in the subsequent frame, and searching the subsequent frame for the phase center point that is closest in phase size and phase weight to the phase center point of the previous frame, obtaining a phase center point that matches the phase center point of the previous frame; if the absolute value is greater than the second preset value, determining that there is no matching object between the phase center point in the previous frame and the phase center point in the subsequent frame.
[0010] Optionally, each group of phase center points is processed based on a preset first formula to obtain each group of phase differences, and each group of phase differences is processed based on a preset second formula to obtain each phase angle, including: each first phase difference and each second phase difference are obtained based on the corresponding matching phase center points in the current frame and two adjacent frames, and each phase angle of the current frame is obtained based on each first phase difference and each second phase difference.
[0011] Optionally, the first phase difference and the second phase difference are obtained based on the phase center points that match each other in the current frame and two adjacent frames, and the phase angles of the current frame are obtained based on the first phase difference and the second phase difference, including: calculating the vector difference between the phase center points that match each other in the current frame and the previous frame, and obtaining the first phase differences; calculating the vector difference between the phase center points that match each other in the current frame and the next frame, and obtaining the second phase differences, wherein the second phase differences correspond to the first phase differences one by one; and obtaining the phase angles based on the one-to-one correspondence between the first phase differences and the second phase differences.
[0012] To achieve the above-mentioned purpose, the present application also provides a device for detecting weak and small moving targets in a complex background based on phase trajectory prediction, including: an acquisition module, used to acquire real-time image data to be processed, and determine the total matrix to be processed based on the real-time image data; a matrix segmentation module, used to perform frame and window processing on the total matrix to be processed to obtain each matrix to be processed, and use a preset matrix segmentation algorithm to segment each matrix to be processed to obtain each sparse foreground component matrix, and obtain each frame in the sparse foreground component matrix; a processing module, used to detect the foreground data of each frame using a preset motion target detection algorithm based on phase trajectory prediction, and obtain a weak and small moving target detection result and motion trajectory based on the foreground data of each frame; an output module, used to output the weak and small moving target detection result and motion trajectory.
[0013] To achieve the above objectives, the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the method for detecting weak moving targets in a complex background based on phase trajectory prediction provided by any of the aforementioned embodiments.
[0014] To achieve the above-mentioned purpose, the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for detecting weak and small moving targets in a complex background based on phase trajectory prediction provided by any of the aforementioned embodiments.
[0015] The embodiment of the present application proposes a method, device, equipment and medium for detecting weak moving targets in a complex background based on phase trajectory prediction, which obtains real-time image data to be processed and determines the total matrix to be processed based on the real-time image data; performs frame-by-frame windowing processing on the total matrix to be processed to obtain each matrix to be processed, and uses a preset matrix segmentation algorithm to segment each matrix to be processed to obtain each sparse foreground component matrix, and obtains each frame in the sparse foreground component matrix; uses a preset motion target detection algorithm based on phase trajectory prediction to detect the foreground data of each frame, and obtains weak moving target detection results and motion trajectories based on the foreground data of each frame; outputs the weak moving target detection results and motion trajectories, which can effectively filter out noise and interference in a complex and changeable background. The present invention effectively utilizes the effective information contained in the sparse matrix, no longer performs background modeling, and greatly simplifies the efficiency of target detection. Moreover, the present invention uses the motion target detection algorithm based on phase trajectory prediction to detect the target, which can effectively improve the detection accuracy and reduce the influence of noise and interference on detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flow chart of a method for detecting weak moving targets in a complex background based on phase trajectory prediction in this application;
[0017] Figure 2 This is a schematic diagram of a method for detecting weak moving targets in a complex background based on phase trajectory prediction in this application;
[0018] Figure 3 Schematic diagram of the phase, phase center point, phase, phase difference, and phase difference angle of the method for detecting weak moving targets in a complex background based on phase trajectory prediction in this application;
[0019] Figure 4 is a diagram showing the actual detection results of the method for detecting weak moving targets in a complex background based on phase trajectory prediction of the present application, wherein: Figure 4(a) is an unframed original video; Figure 4(b) is a diagram showing the detection results of the robust principal component analysis moving target detection method based on Gaussian mean (GA); Figure 4(c) is a diagram showing the detection results of the robust principal component analysis moving target detection method based on Gaussian median (GM); and Figure 4(d) is a diagram showing the detection results of the present invention.
[0020] Figure 5 This is a structural block diagram of a device for detecting weak moving targets in a complex background based on phase trajectory prediction in this application. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0022] In order to effectively solve the problem of moving target detection when the background is complex and changing, the target is relatively weak or the target and the background are easily confused, a method for detecting weak moving targets under complex backgrounds based on phase trajectory prediction is invented. Figure 1 , the detection methods of weak moving targets in complex backgrounds based on phase trajectory prediction include:
[0023] Step S10, obtaining real-time image data to be processed, and determining a total matrix to be processed based on the real-time image data;
[0024] It should be noted that the present application can use a server to obtain input image or video frame sequence data, extract the grayscale value of each pixel of the image or video frame sequence, and construct a spatiotemporal grayscale information matrix as a total matrix to be processed (Xt) based on the spatial position and timing of each pixel, wherein the total matrix to be processed can be updated in real time, that is, if there is new input data, it is filled in the back of the original total matrix to be processed according to the timing, and the processed part of the total matrix to be processed can be released as needed.
[0025] In a specific embodiment, a video of a long-range tiltrotor aircraft shot by a person holding a camera device is input into the server as input data, the grayscale value of each pixel in the video is extracted frame by frame, and a spatiotemporal grayscale information matrix is constructed according to its spatial position and time sequence as the total matrix to be processed (Xt).
[0026] Step S20, performing frame division and windowing processing on the total matrix to be processed to obtain each matrix to be processed, and using a preset matrix segmentation algorithm to segment each matrix to be processed to obtain each sparse foreground component matrix, and obtaining each frame in the sparse foreground component matrix;
[0027] refer to Figure 2 Specifically, the matrix cross section of the total matrix to be processed (Xt) at each moment is called a frame, and each matrix value in each frame is called a point. The sliding window detection method of the present application divides the total matrix to be processed (Xt) into frames and windows according to a fixed time window length to obtain the matrix to be processed (X). In other words, the current data (i.e., the data in the current time window) processed by the delivery detection method is the matrix to be processed (X).
[0028] In a specific embodiment, when the server executes the sliding window detection method, 25 frames are used as a fixed time window length for frame windowing, and the total matrix to be processed (Xt) is frame windowed to obtain the matrix to be processed (X).
[0029] It should be pointed out that the present invention can be used for real-time detection, but in real-time detection, it is divided into two stages: target detection and noise filtering, wherein the detection of the target occurs in the first frame of each time window, and the filtering of the noise occurs in the other frames of each time window. Therefore, in real-time detection, it is necessary to divide the frames into windows with a fixed time window and the time window should not be too long to ensure the effective detection of new targets.
[0030] After obtaining the matrix to be processed, the server performs matrix sparse decomposition on the matrix to be processed (X) using the inexact Lagrange multiplier method to obtain a low-rank background component matrix (Lb) and a sparse foreground component matrix (Sf). The matrix cross section of the low-rank background component matrix (Lb) and the sparse foreground component matrix (Sf) at each moment can be called a frame according to the time sequence, and each matrix value in each frame is called a point.
[0031] Among them, the method of using the inexact Lagrange multiplier method to perform matrix sparse decomposition on the processing matrix is as follows:
[0032] Among them, X = Lb + Sf, the decomposition method is as follows:
[0033]
[0034] In the formula, ||·|| *is the kernel function, ||·||1 is the l1 norm, and λ=0.06.
[0035] refer to Figure 2 , step S30, using a preset moving target detection algorithm based on phase trajectory prediction to detect foreground data of each frame, and obtaining a weak moving target detection result and a moving trajectory based on the foreground data of each frame;
[0036] In an embodiment of the present application, step S30 may include the following execution process:
[0037] S301, searching each sparse foreground component matrix based on a preset extremely sparse criterion to obtain the center point of the current frame and two adjacent frames in each frame;
[0038] Among them, the extremely sparse criterion is to select a number of maximum points in the current frame of the sparse foreground component matrix (Sf), or first divide each frame of data into blocks, and then select the regional maximum point in each block. This application uses the method of selecting a number of maximum points in the current frame and two adjacent frames of the sparse foreground component matrix (Sf) as the center point.
[0039] S302, filtering out some center points in the current frame and two adjacent frames according to preset conditions, obtaining the remaining multiple center points as target points, and performing neighborhood clustering on each target point to obtain predefined phase, phase size, phase and phase weight, and determining multiple groups of one-to-one corresponding phase center points in the current frame and two adjacent frames based on the phase, phase size and phase weight, wherein each phase center point is a center point, and the phase center point corresponds to the phase one-to-one;
[0040] In an embodiment of the present application, filtering out some center points in the current frame and two adjacent frames according to a preset condition may include the following execution process:
[0041] Determine whether the current frame is the first frame in each sparse foreground component matrix;
[0042] If the current frame is the first frame, the center points of the frame are retained;
[0043] If the current frame is not the first frame, a neighborhood search is performed on each center point of the current frame, and during the neighborhood search, it is determined whether the current center point belongs to the neighborhood search range of the previous center point;
[0044] If the current center point belongs to the neighborhood search range of the previous center point, the current center point is retained;
[0045] If the current center point does not belong to the neighborhood search range of the previous center point, the current center point is filtered out.
[0046] Specifically, the above steps are used to determine the center point of each frame. The server detects whether the current frame is the first frame of each time window. If so, all the center points are retained; if it is a frame other than the first frame, a neighborhood search is performed on each center point of the other frames. If the current center point is within the neighborhood search range of the previous center point, the center point is retained; if the current center point is not within the neighborhood search range of the previous center point, the center point is filtered out.
[0047] It should be noted that neighborhood search refers to searching within a certain neighborhood area. The neighborhood area can be manually defined or generated by a server. The neighborhood area is a fixed range. The selection of the range can be determined by the phase size and the phase difference. For example, the range of the neighborhood area can be set to [4*4], [8*8], [16*16], etc. The neighborhood area can also be a superpixel area. In this application, the neighborhood area is set to [25*25].
[0048] In another embodiment, when the background is relatively pure or no filtering is required, this step can be omitted; when the background is relatively complex, this step can be performed multiple times in one cycle using different neighborhood sizes.
[0049] In an embodiment of the present application, step S302 may also include the following execution process:
[0050] S3021. Perform neighborhood clustering on each target point, use the clustering result as the phase, the points included in the clustering result as the phase size, the coordinates of the phase center point as the phase, and the average value of the values of the points included in the clustering result as the phase weight.
[0051] Specifically, after obtaining the center point of each frame, for the center point that meets the retention requirements, the value, coordinates and other information of the point are recorded, and neighborhood clustering is performed with this point as the target. The clustering result is called a phase, the number of points contained in the phase is called the phase size, the coordinates of the phase center point are called the phase, and the average value of the values of the points contained in the phase is calculated as the phase weight.
[0052] refer to Figure 3 , in the figure: 1-S 1,1 ,S 1,2 ,S 1,3 They are the phase center points of the same phase (S1) in the first, second, and third frames, and their coordinates are S 1,1 (x,y),S 1,2 (x,y),S 1,3 (x,y) is called the phase;
[0053] 2-P 1,1-2 is the phase difference between the first and second frames of the same phase (S1), P 1,2-3 is the phase difference between the second and third frames of the same phase (S1), and the phase difference is a vector;
[0054] 3-φ 1,1-3 The angle between the phase difference of the same phase (S1) in the first and second frames and the phase difference in the second and third frames is called the phase angle or phase difference angle of the S1 phase in the first to third frames.
[0055] For example, the i-th corresponding phase center point in the j-th frame is denoted as S i,j , its coordinate value, i.e. phase, is S i,j (x,y), value is S i,j (x,y)[z], where the phase is S i or S i (j) (When the previous and next frames are not distinguished, it is recorded as S i , called the same phase, specifically the i-th phase of the j-th frame is denoted as S i (j)), the phase point is denoted as S i (m,n), (m,n) is the coordinate value of a point in the phase, and the value of the point in the phase is recorded as S i (m,n)[z], the phase size, i.e. the number of phase points, is M i (j) = numS i (m,n), the phase weight, that is, the average value of the phase points, is recorded as:
[0056]
[0057] In an embodiment of the present application, step S302 may also include the following execution process:
[0058] S3022, determining whether the absolute value of the phase difference between the corresponding phase center points in two adjacent frames is less than a preset value;
[0059] S3023, if the absolute value is less than the first preset value, determining that two phase center points in two adjacent frames match;
[0060] S3024. If the absolute value is greater than or equal to the first preset value and less than or equal to the second preset value, taking the phase of the phase center point in the previous frame of two adjacent frames as the center, perform neighborhood clustering on all phase center points in the next frame to obtain the phase size and phase weight of all phase center points in the next frame, and search in the next frame for the phase center point that is closest in phase size and phase weight to the phase center point in the previous frame to obtain the phase center point that matches the phase center point in the previous frame;
[0061] S3025: If the absolute value is greater than the second preset value, it is determined that there is no matching object between the phase center point in the previous frame and the phase center point in the next frame.
[0062] The server can determine the phases and phase centers corresponding to adjacent frames (previous and next frames) by executing steps S3022 to S3025. Specifically, when the phase distances of the phase centers corresponding to the previous and next frames are close (the absolute values of the two phase differences are less than the first preset value) and the phase distances of different phase centers are far away (the absolute values of the two phase differences are greater than the third preset value), the matching relationship of the phase centers of the previous and next frames can be found only by using the phase information, and the phase center point with a farther distance can be determined as a non-matching point, and the phases where the phase centers corresponding to the previous and next frames are located are said to be the same phase, that is, the two phase centers match. When the phase distances between corresponding phase center points and different phase center points in the current and subsequent frames are not much different (the absolute value of the two phase difference values is greater than the first preset value and less than or equal to the second preset value) and confusion occurs, in order to find the corresponding phase center point of a phase center point in the previous frame in the subsequent frame, first, the phase of a phase center point in the previous frame is taken as the center, and all phase center points in the subsequent frame are clustered using a clustering method, and then the phase size, phase weight and other information of the phase where the phase center point in the subsequent frame that meets the above-mentioned clustering requirements is located are compared, and it is considered that the phases in the previous and subsequent frames with the closest phase size and phase weight are the same phase, and the phase center point where it is located is the matching phase center point.
[0063] S303, processing each group of phase center points based on a preset first formula to obtain each group of phase differences, and processing each group of phase differences based on a preset second formula to obtain each phase angle;
[0064] In an embodiment of the present application, step S303 may include the following execution process:
[0065] The first formula is used to process the matching phase center points in the current frame and two adjacent frames to obtain the first phase differences and the second phase differences, and the second formula is used to process the first phase differences and the second phase differences to obtain the phase angles of the current frame.
[0066] For example, the phase distance (vector difference) between the corresponding phase center points of the previous and next frames is calculated as the phase difference (vector). i , a phase difference P can be obtained for every two adjacent frames (j-1 frame, j frame) i,(j-1)-j =S i,j (x j ,y j )-S i,j-1 (x j-1 ,y j-1 )(First formula), where (x j ,y j ) and (x j-1 ,y j-1 ) represent S i The phase difference P is between the jth frame and the j-1th frame. Then, two phase differences P can be obtained for every three adjacent frames (j-1th frame, jth frame, j+1th frame). i,(j-1)-jand P i,j-(j+1) , according to the time sequence, the previous phase difference is called P i,(j-1)-j is the phase difference of the previous frame, and the next (currently calculated) phase difference is called P i,j-(j+1) The current phase difference P is calculated using the second formula i,j-(j+1) Phase difference with the previous frame P i,(j-1)-j The second formula is:
[0067]
[0068] S304: retain the phases corresponding to the phase difference angles smaller than the first preset threshold in the current frame, and filter out the phases corresponding to the phase difference angles larger than the second preset threshold, to obtain foreground data in the current frame.
[0069] Among them, the angle When the angle is less than a certain value, the phase is retained as the detection foreground and enters the next frame detection cycle; When it is greater than a certain value, the phase is filtered out. The present invention calls the above process the determination of no sudden change in target motion direction, based on which the present invention proposes a criterion for no sudden change in target motion direction. The criterion for no sudden change in target motion direction believes that the turning of a maneuvering target during the motion process has limitations, and there is a process of first slowing down and then turning, or first slowing down and then turning around. In particular, for targets detected by computer vision detection technologies including the present invention, they generally do not have the ability to suddenly and drastically change their motion direction within a very short period of time between adjacent frames (previous and next frames), while the movement of noise is arbitrary. Based on this, effective filtering of complex background noise can be achieved.
[0070] Step S40: output the small moving target detection result and the moving trajectory.
[0071] Referring to Figure 4, Figure 4(a) is an unframed image of the original video; Figure 4(b) is a detection result diagram of a motion target detection method based on robust principal component analysis of Gaussian mean (GA); Figure 4(c) is a detection result diagram of a motion target detection method based on robust principal component analysis of Gaussian median (GM); and Figure 4(d) is a detection result diagram of the present invention.
[0072] In the specific execution process, the detection result of the current frame is saved and output. When there is data to be detected, the next frame or the next sliding time window is entered for subsequent detection; when there is no data to be detected, the detection is paused or ended.
[0073] The beneficial effects of the method of the present invention mainly include:
[0074] (1) Real-time operation is crucial for the practical application of moving target detection technology. A moving target detection method that cannot achieve real-time operation does not actually have practical value. The present invention has a clear process and relatively low computational complexity. It has been experimentally verified in the first specific embodiment that fast target detection can be achieved and real-time operation can be achieved on a general performance computer.
[0075] (2) The present invention solves the problem that sparse decomposition-based motion target detection methods generally require the use of background low-rank matrix information and the adoption of background modeling methods to achieve target detection. It creatively directly uses the foreground sparse matrix (noise matrix) to extract target information for detection, while effectively filtering out a large amount of irrelevant information such as noise and interference contained in the sparse matrix, thereby better detecting moving targets, especially weak moving targets.
[0076] (3) The size, dimensions, distance, posture, etc. of the same object in different frames of the video are different, and it is objectively difficult to establish a connection between them. The present invention draws on relevant concepts in the field of traditional signal processing and creatively defines concepts such as phase, phase center point, phase size, phase weight, phase, phase difference, and phase difference angle of the video content. By calculating this information, the same object (moving target, etc.) in adjacent frames of the video can be effectively matched and connected, thereby providing important value for detecting and tracking targets.
[0077] (4) The present invention proposes a criterion for no sudden change in target motion direction and a corresponding filtering algorithm, which can effectively deal with the impact of complex and changeable backgrounds on motion target detection, thereby better adapting to situations where the camera may move or shake, as well as situations where the background content may change dramatically, thereby effectively reducing the impact of noise and interference on detection, making the detection results more stable and accurate.
[0078] refer to Figure 5 On the basis of the above embodiments, the present application further provides a device for detecting weak and small moving targets in a complex background based on phase trajectory prediction. The target detection device 100 includes an acquisition module 1001, a matrix segmentation module 1002, a processing module 1003 and an output module 1004: the acquisition module 1001 is used to acquire real-time image data to be processed, and determine the total matrix to be processed based on the real-time image data; the matrix segmentation module 1002 is used to perform frame segmentation and windowing processing on the total matrix to be processed to obtain each matrix to be processed, and use a preset matrix segmentation algorithm to segment each matrix to be processed to obtain each sparse foreground component matrix, and obtain each frame in the sparse foreground component matrix; the processing module 1003 is used to detect the foreground data of each frame using a preset motion target detection algorithm based on phase trajectory prediction, and obtain the weak and small moving target detection result and motion trajectory based on the foreground data of each frame; the output module 1004 is used to output the weak and small moving target detection result and motion trajectory.
[0079] It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiments.
[0080] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0081] Another embodiment of the present application proposes an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for detecting weak and small moving targets in a complex background based on phase trajectory prediction in the above-mentioned method embodiments.
[0082] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators and power management circuits together, which are all well known in the art, so this article will not describe them further. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.
[0083] The processor is responsible for managing the bus and general processing, and may also provide various functions, including timing, peripheral interfacing, voltage regulation, power management, and other control functions. Magnetic storage may be used to store data used by the processor when performing operations.
[0084] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0085] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM (Read-Only Memory), RAM (Random Access Memory), disk or optical disk and other media that can store program codes.
[0086] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
[0087] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for detecting weak moving targets in complex backgrounds based on phase trajectory prediction, characterized in that: include: Acquire real-time image data to be processed, and determine a total matrix to be processed based on the real-time image data; Performing frame-by-frame windowing processing on the total matrix to be processed to obtain each matrix to be processed, and using a preset matrix segmentation algorithm to segment each matrix to be processed to obtain each sparse foreground component matrix, and obtaining each frame in the sparse foreground component matrix; Detecting the foreground data of each of the frames using a preset moving target detection algorithm based on phase trajectory prediction, and obtaining a weak moving target detection result and a moving trajectory based on the foreground data of each of the frames; Output the small moving target detection result and motion trajectory.
2. The method for detecting small moving targets under complex backgrounds based on phase trajectory prediction according to claim 1, characterized in that: The detecting of the foreground data of each frame by using a preset moving target detection algorithm based on phase trajectory prediction includes: Searching each of the sparse foreground component matrices based on a preset extremely sparse criterion to obtain the center point of each of the current frame and two adjacent frames in each of the frames; According to preset conditions, some center points in the current frame and two adjacent frames are filtered out to obtain the remaining multiple center points as target points, and neighborhood clustering is performed on each of the target points to obtain predefined phases, phase sizes, phases and phase weights, and multiple groups of one-to-one corresponding phase center points in the current frame and two adjacent frames are determined based on the phases, the phase sizes and the phase weights, wherein each of the phase center points is the center point, and the phase center points correspond to the phases one-to-one; Processing each group of phase center points based on a preset first formula to obtain each group of phase differences, and processing each group of phase differences based on a preset second formula to obtain each phase angle; The phases corresponding to the phase difference angles smaller than a first preset threshold are retained in the current frame, and the phases corresponding to the phase difference angles larger than a second preset threshold are filtered out to obtain foreground data in the current frame.
3. The method for detecting small moving targets under complex backgrounds based on phase trajectory prediction according to claim 2, characterized in that: The filtering out some center points in the current frame and two adjacent frames according to a preset condition includes: Determining whether the current frame is the first frame in each of the sparse foreground component matrices; If the current frame is the first frame, retaining the central points of the current frame; If the current frame is not the first frame, a neighborhood search is performed on each center point of the current frame, and during the neighborhood search, it is determined whether the current center point belongs to a neighborhood search range of a previous center point; If the current center point belongs to the neighborhood search range of the previous center point, the current center point is retained; If the current center point does not belong to the neighborhood search range of the previous center point, the current center point is filtered out.
4. The method for detecting small moving targets under complex backgrounds based on phase trajectory prediction according to claim 2, characterized in that: Taking the center point as the phase center point, performing neighborhood clustering on each of the target points to obtain predefined phases, phase sizes, phases and phase weights, including: Neighborhood clustering is performed on each of the target points, and the clustering result is used as the phase, the points included in the clustering result are used as the phase size, the coordinates of the phase center point are used as the phase, and the average value of the values of the points included in the clustering result is used as the phase weight.
5. The method for detecting small moving targets under complex backgrounds based on phase trajectory prediction according to claim 2, characterized in that: The determining of a plurality of groups of one-to-one corresponding phase center points in a current frame and two adjacent frames based on the phase, the phase size and the phase weight comprises: Determine whether the absolute value of the phase difference between the corresponding phase center points in two adjacent frames is less than a preset value; If the absolute value is less than a first preset value, determining that the two phase center points in the two adjacent frames match; If the absolute value is greater than or equal to a first preset value and less than or equal to a second preset value, then taking the phase of the phase center point in the previous frame of two adjacent frames as the center, performing neighborhood clustering on all phase center points in the next frame to obtain the phase size and phase weight of all phase center points in the next frame, and searching in the next frame for the phase center point that is closest in phase size and phase weight to the phase center point in the previous frame to obtain a phase center point that matches the phase center point in the previous frame; If the absolute value is greater than the second preset value, it is determined that the phase center point in the previous frame has no matching object with the phase center point in the next frame.
6. The method for detecting small moving targets under complex backgrounds based on phase trajectory prediction according to claim 2, characterized in that: The processing of each group of phase center points based on a preset first formula to obtain each group of phase differences, and the processing of each group of phase differences based on a preset second formula to obtain each phase angle, includes: The first formula is used to process the phase center points that match the current frame and the two adjacent frames to obtain the first phase differences and the second phase differences, and the second formula is used to process the first phase differences and the second phase differences to obtain the phase angles of the current frame.
7. The method for detecting small moving targets under complex backgrounds based on phase trajectory prediction according to claim 6, characterized in that: The first phase difference and the second phase difference are obtained based on the phase center points of the current frame and the two adjacent frames, and the phase angles of the current frame are obtained based on the first phase difference and the second phase difference, including: Calculating the vector difference between each of the phase center points that match the current frame and the previous frame, and correspondingly obtaining each of the first phase differences; Calculate the vector difference between each of the phase center points that match the current frame and the next frame, and obtain each of the second phase differences accordingly, wherein each of the second phase differences corresponds to each of the first phase differences one by one; Based on the one-to-one correspondence between each of the first phase differences and each of the second phase differences, corresponding phase angles are obtained.
8. A device for detecting weak moving targets in complex backgrounds based on phase trajectory prediction, characterized in that: include: An acquisition module, used for acquiring real-time image data to be processed, and determining a total matrix to be processed based on the real-time image data; A matrix segmentation module is used to perform frame segmentation and windowing processing on the total matrix to be processed to obtain each matrix to be processed, and to segment each matrix to be processed using a preset matrix segmentation algorithm to obtain each sparse foreground component matrix, and to obtain each frame in the sparse foreground component matrix; A processing module, used to detect the foreground data of each frame using a preset moving target detection algorithm based on phase trajectory prediction, and obtain a weak moving target detection result and a moving trajectory based on the foreground data of each frame; The output module is used to output the weak moving target detection result and motion trajectory.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for detecting weak and small moving targets under a complex background based on phase trajectory prediction as described in any one of claims 1 to 7 can be implemented.
10. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; In which, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for detecting weak moving targets in a complex background based on phase trajectory prediction as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Low-rank matrix representation-based image foreground object detection method and detection system
CN106204613A
Target tracking method for predictive adaptive learning
CN109859242A
Method for improving intuitive fuzzy clustering extraction of infrared ship by utilizing position information
CN110853054A
Weak and small moving target detection method based on superpixel adjacent frame feature comparison
CN110910417A
Target detection method suitable for court trial monitoring
CN113177462A