CN108230366B - Target object tracking method - Google Patents
Target object tracking method Download PDFInfo
- Publication number
- CN108230366B CN108230366B CN201711458999.4A CN201711458999A CN108230366B CN 108230366 B CN108230366 B CN 108230366B CN 201711458999 A CN201711458999 A CN 201711458999A CN 108230366 B CN108230366 B CN 108230366B
- Authority
- CN
- China
- Prior art keywords
- image
- frame
- target object
- value
- moving object
- 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.)
- Active
Links
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/254—Analysis of motion involving subtraction of images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
-
- 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/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
-
- 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
Abstract
The invention relates to a method for tracking a target object, which comprises the steps of collecting a moving object set of a frame of image at a position, identifying a moving object matched with a target object with high speed and small volume, and adjusting the position of the target object on the frame of image and the adjusting angle of a collecting range to keep the target object in the central area of the collecting range, thereby realizing the tracking of the target object with high speed and small volume.
Description
Technical Field
The invention relates to the technical field of tracking, in particular to a target object tracking method.
Background
The traditional target tracking algorithm based on vision comprises motion detection, MeanShift, KCF, TLD and the like, the motion detection algorithm is simple, and a scene with changed background cannot be detected; MeanShift and KCF calculated amount are not large, tracking effect is good for the condition that target size changes little, TLD calculation is complex, the same as KCF, the requirement is placed on size change of a target, the target object with high speed and small size is subjected to background influence due to small size, the tracking effect is poor, KCF and TLD are online learning algorithms, the object needing to be tracked needs to be manually specified before tracking is started, full-automatic tracking cannot be achieved, the target needs to be specified again after being lost, and the practical effect is poor.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a method for tracking a target object with high speed and small size is provided.
In order to solve the technical problems, the invention adopts the technical scheme that: a method of tracking a target object, comprising the steps of:
s1, collecting a frame image of a position, and detecting a moving object in the frame image to obtain a moving object set;
s2, acquiring feature point information on a specific object, and judging whether a moving object matched with the feature point information exists in the moving object set; if yes, marking the moving object matched with the characteristic point information as a target object;
s3, identifying the position of the object on the frame of image, and judging whether the position is in the central area of the frame of image;
and S4, if not, calculating the movement speed of the target object, and obtaining the adjustment angle of the corresponding acquisition range according to the movement speed so that the target object is kept in the central area of the acquisition range.
The invention has the beneficial effects that: the method comprises the steps of acquiring a moving object set of a frame of image at a position, identifying a moving object matched with a target object with high speed and small volume, and adjusting the position of the target object on the frame of image and the adjusting angle of an acquisition range, so that the target object is kept in the central area of the acquisition range, tracking of the target object with high speed and small volume is realized, full-automatic tracking can be realized, and the method is high in practicability.
Drawings
Fig. 1 is a schematic diagram illustrating a method for tracking an object according to the present invention.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
The most key concept of the invention is as follows: the method comprises the steps of acquiring a moving object set of a frame of image at a position, identifying a moving object matched with a target object with high speed and small volume, and adjusting the position of the target object on the frame of image and the adjusting angle of an acquisition range to realize the tracking of the target object.
Referring to fig. 1 of the drawings,
a method of tracking a target object, comprising the steps of:
s1, collecting a frame image of a position, and detecting a moving object in the frame image to obtain a moving object set;
s2, acquiring feature point information on a specific object, and judging whether a moving object matched with the feature point information exists in the moving object set; if yes, marking the moving object matched with the characteristic point information as a target object;
s3, identifying the position of the object on the frame of image, and judging whether the position is in the central area of the frame of image;
and S4, if not, calculating the movement speed of the target object, and obtaining the adjustment angle of the corresponding acquisition range according to the movement speed so that the target object is kept in the central area of the acquisition range.
From the above description, the beneficial effects of the present invention are: the method comprises the steps of acquiring a moving object set of a frame of image at a position, identifying a moving object matched with a target object with high speed and small volume, and adjusting the position of the target object on the frame of image and the adjusting angle of an acquisition range, so that the target object is kept in the central area of the acquisition range, tracking of the target object with high speed and small volume is realized, full-automatic tracking can be realized, and the method is high in practicability.
Further, step S1 further includes:
acquiring a plurality of frames of images at the position in advance, carrying out average value operation on the gray values of the same pixel point in each frame of image, and calculating to obtain a first image, wherein the first image is marked as a background image;
comparing the frame of image with a background image, and judging whether an object which does not exist in the background image exists in the frame of image, wherein if the object exists in the frame of image, the object is a moving object; and judging whether the vector displacement difference of the same object between the frame image and the background image is larger than a first preset value, and if so, judging that the object is a moving object.
As can be seen from the above description, by comparing the frame image with the background image, it can be determined whether there is a moving object.
Further, step S1 includes updating the background value C of the frame imagek
Wherein C iskIs the current background value, Ck-1Is the background value of the previous moment, TkIs a threshold value at the time k, and the threshold value T at the time k iskIn particular a weighted average of the gray values, fkIf the gray value of the kth frame image is greater than or equal to the threshold value at the moment k, the current background value is equal to the background value at the previous moment; and if the gray value of the kth frame image is smaller than the threshold value at the moment k, the current background value is equal to the weighted value of the current frame data value and the historical frame data value.
As can be seen from the above description, since the object is moving, the background changes, and the background of the object needs to be updated in real time.
Further, step S2 specifically includes:
acquiring feature point information on a specific object, zooming the size of the frame of image to a second preset value to obtain a second image, and judging whether a moving object matched with the feature point information exists in a moving object set in the second image or not; and if so, marking the moving object matched with the characteristic point information as the target object.
From the above description, it can be known that the moving object matched with the feature point information can be found according to the feature point information, that is, the target object.
Further, step S3 specifically includes:
identifying whether the distance from the position coordinate of the target object on the frame of image to the central point of the frame of image is greater than a third preset value, if so, determining that the position of the target object is not in the central area of the frame of image;
and if not, the position of the target object is in the central area of the frame of image.
As can be seen from the above description, the third preset value is a radius of a central area of the frame image.
Further, the calculation of the movement speed in step S4 is specifically:
respectively acquiring images at the time i and the time j, and calculating the coordinate (x) of the target object at the time ii,yi,ti) And the coordinates (x) of the object at time jj,yj,tj) Substituting V as S/T to obtain the motion speed V (V)x,vy)
vx=(xj-xi)/(tj-ti)
vy=(yj-yi)/(tj-ti)。
From the above description, the movement speed of the target object can be calculated through the displacement coordinates of the target object at different time points.
Further, the calculation of the adjustment angle of the acquisition range specifically includes:
substituting the movement velocity V intoObtaining an adjustment angle value of the acquisition range, wherein c is a constant,is a coefficient of the speed of movement.
As can be seen from the above description, the adjustment angle of the acquisition range is linearly related to the movement speed.
Further, step S4 further includes:
and adjusting the focal length parameter corresponding to the acquisition range, so that the proportion of the target object in the acquisition range is within a fourth preset value range, and the target object is kept in the central area of the acquisition range.
As can be seen from the above description, when the size of the target object is too large, it is easy to miss, and when the size of the target object is too small, it is easy to make a misjudgment.
Referring to fig. 1, a first embodiment of the present invention is:
a method of tracking a target object, comprising the steps of:
s1, collecting a plurality of frames of images at a position in advance, carrying out average value operation on the gray values of the same pixel points in each frame of image, and calculating to obtain a first image, wherein the first image is marked as a background image, and 20 frames of images are collected in the embodiment;
acquiring a frame of image of the position, and detecting a moving object in the frame of image to obtain a moving object set;
comparing the frame of image with a background image, and judging whether an object which does not exist in the background image exists in the frame of image, wherein if the object exists in the frame of image, the object is a moving object;
judging whether the vector displacement difference of the same object between the frame image and the background image is larger than a first preset value or not, and if so, judging that the object is a moving object;
further comprises updating the background value C of the frame imagek
Wherein C iskIs the current background value, Ck-1Is the background value of the previous moment, TkIs a threshold value at the time k, and the threshold value T at the time k iskIn particular a weighted average of the grey values, assuming n grey values x1,x2,x3....xnThe weights of (a) are w1,w2,w3...wnThen the weighted average threshold at time k:
fkthe value of α is 0.875, and if the gray value of the kth frame image is greater than or equal to the threshold value at the time k, the current background value is equal to the background value at the previous time; if the gray value of the kth frame image is smaller than the threshold value at the k moment, the current background value is equal to the weighted value of the gray value of the current frame and the gray value of the historical frame;
s2, obtaining feature point information on a specific object, scaling the size of the frame of image to a second preset value, in this embodiment, the second preset value is 520 × 520, obtaining a second image, and determining whether a moving object matching the feature point information exists in a moving object set in the second image; if so, marking the moving object matched with the characteristic point information as a target object, wherein the characteristic point information of the target object is high in speed and small in size;
s3, identifying whether a distance from a position coordinate of the target object on the frame of image to a center point of the frame of image is greater than a third preset value, where the third preset value is a radius R of a central area of the frame of image, where R is 270mm in this embodiment, and if yes, the position of the target object is not in the central area of the frame of image;
if not, the position of the target object is in the central area of the frame of image;
s4, if the position of the target object is not in the central area of the frame of image, calculating a movement velocity of the target object, and obtaining an adjustment angle of a corresponding acquisition range according to the movement velocity, where the calculation of the movement velocity specifically includes:
respectively acquiring images at the time i and the time j, and calculating the coordinate (x) of the target object at the time ii,yi,ti) And the coordinates (x) of the object at time jj,yj,tj) Substituting V as S/T to obtain the motion speed V (V)x,vy)
vx=(xj-xi)/(tj-ti)
vy=(yj-yi)/(tj-ti)
The calculation of the adjustment angle of the acquisition range specifically comprises:
substituting the movement velocity V intoObtaining an adjustment angle value of the acquisition range, wherein c is a constant,a coefficient of motion speed;
further comprising:
and adjusting the focal length parameter corresponding to the acquisition range, so that the proportion of the target object occupying the acquisition range is within a fourth preset value range, the target object is kept in the central area of the acquisition range, and the fourth preset value range is height width information of the target object within the acquisition range [ 30-40 ].
In summary, according to the tracking method for the target object provided by the invention, the moving object set of one frame of image at one position is acquired, the moving object matched with the target object with high speed and small volume is identified, and the position of the target object on the one frame of image and the adjustment angle of the acquisition range are adjusted, so that the target object is kept in the central area of the acquisition range, and the tracking of the target object with high speed and small volume is realized.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.
Claims (4)
1. A method for tracking a target object, comprising the steps of:
s1, collecting a frame image of a position, and detecting a moving object in the frame image to obtain a moving object set;
s2, acquiring feature point information on a specific object, and judging whether a moving object matched with the feature point information exists in the moving object set; if yes, marking the moving object matched with the characteristic point information as a target object;
s3, identifying the position of the object on the frame of image, and judging whether the position is in the central area of the frame of image;
s4, if not, calculating the movement speed of the target object, obtaining the adjustment angle of the corresponding acquisition range according to the movement speed, and adjusting the acquisition range according to the adjustment angle to keep the target object in the central area of the acquisition range;
the calculation of the movement speed in step S4 is specifically:
respectively acquiring images at the time i and the time j, and substituting the coordinates (xi, yi, ti) of the target object at the time i and the coordinates (xj, yj, tj) of the target object at the time j into V which is S/T to obtain the motion speed V (vx, vy)
vx=(xj-xi)/(tj-ti);
vy=(yj-yi)/(tj-ti);
The calculation of the adjustment angle of the acquisition range specifically comprises:
substituting the movement velocity V intoObtaining an adjustment angle value of the acquisition range, wherein c is a constant,a coefficient of motion speed;
step S4 further includes:
adjusting the focal length parameter corresponding to the acquisition range to enable the proportion of the target object in the acquisition range to be within a fourth preset value range;
step S1 further includes updating the background value C of the frame of imagek
Wherein C iskIs the current background value, Ck-1Is the background value of the previous moment, TkIs a threshold value at the time k, and the threshold value T at the time k iskIn particular a weighted average of the gray values, fkIs the gray value of the k frame image, alpha is the updating coefficient, if the gray value of the k frame imageIf the value is greater than or equal to the threshold value at the moment k, the current background value is equal to the background value at the previous moment; and if the gray value of the image of the kth frame is smaller than the threshold value at the moment k, the current background value is equal to the weighted value of the gray value of the current frame and the gray value of the historical frame.
2. The method for tracking the target object according to claim 1, wherein the step S1 further comprises:
acquiring a plurality of frames of images at the position in advance, carrying out average value operation on the gray values of the same pixel point in each frame of image, and calculating to obtain a first image, wherein the first image is marked as a background image;
comparing the frame of image with a background image, and judging whether an object which does not exist in the background image exists in the frame of image, wherein if the object exists in the frame of image, the object is a moving object;
and judging whether the vector displacement difference of the same object between the frame image and the background image is larger than a first preset value, and if so, judging that the object is a moving object.
3. The method for tracking the target object according to claim 1, wherein the step S2 specifically comprises:
acquiring feature point information on a specific object;
scaling the size of the frame image to a second preset value to obtain a second image;
judging whether a moving object matched with the characteristic point information exists in the moving object set in the second image or not; and if so, marking the moving object matched with the characteristic point information as the target object.
4. The method for tracking the target object according to claim 1, wherein the step S3 specifically comprises:
identifying whether the distance from the position of the target object on the frame of image to the center point of the frame of image is greater than a third preset value, if so, determining that the target object is not in the central area of the frame of image;
and if not, the target object is in the central area of the frame of image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711458999.4A CN108230366B (en) | 2017-12-28 | 2017-12-28 | Target object tracking method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711458999.4A CN108230366B (en) | 2017-12-28 | 2017-12-28 | Target object tracking method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108230366A CN108230366A (en) | 2018-06-29 |
CN108230366B true CN108230366B (en) | 2021-09-07 |
Family
ID=62645619
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711458999.4A Active CN108230366B (en) | 2017-12-28 | 2017-12-28 | Target object tracking method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108230366B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7374581B2 (en) * | 2018-10-01 | 2023-11-07 | カシオ計算機株式会社 | Robot, image processing method and program |
CN110691197A (en) * | 2019-11-04 | 2020-01-14 | 上海摩象网络科技有限公司 | Shooting tracking method and device and electronic equipment |
Family Cites Families (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100426174B1 (en) * | 2001-10-29 | 2004-04-06 | 삼성전자주식회사 | Method for controlling a camera using video compression algorithm |
KR20110058022A (en) * | 2009-11-25 | 2011-06-01 | 엘지이노텍 주식회사 | Continuously photographing image system including camera module |
CN106508051B (en) * | 2010-05-20 | 2014-01-01 | 西北工业大学 | A kind of FPGA implementation method of air-ground image trace |
CN101986348A (en) * | 2010-11-09 | 2011-03-16 | 上海电机学院 | Visual target identification and tracking method |
CN102096927A (en) * | 2011-01-26 | 2011-06-15 | 北京林业大学 | Target tracking method of independent forestry robot |
CN102494675B (en) * | 2011-11-30 | 2013-12-25 | 哈尔滨工业大学 | High-speed visual capturing method of moving target features |
CN102831401B (en) * | 2012-08-03 | 2016-01-13 | 樊晓东 | To following the tracks of without specific markers target object, three-dimensional overlay and mutual method and system |
CN102883144B (en) * | 2012-09-26 | 2015-04-22 | 青岛海信网络科技股份有限公司 | Video monitoring system and video monitoring method |
CN102930541B (en) * | 2012-10-29 | 2015-06-24 | 深圳市开天源自动化工程有限公司 | Background extracting and updating method of video images |
US9769387B1 (en) * | 2013-11-05 | 2017-09-19 | Trace Live Network Inc. | Action camera system for unmanned aerial vehicle |
CN104125433A (en) * | 2014-07-30 | 2014-10-29 | 西安冉科信息技术有限公司 | Moving object video surveillance method based on multi-PTZ (pan-tilt-zoom)-camera linkage structure |
CN105812736A (en) * | 2016-03-21 | 2016-07-27 | 北京工业大学 | Self-adjustment Pan/Tilt/Zoom camera remote intelligent control system and control method |
CN107452021A (en) * | 2016-04-19 | 2017-12-08 | 深圳正谱云教育技术有限公司 | Camera to automatically track system and method based on single-lens image Dynamic Recognition |
CN106331511A (en) * | 2016-11-16 | 2017-01-11 | 广东欧珀移动通信有限公司 | Method and device of tracking shoot by intelligent terminal |
CN106600625A (en) * | 2016-12-13 | 2017-04-26 | 广东沅朋网络科技有限公司 | Image processing method and device for detecting small-sized living thing |
-
2017
- 2017-12-28 CN CN201711458999.4A patent/CN108230366B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108230366A (en) | 2018-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108985171B (en) | Motion state estimation method and motion state estimation device | |
JP6942488B2 (en) | Image processing equipment, image processing system, image processing method, and program | |
CN103530599A (en) | Method and system for distinguishing real face and picture face | |
JP2018522348A (en) | Method and system for estimating the three-dimensional posture of a sensor | |
JP7272024B2 (en) | Object tracking device, monitoring system and object tracking method | |
JP6469905B2 (en) | Monocular 3D localization for autonomous driving using adaptive ground plane estimation | |
CN108537821A (en) | A kind of moving target detecting method based on video | |
WO2019057197A1 (en) | Visual tracking method and apparatus for moving target, electronic device and storage medium | |
CN106919895B (en) | Tracking method and system for moving object | |
CN110197185B (en) | Method and system for monitoring space under bridge based on scale invariant feature transform algorithm | |
WO2021084972A1 (en) | Object tracking device and object tracking method | |
CN110827321B (en) | Multi-camera collaborative active target tracking method based on three-dimensional information | |
CN112184757A (en) | Method and device for determining motion trail, storage medium and electronic device | |
CN108521554A (en) | Large scene multi-target cooperative tracking method, intelligent monitor system, traffic system | |
CN111178193A (en) | Lane line detection method, lane line detection device and computer-readable storage medium | |
CN108230366B (en) | Target object tracking method | |
JP2018120283A (en) | Information processing device, information processing method and program | |
JP2020149641A (en) | Object tracking device and object tracking method | |
CN111998862A (en) | Dense binocular SLAM method based on BNN | |
CN111914756A (en) | Video data processing method and device | |
CN110570474A (en) | Pose estimation method and system of depth camera | |
CN107292910A (en) | Moving target detecting method under a kind of mobile camera based on pixel modeling | |
CN106651921B (en) | Motion detection method and method for avoiding and tracking moving target | |
Jin et al. | Road curvature estimation using a new lane detection method | |
CN113723432B (en) | Intelligent identification and positioning tracking method and system based on deep 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |