CN111862164A - Nuclear correlation filtering defogging tracking algorithm based on dark channel prior - Google Patents
Nuclear correlation filtering defogging tracking algorithm based on dark channel prior Download PDFInfo
- Publication number
- CN111862164A CN111862164A CN201910354450.3A CN201910354450A CN111862164A CN 111862164 A CN111862164 A CN 111862164A CN 201910354450 A CN201910354450 A CN 201910354450A CN 111862164 A CN111862164 A CN 111862164A
- Authority
- CN
- China
- Prior art keywords
- target
- defogging
- frame
- tracking
- dark channel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001914 filtration Methods 0.000 title claims abstract description 36
- 238000000034 method Methods 0.000 claims abstract description 20
- 238000001514 detection method Methods 0.000 claims abstract description 19
- 239000011159 matrix material Substances 0.000 claims description 21
- 230000004044 response Effects 0.000 claims description 15
- 238000002834 transmittance Methods 0.000 claims description 9
- 238000012549 training Methods 0.000 claims description 6
- 238000012937 correction Methods 0.000 claims description 3
- 238000003384 imaging method Methods 0.000 claims description 3
- 238000005259 measurement Methods 0.000 claims description 3
- 238000011084 recovery Methods 0.000 claims description 3
- 230000000717 retained effect Effects 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims description 3
- 230000007704 transition Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000000052 comparative effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012706 support-vector machine Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/277—Analysis of motion involving stochastic approaches, e.g. using Kalman filters
-
- G06T5/73—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
Abstract
A nuclear correlation filtering defogging tracking algorithm based on dark channel prior comprises the following steps: selecting a video sequence to be tracked, wherein the video sequence, a group frame text file and frames text files are required to be included; judging whether to defogg according to the first frame, and if so, defogging the image by using a dark channel defogging algorithm; initializing the filter through the first frame information; predicting the current motion state of the target from the second frame according to the motion trend of the target in the previous frame, and then detecting the position of the target at the predicted position through Kalman filtering, wherein the detection comprises state vector prediction and state vector covariance prediction; calculating the target position detection of a new frame through kernel correlation filtering, and positioning and tracking the target: sixthly, judging the occlusion of the detection result of the target position. The method and the device can improve the accuracy of tracking the pedestrian under the condition that the contrast of the target object is not obvious in foggy days.
Description
Technical Field
The invention belongs to the field of visual tracking, and particularly relates to a nuclear correlation filtering defogging tracking algorithm based on dark channel prior.
Background
Target tracking is an important research subject in the field of computer vision, and has wide application prospects in the fields of video monitoring, man-machine interaction, robots, military guidance and the like. The target tracking based on the image sequence determines the target position and the motion trail thereof according to the given target frame in the first frame without any prior knowledge. Despite the rapid development in the field of object tracking in recent years, many challenges remain: background interference, motion blur, target deformation, illumination change, fast movement, occlusion, low resolution, rotation, scale change, etc., which may cause drift and even tracking failure in the target tracking process. The target object blurring in the foggy days is a key factor for limiting the development of a target tracking algorithm, and how to solve the problem of tracking failure of the algorithm under the condition that the target is blurred in the foggy days is a key problem in the field of target tracking.
Target tracking algorithms can be classified into generating tracking algorithms and discriminating tracking algorithms. Generative target tracking first builds an apparent model of the target and then searches for the region in the image that most resembles the model as the target. The discriminant algorithm regards the tracking problem as a two-classification problem of the target and the background, and the target is separated from the background by a machine learning method. The generating algorithm only considers the target information and ignores the background information in the tracking process, which easily causes the tracking failure in the case of background interference. And the discriminant target tracking makes full use of background information, so that the defect of a living target tracking algorithm can be well overcome. Discriminant algorithms can be classified into online Boosting-based methods, support vector machine-based methods, random learning-based methods, correlation filtering-based methods, and discriminant analysis-based methods. Due to the introduction of the 2010 related filtering, the target tracking algorithm is rapidly developed.
Disclosure of Invention
The invention aims to provide a nuclear correlation filtering defogging tracking algorithm based on dark channel prior, which can improve the accuracy of tracking pedestrians under the condition that the contrast of a target object is not obvious in a foggy day.
In order to achieve the purpose, the technical scheme of the invention is as follows: a nuclear correlation filtering defogging tracking algorithm based on dark channel prior is characterized in that:
a nuclear correlation filtering defogging tracking algorithm based on dark channel prior comprises the following steps:
selecting a video sequence to be tracked, wherein the video sequence, a group frame text file and frames text files are required to be included;
judging whether to defogg according to the first frame, and if so, defogging the image by using a dark channel defogging algorithm;
thirdly, initializing the filter by the first frame information, and solving alpha (K + lambda I) by the minimized loss function-1y, where I is an identity matrix, y represents a label of the training sample, and K is a kernel matrix Kij=κ(xi,xj) κ (, x) is a kernel function, x is a training sample;
predicting the current motion state of the target from the second frame according to the motion trend of the target in the previous frame, and then detecting the position of the target at the predicted position through Kalman filtering, wherein the detection comprises state vector prediction and state vector covariance prediction;
Calculating the target position detection of a new frame through kernel correlation filtering, and positioning and tracking the target:
taking the target position obtained by prediction as an initial position, extracting a large number of samples from the image in a sliding window mode according to the setting of scale factors, adjusting the samples to the size of a filter in a linear interpolation mode, and calculating the response values of all the samples by combining discrete Fourier transform with related filteringWhereinFor input of samples to be tested, PiIs the i-th row element of the circulant matrix P.In order to perform the fourier transformation, the method,for Fourier inverse operation, the position with the maximum response value is used as the tracking result of the kernel correlation filter;
sixthly, judging the occlusion of the detection result of the target position: when the maximum response value is larger than a given threshold value 1 and the difference value between the maximum response value and the maximum response value of the previous frame is smaller than a given threshold value 2, judging that the shielding does not occur, enabling the tracking result of the quasi-nuclear correlation filter to be effective, correcting the detection result through Kalman filtering, and updating the filter; otherwise, the tracking result of the kernel correlation filtering is not retained.
The step II is that the image defogging method by using the dark channel defogging algorithm comprises the following steps: the fog imaging model in computer vision can be expressed as: where i (x) denotes an input image, i.e., an image to be defogged, j (x) denotes a haze-free image after recovery, t (x) denotes a transmittance, a denotes a global atmospheric light component, and when the transmittance t (x) is constant and a is known: Introducing a dark channel prior can yield an estimate of the transmittance:
the fourth step comprises the following steps: A. state vector prediction:where H (k) is the state transition matrix for the kth frame, initialized to [1,0,1, 0; 0,1,0, 1; 0,0,1, 0; 0,0,0,1],For the last frame of the correction result, initializing to [ pos'; 0; 0]Pos is the target position given by the first frame; B. state vector covariance prediction: p (k +1| k) ═ H (k) P (k | k) HT(k)+Q(k) Where P (k | k) is the state vector of the kth frame, Q (k) is the system noise, and is initialized to the four-dimensional identity matrix;
the step of Kalman filtering calibration comprises the following steps:
calculating a Kalman weighting matrix:
K(k+1)=P(k+1|k)FT(k+1)·(F(k+1)P(k+1|k)FT(k+1)+Λ(k+1)-1)
where F is a measurement matrix, F ═ 1,0, 0, 0; 0,1,0, 0], Λ ═ 36, 0; 0, 36 ];
updating the state vector:
wherein X ═ pos', represents the column vector constructed at the target position obtained in the fifth step;
updating the covariance of the state vector:
P(k+1|k+1)=(I-K(k+1)F(k+1))P(k+1,k)。
judging whether an image needs defogging through a dark channel prior method, combining the dark channel defogging method with a kernel-related filtering tracking algorithm, taking the kernel-related filtering as a detection algorithm in Kalman filtering, predicting the current motion state of a target according to the motion trend of the target in the previous frame, then performing target detection at the predicted position through the Kalman filtering, performing occlusion judgment on a detection result, and calibrating the detection result through the Kalman filtering under the condition that occlusion does not occur; and when the shielding occurs, directly calibrating the prediction result. The invention can realize target tracking in foggy weather, and the integration of the defogging method can also ensure that the high speed of the nuclear correlation filtering algorithm is not greatly influenced under the condition of good weather condition. The invention can obtain better tracking effect under the condition that the target is shielded, has the data processing speed of about 82 frames/second and can meet the real-time requirement.
Drawings
FIG. 1 is a comparative experimental graph of the defogging range of the present invention;
FIG. 2 is a comparison of the invention before and after defogging;
wherein: fig. 2a is a schematic diagram of 5 frames before defogging, fig. 2b is a schematic diagram of 50 frames before defogging, fig. 2c is a schematic diagram of 100 frames before defogging, fig. 2d is a schematic diagram of 5 frames after defogging, fig. 2e is a schematic diagram of 50 frames after defogging, and fig. 2f is a schematic diagram of 100 frames after defogging.
The specific implementation mode is as follows:
a nuclear correlation filtering defogging tracking algorithm based on dark channel prior comprises the following steps:
selecting a video sequence to be tracked, wherein the video sequence, a group frame text file and frames text files are required to be included;
judging whether to defogg according to the first frame, and if so, defogging the image by using a dark channel defogging algorithm; the defogging method comprises the following steps: the fog imaging model in computer vision can be expressed as: where i (x) denotes an input image, i.e., an image to be defogged, j (x) denotes a haze-free image after recovery, t (x) denotes a transmittance, a denotes a global atmospheric light component, and when the transmittance t (x) is constant and a is known:introducing a dark channel prior can yield an estimate of the transmittance:
Thirdly, initializing the filter by the first frame information, and solving alpha (K + lambda I) by the minimized loss function-1y, where I is an identity matrix, y represents a label of the training sample, and K is a kernel matrix Kij=κ(xi,xj) κ (, x) is a kernel function, x is a training sample;
predicting the current motion state of the target from the second frame according to the motion trend of the target in the previous frame, and then detecting the position of the target at the predicted position through Kalman filtering, wherein the detection comprises state vector prediction and state vector covariance prediction;
A. state vector prediction:Where H (k) is the state transition matrix for the kth frame, initialized to [1,0,1, 0; 0,1,0, 1; 0,0,1, 0; 0,0,0,1],For the last frame of the correction result, initializing to [ pos'; 0; 0]Pos is the target position given by the first frame;
B. state vector covariance prediction: p (k +1| k) ═ H (k) P (k | k) HT(k) + Q (k), where P (k | k) is the state vector of the kth frame, and Q (k) is the system noise, initialized to the four-dimensional identity matrix;
calculating the target position detection of a new frame through kernel correlation filtering, and positioning and tracking the target:
taking the target position obtained by prediction as an initial position, extracting a large number of samples from the image in a sliding window mode according to the setting of scale factors, adjusting the samples to the size of a filter in a linear interpolation mode, and calculating the response values of all the samples by combining discrete Fourier transform with related filtering WhereinFor input of samples to be tested, PiIs the i-th row element of the circulant matrix P.In order to perform the fourier transformation, the method,for Fourier inverse operation, the position with the maximum response value is used as the tracking result of the kernel correlation filter;
sixthly, judging the occlusion of the detection result of the target position: when the maximum response value is larger than a given threshold value 1 and the difference value between the maximum response value and the maximum response value of the previous frame is smaller than a given threshold value 2, judging that the shielding does not occur, enabling the tracking result of the quasi-nuclear correlation filter to be effective, correcting the detection result through Kalman filtering, and updating the filter; otherwise, the tracking result of the kernel correlation filtering is not retained.
The step of Kalman filter calibration comprises:
calculating a Kalman weighting matrix:
K(k+1)=P(k+1|k)FT(k+1)·(F(k+1)P(k+1|k)FT(k+1)+Λ(k+1)-1)
where F is a measurement matrix, F ═ 1, 0, 0, 0; 0, 1, 0, 0], Λ ═ 36, 0; 0, 36 ];
updating the state vector:
wherein X ═ pos', represents the column vector constructed at the target position obtained in the fifth step;
updating the covariance of the state vector:
P(k+1|k+1)=(I-K(k+1)F(k+1))P(k+1,k)。
experimental examples of the invention:
since the dark channel defogging algorithm is time consuming, the selection of the defogging range is crucial. Therefore, the experiments were performed with different sizes of defogging ranges, and the experimental results are shown in fig. 1, wherein red, yellow, blue, cyan and pink represent the defogging ranges of 1 time, 2.5 times, 3.25 times, 4 times and 4.75 times of the target respectively. It can be seen from the figure that in the case where the defogging range is 2.5 times and 4 times the image, the tracking fails due to drift occurring in the tracking process. When the defogging range is consistent with the size of the target, transient tracking drift is easy to occur in the tracking process, and the tracking result is unstable; when the defogging range is 4.75 times of the target, the operation speed of the algorithm is low due to the fact that the defogging range is too large; the defogging range in the algorithm herein takes 3.25 times the tracking image.
Wherein, the sub-graphs a, b and c respectively represent the 5 th, 50 th and 100 th frames of original images, and the upper left number is the average pixel value of the dark channel graph of the central target area. d. e and f respectively represent the defogging effect of the images of the 5 th, 50 th and 100 th frames. It can be seen that the fog in the image is dense fog, and the dark channel average pixel value of the target is much larger than the set threshold value of 0.2, and dark channel defogging is required before tracking. The visibility of the object in the original image is low and the characteristic is not obvious through the comparison before and after the defogging. After defogging, the color and texture characteristics of the image are more obvious, and great help is provided for accurate tracking of the target.
It should be noted that the above-mentioned embodiments are only preferred embodiments of the present invention, and are only illustrative and not restrictive of the scope of the invention. The technical idea of the invention is that only obvious changes are needed and still fall within the scope of the invention.
Claims (4)
1. A nuclear correlation filtering defogging tracking algorithm based on dark channel prior is characterized in that: the method comprises the following steps:
selecting a video sequence to be tracked, wherein the video sequence, a group frame text file and frames text files are required to be included;
Judging whether to defogg according to the first frame, and if so, defogging the image by using a dark channel defogging algorithm;
thirdly, initializing the filter by the first frame information, and solving alpha (K + lambda I) by the minimized loss function-1y, where I is an identity matrix, y represents a label of the training sample, and K is a kernel matrix Kij=κ(xi,xj) κ (, x) is a kernel function, x is a training sample;
predicting the current motion state of the target from the second frame according to the motion trend of the target in the previous frame, and then detecting the position of the target at the predicted position through Kalman filtering, wherein the detection comprises state vector prediction and state vector covariance prediction;
calculating the target position detection of a new frame through kernel correlation filtering, and positioning and tracking the target:
taking the target position obtained by prediction as an initial position, extracting a large number of samples from the image in a sliding window mode according to the setting of scale factors, and linearly extractingAdjusting the sample to the size of the filter by interpolation, calculating the response value of all samples by discrete Fourier transform and related filteringWhereinz is the input sample to be tested, PiIs the i-th row element of the circulant matrix P.In order to perform the fourier transformation, the method,for Fourier inverse operation, the position with the maximum response value is used as the tracking result of the kernel correlation filter;
Sixthly, judging the occlusion of the detection result of the target position: when the maximum response value is larger than a given threshold value 1 and the difference value between the maximum response value and the maximum response value of the previous frame is smaller than a given threshold value 2, judging that the shielding does not occur, enabling the tracking result of the quasi-nuclear correlation filter to be effective, correcting the detection result through Kalman filtering, and updating the filter; otherwise, the tracking result of the kernel correlation filtering is not retained.
2. The dark channel prior based nuclear-correlation-filtered defogging tracking algorithm according to claim 1, wherein: the step II is that the image defogging method by using the dark channel defogging algorithm comprises the following steps: the fog imaging model in computer vision can be expressed as: where i (x) denotes an input image, i.e., an image to be defogged, j (x) denotes a haze-free image after recovery, t (x) denotes a transmittance, a denotes a global atmospheric light component, and when the transmittance t (x) is constant and a is known:introducing a dark channel prior can yield an estimate of the transmittance:
3. the dark channel prior based nuclear-correlation-filtered defogging tracking algorithm according to claim 1, wherein: the fourth step comprises the following steps: A. state vector prediction: Where H (k) is the state transition matrix for the kth frame, initialized to [1, 0, 1, 0; 0, 1, 0, 1; 0, 0, 1, 0; 0,0,0,1],For the last frame of the correction result, initializing to [ pos'; 0; 0]Pos is the target position given by the first frame; B. state vector covariance prediction: p (k +1| k) ═ H (k) P (k | k) HT(k) + Q (k), where P (k | k) is the state vector of the kth frame and Q (k) is the system noise, initialized to the four-dimensional identity matrix.
4. The dark channel prior based nuclear-correlation-filtered defogging tracking algorithm according to claim 1, wherein: the step of Kalman filtering calibration comprises the following steps:
calculating a Kalman weighting matrix:
K(k+1)=P(k+1|k)FT(k+1)·(F(k+1)P(k+1|k)FT(k+1)+A(k+1)-1)
where F is a measurement matrix, F ═ 1, 0, 0, 0; 0, 1, 0, 0], Λ ═ 36, 0; 0, 36 ];
updating the state vector:
wherein X ═ pos', represents the column vector constructed at the target position obtained in the fifth step;
updating the covariance of the state vector:
P(k+1|k+1)=(I-K(k+1)F(k+1))P(k+1,k)。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910354450.3A CN111862164A (en) | 2019-04-29 | 2019-04-29 | Nuclear correlation filtering defogging tracking algorithm based on dark channel prior |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910354450.3A CN111862164A (en) | 2019-04-29 | 2019-04-29 | Nuclear correlation filtering defogging tracking algorithm based on dark channel prior |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111862164A true CN111862164A (en) | 2020-10-30 |
Family
ID=72966595
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910354450.3A Pending CN111862164A (en) | 2019-04-29 | 2019-04-29 | Nuclear correlation filtering defogging tracking algorithm based on dark channel prior |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111862164A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108198209A (en) * | 2017-12-22 | 2018-06-22 | 天津理工大学 | It is blocking and dimensional variation pedestrian tracking algorithm |
CN108717686A (en) * | 2018-04-04 | 2018-10-30 | 华南理工大学 | A kind of real-time video defogging method based on dark channel prior |
CN109558877A (en) * | 2018-10-19 | 2019-04-02 | 复旦大学 | Naval target track algorithm based on KCF |
-
2019
- 2019-04-29 CN CN201910354450.3A patent/CN111862164A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108198209A (en) * | 2017-12-22 | 2018-06-22 | 天津理工大学 | It is blocking and dimensional variation pedestrian tracking algorithm |
CN108717686A (en) * | 2018-04-04 | 2018-10-30 | 华南理工大学 | A kind of real-time video defogging method based on dark channel prior |
CN109558877A (en) * | 2018-10-19 | 2019-04-02 | 复旦大学 | Naval target track algorithm based on KCF |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108198209B (en) | People tracking method under the condition of shielding and scale change | |
CN110097568B (en) | Video object detection and segmentation method based on space-time dual-branch network | |
CN110569723A (en) | Target tracking method combining feature fusion and model updating | |
CN110287819B (en) | Moving target detection method based on low rank and sparse decomposition under dynamic background | |
CN109993052B (en) | Scale-adaptive target tracking method and system under complex scene | |
CN111260738A (en) | Multi-scale target tracking method based on relevant filtering and self-adaptive feature fusion | |
CN111489330B (en) | Weak and small target detection method based on multi-source information fusion | |
CN110084837B (en) | Target detection and tracking method based on unmanned aerial vehicle video | |
CN110895820A (en) | KCF-based scale self-adaptive target tracking method | |
CN112085765A (en) | Video target tracking method combining particle filtering and metric learning | |
CN111723756B (en) | Facial feature point tracking method based on self-supervision and semi-supervision learning | |
CN111429485B (en) | Cross-modal filtering tracking method based on self-adaptive regularization and high-reliability updating | |
CN107368802B (en) | Moving target tracking method based on KCF and human brain memory mechanism | |
CN111260691B (en) | Space-time regular correlation filtering tracking method based on context awareness regression | |
CN111369449A (en) | Infrared blind pixel compensation method based on generating type countermeasure network | |
CN108921872B (en) | Robust visual target tracking method suitable for long-range tracking | |
CN110276782B (en) | Hyperspectral target tracking method combining spatial spectral features and related filtering | |
CN110782480A (en) | Infrared pedestrian tracking method based on online template prediction | |
CN107784664B (en) | K-sparse-based rapid robust target tracking method | |
CN109146928B (en) | Target tracking method for updating gradient threshold judgment model | |
CN113888607A (en) | Target detection and tracking method and system based on event camera and storage medium | |
CN110751670A (en) | Target tracking method based on fusion | |
Walsh et al. | Detecting tracking failures from correlation response maps | |
CN108573217B (en) | Compression tracking method combined with local structured information | |
CN111241965A (en) | Target tracking method for occlusion detection based on multi-example learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |