CN105787961B - The Camshift motion target tracking method of goal histogram based on Background color information weighting - Google Patents
The Camshift motion target tracking method of goal histogram based on Background color information weighting Download PDFInfo
- Publication number
- CN105787961B CN105787961B CN201610094544.8A CN201610094544A CN105787961B CN 105787961 B CN105787961 B CN 105787961B CN 201610094544 A CN201610094544 A CN 201610094544A CN 105787961 B CN105787961 B CN 105787961B
- Authority
- CN
- China
- Prior art keywords
- color
- target
- value
- background
- histogram
- 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.)
- Expired - Fee Related
Links
Classifications
-
- 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/10—Image acquisition modality
- G06T2207/10024—Color image
Landscapes
- Image Analysis (AREA)
Abstract
The present invention relates to a kind of Camshift motion target tracking method of goal histogram based on Background color information weighting, operating procedure is as follows: 1) establishing color of object histogram;2) difference color histogram is established;3) background weighting coefficient is calculated according to color of object histogram and difference color histogram;4) color of object histogram is weighted using weighting coefficient, obtains final goal model;5) by object module back mapping to each pixel, color probability distribution figure is obtained;6) search window is initialized, zeroth order square and first moment in search window is calculated, further calculates the mass center and new search window size of search window;7) center of search window is moved to the centroid position in step 6), judges whether to restrain, if convergence, read in next frame, enter back into step 5), be otherwise directly entered step 6).The present invention is the object module that Camshift algorithm establishes a prominent color of object characteristic, improves the anti-background colour interference performance of algorithm.
Description
Technical field
The present invention relates to a kind of Camshift motion target trackings of goal histogram based on Background color information weighting
Method, applied to the motion target tracking in intelligent video process field, suitable for the movement under by background color interference cases
Target following.
Background technique
Real time kinematics target detection and tracking are one key techniques of computer vision field, are mainly used in intelligence
Security protection and human-computer interaction, wherein the tracking technique with moving target is particularly important.The Camshift that document [1] proposes
(Continuously Adaptive Mean Shift) algorithm be one kind be easily achieved and the higher moving target of efficiency with
Track algorithm, is widely used.Camshift algorithm is the development to Mean Shift algorithm.Mean Shift algorithm is
It is a kind of without ginseng density estimation algorithm, by document [2] for the first time be applied to area of pattern recognition.Mean Shift algorithm utilizes iteration
The characteristics of Mean Shift vector converges on the gradient direction of probability density distribution finds target pattern (the maximum area of probability density
Domain).Since Mean Shift algorithm operates probability distribution, for its thought is applied in field of video image processing,
Corresponding probability distribution must be obtained according to video image, so in the Camshift algorithm of document [1], with the HSV of target
H (tone) component of color space establishes histogram as object module as statistic, and object module back mapping is arrived
Each pixel of every frame image, to convert color probability distribution figure for video image.To color probability distribution figure middle finger
The Mean Shift vector (having the mass center for turning to search window in Camshift algorithm) determined in search window is iterated until receiving
It holds back, to obtain target pattern.When each frame to video sequence is handled, all centered on the convergence position of previous frame
Subsequent iteration Mean Shift vector is until it converges on new position, and search window size is set dynamically, to realize
Tracking to target pattern.Since target pattern is relatively fixed (similar to making translational motion relative to the position of target entirety
The center of gravity of object is basically unchanged), to realize the tracking to moving target indirectly.
Camshift algorithm is functional in target and very big color background retrochromism, however target and background
Color all has respective randomness, so background and target have been possible to identical color component in some cases, herein
Due to being interfered by background color when being tracked under kind situation to moving target, it is easy to happen erroneous judgement, is occurred once being put at some
Erroneous judgement, due to the forward-backward correlation of the algorithm, subsequent tracking will be entirely ineffective.It is easy to be by the interference of background color
The build-in attribute of Camshift algorithm, because the algorithm is when establishing object module (i.e. the color histogram of target), complete base
In target without considering background, all colours ingredient (including color component identical with background) of target has identically
Position judges a part that the ingredient is target if there is background component identical with color of object ingredient enters search window.
Due to being easy to be the build-in attribute of the algorithm by background interference and can not eradicate, the present invention is from another angle, it is intended to
Reduce adverse effect caused by color component identical with target in background: the present invention is when establishing object module, relative reduction
Contribution of the shared color component of target and background to object module, at this time if there is background identical with color of object ingredient at
Divide and enter search window, since this kind of color component is to the contribution relative reduction of entire object module, this kind of color bring is bad
Influence will also decrease.
Document [1]: Bradski, G.: " Computer vision face tracking for use in a
perceptual user interface”,Intel Technol.J.,1998,2,(Q2),pp.1–15。
Document [2]: Cheng, Y.: " Mean shift, mode seeking, and clustering ", IEEE Trans
Pattern Anal.Mach.Intell.,1995,17,(8),pp.790–799。
Summary of the invention
The purpose of the present invention is be easy when tracking to moving target by background face for tradition Camshift algorithm
Color interference the problem of the algorithm improved, a kind of goal histogram based on Background color information weighting is provided
Camshift motion target tracking method, this method generate one and background and target when establishing object module first
Then the relevant weighting coefficient of colouring information is weighted original object color histogram graph model by the weighting coefficient.Add
The purpose of power is the specific gravity for the shared color component of relative reduction target and background in object module, opposite to keep target
The specific gravity of distinctive color component.The algorithm core concept is the specific color characteristic of prominent target, desalinates target and background
Shared color characteristics, to reduce interference caused by background color.Reliability pair of the present invention from enhancing object module
Traditional Camshift algorithm makes improvement, compared to more traditional Camshift algorithm, opposite can mention when having powerful connections color interference
High algorithm performance reduces False Rate.
In order to achieve the above objectives, the present invention adopts the following technical scheme that:
A kind of Camshift motion target tracking method of the goal histogram based on Background color information weighting, operation step
It is rapid as follows:
1) initialized target window establishes the color histogram of target;
2) color histogram of background is established with other regions in addition to target window;
3) background using tone as parameter is calculated according to the color histogram of the color histogram of target and background
Weighting coefficient;
4) color of object histogram is weighted using weighting coefficient, obtains final object module;
5) by each pixel of object module back mapping to video image, color probability distribution figure is obtained;
6) search window is initialized, zeroth order square and first moment in search window are calculated, is searched with zeroth order square and first moment calculating
The mass center of rope window calculates new search window size with zeroth order square;
7) center of search window is moved in step 6) and calculates resulting centroid position, judge whether to restrain, if received
It holds back, read in next frame and enters step 5), be otherwise directly entered step 6).
Compare with the existing technology of the present invention, have following obvious prominent substantive distinguishing features and significant technology into
Step:
Algorithm of the invention improves traditional Camshift algorithm, and Background color information and target face have been merged in foundation
For the goal histogram of color information as object module, which maintains ratio of the distinctive color component of target in object module
Weight, but specific gravity of the shared color component of relative reduction target and background in object module.The model highlights target face
The retrochromism of color and background has desalinated the general character of color of object and background color, so having higher accuracy.It is based on
The Camshift Moving Target Tracking Algorithm of this kind of object module has stronger anti-background interference ability.
Detailed description of the invention
Fig. 1 is that the present invention is based on the Camshift motion target tracking methods of the goal histogram of Background color information weighting
Flow diagram.
Specific embodiment
The preferred embodiment of the present invention is described in further detail below in conjunction with attached drawing:
The Camshift motion target tracking method for the goal histogram that the present embodiment is weighted based on Background color information, ginseng
See Fig. 1, comprising the following steps:
1) initialized target window establishes the color histogram of target;
2) color histogram of background is established with other regions in addition to target window;
3) background using tone as parameter is calculated according to the color histogram of the color histogram of target and background
Weighting coefficient;
4) color of object histogram is weighted using weighting coefficient, obtains final object module;
5) by each pixel of object module back mapping to video image, color probability distribution figure is obtained;
6) search window is initialized, zeroth order square and first moment in search window are calculated, is searched with zeroth order square and first moment calculating
Mass center (the x of rope windowc,yc), new search window size is calculated with zeroth order square;
7) center of search window is moved in step 6) and calculates resulting centroid position, judge whether to restrain, if received
It holds back, read in next frame and enters step 5), be otherwise directly entered step 6).
In the step 1), video image first frame is read in, a target window is selected manually, makes the window include just
The rgb value of each pixel in target window is converted to corresponding HSV value, takes H value therein, i.e. tone by entire target
Value establishes color of object histogram t={ tuU=1,2 ..., n, wherein u indicates target area tone parameter, 1,2 ..., n table
Show the constant interval of target area tone parameter, tuIndicate every kind of tone corresponding value in histogram:
Wherein, δ is Dirac function, and (x, y) indicates that single pixel point, h indicate that the tone value of pixel, C indicate normalizing
Change coefficient:
In the step 2), background color histogram is established to the region in the first frame of video image in addition to target window
Figure, is converted to corresponding HSV value for the rgb value of each pixel first, H value therein is taken to establish the straight color side's figure b=of background
{bu′}U '=1,2 ..., m, wherein the tone parameter of u ' expression background area, 1,2 ..., m indicate the change of background area tone parameter
Change section, bu′Indicate every kind of tone corresponding value in histogram:
Wherein, δ is Dirac function, and (x, y) indicates that single pixel point, h indicate that the tone value of pixel, C indicate normalizing
Change coefficient:
In the step 3), the information of integration objective color histogram and difference color histogram judges first frame video
Each color in image is to belong to following any situations: having in the color but background in target does not have;Without being somebody's turn to do in target
Have in color but background;There is the color in target and background.It is also needed when target and background has certain color further
The ratio of this kind of color in this kind of color of target and background is judged, to produce a background weighting coefficient.If weighting coefficient
For w={ wu″}U "=1,2 ..., l, wherein u " is tone parameter, and 1,2 ..., l refers to the constant interval of tone parameter u ", and has:
L=max { m, n }
Based on assumed above, if enablingDefine background weighting coefficient are as follows:
Wherein tanh pu″It is hyperbolic tangent function, which is incremented by when domain is (0, ∝), and codomain is (0,1).
In the step 4), color of object histogram t is weighted using the weighting coefficient w obtained in step 3), is obtained
To final object module t '={ tu′}U=1,2,3 ..., n, in which:
t′u=wutu。
In the step 5), since the first frame of video sequence, the rgb value of each pixel of video image is converted
Corresponding probability value is found in object module t ', and the value is mapped to using the H value of each pixel as index for HSV value
Probability value is expanded 256 times of values as the pixel by the gray space of 8bit.If the H value of pixel (x, y) falls in
U tone section, then the corresponding gray value of the pixel is I (x, y)=256 × t 'u, arrived after above-mentioned variation
So-called color probability distribution figure.
In the step 6), a search window is initialized: for first entering the step, during the center with target window is
The heart selects a circular search window, and the radius of the window is any one odd number more than or equal to 3, and unit is pixel;It is right
The step is first entered in non-, then search window is arranged in the center and window size set using a upper circulation.It is searching
Zeroth order square is calculated separately in rope window:
Wherein I (x, y) indicates the gray value of zero pixel;
First moment:
The then mass center of search window are as follows:
Real-time update search box size is the embodiment of the continuous adaptability of Camshift algorithm, the radius of new search window
It is sized to the function directly proportional with zeroth order square, if maximum gray value is I in search windowmax=I (xi,yi), xi, yiIt is
The pixel of maximum gradation value is taken, if the radius of new search window is R, then sets its value are as follows:
In the step 7), to the constringent judgement of Mean Shift, to determine to move towards in next step.First by search window
Center is moved to (x obtained in step 6)c,yc), moving distance d is recorded, the threshold value for defining moving distance is ε, another to define
The threshold value of one the number of iterations is judged as convergence if d < ε or the number of iterations reach threshold value, reads in next frame video figure
Picture, and enter step 5), otherwise, it is judged as and does not restrain, be directly entered step 6).
Claims (3)
1. a kind of Camshift motion target tracking method of the goal histogram based on Background color information weighting, feature exist
In operating procedure is as follows:
1) initialized target window establishes the color histogram of target;
2) color histogram of background is established with other regions in addition to target window;
3) weighting of the background using tone as parameter is calculated according to the color histogram of the color histogram of target and background
Coefficient;
4) color of object histogram is weighted using weighting coefficient, obtains final object module;
5) by each pixel of object module back mapping to video image, color probability distribution figure is obtained;
6) search window is initialized, zeroth order square and first moment in search window are calculated, calculates search window with zeroth order square and first moment
Mass center (xc,yc), new search window size is calculated with zeroth order square;
7) center of search window is moved in step 6) and calculates resulting centroid position, judge whether to restrain, if convergence, read
Enter next frame and enter step 5), is otherwise directly entered step 6);
In the step 1), video image first frame is read in, selectes a target window manually, it includes whole for making the window just
The rgb value of each pixel in target window is converted to corresponding HSV value, takes H value therein, i.e. tone value by a target
Establish color of object histogram t={ tu}U=1,2 ..., n, wherein u indicates that target area tone parameter, 1,2 ..., n indicate target
The constant interval of image parameter, tuIndicate every kind of tone corresponding value in histogram:
Wherein, δ is Dirac function, and (x, y) indicates that single pixel point, h indicate that the tone value of pixel, C indicate normalization system
Number:
In the step 2), background color histogram is established to the region in the first frame of video image in addition to target window
Figure, is converted to corresponding HSV value for the rgb value of each pixel first, H value therein is taken to establish the straight color side's figure b=of background
{bu′}U '=1,2 ..., m, wherein the tone parameter of u ' expression background area, 1,2 ..., m indicate the change of background area tone parameter
Change section, bu′Indicate every kind of tone corresponding value in histogram:
Wherein, δ is Dirac function, and (x, y) indicates that single pixel point, h indicate that the tone value of pixel, C indicate normalization system
Number:
In the step 3), the information of integration objective color histogram and difference color histogram judges first frame video figure
Each color as in is to belong to following any situations: having in the color but background in target does not have;There is no the face in target
Have in color but background;There is the color in target and background;It also needs further to sentence when target and background has certain color
The ratio of this kind of color in disconnected this kind of color of target and background, to produce a background weighting coefficient;If weighting coefficient is w
={ wu″}U "=1,2 ..., l, wherein u " is tone parameter, and 1,2 ..., l refers to the constant interval of tone parameter u ", and has:
L=max { m, n }
Based on assumed above, if enablingDefine background weighting coefficient are as follows:
Wherein tanhpu″It is hyperbolic tangent function, which is incremented by when domain is (0, ∝), and codomain is (0,1);
In the step 6), a search window is initialized: for first entering the step, centered on the center of target window
A circular search window is selected, the radius of the window is any one odd number more than or equal to 3, and unit is pixel;For
Non- to first enter the step, then search window is arranged in the center and window size set using a upper circulation;It is searching for
Zeroth order square is calculated separately in window:
Wherein I (x, y) indicates the gray value of zero pixel;
First moment:
The then mass center of search window are as follows:
Real-time update search box size is the embodiment of the continuous adaptability of Camshift algorithm, the radius size of new search window
It is arranged to the function directly proportional with zeroth order square, if maximum gray value is I in search windowmax=I (xi,yi), xi, yiIt is to take most
The pixel of high-gray level value then sets its value if the radius of new search window is R are as follows:
In the step 7), to the constringent judgement of Mean Shift, to determine to move towards in next step;It first will be in search window
Heart position is moved to (x obtained in step 6)c,yc), moving distance d is recorded, the threshold value for defining moving distance is ε, separately defines one
The threshold value of a the number of iterations is judged as convergence if d < ε or the number of iterations reach threshold value, reads in next frame video figure
Picture, and enter step 5), otherwise, it is judged as and does not restrain, be directly entered step 6).
2. it is according to claim 1 based on Background color information weighting goal histogram Camshift moving target with
Track method, which is characterized in that in the step 4), using the weighting coefficient w obtained in step 3) to color of object histogram t into
Row weighting, obtains final object module t '={ t 'u}U=1,2,3 ..., n, in which:
t′u=wutu。
3. it is according to claim 2 based on Background color information weighting goal histogram Camshift moving target with
Track method, which is characterized in that in the step 5), since the first frame of video sequence, by each pixel of video image
Rgb value be transformed to HSV value, using the H value of each pixel as index, find corresponding probability value in object module t ', and
The value is mapped to the gray space of 8bit, i.e., probability value is expanded into 256 times of values as the pixel;If pixel (x,
Y) H value falls in u-th of tone section, then the corresponding gray value of the pixel is I (x, y)=256 × t 'u, by above-mentioned change
Change after to get arrive so-called color probability distribution figure.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610094544.8A CN105787961B (en) | 2016-02-21 | 2016-02-21 | The Camshift motion target tracking method of goal histogram based on Background color information weighting |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610094544.8A CN105787961B (en) | 2016-02-21 | 2016-02-21 | The Camshift motion target tracking method of goal histogram based on Background color information weighting |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105787961A CN105787961A (en) | 2016-07-20 |
CN105787961B true CN105787961B (en) | 2019-06-25 |
Family
ID=56403501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610094544.8A Expired - Fee Related CN105787961B (en) | 2016-02-21 | 2016-02-21 | The Camshift motion target tracking method of goal histogram based on Background color information weighting |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105787961B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110458045A (en) * | 2019-07-22 | 2019-11-15 | 浙江大华技术股份有限公司 | Acquisition methods, image processing method and the device of response probability histogram |
-
2016
- 2016-02-21 CN CN201610094544.8A patent/CN105787961B/en not_active Expired - Fee Related
Non-Patent Citations (4)
Title |
---|
一种基于目标和背景加权的目标跟踪方法;陈爱斌 等;《控制与决策》;20100831;第25卷(第8期);第1246-1250页 |
二维联合特征模型的自适应均值漂移目标跟踪;修春波 等;《光电子 激光》;20150228;第26卷(第2期);第342-351页 |
在线加权多示例学习实时目标跟踪;陈东成 等;《光学 精密工程》;20140630;第22卷(第6期);第1661-1667页 |
显著性直方图模型的Camshift跟踪方法;修春波 等;《光学 精密工程》;20150630;第23卷(第6期);第1749-1757页 |
Also Published As
Publication number | Publication date |
---|---|
CN105787961A (en) | 2016-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108520216B (en) | Gait image-based identity recognition method | |
CN103886344B (en) | A kind of Image Fire Flame recognition methods | |
CN104601964B (en) | Pedestrian target tracking and system in non-overlapping across the video camera room of the ken | |
US7668338B2 (en) | Person tracking method and apparatus using robot | |
CN108268859A (en) | A kind of facial expression recognizing method based on deep learning | |
CN110298297B (en) | Flame identification method and device | |
CN103927511B (en) | image identification method based on difference feature description | |
CN105528794A (en) | Moving object detection method based on Gaussian mixture model and superpixel segmentation | |
CN107066969A (en) | A kind of face identification method | |
CN111832405A (en) | Face recognition method based on HOG and depth residual error network | |
CN114241517A (en) | Cross-modal pedestrian re-identification method based on image generation and shared learning network | |
CN113111857A (en) | Human body posture estimation method based on multi-mode information fusion | |
CN106600613B (en) | Improvement LBP infrared target detection method based on embedded gpu | |
CN103714340B (en) | Self-adaptation feature extracting method based on image partitioning | |
CN110633727A (en) | Deep neural network ship target fine-grained identification method based on selective search | |
CN112329784A (en) | Correlation filtering tracking method based on space-time perception and multimodal response | |
Yang et al. | A Face Detection Method Based on Skin Color Model and Improved AdaBoost Algorithm. | |
CN112329764A (en) | Infrared dim target detection method based on TV-L1 model | |
CN114495170A (en) | Pedestrian re-identification method and system based on local self-attention inhibition | |
Long et al. | Transmission: a new feature for computer vision based smoke detection | |
CN105787961B (en) | The Camshift motion target tracking method of goal histogram based on Background color information weighting | |
CN112580445A (en) | Human body gait image visual angle conversion method based on generation of confrontation network | |
CN109657544B (en) | Face detection method and device | |
CN116778530A (en) | Cross-appearance pedestrian re-identification detection method based on generation model | |
Wu et al. | Face detection based on YCbCr Gaussian model and KL transform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190625 |