CN109040574A - A kind of method and device of rotation head-shaking machine tracking target - Google Patents
A kind of method and device of rotation head-shaking machine tracking target Download PDFInfo
- Publication number
- CN109040574A CN109040574A CN201710427502.6A CN201710427502A CN109040574A CN 109040574 A CN109040574 A CN 109040574A CN 201710427502 A CN201710427502 A CN 201710427502A CN 109040574 A CN109040574 A CN 109040574A
- Authority
- CN
- China
- Prior art keywords
- head
- shaking machine
- tracking target
- frame image
- image
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/66—Remote control of cameras or camera parts, e.g. by remote control devices
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D3/00—Control of position or direction
- G05D3/12—Control of position or direction using feedback
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/617—Upgrading or updating of programs or applications for camera control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/64—Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
Abstract
The embodiment of the invention provides a kind of method and devices of rotation head-shaking machine tracking target to be maintained at picture center for target, observe convenient for user to identify the target in video and control head-shaking machine rotation to track target.This method comprises: obtaining a frame image of head-shaking machine current shooting;The tracking target of head-shaking machine is determined from current frame image;Determine the tracking target at a distance from picture centre;According to relationship of the tracking target at a distance from picture centre and between the motor rotational parameters and image distance of predetermined head-shaking machine, motor rotational parameters needed for determining rotation head-shaking machine tracking target;The head-shaking machine is rotated according to the motor rotational parameters.
Description
Technical field
The present invention relates to field of image processing more particularly to a kind of method and devices of rotation head-shaking machine tracking target.
Background technique
Currently, mainly carrying out picture material identification using cascade classifier.Cascade classifier is a kind of iterative algorithm, core
Thought thinks it is the classifier (Weak Classifier) different for the training of the same training set, and then these weak classifier sets are risen
Come, constitutes a stronger classifier, that is, strong classifier;It trains multiple strong classifiers to combine, just constitutes cascade sort
Device.The only characteristics of image requirement that meets every level-one Weak Classifier is just considered comprising object content.Cascade classifier pair at present
Target identification in image has had reached higher accuracy rate, and derives a series of application scenarios.
In the prior art, there are a kind of application demands, that is, identify video image target and control head-shaking machine track up.With
For video monitoring, picture a group traveling together or vehicle target need to be locked, head-shaking machine angle is adjusted in real time, so that camera lens is always by mesh
Mark is locked in picture central area, facilitates user to the follow-up observation of target, has very strong Practical significance.However, how to solve
The certainly demand, the prior art do not suggest that corresponding solution.
Summary of the invention
The embodiment of the invention provides a kind of method and devices of rotation head-shaking machine tracking target, to identify in video
Target simultaneously controls head-shaking machine rotation to track target, and target is maintained at picture center, is observed convenient for user.
Concrete scheme provided in an embodiment of the present invention is as follows:
In a first aspect, a kind of rotation head-shaking machine tracks mesh calibration method, comprising:
Obtain a frame image of head-shaking machine current shooting;
The tracking target of head-shaking machine is determined from current frame image;
Determine the tracking target at a distance from picture centre;
According to the tracking target at a distance from picture centre and the motor rotational parameters of predetermined head-shaking machine with
Relationship between image distance, motor rotational parameters needed for determining rotation head-shaking machine tracking target;
The head-shaking machine is rotated according to the motor rotational parameters.
With reference to first aspect, in the first possible implementation, determined from current frame image head-shaking machine with
Track target, comprising:
Detect whether current frame image includes the corresponding tracking target of previous frame image, if so, by the previous frame figure
As corresponding tracking target is as the corresponding tracking target of current frame image;Otherwise, again choose current frame image it is corresponding with
Track target.
The possible implementation of with reference to first aspect the first, in the second possible implementation, described in detection
Whether current frame image includes the corresponding tracking target of previous frame image, comprising:
According to the corresponding tracking target region of previous frame image, the detection range of current frame image is determined;
According to preparatory trained cascade classifier, whether detect in the detection range comprising the previous frame image pair
The tracking target answered.
The possible implementation of with reference to first aspect the first, in the third possible implementation, described upper one
The corresponding tracking target of frame image is less than the target of preset threshold for static duration.
With reference to first aspect the first or the third possible implementation, in the fourth possible implementation,
It is described to choose the corresponding tracking target of current frame image again, comprising:
Traversal detection is carried out to the current frame image according to preparatory trained cascade classifier;
A tracking target is chosen from the multiple targets detected.
With reference to first aspect, in a fifth possible implementation, the motor rotational parameters, including head-shaking machine are horizontal
Motor turnning circle when motor turnning circle and vertical rotation when rotation;
Determine the relationship between the motor rotational parameters of head-shaking machine and image distance, comprising:
Predefine horizontally rotating maximum angle, vertically rotating maximum angle, horizontal direction field of view angle, hang down for head-shaking machine
Histogram to field of view angle, horizontally rotate motor turnning circle needed for maximum angle, vertical rotation maximum angle needed for motor rotate
Enclose width, the height of number and head-shaking machine shooting image;
According to it is described horizontally rotate maximum angle and it is described horizontally rotate maximum angle needed for motor turnning circle, determination shake
Head machine when horizontally rotating every circle motor rotate corresponding level angle variation, and, according to the vertical rotation maximum angle with
Motor turnning circle needed for the vertical rotation maximum angle determines that every circle motor rotation is corresponding vertical when head-shaking machine vertically rotates
Squareness variation;
According to the horizontal direction field of view angle and the width, determine when head-shaking machine horizontally rotates level angle variation with
The relationship of image level distance, and, according to the vertical direction field of view angle and the height, determine that head-shaking machine vertically rotates
When the vertical angle variation and relationship of image vertical range;
Every circle motor rotates corresponding level angle variation and the head-shaking machine water when being horizontally rotated according to the head-shaking machine
The relationship of level angle variation and image level distance when flat turn is dynamic determines that every circle motor rotation corresponds to when head-shaking machine horizontally rotates
Image level distance, and, when vertically being rotated according to the head-shaking machine every circle motor rotate corresponding vertical angle variation and
The relationship of vertical angle variation and image vertical range, determines every circle when head-shaking machine vertically rotates when the head-shaking machine vertically rotates
Motor rotates corresponding image vertical range.
Second aspect, a kind of device of rotation head-shaking machine tracking target, comprising:
Image acquisition unit, for obtaining a frame image of head-shaking machine current shooting;
Target determination unit is tracked, for determining the tracking target of head-shaking machine from current frame image;
Metrics calculation unit, for determining the tracking target at a distance from picture centre;
Motor rotational parameters determination unit, for according to the tracking target at a distance from picture centre, and in advance really
Relationship between the motor rotational parameters and image distance of fixed head-shaking machine, motor needed for determining rotation head-shaking machine tracking target turn
Dynamic parameter;
Driving unit, for rotating the head-shaking machine according to the motor rotational parameters.
In conjunction with second aspect, in the first possible implementation, the tracking target determination unit is specifically used for:
Detect whether current frame image includes the corresponding tracking target of previous frame image, if so, by the previous frame figure
As corresponding tracking target is as the corresponding tracking target of current frame image;Otherwise, again choose current frame image it is corresponding with
Track target.
In conjunction with the first possible implementation of second aspect, in the second possible implementation, the tracking
When whether target determination unit includes previous frame image corresponding tracking target for detecting the current frame image, comprising:
Detection range determination unit, for determining present frame according to the corresponding tracking target region of previous frame image
The detection range of image;
Detection unit, for whether according to preparatory trained cascade classifier, detecting in the detection range comprising institute
State the corresponding tracking target of previous frame image.
In conjunction with the first possible implementation of second aspect, in the third possible implementation, the tracking
When whether target determination unit includes previous frame image corresponding tracking target for detecting current frame image, it is specifically used for:
Whether detection current frame image includes previous frame image corresponding tracking target of the static duration less than preset threshold.
In conjunction with the first or the third possible implementation of second aspect, in the fourth possible implementation,
When the tracking target determination unit for choosing the corresponding tracking target of current frame image again, specifically include:
Detection unit is traversed, for carrying out traversal inspection to the current frame image according to preparatory trained cascade classifier
It surveys;
Object selection unit, for choosing a tracking target from the multiple targets detected.
In conjunction with second aspect, in a fifth possible implementation, the motor rotational parameters determination unit is for true
When determining the relationship between the motor rotational parameters of head-shaking machine and image distance, it is specifically used for:
Predefine horizontally rotating maximum angle, vertically rotating maximum angle, horizontal direction field of view angle, hang down for head-shaking machine
Histogram to field of view angle, horizontally rotate motor turnning circle needed for maximum angle, vertical rotation maximum angle needed for motor rotate
Enclose width, the height of number and head-shaking machine shooting image;
According to it is described horizontally rotate maximum angle and it is described horizontally rotate maximum angle needed for motor turnning circle, determination shake
Head machine when horizontally rotating every circle motor rotate corresponding level angle variation, and, according to the vertical rotation maximum angle with
Motor turnning circle needed for the vertical rotation maximum angle determines that every circle motor rotation is corresponding vertical when head-shaking machine vertically rotates
Squareness variation;
According to the horizontal direction field of view angle and the width, determine when head-shaking machine horizontally rotates level angle variation with
The relationship of image level distance, and, according to the vertical direction field of view angle and the height, determine that head-shaking machine vertically rotates
When the vertical angle variation and relationship of image vertical range;
Every circle motor rotates corresponding level angle variation and the head-shaking machine water when being horizontally rotated according to the head-shaking machine
The relationship of level angle variation and image level distance when flat turn is dynamic determines that every circle motor rotation corresponds to when head-shaking machine horizontally rotates
Image level distance, and, when vertically being rotated according to the head-shaking machine every circle motor rotate corresponding vertical angle variation and
The relationship of vertical angle variation and image vertical range, determines every circle when head-shaking machine vertically rotates when the head-shaking machine vertically rotates
Motor rotates corresponding image vertical range.
The embodiment of the present invention obtains a frame image of head-shaking machine current shooting;Head-shaking machine is determined from current frame image
Tracking target;Determine the tracking target at a distance from picture centre;According to the tracking target at a distance from picture centre,
And the relationship between the motor rotational parameters and image distance of predetermined head-shaking machine, determine that rotation head-shaking machine tracks target
Required motor rotational parameters;The head-shaking machine is rotated according to the motor rotational parameters.It is being moved through by calculating tracking target
Cheng Zhong, the offset with image center location generated in each frame picture, target guarantor will be tracked by further calculating out head-shaking machine
The corresponding motor rotational parameters in heart district domain in the picture are held, enables head-shaking machine camera lens to track target and keeps target in picture
Central area facilitates user to observe.
Detailed description of the invention
Fig. 1 is the flow diagram of rotation head-shaking machine tracking mesh calibration method provided in an embodiment of the present invention;
Fig. 2 is the another flow diagram of rotation head-shaking machine tracking mesh calibration method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram for the method that the specific embodiment of the invention provides;
Fig. 4 is the structural schematic diagram of the device of rotation head-shaking machine tracking target provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of method and devices of rotation head-shaking machine tracking target, solve and how to realize view
The problem of head-shaking machine tracks target is rotated automatically in frequency monitoring.
Referring to Fig. 1, a kind of rotation head-shaking machine tracking mesh calibration method provided in an embodiment of the present invention includes:
S101, the frame image for obtaining head-shaking machine current shooting;
S102, the tracking target that head-shaking machine is determined from current frame image;
S103, determine tracking target at a distance from picture centre;
S104, according to tracking target at a distance from picture centre and the motor rotational parameters of predetermined head-shaking machine
Relationship between image distance, motor rotational parameters needed for determining rotation head-shaking machine tracking target;
S105, the head-shaking machine is rotated according to the motor rotational parameters.
Step S102 specifically includes the following contents: whether detection current frame image includes the corresponding tracking mesh of previous frame image
Mark, if so, using the corresponding tracking target of the previous frame image as the corresponding tracking target of current frame image;Otherwise, weight
It is new to choose the corresponding tracking target of current frame image.In general, head-shaking machine need to keep the lasting tracking to same target therefore to obtain
After the frame image for getting head-shaking machine shooting, original tracking target is found in the picture.?
When mark has left head-shaking machine picture, new tracking target need to be chosen again.
Further, whether detection current frame image includes that the corresponding tracking target of previous frame image specifically includes in following
Hold: according to the corresponding tracking target region of previous frame image, determining the detection range of current frame image;According to preparatory training
Whether good cascade classifier detects in the detection range comprising the corresponding tracking target of previous frame image.Due to frame and frame
Between time interval it is extremely short, the moving distance for tracking target is limited, therefore, according to where the corresponding tracking target of previous frame image
Region simultaneously suitably expands the region as detection range, and tracking target just can be detected in this frame image, so as to avoid
Search and track target is detected in full frame area, can be effectively reduced calculation amount.Specifically, target detection uses adboost algorithm,
By preparatory trained cascade classifier, the tracking target in image is detected.
Further, the corresponding tracking target of above-mentioned previous frame image refers to that static duration is less than preset threshold
Target.Specifically, it before whether detection current frame image includes the corresponding tracking target of previous frame image, also needs to execute following
Step: judging whether the static duration of the corresponding tracking target of previous frame image is less than preset threshold, if so, detection present frame
Whether image includes the corresponding tracking target of previous frame image;Otherwise, the corresponding tracking target of current frame image is chosen again.It is right
In the target that continuous multiple frames are static, it may be possible to which the stationary object of erroneous detection does not have observation value generally, thus be excluded that this classification
Target tracking.
Above content specifically includes following content: root when being related to choosing the corresponding tracking target of current frame image again
Traversal detection is carried out to current frame image according to preparatory trained cascade classifier;From the multiple targets detected choose one with
Track target.Its main purpose is, full frame is unfolded from present frame and searches in the case where previous frame corresponding tracking targeted failure
Rope determines new tracking target.The case where to avoid erroneous detection, the target that only can detect continuous predetermined number frame as
New tracking target, also, the target static for fixed continuous multiple frames, cannot function as new tracking target.
It is pixel distance preferably, tracking target at a distance from picture centre in step S103.It is determined in step S104
Head-shaking machine motor rotational parameters and image distance between relationship, be head-shaking machine motor rotational parameters and image pixel away from
Relationship between.
Specifically, referring to fig. 2, the relationship between the motor rotational parameters of head-shaking machine and image distance is determined, including as follows
Step:
S201, horizontally rotating maximum angle, vertically rotating maximum angle, horizontal direction field angle for head-shaking machine is predefined
Degree, vertical direction field of view angle, horizontally rotate motor turnning circle needed for maximum angle, vertical rotation maximum angle needed for motor
The width of turnning circle and head-shaking machine shooting image, height;
S202, horizontally rotate according to maximum angle and it is described horizontally rotate motor turnning circle needed for maximum angle,
Determine that every circle motor rotates corresponding level angle variation when head-shaking machine horizontally rotates, and, it is maximum according to the vertical rotation
Motor turnning circle needed for angle and the vertical rotation maximum angle determines every circle motor rotation pair when head-shaking machine vertically rotates
The vertical angle variation answered;
S203, according to the horizontal direction field of view angle and the width, determine level angle when head-shaking machine horizontally rotates
The relationship of variation and image level distance, and, according to the vertical direction field of view angle and the height, determine that head-shaking machine hangs down
The relationship of vertical angle variation and image vertical range when straight rotation;
S204, every circle motor rotates corresponding level angle variation and described shakes the head when being horizontally rotated according to the head-shaking machine
The relationship of level angle variation and image level distance when machine horizontally rotates determines every circle motor rotation when head-shaking machine horizontally rotates
Corresponding image level distance, and, every circle motor rotates corresponding vertical angle and becomes when vertically being rotated according to the head-shaking machine
The relationship of vertical angle variation and image vertical range when change and the head-shaking machine vertically rotate, when determining that head-shaking machine vertically rotates
Every circle motor rotates corresponding image vertical range.
Step specific example shown in Fig. 2 is as follows: if the horizontal hard-over of head-shaking machine is 360 degree, vertical hard-over
It is 90 degree, is respectively necessary for motor rotation m circle, n circle, then motor horizontal direction every revolution is (360/m) degree, every turn of vertical direction
One circle is (90/n) degree.The resolution ratio of known head-shaking machine camera lens horizontal direction is 1280, and the resolution ratio of vertical direction is 720, mirror
It is Qy degree that the field of view angle of the horizontal direction of head, which is the field of view angle of Qx degree vertical direction, wherein field of view angle by camera lens coke
Away from being codetermined with CCD;Corresponding (1280/Qx) a pixel of each angle of horizontal direction, each angle of vertical direction are corresponding in this way
(720/Qy) a pixel.Then, motor horizontally rotates corresponding (360/m) * (1280/Qx) a pixel of a circle, when tracking target with
When the lateral shift of picture centre is dx, motor horizontal direction turnning circle is dx/ [(360/m) * (1280/Qx)];Similarly, electric
Corresponding (90/n) * (720/Qy) a pixel is enclosed in machine vertical direction rotation one, when the vertical misalignment of tracking target and picture centre is
When dy, motor vertical direction turnning circle is dx/ [(360/m) * (1280/Qx)].
It is further described below with reference to complete embodiment process.
Referring to Fig. 3, the specific embodiment of the invention includes the following steps:
S301, input head-shaking machine vision signal.
S302, parameter initialization, i=0, status=NEW_DETECT.
Status includes two kinds of assignment of NEW_DETECT and ROI_DETECT, respectively indicates full frame detection and area-of-interest
Detection;Search new tracking target when full frame detection is for without tracking target, area-of-interest detect for according to
One frame tracking target determines the detection zone of this frame, the detecting and tracking target in detection zone.
S303, i-th is read ++ frame image.
S304, judge whether status==NEW_DETECT is true, if so, executing S305;Otherwise, turn S311.
S305, full frame detection, to find new tracking target.
S306, judge whether to detect any target, if so, executing S307;Otherwise, turn S303.
S307, detection target position record update.
S308, it judges whether there is target and is consecutively detected M times, wherein do not include reaching the target of N frame in same position,
If so, executing S309;Otherwise, turn S303.
M > 1, primarily to the case where excluding erroneous detection;N can be set to 300 frames, exclude to reach N frame in same position
Target as abandons the target for tracking the stationary long period.
S309, the target for being detected M times is chosen.
S310, status=ROI_DETECT;Turn S316.
Again status is assigned a value of ROI_DETECT, indicates to rise in next frame, it is only necessary in the target area that S309 chooses
Domain nearby searches for the target and goes forward side by side line trace.
S311, the appropriate previous frame that expands track target area, and detect enlarged area.
S312, judge whether to detect the target of previous frame tracking, if so, executing S313;Otherwise, turn S315.
S313, detection target position record update.
S314, judge whether the target in same position reaches N frame, if so, the mesh of as stationary long period
Mark executes S315 in next step;Otherwise, turn S316.
S315, status==NEW_DETECT indicate that original tracking target is no longer valid, and next frame need to carry out full frame inspection
Check weighing newly finds target, turns S303.
S316, the offset of target to picture centre is obtained, simultaneously output motor rotational parameters is calculated according to degrees of offset.
Referring to fig. 4, a kind of device of rotation head-shaking machine tracking target provided in an embodiment of the present invention includes:
Image acquisition unit 401, for obtaining a frame image of head-shaking machine current shooting;
Target determination unit 402 is tracked, for determining the tracking target of head-shaking machine from current frame image;
Metrics calculation unit 403, for determining the tracking target at a distance from picture centre;
Motor rotational parameters determination unit 404, for according to the tracking target at a distance from picture centre, and in advance
Relationship between the motor rotational parameters and image distance of determining head-shaking machine, motor needed for determining rotation head-shaking machine tracking target
Rotational parameters;
Driving unit 405, for rotating the head-shaking machine according to the motor rotational parameters.
The tracking target determination unit 402 is specifically used for: whether detection current frame image includes that previous frame image is corresponding
Tracking target, if so, using the corresponding tracking target of the previous frame image as the corresponding tracking target of current frame image;
Otherwise, the corresponding tracking target of current frame image is chosen again.
Further, the tracking target determination unit 402 is for detecting whether the current frame image includes previous frame
When the corresponding tracking target of image, comprising: detection range determination unit, for according to the corresponding tracking target institute of previous frame image
In region, the detection range of current frame image is determined;Detection unit, for according to preparatory trained cascade classifier, detection
It whether include the corresponding tracking target of the previous frame image in the detection range.
Further, the tracking target determination unit 402 is for detecting whether current frame image includes previous frame image
When corresponding tracking target, be specifically used for: whether detection current frame image includes previous frame of the static duration less than preset threshold
The corresponding tracking target of image.
When the tracking target determination unit 402 for choosing the corresponding tracking target of current frame image again, specific packet
It includes: traversal detection unit, for carrying out traversal detection to the current frame image according to preparatory trained cascade classifier;Mesh
Selection unit is marked, for choosing a tracking target from the multiple targets detected.
The motor rotational parameters determination unit 404 is for determining between the motor rotational parameters of head-shaking machine and image distance
Relationship when, be specifically used for:
Predefine horizontally rotating maximum angle, vertically rotating maximum angle, horizontal direction field of view angle, hang down for head-shaking machine
Histogram to field of view angle, horizontally rotate motor turnning circle needed for maximum angle, vertical rotation maximum angle needed for motor rotate
Enclose width, the height of number and head-shaking machine shooting image;
According to it is described horizontally rotate maximum angle and it is described horizontally rotate maximum angle needed for motor turnning circle, determination shake
Head machine when horizontally rotating every circle motor rotate corresponding level angle variation, and, according to the vertical rotation maximum angle with
Motor turnning circle needed for the vertical rotation maximum angle determines that every circle motor rotation is corresponding vertical when head-shaking machine vertically rotates
Squareness variation;
According to the horizontal direction field of view angle and the width, determine when head-shaking machine horizontally rotates level angle variation with
The relationship of image level distance, and, according to the vertical direction field of view angle and the height, determine that head-shaking machine vertically rotates
When the vertical angle variation and relationship of image vertical range;
Every circle motor rotates corresponding level angle variation and the head-shaking machine water when being horizontally rotated according to the head-shaking machine
The relationship of level angle variation and image level distance when flat turn is dynamic determines that every circle motor rotation corresponds to when head-shaking machine horizontally rotates
Image level distance, and, when vertically being rotated according to the head-shaking machine every circle motor rotate corresponding vertical angle variation and
The relationship of vertical angle variation and image vertical range, determines every circle when head-shaking machine vertically rotates when the head-shaking machine vertically rotates
Motor rotates corresponding image vertical range.
In conclusion the embodiment of the invention provides a kind of method and device of rotation head-shaking machine tracking target, Neng Goushi
When identification video in tracking target and rotate head-shaking machine tracking target so that target is maintained at video hub region, convenient for pair
The follow-up observation of target.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The shape for the computer program product implemented on usable record medium (including but not limited to magnetic disk recorder and optical recorder etc.)
Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which are also recordable in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable logger that mode works, so that it includes referring to that the instruction being recorded in the computer-readable logger, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of rotation head-shaking machine tracks mesh calibration method characterized by comprising
Obtain a frame image of head-shaking machine current shooting;
The tracking target of head-shaking machine is determined from current frame image;
Determine the tracking target at a distance from picture centre;
According to the tracking target at a distance from picture centre and the motor rotational parameters and image of predetermined head-shaking machine
Relationship between distance, motor rotational parameters needed for determining rotation head-shaking machine tracking target;
The head-shaking machine is rotated according to the motor rotational parameters.
2. the method as described in claim 1, which is characterized in that the tracking target of head-shaking machine is determined from current frame image,
Include:
Detect whether current frame image includes the corresponding tracking target of previous frame image, if so, by the previous frame image pair
The tracking target answered is as the corresponding tracking target of current frame image;Otherwise, the corresponding tracking mesh of current frame image is chosen again
Mark.
3. method according to claim 2, which is characterized in that detect whether the current frame image includes previous frame image pair
The tracking target answered, comprising:
According to the corresponding tracking target region of previous frame image, the detection range of current frame image is determined;
According to preparatory trained cascade classifier, detect whether corresponding comprising the previous frame image in the detection range
Track target.
4. method according to claim 2, which is characterized in that the corresponding tracking target of the previous frame image, when being static
The long target for being less than preset threshold.
5. method as claimed in claim 2 or 4, which is characterized in that described to choose the corresponding tracking mesh of current frame image again
Mark, comprising:
Traversal detection is carried out to the current frame image according to preparatory trained cascade classifier;
A tracking target is chosen from the multiple targets detected.
6. the method as described in claim 1, which is characterized in that the motor rotational parameters, including when head-shaking machine horizontally rotates
Motor turnning circle when motor turnning circle and vertical rotation;
Determine the relationship between the motor rotational parameters of head-shaking machine and image distance, comprising:
Predefine horizontally rotating maximum angle, vertically rotating maximum angle, horizontal direction field of view angle, Vertical Square for head-shaking machine
To field of view angle, horizontally rotate motor turnning circle needed for maximum angle, vertical rotation maximum angle needed for motor turnning circle
Width, height with head-shaking machine shooting image;
According to it is described horizontally rotate maximum angle and it is described horizontally rotate maximum angle needed for motor turnning circle, determine head-shaking machine
Every circle motor rotates corresponding level angle variation when horizontally rotating, and, according to the vertical rotation maximum angle and described
Motor turnning circle needed for vertical rotation maximum angle determines that every circle motor rotates corresponding vertical angle when head-shaking machine vertically rotates
Degree variation;
According to the horizontal direction field of view angle and the width, level angle variation and image when head-shaking machine horizontally rotates are determined
The relationship of horizontal distance, and, according to the vertical direction field of view angle and the height, determines and hang down when head-shaking machine vertically rotates
The relationship of squareness variation and image vertical range;
Every circle motor rotates corresponding level angle variation when being horizontally rotated according to the head-shaking machine and the head-shaking machine level turns
The relationship of level angle variation and image level distance when dynamic determines that every circle motor rotates corresponding figure when head-shaking machine horizontally rotates
As horizontal distance, and, when vertically being rotated according to the head-shaking machine every circle motor rotate corresponding vertical angle variation with it is described
The relationship of vertical angle variation and image vertical range, determines every circle motor when head-shaking machine vertically rotates when head-shaking machine vertically rotates
Rotate corresponding image vertical range.
7. a kind of device of rotation head-shaking machine tracking target characterized by comprising
Image acquisition unit, for obtaining a frame image of head-shaking machine current shooting;
Target determination unit is tracked, for determining the tracking target of head-shaking machine from current frame image;
Metrics calculation unit, for determining the tracking target at a distance from picture centre;
Motor rotational parameters determination unit, at a distance from picture centre and predetermined according to the tracking target
Relationship between the motor rotational parameters and image distance of head-shaking machine, motor rotation ginseng needed for determining rotation head-shaking machine tracking target
Number;
Driving unit, for rotating the head-shaking machine according to the motor rotational parameters.
8. device as claimed in claim 7, which is characterized in that the tracking target determination unit is specifically used for:
Detect whether current frame image includes the corresponding tracking target of previous frame image, if so, by the previous frame image pair
The tracking target answered is as the corresponding tracking target of current frame image;Otherwise, the corresponding tracking mesh of current frame image is chosen again
Mark.
9. device as claimed in claim 8, which is characterized in that the tracking target determination unit is for detecting the present frame
When whether image includes previous frame image corresponding tracking target, comprising:
Detection range determination unit, for determining current frame image according to the corresponding tracking target region of previous frame image
Detection range;
Detection unit, whether for the preparatory trained cascade classifier of basis, detecting in the detection range includes on described
The corresponding tracking target of one frame image.
10. device as claimed in claim 7, which is characterized in that the motor rotational parameters determination unit is shaken the head for determination
When relationship between the motor rotational parameters and image distance of machine, it is specifically used for:
Predefine horizontally rotating maximum angle, vertically rotating maximum angle, horizontal direction field of view angle, Vertical Square for head-shaking machine
To field of view angle, horizontally rotate motor turnning circle needed for maximum angle, vertical rotation maximum angle needed for motor turnning circle
Width, height with head-shaking machine shooting image;
According to it is described horizontally rotate maximum angle and it is described horizontally rotate maximum angle needed for motor turnning circle, determine head-shaking machine
Every circle motor rotates corresponding level angle variation when horizontally rotating, and, according to the vertical rotation maximum angle and described
Motor turnning circle needed for vertical rotation maximum angle determines that every circle motor rotates corresponding vertical angle when head-shaking machine vertically rotates
Degree variation;
According to the horizontal direction field of view angle and the width, level angle variation and image when head-shaking machine horizontally rotates are determined
The relationship of horizontal distance, and, according to the vertical direction field of view angle and the height, determines and hang down when head-shaking machine vertically rotates
The relationship of squareness variation and image vertical range;
Every circle motor rotates corresponding level angle variation when being horizontally rotated according to the head-shaking machine and the head-shaking machine level turns
The relationship of level angle variation and image level distance when dynamic determines that every circle motor rotates corresponding figure when head-shaking machine horizontally rotates
As horizontal distance, and, when vertically being rotated according to the head-shaking machine every circle motor rotate corresponding vertical angle variation with it is described
The relationship of vertical angle variation and image vertical range, determines every circle motor when head-shaking machine vertically rotates when head-shaking machine vertically rotates
Rotate corresponding image vertical range.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710427502.6A CN109040574A (en) | 2017-06-08 | 2017-06-08 | A kind of method and device of rotation head-shaking machine tracking target |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710427502.6A CN109040574A (en) | 2017-06-08 | 2017-06-08 | A kind of method and device of rotation head-shaking machine tracking target |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109040574A true CN109040574A (en) | 2018-12-18 |
Family
ID=64629160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710427502.6A Pending CN109040574A (en) | 2017-06-08 | 2017-06-08 | A kind of method and device of rotation head-shaking machine tracking target |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109040574A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110262565A (en) * | 2019-05-28 | 2019-09-20 | 深圳市吉影科技有限公司 | The target following motion control method and device for pushing away unmanned plane applied to underwater six |
CN111833382A (en) * | 2020-02-13 | 2020-10-27 | 珠海安联锐视科技股份有限公司 | Target tracking method based on moving head camera |
WO2021008207A1 (en) * | 2019-07-17 | 2021-01-21 | 上海商汤智能科技有限公司 | Target tracking method and apparatus, intelligent mobile device and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102143324A (en) * | 2011-04-07 | 2011-08-03 | 天津市亚安科技电子有限公司 | Method for automatically and smoothly tracking target by cradle head |
CN104184932A (en) * | 2013-05-20 | 2014-12-03 | 浙江大华技术股份有限公司 | Spherical camera control method and device thereof |
US20150334310A1 (en) * | 2014-03-31 | 2015-11-19 | Canon Kabushiki Kaisha | Position control apparatus, position control method, optical apparatus, and imaging apparatus |
CN105654512A (en) * | 2015-12-29 | 2016-06-08 | 深圳羚羊微服机器人科技有限公司 | Target tracking method and device |
CN105898136A (en) * | 2015-11-17 | 2016-08-24 | 乐视致新电子科技(天津)有限公司 | Camera angle adjustment method, system and television |
CN106060380A (en) * | 2016-05-11 | 2016-10-26 | 北京格灵深瞳信息技术有限公司 | Linkage camera control system and method |
CN106228112A (en) * | 2016-07-08 | 2016-12-14 | 深圳市优必选科技有限公司 | Face datection tracking and robot head method for controlling rotation and robot |
-
2017
- 2017-06-08 CN CN201710427502.6A patent/CN109040574A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102143324A (en) * | 2011-04-07 | 2011-08-03 | 天津市亚安科技电子有限公司 | Method for automatically and smoothly tracking target by cradle head |
CN104184932A (en) * | 2013-05-20 | 2014-12-03 | 浙江大华技术股份有限公司 | Spherical camera control method and device thereof |
US20150334310A1 (en) * | 2014-03-31 | 2015-11-19 | Canon Kabushiki Kaisha | Position control apparatus, position control method, optical apparatus, and imaging apparatus |
CN105898136A (en) * | 2015-11-17 | 2016-08-24 | 乐视致新电子科技(天津)有限公司 | Camera angle adjustment method, system and television |
CN105654512A (en) * | 2015-12-29 | 2016-06-08 | 深圳羚羊微服机器人科技有限公司 | Target tracking method and device |
CN106060380A (en) * | 2016-05-11 | 2016-10-26 | 北京格灵深瞳信息技术有限公司 | Linkage camera control system and method |
CN106228112A (en) * | 2016-07-08 | 2016-12-14 | 深圳市优必选科技有限公司 | Face datection tracking and robot head method for controlling rotation and robot |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110262565A (en) * | 2019-05-28 | 2019-09-20 | 深圳市吉影科技有限公司 | The target following motion control method and device for pushing away unmanned plane applied to underwater six |
WO2021008207A1 (en) * | 2019-07-17 | 2021-01-21 | 上海商汤智能科技有限公司 | Target tracking method and apparatus, intelligent mobile device and storage medium |
CN111833382A (en) * | 2020-02-13 | 2020-10-27 | 珠海安联锐视科技股份有限公司 | Target tracking method based on moving head camera |
CN111833382B (en) * | 2020-02-13 | 2021-03-09 | 珠海安联锐视科技股份有限公司 | Target tracking method based on moving head camera |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11042723B2 (en) | Systems and methods for depth map sampling | |
US20230077355A1 (en) | Tracker assisted image capture | |
CN101877174B (en) | Vehicle speed measurement method, supervisory computer and vehicle speed measurement system | |
US10217228B2 (en) | Method, system and non-transitory computer-readable recording medium for measuring ball spin | |
CN104732187B (en) | A kind of method and apparatus of image trace processing | |
US10564250B2 (en) | Device and method for measuring flight data of flying objects using high speed video camera and computer readable recording medium having program for performing the same | |
CN105809658B (en) | Method and device for setting region of interest | |
CN107408303A (en) | System and method for Object tracking | |
CN106327461B (en) | A kind of image processing method and device for monitoring | |
RU2009139437A (en) | IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD AND PROGRAM | |
CN110049206A (en) | Image processing method and device | |
CN109040574A (en) | A kind of method and device of rotation head-shaking machine tracking target | |
KR20150110697A (en) | Systems and methods for tracking and detecting a target object | |
CN105930762A (en) | Eyeball tracking method and device | |
AU2008201108A1 (en) | Vision based navigation and guidance system | |
WO2021129305A1 (en) | Calibration rod testing method for optical motion capture system, device, apparatus, and storage medium | |
CN109871745A (en) | Identify method, system and the vehicle of empty parking space | |
US10587797B2 (en) | Method, system and non-transitory computer-readable recording medium for compensating brightness of ball images | |
CN111627049B (en) | Method and device for determining high-altitude parabolic object, storage medium and processor | |
CN108957024A (en) | A kind of method, apparatus and electronic equipment of tachometric survey | |
CN109102026A (en) | A kind of vehicle image detection method, apparatus and system | |
CN112017210A (en) | Target object tracking method and device | |
US9990857B2 (en) | Method and system for visual pedometry | |
CN105472231A (en) | Control method, image acquisition device and electronic equipment | |
CN108122244B (en) | Video speed measuring method and device for video image |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181218 |
|
RJ01 | Rejection of invention patent application after publication |