CN104880154A - Internet-of-things binocular vision zoom dynamic target tracking test system platform and Internet-of-things binocular vision zoom dynamic target tracking ranging method - Google Patents

Internet-of-things binocular vision zoom dynamic target tracking test system platform and Internet-of-things binocular vision zoom dynamic target tracking ranging method Download PDF

Info

Publication number
CN104880154A
CN104880154A CN201510297393.1A CN201510297393A CN104880154A CN 104880154 A CN104880154 A CN 104880154A CN 201510297393 A CN201510297393 A CN 201510297393A CN 104880154 A CN104880154 A CN 104880154A
Authority
CN
China
Prior art keywords
target
camera
focal length
distance
cameras
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.)
Granted
Application number
CN201510297393.1A
Other languages
Chinese (zh)
Other versions
CN104880154B (en
Inventor
韩九强
蔡竹稚
郑辑光
潘文培
张新曼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN201510297393.1A priority Critical patent/CN104880154B/en
Publication of CN104880154A publication Critical patent/CN104880154A/en
Application granted granted Critical
Publication of CN104880154B publication Critical patent/CN104880154B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention provides an Internet-of-things binocular vision zoom dynamic target tracking test system platform and an Internet-of-things binocular vision zoom dynamic target tracking ranging method. A known dynamic target can be continuously ranged from an acquired video image. Two automatic focusing cameras are adopted to acquire images, the focal length is dispersed into a plurality of fixed gears, the two cameras are put in different gears, and there is some overlap between the measuring intervals. Automatic focusing and camera switching are carried out according to the measured distance to enable the target to be imaged clearly within the view of the cameras and have a certain imaging size. Simple calibration is carried out by inversely calculating the focal lengths of the cameras at different known distance points repeatedly and working out the average value. Target tracking is completed by an improved Camshift algorithm. By adopting the method provided by the invention, distance measurement of a dynamic target in a wide range can be carried out precisely and quickly, and the measurement result can be received by an Internet host with use of the wireless communication technology.

Description

A kind of Internet of Things binocular vision zoom dynamic target tracking pilot system platform and distance-finding method
Technical field
The invention belongs to computer vision measurement technical field, particularly a kind of Internet of Things binocular vision zoom dynamic target tracking pilot system platform and distance-finding method.
Background technology
Conventional distance measuring method has laser ranging, microwave radar range, ultrasonic ranging and infrared distance measuring etc., can complete the target of static state or dynamic realtime range finding according to the difference of target.
And computer vision range finding has that structure is simple, high precision, noncontact, data acquisition soon, do not injure human eye and can realize the advantage such as on-line measurement and kinetic measurement, obtain applying more and more widely.
Machine vision distance-finding method conventional at present has binocular stereo vision distance-finding method, Structure light method and geometrical optics approach.Wherein, the most important thing is binocular stereo vision distance-finding method, its method mainly carries out Feature Points Matching to the image of two collected by cameras of parallel placement, and according to the different imager coordinate of unique point at left and right camera, form disparity map, and obtained the depth information of corresponding object point by disparity computation.
Binocular vision method can be found range to object by extract minutiae and coupling thereof, have flexible and measure advantage accurately, but also there is its inherent shortcoming: the binocular distance-finding method effective range of fixed-focus camera is less, general within 10m, with the lifting of image resolution ratio, its scope slightly increases but adds image processing work amount, relatively sacrifice the real-time of range observation, and the binocular distance-finding method of zoom camera cannot carry out continuous coverage to real-time distance within the time of relatively long focusing, moreover, in actual applications due to the difference of two camera internal reference matrixes and distortion factor, binocular distance-finding method needs to calculate just completing distance after correct image, this just means needs each pixel to full figure to carry out pre-service, unacceptable in the practical application that requirement of real-time is higher, same problem is also present in monocular range finding, time due to focusing is relatively long and cannot ensure carrying out continuously of measurement, then also there is the contradiction of focal range and visual field size in the monocular range finding for zoom camera, larger focal length can ensure that higher precision but easily causes less field range, very likely cause the loss of target, and though less focal length ensure that the tracking of target cannot ensure higher measuring accuracy, these are also all unacceptable in the application that requirement of real-time is higher.
Simultaneously, range finding task in actual applications, normally to be directed to known object, in this case use the principle of pinhole imaging system more simple and fast be easy to operation, if now still use the stereo calibration method of binocular camera, loaded down with trivial details and there is no need, and the burnt camera product of current automated variable is mostly by adjustment electric machine rotation time adjusting focal length, certain randomness is there is because electric machine rotation drives, even if export identical time adjustment instruction, final adjusting focal length also can only drop within the scope of one and cannot be certain exact value, the result which results in each measurement output is all different, namely sacrifice precision to expand measurement range, so adopt a kind of new and easy scaling method calculate discrete after the focal length of each gear ensure that certain precision and measurement range are very necessary simultaneously.
Current, most computer vision distance measuring equipment is all be fixed on certain position to carry out range finding display to target, which results in the limitation in use.Along with the arriving of Internet of Things information age, the target of Information & Communication Technology has developed into and has realized people and thing, connection between thing and thing, so make binocular distance measurement device move, the connection of measurement target and internet is realized by wireless communication technology, the exchange of the information of carrying out with communicate, thus carry out intelligentized identification, location, tracking, monitor and managment, greatly can expand the usable range of distance measuring equipment, be convenient to access analysis and the arrangement of data simultaneously.
Summary of the invention
In order to overcome the shortcoming of above-mentioned prior art, the object of the present invention is to provide a kind of Internet of Things binocular vision zoom dynamic target tracking pilot system platform and distance-finding method, can follow the tracks of known dynamic object from the video image obtained and continuous detecting be carried out to real-time distance, less and increase effective range and but cannot ensure the problem of measuring accuracy for solving effective range in prior art, adopt technology of Internet of things to share on network measurement data simultaneously, the main frame transferred data on internet by wireless communication technology carries out data receiver display, and using it as server, so that other main frames on network conduct interviews and data analysis arrangement etc.
To achieve these goals, the technical solution used in the present invention is:
A kind of Internet of Things binocular vision zoom dynamic target tracking pilot system platform, comprising:
Focal length for the parallel placement gathering image all discrete for some static stalls can automatic focusing camera one and can automatic focusing camera two;
Connect described can automatic focusing camera one and can automatic focusing camera two receive both gather the image pick-up card of image information;
Connect the industrial computer of described image pick-up card;
And connect the wireless communication module of described industrial control computer mainboard;
Wherein, when gathering image, respectively two cameras are placed in different gear, ensure that surveying range has certain overlap, control automatic focusing and switching camera according to recording distance by industrial computer, make target in camera fields of view, keep imaging clearly and certain imaging size, industrial computer completes target following according to the image received, adopt pinhole imaging system principle to calculate distance, eventually through wireless communication module by data transfer to the main frame on internet.
Present invention also offers a kind of Internet of Things binocular vision zoom dynamic target tracking distance-finding method, what adopt two parallel placements can automatic focusing camera one and can gather image by automatic focusing camera two, the focal length of two cameras is all discrete is some static stalls, each gear fixation measuring specific distance range, by the scaling method of repeatedly focussing distance Extrapolation mean value, different gear focal length is demarcated, in gatherer process, two cameras are placed in different gear, ensure that surveying range has certain overlap, according to recording distance focusing and switching camera, target image is remained in camera fields of view, and imaging is clear and keep the imaging size of certain limit,
Carry out target following, and adopt pinhole imaging system principle to calculate distance;
Wirelessly by data transfer to the main frame on internet.
Described focal length is discrete is that the process of some static stalls is as follows:
For a focal range [min, max], within the scope of this, focal length only uses discrete several focal length value point f 1, f 2... f i..., f n, n is the number of static stall, 1≤i≤n, min≤f 1<...<f i<...<f n≤ max, when carrying out Focussing, all adjust regular time to use fixing several focal length value points, the switching between focal length value point is controlled by one group of computing machine control command at every turn, when increasing lens focus and control, sends and increases focal length order.
Describedly to the method that different gear focal length is demarcated be:
For a static stall, camera is adjusted to this gear, in its measurement range, reads imaging size every T rice respectively, and pass through formula: calculate one group of focal length value, and calculate the average focal length value of this group focal length value, be greater than the data setting threshold value, rejected if having among this group focal length with the absolute value of the difference of average focal length value, the arithmetic mean that remaining focal length value is tried to achieve is as a focal length value; If do not have, then direct using this average focal length as a focal length value, continuous several times adjusts to this static stall, calculate with said method, obtain multiple focal length value, again average, using the focal length value of net result as this static stall, the focal length of several static stalls of discretize is all obtained by the method.
Described target following adopts the Camshift algorithm improved to complete, and step is as follows:
By two collected by cameras to image be all divided into H, S, V tri-passages, preserve H channel data and process;
First two field picture is adopted to the mode of traversal automatically, and fast target detection algorithm is adopted to each two field picture: first great-jump-forward traversal finds impact point, the extraction carrying out object boundary chain code after finding, to orient target, uses Camshift algorithm to target following after determining to find target again;
During to next frame image, according to target search result in previous frame image, a ROI region slightly larger than previous frame image template is set in the target location of prediction, this ROI region image is transformed into HSV space, extract H channel image;
The reverse projection image of this area image is calculated according to the color histogram of H channel image;
The target in this region is found with Meanshift clustering algorithm iteration, target initiating searches frame is the target location of previous frame image prediction, and according to the target location that previous frame image position and current C amshift are searched for, the position of target in prediction next frame image.
Using the ratio of width to height of the target detected and the target sizes that detects as the foundation of whether losing, when the ratio of width to height and known target gap of detecting target are greater than setting value, though think that target exists but is about to lose, when the target area detected or length and width data are less than setting value, think track rejection, start to carry out position prediction, Forecasting Methodology is the position occurred according to the Distance Judgment present frame target of front cross frame image object barycenter movement, respectively expand some pixels to increase the size of search window to surrounding simultaneously, to find target fast when causing track rejection because target travel is too fast, ability return-to-zero after confirmation continuous multiple frames lose objects, start anew to carry out searching algorithm.
In the following way the measurable coverage of discrete focal length point determined is tested, to ensure that every two adjacent measurable coverages of focal length point have certain overlapping region:
Determine some threshold value Th 1, Th 2..., Th 2n, the focusing gear of automatic focusing camera one can be set to odd number shelves, the focusing gear of automatic focusing camera two can be set to even number shelves, with ensureing 0 ~ Th by automatic focusing camera one camera 1, Th 2~ Th 3..., Th 2n-2~ Th 2n-1distance range, with ensureing Th by automatic focusing camera two 1~ Th 2, Th 3~ Th 4..., Th 2n-1~ Th 2ndistance range, with this ensure measure continuity, finally according to different measurement results judge run output logic select optimal result export, ensure measurement accuracy with this,
Output logic is:
1) if two cameras export be 0m, represent and target do not detected, export 0m, to not detect that the counter of target adds 1, continue to detect next frame image, when continuous 8 frames do not detect target, represent and detect mistake, two cameras are recalled to lowest gear, restart to detect;
2), when automatic focusing camera two detects target when automatic focusing camera one does not detect target, export the measured value of automatic focus cameras two, and according to this measurement result, automatic focusing camera one is adjusted to corresponding gear; Equally, if automatic focusing camera one target detected and automatic focusing camera two does not detect target time, export the measured value of automatic focus cameras one, and according to this measurement result, automatic focusing camera two be adjusted to corresponding gear;
3), when two cameras all detect target, first judge whether that the measurement result gap of two cameras is excessive, if exceed tolerance interval, namely gap is more than the scope of a gear, be then judged as detecting mistake, two cameras is put deep low gear respectively, again detects; If according to measurement result, two camera measurement result gaps in tolerance interval, then judge whether two cameras are in correct gear: if two camera gears are all incorrect, then adjust two cameras respectively to correct gear, during adjustment, export the result of calculation of another camera; If wherein there is the gear of a camera incorrect, then adjust this camera, export the result of calculation of the correct camera of gear simultaneously; If two cameras are all in correct gear, then calculate the difference of two camera result of calculations, if be less than setting threshold value, then export the result of calculation of high tap position camera, otherwise export the result of calculation of low-grade location camera.
According to the valid interval that distance range and the camera of required measurement can accurately be measured at a focal length point place, be some sections by discrete for distance range, each segment distance scope is made all to be slightly less than the valid interval of camera measurement, accurately focus number of times as far as possible less, using the end points of discrete some distance segment as some threshold value Th to ensure to measure simultaneously 1, Th 2..., Th 2n.
Compared with prior art, the present invention adopts machine vision ranging technology to detect the real-time distance of dynamic object, algorithmic procedure and hardware system structure simple, continuous detecting can be carried out, accuracy of detection is higher, without the need to manual control, uses two cameras, merely add relatively little resource overhead and just obtain operation result more accurately, be applicable to the process of Measurement accuracy distance in a big way.
Accompanying drawing explanation
Fig. 1 is Internet of Things binocular vision zoom dynamic target tracking distance-finding method process flow diagram of the present invention.
Fig. 2 is that the many gears of camera of Internet of Things binocular vision zoom dynamic target tracking distance-finding method of the present invention demarcate process flow diagram.
Fig. 3 is the track algorithm process flow diagram of Internet of Things binocular vision zoom dynamic target tracking distance-finding method of the present invention.
Fig. 4 is the system for implementing hardware of Internet of Things binocular vision zoom dynamic target tracking pilot system platform of the present invention.
Embodiment
Embodiments of the present invention are described in detail below in conjunction with drawings and Examples.
Internet of Things binocular vision zoom dynamic target tracking distance-finding method of the present invention gathers image by using the varifocal camera one that be arranged in parallel and varifocal camera two, be some static stalls by two-phase mechanical coke distance dispersion, by the scaling method of repeatedly focussing distance Extrapolation mean value, different gear focal length demarcated; Two cameras are placed in different gear, ensure that surveying range has certain overlap, according to recording distance automatic focusing and switching camera, target image is remained in camera fields of view, and imaging is clear and keep the imaging size of certain limit; Use the Camshift algorithm improved to complete target following, adopt pinhole imaging system principle to carry out distance and calculate; Final employing technology of Internet of things, self-defining data frame format, sends data to the main frame on internet by wireless communication module, so that the access analysis of data and arrangement.
As shown in Figure 1, concrete measuring process mainly comprises following four steps:
(1) the discrete and camera calibration of focal length
Defocus distance dispersion, refers to and carries out sliding-model control to a focal range [min, max], and namely in this scope limited, the focal length of varifocal camera one and varifocal camera two all only uses several discrete f 1, f 2... f i..., f n, n is the number of static stall, 1≤i≤n, min≤f 1<...<f i<...<f n≤ max, when carrying out Focussing, uses these fixing focal length value points at every turn.Switching between points can be controlled by one group of computing machine control command.When increasing lens focus and control, send increase focal length order to serial ports, now the focal length regulation and control motor of camera can always at rotary state, and focal length is increasing always, and the motor stalls when ceasing and desisting order to serial ports transmission, completes a Focussing.
By calculating and test by discrete for the focal range of automatic adjustable focus camera for some static stalls, each gear fixation measuring specific distance range.
For the range observation of known target thing, the principle using monocular to find range more simple and fast is easy to operation, an interval can only be dropped on for the burnt camera of automated variable at the Focussing of static stall and the problem of certain exact value cannot be obtained, for obtaining measurement result comparatively accurately, following easy scaling method can be adopted to calculate focal length value comparatively accurately:
According to geometry imaging object distance, at a distance of and the relation of focal length: in formula: f is focal length; U is object distance, and V is image distance, known, as U > > V, f ≈ V, and the focal length of general camera lens is not at tens millimeters to hundreds of millimeter etc., relative to the distance of required measurement, meet above condition, so according to pinhole imaging system principle: just can be back-calculated to obtain focal length value at known distance point:
As shown in Figure 2, focal length sliding-model control is carried out to two cameras, focusing time T1, T2 ... Tn is determined according to the distance segment of required measurement, to calculate the focal length of wherein a grade: camera to be adjusted to one of them time Ti, start to calculate i-th grade of focal distance f i: the target sizes in i-th grade of distance range accurately measured in 1m reading images, use formula calculate one group of focal length value, and calculate the average focal length value of this group focal length value, be greater than the data setting threshold value, rejected if having among this group focal length with the absolute value of the difference of average focal length value, the arithmetic mean that remaining focal length value is tried to achieve is as a focal length value; If no, then direct using this average focal length as a focal length value.Continuous several times adjusts to this static stall, calculates with said method, obtains multiple focal length value, again on average, is exported by the final focal length value of net result as this static stall.The focal length of several static stalls of discretize is obtained all in this way.
This way according to being: in measurement range, first measure that one group of focal length is averaged is due to when focal length is constant, target is comparatively large and less compared with the imaging of distant positions place in the local imaging of closer distance, distance size so representated by different distance 1 pixels is just different, matching at partial distance place just there will be nuance and causes error (such as reality must carry out matching by an integer pixel without an integer pixel with regard to the target that can represent), this group focal length value is done and on average just can ensure there is higher measuring accuracy in whole distance segment, the gross error caused due to reasons such as incomplete matching or interference needs to carry out filtering, and repeatedly adjust camera to this focal length point place, measure and organize focal length value more, again its mean value is averaging again, is intended to solve camera and focuses at every turn and drop on the problem of a focal range but not a concrete point value, such way is supposition focal length point setting range Normal Distribution, try to achieve as far as possible and be worth accurately, real focal length when making automatic focusing is with to bring the focal length difference calculating distance into as far as possible little.
(2) target following
By two collected by cameras to image be all divided into H, S, V tri-passages, the main H channel data that uses processes, and sets up pattern mask by the triple channel characteristic of known target feature, carries out filtering operation to image.The Camshift algorithm improved is adopted to complete target following.
As shown in Figure 3, the Camshift algorithm overall process of improvement is as follows:
For the two field picture in video flowing, according to the target that previous frame image detects, detection ROI region is set, if the first two field picture or N continuous frame do not find target, then ROI region is set to full figure, region of search correspondence is set to the region respectively expanding 50 pixels than ROI region up and down, crosses the border if produce, region of search is set to corresponding image boundary, read a two field picture, the conversion of RGB model to HSV model is carried out for the part of image in region of search, make mask images, and extract its H channel image calculating back projection figure, the centroid position of record previous frame image, use fast target detection algorithm to check whether and find target, if, again do not read a two field picture, if the target of finding, carry out target following with Camshift algorithm, and calculate the position of tracking box in former figure and the ratio of width to height of tracking box, judge whether normally to trace into target according to the position of tracking box and the ratio of width to height data, if follow the tracks of normal, the position Camshift algorithm that also continuation improves of prediction next frame target completes target following, otherwise judge whether follow the tracks of abnormal frame number has reached N frame, if do not have, then future position, expands search box following range, otherwise ROI region is set to full figure, again image is carried out to the detection and tracking of target.
After completing target following, the information of target sizes in the image area of target or the token image such as the length of side, diameter can be calculated according to obtained object boundary information.
Compared with traditional Camshift algorithm, after improving, the superiority of algorithm is mainly reflected in following three aspects:
1, traditional C amshift algorithm adopts and each two field picture is converted to HSV space, then searches target area and calculates its back projection figure, finally complete the tracking of target; And the slightly large regions of the appearance target in each frame is just converted to HSV space by this algorithm, calculate back projection and complete target following, largely must reduce the time of image conversion, the superiority of this method is particularly evident when image resolution ratio is comparatively large and target zone is less, also can obtain significantly improving of tracking velocity for general pattern.
2, in order to improve system stability, reducing noise, adding fast target detection algorithm, just only export result of calculation when targets are present.Fast target detection algorithm is described below: by the image upper left corner (0,0) current point is set to, jumpnum is set, the transverse and longitudinal coordinate of current point is added jumpnum respectively and judges whether that this point belongs to impact point according to color or other features, if not impact point, then continue search by being newly set to current point; After searching impact point, keep this y coordinate constant, x coordinate is successively decreased, determines whether frontier point, backtracking like this is until find frontier point, arrange according to jumpnum, backtracking jumpnum time, then uses breadth-first search to the frontier point found at most, continue to find other frontier points, when the border found count be greater than setting threshold value time, think and find target, complete tracking with Camshift algorithm
3, compare traditional Camshift algorithm, algorithm after improvement adds the process after track rejection, using the ratio of width to height of the target detected and the target sizes that detects as the foundation of whether losing, when the ratio of width to height and known target gap of detecting target are excessive, though think that target exists but is about to lose, when the target area detected or length and width data too small time, think track rejection, start to carry out position prediction, Forecasting Methodology is the position occurred according to the Distance Judgment present frame target of front cross frame target centroid movement, respectively expand 2 pixels to increase the size of search window to surrounding simultaneously, target is found fast when to reach and to cause track rejection because target travel is too fast, ability return-to-zero after confirmation continuous multiple frames lose objects, start anew to carry out searching algorithm.Such way can ensure when target of short duration lose tracking, within the fastest time, pick up target, namely ensure that search target rapidity.
(3) gear arranges adjustment and result output
The coverage can measured for the discrete focal length point determined is tested, and ensures that every two adjacent measurable coverages of focal length point have certain overlapping region, namely rationally determines some threshold value Th by calculating and testing 1, Th 2..., Th 2n(also can be Th 1, Th 2..., Th 2n+1, take the circumstances into consideration to select according to concrete measurement range), the focusing gear of automatic focusing camera one can be set to odd number shelves, and the focusing gear of automatic focusing camera two can be set to even number shelves, ensure 0 ~ Th with odd number shelves camera 1, Th 2~ Th 3..., Th 2n-2~ Th 2n-1distance range, with even number shelves camera ensure Th 1~ Th 2, Th 3~ Th 4..., Th 2n-1~ Th 2ndistance range, with this ensure measure continuity, finally according to different measurement results judge run output logic select optimal result export, ensure measurement accuracy with this.
Output decision logic is:
If 1 two cameras export be 0m, represent and target do not detected, export 0m, to not detect that the counter of target adds 1, continue to detect next frame image, when continuous 8 frames do not detect target, represent and detect mistake, two cameras are recalled to lowest gear, restart to detect;
2, when can automatic focusing camera one do not detect target and can automatic focusing camera two target detected time, exporting can the measured value of automatic focusing camera two, and can adjust to corresponding gear by automatic focusing camera one according to this measurement result; Equally, if target and can automatic focusing camera two camera when target not detected can be detected by automatic focusing camera one, exporting can the measured value of automatic focusing camera one, and can be adjusted to corresponding gear by automatic focusing camera two according to this measurement result;
3, when two cameras all detect target, first judge whether that the measurement result gap of two cameras is excessive, if exceed tolerance interval (gap is more than the scope of a gear), be judged as detecting mistake, two cameras put deep low gear respectively, again detects; If two camera measurement result gaps can accept, then judge whether two cameras are in correct gear according to measurement result: if two camera gears are all incorrect, then adjust two cameras respectively to correct gear, during adjustment, export the result of calculation of another camera; If wherein there is a gear incorrect, then adjust this camera, export the result of calculation of the correct camera of gear simultaneously; If two cameras are all in correct gear, then calculate the difference of two camera result of calculations, if be less than setting threshold value, then export the result of calculation of high tap position camera, because adopt the measurement result of larger focal length value more accurate, otherwise export the result of calculation of low-grade location camera.
By above output logic, can ensure in larger finding range, have measurement result accurately to export in real time, the erroneous calculations result caused because of error detection simultaneously reduced.In addition, distance calculating method still adopts traditional pinhole imaging system principle, namely as described in (1)
(4) data transmission and display are filed and are analyzed
In this Internet of Things binocular vision zoom dynamic target tracking pilot system platform, need the data of transmission to have the coordinate data of three dimensions of dynamic object, wherein the most important thing is depth information.Data message due to required transmission is less and simple, self-defined a kind of simple data frame format ensures that data transmission in real time accurately, use RF wireless communication module to complete data that are point-to-point or point to multi--point by serial ports to send and receive simultaneously, and received data is filed.
According to the feature of transmission data, by the formatting of simple data frame be: start bit is set to letter " f ", three data are respectively got n bit digital as data bit, stop bit is set to letter " e "; At receiving end, once detect for " f ", sending data represents that valid data are about to arrive, when the data of reception buffer memory are more than 3n+1, once read in 3n+1 numeral, judge whether last position is " e ", if then every for data above n numeral is merged into data, store display respectively, if not then abandon current data, start anew to judge.Because the data of required transmission are simple, do not need to adopt too complicated frame format, self-defining data frame can ensure effective transmission of data with the shortest transmission figure place.
The hardware configuration of this Internet of Things binocular vision zoom dynamic target tracking pilot system platform as shown in Figure 4, comprise can automatic focusing camera one, can automatic focusing camera two, image pick-up card, industrial control computer mainboard, two wireless modules, connect server host on the internet and other auxiliary peripheral hardwares: can automatic focusing camera one and can automatic focusing camera two keep at a certain distance away fixing in the same horizontal line, and ensure that its optical axis is parallel; The video image input industrial control computer mainboard obtained by two cameras by image pick-up card carries out image procossing according to pre-set program, the real-time distance of Continuous plus target; Measurement result is exported by serial ports with wireless module.The said equipment that camera, industrial control computer mainboard, image pick-up card etc. are used is integrated, by storage battery power supply, removable to ensure this range measurement system.The access of another wireless module is connected server host on the internet, so that the display access of data arranges.
An experimental applications of the present invention, in test process, can automatic focusing camera one and can all select the HC880-1 of MicroVision can automatic focusing camera by automatic focusing camera two, by experiment and calculate, be 5 gears to the measurement of 1-30m coverage by testing camera focus discrete, each gear ensures the accurate measurement of 6m distance, minimum gear f 1ensure that 1m-6m measures, f 2ensure that 6m-12m measures, the rest may be inferred.Wherein f 1initial focal length during for not adjusting, f 2for adjustment 2000ms focal length value, maximum f 5for adjustment 2600ms focal length value, gear so arranges and ensure that the scope of surveying of each gear is at more than 8m, adjacent gear positions has overlapping interval, and in the measurement range of each gear, having enough nargin to ensure, target can not move out image easily, and the focusing gear of side camera is set to f 1, f 3, f 5, the focusing gear of opposite side camera is set to f 2, f 4mode described in (1) is taked to calculate focal length, by each gear find range from integral point place calculate a focal length value, 1 group of 6 value obtained are averaging, be adjusted to for 10 times again this gear by 10 mean values again arithmetic mean try to achieve the focal length value of final utilization, adjustment number of times can take the circumstances into consideration to adjust according to the stability of camera focusing and experiment condition; Then use described in (3) and export decision logic selection Output rusults, this setup ensure that continuity and the accuracy of measurement simultaneously, namely exported by opposite side camera during the camera focusing of side, and in allowed band, export the measurement result of large focal length camera always; The output video image resolution of test camera is only 720*576, less image makes computing velocity effectively improve, the measurement result of exportable 30 two field pictures per second, after demarcating according to aforementioned manner, in the scope of 1-30m, error all can reach within 1%, even only has several millimeters in the error closely located; Simultaneously, the focusing range of test camera is actual in more than 5000ms, and the distance measuring 1-30m has only used the focusing range of 2600ms, if so make full use of the focusing range of camera, between the distance regions can measuring at least 1-50m comparatively accurately, measurement range is greatly improved; And improve with test camera and industrial control computer mainboard attribute, as camera focusing is comparatively stable, photo resolution is higher and industrial control computer mainboard travelling speed quickening etc., measuring error can also effectively reduce; The test data that the Camshift algorithm improved is improving tracking velocity is as follows, due to the difference of test platform, image size and target sizes, the degree that search speed improves is different, the image of 720*480 moving calculation in VS2012 is used in test, use the tracking time of traditional C amshift algorithm at about 6ms, and use this innovatory algorithm tracking time to be reduced to about 2-3ms, speed improves one times, and use larger image, during image as 1280*720 or 1440*1280, the raising of this tracking velocity is more remarkable; Finally, adopt self-defining data frame format, use RF wireless communication module simply sending/receiving module traffic rate to be set to 9600bps, just automatically complete data that are point-to-point or point to multi--point by serial ports and send and receive, after tested, data are received real-time and errorless.
By above step, just finally can realize carrying out accurately range observation fast to dynamic object, and effectively expand measurement range, ensure that the continuity of measurement, hardware system is simple and easy to realize, workable, and makes data be able to effective memory access by technology of Internet of things.
It should be noted that; above-mentioned embodiment is for explaining explanation the present invention; be only the preferred embodiments of the invention; instead of limit the invention; in the protection domain of spirit of the present invention and claim; the any amendment made the present invention, equivalent replacement, improvement etc., all belong to protection scope of the present invention.

Claims (8)

1. an Internet of Things binocular vision zoom dynamic target tracking pilot system platform, is characterized in that, comprising:
Focal length for the parallel placement gathering image all discrete for some static stalls can automatic focusing camera one and can automatic focusing camera two;
Connect described can automatic focusing camera one and can automatic focusing camera two receive both gather the image pick-up card of image information;
Connect the industrial computer of described image pick-up card;
And connect the wireless communication module of described industrial control computer mainboard;
Wherein, when gathering image, respectively two cameras are placed in different gear, ensure that surveying range has certain overlap, control automatic focusing and switching camera according to recording distance by industrial computer, make target in camera fields of view, keep imaging clearly and certain imaging size, industrial computer completes target following according to the image received, adopt pinhole imaging system principle to calculate distance, eventually through wireless communication module by data transfer to the main frame on internet.
2. an Internet of Things binocular vision zoom dynamic target tracking distance-finding method, is characterized in that,
What adopt two parallel placements can automatic focusing camera one and can gather image by automatic focusing camera two, the focal length of two cameras is all discrete is some static stalls, each gear fixation measuring specific distance range, by the scaling method of repeatedly focussing distance Extrapolation mean value, different gear focal length is demarcated, in gatherer process, two cameras are placed in different gear, ensure that surveying range has certain overlap, according to recording distance focusing and switching camera, target image is remained in camera fields of view, and imaging is clear and keep the imaging size of certain limit;
Carry out target following, and adopt pinhole imaging system principle to calculate distance;
Wirelessly by data transfer to the main frame on internet.
3. Internet of Things binocular vision zoom dynamic target tracking distance-finding method according to claim 2, is characterized in that, described focal length is discrete is that the process of some static stalls is as follows:
For a focal range [min, max], within the scope of this, focal length only uses discrete several focal length value point f 1, f 2... f i..., f n, n is the number of static stall, 1 £ i £ n, min £ f 1<...<f i<...<f n£ max, when carrying out Focussing, all adjust regular time to use fixing several focal length value points, the switching between focal length value point is controlled by one group of computing machine control command at every turn, when increasing lens focus and control, sends and increases focal length order.
4. Internet of Things binocular vision zoom dynamic target tracking distance-finding method according to claim 2, is characterized in that, describedly to the method that different gear focal length is demarcated is:
For a static stall, camera is adjusted to this gear, in its measurement range, reads imaging size every T rice respectively, and pass through formula: calculate one group of focal length value, and calculate the average focal length value of this group focal length value, be greater than the data setting threshold value, rejected if having among this group focal length with the absolute value of the difference of average focal length value, the arithmetic mean that remaining focal length value is tried to achieve is as a focal length value; If do not have, then direct using this average focal length as a focal length value, continuous several times adjusts to this static stall, calculate with said method, obtain multiple focal length value, again average, using the focal length value of net result as this static stall, the focal length of several static stalls of discretize is all obtained by the method.
5. Internet of Things binocular vision zoom dynamic target tracking distance-finding method according to claim 2, is characterized in that, described target following adopts the Camshift algorithm improved to complete, and step is as follows:
By two collected by cameras to image be all divided into H, S, V tri-passages, preserve H channel data and process;
First two field picture is adopted to the mode of traversal automatically, and fast target detection algorithm is adopted to each two field picture: first great-jump-forward traversal finds impact point, the extraction carrying out object boundary chain code after finding, to orient target, uses Camshift algorithm to target following after determining to find target again;
During to next frame image, according to target search result in previous frame image, a ROI region slightly larger than previous frame image template is set in the target location of prediction, this ROI region image is transformed into HSV space, extract H channel image;
The reverse projection image of this area image is calculated according to the color histogram of H channel image;
The target in this region is found with Meanshift clustering algorithm iteration, target initiating searches frame is the target location of previous frame image prediction, and according to the target location that previous frame image position and current C amshift are searched for, the position of target in prediction next frame image.
6. Internet of Things binocular vision zoom dynamic target tracking distance-finding method according to claim 5, it is characterized in that, using the ratio of width to height of the target detected and the target sizes that detects as the foundation of whether losing, when the ratio of width to height and known target gap of detecting target are greater than setting value, though think that target exists but is about to lose, when the target area detected or length and width data are less than setting value, think track rejection, start to carry out position prediction, Forecasting Methodology is the position occurred according to the Distance Judgment present frame target of front cross frame image object barycenter movement, respectively expand some pixels to increase the size of search window to surrounding simultaneously, to find target fast when causing track rejection because target travel is too fast, ability return-to-zero after confirmation continuous multiple frames lose objects, start anew to carry out searching algorithm.
7. Internet of Things binocular vision zoom dynamic target tracking distance-finding method according to claim 2, it is characterized in that, in the following way the measurable coverage of discrete focal length point determined is tested, to ensure that every two adjacent measurable coverages of focal length point have certain overlapping region:
Determine some threshold value Th 1, Th 2..., Th 2n, the focusing gear of automatic focusing camera one can be set to odd number shelves, the focusing gear of automatic focusing camera two can be set to even number shelves, with ensureing 0 ~ Th by automatic focusing camera one camera 1, Th 2~ Th 3..., Th 2n-2~ Th 2n-1distance range, with ensureing Th by automatic focusing camera two 1~ Th 2, Th 3~ Th 4..., Th 2n-1~ Th 2ndistance range, with this ensure measure continuity, finally according to different measurement results judge run output logic select optimal result export, ensure measurement accuracy with this,
Output logic is:
1) if two cameras export be 0m, represent and target do not detected, export 0m, to not detect that the counter of target adds 1, continue to detect next frame image, when continuous 8 frames do not detect target, represent and detect mistake, two cameras are recalled to lowest gear, restart to detect;
2), when automatic focusing camera two detects target when automatic focusing camera one does not detect target, export the measured value of automatic focus cameras two, and according to this measurement result, automatic focusing camera one is adjusted to corresponding gear; Equally, if automatic focusing camera one target detected and automatic focusing camera two does not detect target time, export the measured value of automatic focus cameras one, and according to this measurement result, automatic focusing camera two be adjusted to corresponding gear;
3), when two cameras all detect target, first judge whether that the measurement result gap of two cameras is excessive, if exceed tolerance interval, namely gap is more than the scope of a gear, be then judged as detecting mistake, two cameras is put deep low gear respectively, again detects; If according to measurement result, two camera measurement result gaps in tolerance interval, then judge whether two cameras are in correct gear: if two camera gears are all incorrect, then adjust two cameras respectively to correct gear, during adjustment, export the result of calculation of another camera; If wherein there is the gear of a camera incorrect, then adjust this camera, export the result of calculation of the correct camera of gear simultaneously; If two cameras are all in correct gear, then calculate the difference of two camera result of calculations, if be less than setting threshold value, then export the result of calculation of high tap position camera, otherwise export the result of calculation of low-grade location camera.
8. Internet of Things binocular vision zoom dynamic target tracking distance-finding method according to claim 7, it is characterized in that, according to the valid interval that distance range and the camera of required measurement can accurately be measured at a focal length point place, be some sections by discrete for distance range, each segment distance scope is made all to be slightly less than the valid interval of camera measurement, accurately focus number of times as far as possible less, using the end points of discrete some distance segment as some threshold value Th to ensure to measure simultaneously 1, Th 2..., Th 2n.
CN201510297393.1A 2015-06-03 2015-06-03 A kind of Internet of Things binocular vision zoom dynamic target tracking pilot system platform and distance-finding method Expired - Fee Related CN104880154B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510297393.1A CN104880154B (en) 2015-06-03 2015-06-03 A kind of Internet of Things binocular vision zoom dynamic target tracking pilot system platform and distance-finding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510297393.1A CN104880154B (en) 2015-06-03 2015-06-03 A kind of Internet of Things binocular vision zoom dynamic target tracking pilot system platform and distance-finding method

Publications (2)

Publication Number Publication Date
CN104880154A true CN104880154A (en) 2015-09-02
CN104880154B CN104880154B (en) 2016-05-11

Family

ID=53947744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510297393.1A Expired - Fee Related CN104880154B (en) 2015-06-03 2015-06-03 A kind of Internet of Things binocular vision zoom dynamic target tracking pilot system platform and distance-finding method

Country Status (1)

Country Link
CN (1) CN104880154B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131408A (en) * 2016-07-11 2016-11-16 深圳市金立通信设备有限公司 A kind of image processing method and terminal
CN106161941A (en) * 2016-07-29 2016-11-23 深圳众思科技有限公司 Dual camera chases after burnt method, device and terminal automatically
CN106384353A (en) * 2016-09-12 2017-02-08 佛山市南海区广工大数控装备协同创新研究院 Target positioning method based on RGBD
CN107306338A (en) * 2016-04-19 2017-10-31 通用汽车环球科技运作有限责任公司 For object detection and the panoramic camera system of tracking
CN107437050A (en) * 2016-05-28 2017-12-05 上海大学 Miniature self-service finds safe landing locations method from gyroplane with monocular adjustable focus liquid lens
CN107896303A (en) * 2017-10-23 2018-04-10 努比亚技术有限公司 A kind of image-pickup method, system and equipment and computer-readable recording medium
WO2018077218A1 (en) * 2016-10-31 2018-05-03 杭州海康威视数字技术股份有限公司 Depth measuring method and system
CN110290379A (en) * 2019-07-02 2019-09-27 珠海达明科技有限公司 A kind of camera focus calibration platform and calibration method
CN110631481A (en) * 2019-10-31 2019-12-31 湖北民族大学 Method and system for measuring steel profile parameters
CN113658251A (en) * 2021-08-25 2021-11-16 北京市商汤科技开发有限公司 Distance measuring method, device, electronic equipment, storage medium and system
CN113686976A (en) * 2021-09-06 2021-11-23 苏州好捷生智能机电设备有限公司 Columnar crystal information processing technology based on ultrasonic detection
CN113875219A (en) * 2019-08-27 2021-12-31 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN114299167A (en) * 2022-03-11 2022-04-08 杭州灵西机器人智能科技有限公司 Monocular calibration method, system, device and medium for zoom lens
CN117741682A (en) * 2024-02-19 2024-03-22 荣耀终端有限公司 Distance detection method, distance measurement system, electronic device, and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008082870A (en) * 2006-09-27 2008-04-10 Setsunan Univ Image processing program, and road surface state measuring system using this
CN103278139A (en) * 2013-05-06 2013-09-04 北京航空航天大学 Variable-focus monocular and binocular vision sensing device
CN104015931A (en) * 2014-04-22 2014-09-03 西安交通大学 Vision localization, measurement and control method, system and experimental platform for automatic refueling dead zone of unmanned aerial vehicle
CN203861189U (en) * 2013-11-11 2014-10-08 武汉芯印象光电科技有限公司 Pupil distance and pupil height measuring instrument based on binocular vision
CN104123726A (en) * 2014-07-15 2014-10-29 大连理工大学 Blanking point based large forging measurement system calibration method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008082870A (en) * 2006-09-27 2008-04-10 Setsunan Univ Image processing program, and road surface state measuring system using this
CN103278139A (en) * 2013-05-06 2013-09-04 北京航空航天大学 Variable-focus monocular and binocular vision sensing device
CN203861189U (en) * 2013-11-11 2014-10-08 武汉芯印象光电科技有限公司 Pupil distance and pupil height measuring instrument based on binocular vision
CN104015931A (en) * 2014-04-22 2014-09-03 西安交通大学 Vision localization, measurement and control method, system and experimental platform for automatic refueling dead zone of unmanned aerial vehicle
CN104123726A (en) * 2014-07-15 2014-10-29 大连理工大学 Blanking point based large forging measurement system calibration method

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107306338A (en) * 2016-04-19 2017-10-31 通用汽车环球科技运作有限责任公司 For object detection and the panoramic camera system of tracking
CN107437050B (en) * 2016-05-28 2021-02-23 上海大学 Method for searching safe landing area by monocular adjustable-focus liquid lens for small unmanned autogyro
CN107437050A (en) * 2016-05-28 2017-12-05 上海大学 Miniature self-service finds safe landing locations method from gyroplane with monocular adjustable focus liquid lens
CN106131408A (en) * 2016-07-11 2016-11-16 深圳市金立通信设备有限公司 A kind of image processing method and terminal
CN106161941A (en) * 2016-07-29 2016-11-23 深圳众思科技有限公司 Dual camera chases after burnt method, device and terminal automatically
CN106161941B (en) * 2016-07-29 2022-03-11 南昌黑鲨科技有限公司 Automatic double-camera focus tracking method and device and terminal
CN106384353A (en) * 2016-09-12 2017-02-08 佛山市南海区广工大数控装备协同创新研究院 Target positioning method based on RGBD
WO2018077218A1 (en) * 2016-10-31 2018-05-03 杭州海康威视数字技术股份有限公司 Depth measuring method and system
CN108020200A (en) * 2016-10-31 2018-05-11 杭州海康威视数字技术股份有限公司 A kind of depth measurement method and system
US11209268B2 (en) 2016-10-31 2021-12-28 Hangzhou Hikvision Digital Technology Co., Ltd. Depth measuring method and system
CN108020200B (en) * 2016-10-31 2020-02-28 杭州海康威视数字技术股份有限公司 Depth measurement method and system
CN107896303A (en) * 2017-10-23 2018-04-10 努比亚技术有限公司 A kind of image-pickup method, system and equipment and computer-readable recording medium
CN110290379A (en) * 2019-07-02 2019-09-27 珠海达明科技有限公司 A kind of camera focus calibration platform and calibration method
CN113875219A (en) * 2019-08-27 2021-12-31 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN113875219B (en) * 2019-08-27 2023-08-15 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN110631481A (en) * 2019-10-31 2019-12-31 湖北民族大学 Method and system for measuring steel profile parameters
CN113658251A (en) * 2021-08-25 2021-11-16 北京市商汤科技开发有限公司 Distance measuring method, device, electronic equipment, storage medium and system
CN113686976A (en) * 2021-09-06 2021-11-23 苏州好捷生智能机电设备有限公司 Columnar crystal information processing technology based on ultrasonic detection
CN114299167A (en) * 2022-03-11 2022-04-08 杭州灵西机器人智能科技有限公司 Monocular calibration method, system, device and medium for zoom lens
CN114299167B (en) * 2022-03-11 2022-07-26 杭州灵西机器人智能科技有限公司 Monocular calibration method, system, device and medium of zoom lens
CN117741682A (en) * 2024-02-19 2024-03-22 荣耀终端有限公司 Distance detection method, distance measurement system, electronic device, and readable storage medium

Also Published As

Publication number Publication date
CN104880154B (en) 2016-05-11

Similar Documents

Publication Publication Date Title
CN104880154A (en) Internet-of-things binocular vision zoom dynamic target tracking test system platform and Internet-of-things binocular vision zoom dynamic target tracking ranging method
US11922643B2 (en) Vehicle speed intelligent measurement method based on binocular stereo vision system
CN108416791B (en) Binocular vision-based parallel mechanism moving platform pose monitoring and tracking method
RU2730687C1 (en) Stereoscopic pedestrian detection system with two-stream neural network with deep training and methods of application thereof
WO2021004312A1 (en) Intelligent vehicle trajectory measurement method based on binocular stereo vision system
CN104154898B (en) A kind of initiative range measurement method and system
CN100487724C (en) Quick target identification and positioning system and method
CN109167956A (en) The full-bridge face traveling load spatial distribution merged based on dynamic weighing and more video informations monitors system
CN106875436B (en) It is a kind of based on feature dot density by the method and apparatus of focusing storehouse estimating depth
CN104700408B (en) A kind of indoor single goal localization method based on camera network
CN105627932A (en) Distance measurement method and device based on binocular vision
CN111753757B (en) Image recognition processing method and device
CN106503605A (en) Human body target recognition methods based on stereovision technique
CN104173054A (en) Measuring method and measuring device for height of human body based on binocular vision technique
CN104102069B (en) A kind of focusing method of imaging system and device, imaging system
CN110084243A (en) It is a kind of based on the archives of two dimensional code and monocular camera identification and localization method
CN107991665A (en) It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring
CN111288910A (en) Tramcar trapezoidal turnout deformation monitoring system and method
Cvišić et al. Recalibrating the KITTI dataset camera setup for improved odometry accuracy
CN107036579A (en) A kind of target relative positioning method based on monocular liquid lens optical system
CN104123776A (en) Object statistical method and system based on images
CN109711267A (en) A kind of pedestrian identifies again, pedestrian movement&#39;s orbit generation method and device
CN106842178A (en) A kind of light field method for estimating distance and optical field imaging system
CN106504274A (en) A kind of visual tracking method and system based under infrared camera
CN108805940B (en) Method for tracking and positioning zoom camera in zooming process

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160511

Termination date: 20190603

CF01 Termination of patent right due to non-payment of annual fee