A method and device for target detection and target occlusion judgment based on response graph
Through the object detection method based on the response graph, the problem of inaccurate object detection in complex scenarios is solved, especially when the target is blocked, efficient object detection and accurate template updates are achieved, which improves the robustness and real-timeness of the detection.
Patent Information
- Application Number
- CN202111141966.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-09-28
AI Technical Summary
The prior art is difficult to accurately detect targets in complex scenarios, especially when the targets are half-occluded or fully occluded, the detection effect is poor, and the robustness and tracking accuracy are affected.
Using the object detection method based on the response graph, by calculating the Euro-like distance between the target template and the response graph of the HOG feature of the current frame, we judge whether the target is blocked, and the template is updated according to the grayscale distribution characteristics.
It improves the anti-occlusion and anti-interference in complex scenarios, ensuring the accuracy and real-time nature of target detection.
Smart Images

Figure CN114119656B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of target tracking, and in particular to a method and device for target detection and target occlusion judgment based on a response graph. Background Art
[0002] The target tracking algorithm takes a continuous image sequence as input, and gives the target size and position of the initial frame image, and predicts the target size and position in the subsequent frame image. The target tracking process can be divided into four steps: determining the target candidate frame, feature extraction, sample collection, and target position prediction. The determination of the target candidate frame is generally derived from the manual annotation of the target in the first frame or the detection result obtained by the previous detection algorithm. Target feature extraction is to select features that can effectively express the object and compare them with the candidate samples selected in the subsequent process. Sample collection is to screen suspected target samples. Considering that the target moves a limited distance in a short time, sampling is generally performed around the target candidate frame. Target position prediction is through the matching between the feature template and the candidate sample area. The position with a higher degree of similarity is more likely to be the latest position of the target.
[0003] The commonly used tracking algorithms are as follows:
[0004] Background difference method: It is a method of detecting moving targets by using the difference between the current frame and the background model. The steps of the difference method mainly include foreground detection and background update. The advantage of the background difference method is that it can achieve higher accuracy and calculation speed in a single scene, but the background difference method is very dependent on the continuity of the environment. When the lighting changes or the background shakes, the background changes suddenly, the detection effect of the background difference method will become very poor.
[0005] Inter-frame difference method: It is to obtain the moving target by performing pixel value subtraction operation on the image of two adjacent frames and performing threshold judgment on the pixel value image after subtraction. Inter-frame difference is insensitive to changes in light, and it updates quickly when processing static environments, and does not require modeling of the background environment. However, the effect of inter-frame difference when used in moving cameras is very poor. It is impossible to identify slow-moving or stationary targets, and it is difficult to completely extract the target area. Only the boundary can be extracted well. The accuracy of the detection result is highly dependent on the continuity of the selected frames, and it is easy to have holes and missed detections.
[0006] Optical flow method: The idea of the optical flow method is to detect the target through the change of the optical flow field of the target, and compare the change of pixels and the correlation between two adjacent frames to obtain the information of the moving target in the adjacent frames. The image is analyzed according to the velocity vector of the pixel points in the image to obtain the information of the moving target. The advantage of the optical flow method is that it does not require any prior information before detection, and it can handle the situation of background changes. However, the calculation complexity is very high, and there is a large delay in the processing of the target.
[0007] Due to the existence of many complex interference factors in actual scenes, the robustness and tracking accuracy of the tracking algorithm are affected, and even the target is lost; among them, target occlusion is a major factor affecting the tracking effect. Summary of the invention
[0008] In order to solve the above technical problems, the present invention proposes a method and device for target detection and target occlusion judgment based on a response graph. The method and device are used to solve the technical problems of whether the target is occluded in the prior art, as well as inaccurate target retrieval and large interference in semi-occlusion or full occlusion.
[0009] According to a first aspect of the present invention, a method for target detection and target occlusion judgment based on a response graph is provided, the method comprising the following steps:
[0010] Step S101: Get the original image of the target and the initial frame I of the video stream 1 , the initial frame I 1 As the current frame, get I 1 Template T 1 ; Initialize the target template T to template T 1 ;
[0011] Step S102: Determine whether the video stream has been processed. If so, the method ends; if not, proceed to step S103;
[0012] Step S103: The next image frame of the current frame is taken as the current frame, denoted as I i , 2≤i≤N, N is the number of image frames in the video stream; based on the target position, calculate the current frame I i The HOG feature of the target in the i ;
[0013] Step S104: Based on the target template T and the current frame I i Current frame I i The HOG feature H of the extracted target i Calculate the current frame I i The target response map G i '; Get the current frame I i The ideal response diagram G 0; Calculate the current frame I i The target response map G i ' and the ideal response diagram G 0 The Euclidean distance d i ; Calculate the current frame I i Template T i ;
[0014] Step S105: If the Euclidean distance d i If it is less than the preset threshold, the target template T and the target position (I ix ,I iy ), go to step S102; otherwise, determine that the target is occluded in the current frame and no update operation is required; go to step S102.
[0015] According to a second aspect of the present invention, a device for target detection and target occlusion judgment based on a response graph is provided, the device comprising:
[0016] Initialization module: configured to obtain the original image of the target and the initial frame I of the video stream 1 , the initial frame I 1 As the current frame, get I 1 Template T 1 ; Initialize the target template T to template T 1 ;
[0017] The first judgment module is configured to judge whether the video stream has been processed;
[0018] HOG feature extraction module: configured to take the next image frame of the current frame as the current frame, denoted as I i , 2≤i≤N, N is the number of image frames in the video stream; based on the target position, calculate the current frame I i The HOG feature of the target in the i ;
[0019] Template acquisition module: configured based on the target template T and the current frame I i Current frame I i The HOG feature H of the extracted target i Calculate the current frame I i The target response map G i '; Get the current frame I i The ideal response diagram G 0 ; Calculate the current frame I i The target response map G i ' and the ideal response diagram G 0 The Euclidean distance d i ; Calculate the current frame I i Template T i ;
[0020] Update module: Configured as if the Euclidean distance d i If it is less than the preset threshold, the target template T and the target position (I ix ,I iy ); otherwise, it is determined that the target is occluded in the current frame and no update operation is required.
[0021] According to a third aspect of the present invention, a system for target detection and target occlusion judgment based on a response graph is provided, comprising:
[0022] A processor, which is used to execute multiple instructions;
[0023] A memory for storing a plurality of instructions;
[0024] The plurality of instructions are used to be stored in the memory, and loaded and executed by the processor to perform the method of target detection and target occlusion judgment based on the response graph as described above.
[0025] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the method for target detection and target occlusion judgment based on a response graph as described above.
[0026] The present invention combines the grayscale distribution characteristics of the ideal response graph and the actual response graph with full consideration of the characteristics of the template response graph of the correlation filter tracking algorithm, and applies the update strategy of the target template. First, the original image is preprocessed and grayscale space transformed to reduce the influence of illumination, and the target HOG features are extracted using the target position and size information provided by the initial frame. Then, the template response graphs of the current frame and the previous frame image are obtained using the correlation filter algorithm, and the next step of the template update operation is performed according to the difference in the grayscale distribution characteristics of the current frame response graph and the ideal response graph. Correlation filter tracking utilizes the similarity between the target features of the current frame and the template, and completes the target tracking process by obtaining the position deviation of the maximum value of the response graph. According to the above scheme of the present invention, it is adaptive to semi-occlusion and full occlusion in complex scenes, can meet the real-time requirements, and has the technical effects of strong anti-occlusion and anti-interference.
[0027] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention, and the present invention is described by providing the following accompanying drawings. In the accompanying drawings:
[0029] Figure 1A flow chart of a method for target detection and target occlusion judgment based on a response graph according to an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of an initial frame image according to an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of a current frame image according to an embodiment of the present invention;
[0032] Figure 4 is an ideal template response diagram for one embodiment of the present invention;
[0033] Figure 5 A current frame template response diagram according to an embodiment of the present invention;
[0034] Figure 6 A response diagram after a target is blocked according to an embodiment of the present invention;
[0035] Figure 7 A structural block diagram of a device for target detection and target occlusion judgment based on a response graph according to an embodiment of the present invention; DETAILED DESCRIPTION
[0036] First combine Figure 1 The method flow of target occlusion judgment based on response graph according to one embodiment of the present invention is described, and the method comprises the following steps:
[0037] Step S101: Get the original image of the target and the initial frame I of the video stream 1 , the initial frame I 1 As the current frame, get I 1 Template T 1 ; Initialize the target template T to template T 1 ;
[0038] Step S102: Determine whether the video stream has been processed. If so, the method ends; if not, proceed to step S103;
[0039] Step S103: The next image frame of the current frame is taken as the current frame, denoted as I i , 2≤i≤N, N is the number of image frames in the video stream; based on the target position, calculate the current frame I i The HOG feature of the target in the i ;
[0040] Step S104: Based on the target template T and the current frame I i Current frame I i The HOG feature H of the extracted target i Calculate the current frame I i The target response map G i'; Get the current frame I i The ideal response diagram G 0 ; Calculate the current frame I i The target response map G i ' and the ideal response diagram G 0 The Euclidean distance d i ; Calculate the current frame I i Template T i ;
[0041] Step S105: If the Euclidean distance d i If it is less than the preset threshold, the target template T and the target position (I ix ,I iy ), go to step S102; otherwise, determine that the target is occluded in the current frame and no update operation is required; go to step S102.
[0042] In this embodiment, Figure 2 As shown, determine the target image in the initial frame and obtain Figure 3 The current frame is shown.
[0043] Step S101: obtaining the original image of the target, obtaining the initial frame I of the video stream 1 , the initial frame I 1 As the current frame, get I 1 Template T 1 ,include:
[0044] The step S1011: converting the two-dimensional image matrix f(x, y) of the original image of the target from the RGB space to the grayscale space to obtain the grayscale image matrix g(x, y) of the original image; wherein x is the pixel coordinate in the horizontal X direction of the two-dimensional image, and y is the pixel coordinate in the vertical Y direction of the two-dimensional image;
[0045] The step S1012: determining the position and size of the target in the initial frame of the video, extracting the ROI corresponding to the target in the grayscale image of the original image based on the position and size of the target, and determining the image block C(x, y) corresponding to the ROI;
[0046] Step S1013: Divide the image block into a plurality of interconnected cell units C j , calculate the gradient g of each cell unit j (x,y), Among them, 1≤j≤M, M is the number of cell units, g jx is the horizontal gradient of cell unit j, g jy is the gradient of cell unit j in the vertical direction;
[0047]
[0048] Wherein, C(x+1,y) is the gray value of the image block C(x,y) at (x+1,y), C(x-1,y) is the gray value of the image block C(x,y) at (x-1,y), C(x,y+1) is the gray value of the image block C(x,y) at (x,y+1), and C(x,y-1) is the gray value of the image block C(x,y) at (x,y-1);
[0049] Step S1014: Counting the gradient histogram of each cell unit to form a gradient vector of the HOG feature of the current frame;
[0050] Step S1015: Combine the gradient vectors of all cell units to form the HOG feature vector matrix of the target, denoted as H 1 ;
[0051] Step S1016: According to the HOG features of the target, a Gaussian model is established and a template T is obtained. 1 , Among them, G 0 is the ideal Gaussian response graph of the current frame, is the Fourier transform. The calculation method of the ideal Gaussian response diagram is:
[0052]
[0053] Among them, x 1 ,y 1 They are the ideal response graphs G 0 The horizontal X-direction and vertical Y-direction coordinates, lenx and leny are the ideal response graph G 0 The lengths in the horizontal X direction and the vertical Y direction, σ=sqrt(lenx·leny), and α is a normalization constant.
[0054] like Figure 4-6 As shown, the step S104: based on the target template T and the current frame I i The HOG feature H of the extracted target i Calculate the current frame I i The target response map G i '; Get the current frame I i The ideal response diagram G 0 ; Calculate the current frame I i The target response map G i ' and the ideal response diagram G 0 The Euclidean distance d i ; Calculate the current frame I i Template T i ,in:
[0055] Current frame Ii The target response map G i The calculation method of ' is:
[0056]
[0057] in, For H i Perform Fourier transform, T i-1 is the target template obtained by training the previous frame, The target template T obtained by training the previous frame i-1 The convolution result with the current frame feature, For Perform an inverse Fourier transform.
[0058] Calculate the current frame I i The target response map G i ' and the ideal response diagram G 0 The Euclidean distance d i ,include:
[0059] Step S1041: Response graph G to the target i 'Perform linear transformation, convert to the interval [0,255], count the number of grayscales in 32 intervals with an interval of 8, and form a one-dimensional vector X with 32 grayscale numbers i ;
[0060] Step S1042: The ideal response graph G 0 Perform a linear transformation to convert to the interval [0,255], count the number of grayscales in 32 intervals with an interval of 8, and form a one-dimensional vector X with 32 grayscale numbers 0 ;
[0061] Step S1043: Calculate the target response graph G of the current frame Ii i ' and the ideal response diagram G 0 The Euclidean distance d i , d i =||X i -X 0 || 2 ,in X i is the one-dimensional vector corresponding to the target response map of the current frame, X 0 is the one-dimensional vector corresponding to the ideal response graph, X i (j) is the jth element in the one-dimensional vector corresponding to the target response map of the current frame, X 0 (j) is the jth element in the one-dimensional vector corresponding to the ideal response graph.
[0062] Calculate the current frame I i Template T i ,include:
[0063]
[0064] Among them, T i is the current frame template, G 0 is the ideal Gaussian response graph of the current frame, is the Fourier transform, H i HOG features of the target extracted in the current frame.
[0065] In step S105: if the Euclidean distance d i If it is less than the preset threshold, the target template T and the target position (I ix ,I iy ), proceed to step S102; otherwise, it is determined that the target is blocked in the current frame and no update operation is required; proceed to step S102, wherein:
[0066] The target template T and the target position (I ix ,I iy ) is updated as:
[0067] T=(1-ρ)T i-1 +ρT i
[0068] (I ix ,I iy )=(I (i-1)x +G xmax -M1 / 2,I (i-1)y ++G ymax -N1 / 2)
[0069] Among them, ρ is the template update weight, which is generally taken as 0.02, I ix is the horizontal X-coordinate of the target position in the current frame, I iy is the vertical Y coordinate of the target position in the current frame, I (i-1)x is the horizontal X-coordinate of the target position in the previous frame, I (i-1)y G is the vertical Y coordinate of the target position in the previous frame; xmax The current frame I i The target response map G i 'The horizontal coordinate of the position corresponding to the maximum response value, G ymax The current frame I i The target response map G i 'The coordinates of the vertical axis of the position corresponding to the maximum response value, M1 and N1 are the response graph G i 'Horizontal and vertical lengths;
[0070] The current frame I iThe target response map G i The position corresponding to the maximum response value of 'is obtained by traversing the target response graph G i ', find the maximum response value as the maximum response value, and obtain the position corresponding to the maximum response value.
[0071] In this embodiment, the preset threshold is generally set between 0.4 and 0.6 based on experience.
[0072] In this embodiment, the HOG features and background features of the target are first extracted using the position and size of the target in the initial frame, and a Gaussian model is established to obtain the target initial template; then, the target template is used to perform correlation calculation response graph in the second frame image; according to the target position information of the previous frame, feature extraction is performed in the current frame, and the current frame target response graph is obtained through a correlation filtering algorithm; finally, the grayscale distribution features of the current frame response graph are counted, and the Euclidean distance of the grayscale distribution features with the ideal response graph is calculated, and whether to update the target template is determined according to the distance size. Finally, the grayscale distribution histogram of the response graph is used to determine whether the target is blocked, thereby deciding whether to update the target template. Compared with the commonly used tracking algorithms, it has the characteristics of strong anti-blocking and anti-interference.
[0073] The embodiment of the present invention further provides a target occlusion judgment device based on a response graph, such as Figure 7 As shown, the device comprises:
[0074] Initialization module: configured to obtain the original image of the target and the initial frame I of the video stream 1 , the initial frame I 1 As the current frame, get I 1 Template T 1 ; Initialize the target template T to template T 1 ;
[0075] The first judgment module is configured to judge whether the video stream has been processed;
[0076] HOG feature extraction module: configured to take the next image frame of the current frame as the current frame, denoted as I i , 2≤i≤N, N is the number of image frames in the video stream; based on the target position, calculate the current frame I i The HOG feature of the target in the i ;
[0077] Template acquisition module: configured based on the target template T and the current frame I i Current frame I i The HOG feature H of the extracted target i Calculate the current frame I i The target response map G i'; Get the current frame I i The ideal response diagram G 0 ; Calculate the current frame I i The target response map G i ' and the ideal response diagram G 0 The Euclidean distance d i ; Calculate the current frame I i Template T i ;
[0078] Update module: Configured as if the Euclidean distance d i If it is less than the preset threshold, the target template T and the target position (I ix ,I iy ); otherwise, it is determined that the target is occluded in the current frame and no update operation is required.
[0079] The embodiment of the present invention further provides a target occlusion judgment system, including:
[0080] A processor, which is used to execute multiple instructions;
[0081] A memory for storing a plurality of instructions;
[0082] The plurality of instructions are used to be stored by the memory, and loaded and executed by the processor to implement the target occlusion determination method as described above.
[0083] The embodiment of the present invention further provides a computer-readable storage medium, in which a plurality of instructions are stored; the plurality of instructions are used for a processor to load and execute the target occlusion determination method as described above.
[0084] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0085] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0086] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0087] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0088] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a physical server, or a network cloud server, etc., which needs to be installed with Windows or Windows Server operating system) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (RandomAccess Memory, RAM), disk or optical disk and other media that can store program codes.
[0089] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A method for target occlusion judgment based on a response graph, characterized in that: The method comprises the following steps: Step S101: obtaining an original image of a target, obtaining an initial frame I1 of a video stream, taking the initial frame I1 as a current frame, obtaining a template T1 of I1; initializing the target template T as template T1; Step S102: determine whether the video stream has been processed, if so, the method ends; if not, proceed to step S103; Step S103: The next image frame of the current frame is taken as the current frame, denoted as I i , 2≤i≤N, N is the number of image frames in the video stream; based on the target position, calculate the current frame I i The HOG feature of the target in the i ; Step S104: Based on the target template T and the current frame I i Current frame I i The HOG feature H of the extracted target i Calculate the current frame I i The target response map G i '; Get the current frame I i The ideal response graph G0 of the current frame I i The target response map G i 'Euclidean distance d from the ideal response graph G0 i ; Calculate the current frame I i Template T i ; Step S105: If the Euclidean distance d i If it is less than the preset threshold, the target template T and the target position (I ix ,I iy ), go to step S102; otherwise, it is determined that the target is blocked in the current frame and no update operation is required; go to step S102; The step S101: obtaining the original image of the target, obtaining the initial frame I1 of the video stream, taking the initial frame I1 as the current frame, and obtaining the template T1 of I1, includes: Step S1011: converting the two-dimensional image matrix f(x, y) of the original image of the target from the RGB space to the grayscale space to obtain the grayscale image matrix g(x, y) of the original image; wherein x is the pixel coordinate in the horizontal X direction of the two-dimensional image, and y is the pixel coordinate in the vertical Y direction of the two-dimensional image; Step S1012: determining the position and size of the target in the initial frame of the video, extracting the ROI corresponding to the target in the grayscale image of the original image based on the position and size of the target, and determining the image block C(x, y) corresponding to the ROI; Step S1013: Divide the image block into a plurality of interconnected cell units C j , calculate the gradient g of each cell unit j (x,y), Among them, 1≤j≤M, M is the number of cell units, g jx is the horizontal gradient of cell unit j, g jy is the gradient of cell unit j in the vertical direction; Wherein, C(x+1,y) is the gray value of the image block C(x,y) at (x+1,y), C(x-1,y) is the gray value of the image block C(x,y) at (x-1,y), C(x,y+1) is the gray value of the image block C(x,y) at (x,y+1), and C(x,y-1) is the gray value of the image block C(x,y) at (x,y-1); Step S1014: Counting the gradient histogram of each cell unit to form a gradient vector of the HOG feature of the current frame; Step S1015: combining the gradient vectors of all cell units to form a HOG feature vector matrix of the target, denoted as H1; Step S1016: According to the HOG features of the target, a Gaussian model is established and a template T1 is obtained. Among them, G0 is the ideal Gaussian response graph of the current frame, is the Fourier transform; the ideal Gaussian response diagram is calculated as: Where x1 and y1 are the coordinates of the ideal response graph G0 in the horizontal X direction and the vertical Y direction, lenx and leny are the lengths of the ideal response graph G0 in the horizontal X direction and the vertical Y direction, σ = sqrt(lenx leny), and α is a normalization constant; Step S104: based on the target template T and the current frame I i The HOG feature H of the extracted target i Calculate the current frame I i The target response map G i '; Get the current frame I i The ideal response graph G0 of the current frame I i The target response map G i 'Euclidean distance d from the ideal response graph G0 i ; Calculate the current frame I i Template T i ,in: Current frame I i The target response map G i The calculation method of ' is: in, For H i Perform Fourier transform, T i-1 is the target template obtained by training the previous frame, The target template T obtained by training the previous frame i-1 The convolution result with the current frame feature, For Perform inverse Fourier transform; Calculate the current frame I i The target response map G i 'Euclidean distance d from the ideal response graph G0 i ,include: Step S1041: Response graph G to the target i 'Perform linear transformation, convert to the interval [0,255], count the number of grayscales in 32 intervals with an interval of 8, and form a one-dimensional vector X with 32 grayscale numbers i ; Step S1042: performing a linear transformation on the ideal response graph G0, converting it to the interval [0, 255], counting the number of grayscales in 32 intervals at intervals of 8, and forming a one-dimensional vector X0 with the 32 grayscale numbers; Step S1043: Calculate the target response graph G of the current frame Ii i 'Euclidean distance d from the ideal response graph G0 i , d i =||X i -X0||2, where X i is the one-dimensional vector corresponding to the target response graph of the current frame, X0 is the one-dimensional vector corresponding to the ideal response graph, and X i (j) is the jth element in the one-dimensional vector corresponding to the target response map of the current frame, and X0(j) is the jth element in the one-dimensional vector corresponding to the ideal response map; Calculate the current frame I i Template T i ,include: Among them, T i is the current frame template, G0 is the ideal Gaussian response graph of the current frame, is the Fourier transform, H i HOG features of the target extracted in the current frame.
2. The method for target occlusion judgment based on response graph according to claim 1, characterized in that: In step S105: if the Euclidean distance d i If it is less than the preset threshold, the target template T and the target position (I ix ,I iy ), proceed to step S102; Otherwise, it is determined that the target is occluded in the current frame and no update operation is required; Enter step S102, where: The target template T and the target position (I ix ,I iy ) is updated as: T=(1-ρ)T i-1 +ρT i (I ix ,I iy )=(I (i-1)x +G xmax -M1 / 2,I (i-1)y ++G ymax -N1 / 2) Among them, ρ is the template update weight, the value is 0.02, I ix is the horizontal X-coordinate of the target position in the current frame, I iy is the vertical Y coordinate of the target position in the current frame, I (i-1)x is the horizontal X-coordinate of the target position in the previous frame, I (i-1)y G is the vertical Y coordinate of the target position in the previous frame; xmax The current frame I i The target response graph G' i The coordinate of the position corresponding to the maximum response value in the horizontal direction, G ymax The current frame I i The target response graph G' i The coordinates of the vertical axis of the position corresponding to the maximum response value, M1 and N1 are the response graph G' i Horizontal and vertical lengths; The current frame I i The target response graph G' i The position corresponding to the maximum response value is obtained by traversing the target response graph G' i The method of finding all the pixel points in the image is to find the response value with the largest value as the maximum response value, and at the same time obtain the position corresponding to the maximum response value.
3. A device for target occlusion judgment based on a response graph, executing the method as claimed in any one of claims 1 to 2, characterized in that: The device comprises: Initialization module: configured to obtain the original image of the target, obtain the initial frame I1 of the video stream, use the initial frame I1 as the current frame, obtain the template T1 of I1; initialize the target template T to the template T1; The first judgment module is configured to judge whether the video stream has been processed; HOG feature extraction module: configured to take the next image frame of the current frame as the current frame, denoted as I i , 2≤i≤N, N is the number of image frames in the video stream; based on the target position, calculate the current frame I i The HOG feature of the target in the i ; Template acquisition module: configured based on the target template T and the current frame I i Current frame I i The HOG feature H of the extracted target i Calculate the current frame I i The target response diagram G' i ; Get the current frame I i The ideal response graph G0 of the current frame I i The target response graph G' i The Euclidean distance d from the ideal response graph G0 i ; Calculate the current frame I i Template T i ; Update module: Configured as if the Euclidean distance d i If it is less than the preset threshold, the target template T and the target position (I ix ,I iy ); otherwise, it is determined that the target is occluded in the current frame and no update operation is required.
4. A computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used by a processor to load and execute the method for target occlusion judgment based on a response graph as described in any one of claims 1-2.
Citation Information
Patent Citations
Anti-shielding infrared target tracking method
CN110276785A
Target tracking hardware implementation system and method
US20190139232A1