CN108122244A - The video frequency speed-measuring method and device of a kind of video image - Google Patents

The video frequency speed-measuring method and device of a kind of video image Download PDF

Info

Publication number
CN108122244A
CN108122244A CN201611084256.0A CN201611084256A CN108122244A CN 108122244 A CN108122244 A CN 108122244A CN 201611084256 A CN201611084256 A CN 201611084256A CN 108122244 A CN108122244 A CN 108122244A
Authority
CN
China
Prior art keywords
plane
characteristic point
coordinates
target vehicle
camera
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
CN201611084256.0A
Other languages
Chinese (zh)
Other versions
CN108122244B (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201611084256.0A priority Critical patent/CN108122244B/en
Publication of CN108122244A publication Critical patent/CN108122244A/en
Application granted granted Critical
Publication of CN108122244B publication Critical patent/CN108122244B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/052Detecting movement of traffic to be counted or controlled with provision for determining speed or overspeed
    • G08G1/054Detecting movement of traffic to be counted or controlled with provision for determining speed or overspeed photographing overspeeding vehicles
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/36Devices characterised by the use of optical means, e.g. using infrared, visible, or ultraviolet light
    • G01P3/38Devices characterised by the use of optical means, e.g. using infrared, visible, or ultraviolet light using photographic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • Power Engineering (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses the video frequency speed-measuring methods and device of a kind of video image, obtain the image space coordinate of the characteristic point of target vehicle, characteristic point is mapped to pre-set first plane, characteristic point is mapped to the second plane further according to pre-set first mapping relations, obtains plane coordinates of the characteristic point in the second plane;The movement velocity of target vehicle is determined according to plane coordinates.Image space coordinate of the present invention first by obtaining characteristic point, then characteristic point is mapped in the second plane using pre-set mapping relations, the movement velocity of target vehicle is determined eventually by motion track information of the characteristic point in the second plane, improves the precision of movement velocity calculating.

Description

The video frequency speed-measuring method and device of a kind of video image
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of video frequency speed-measuring method of video image.The present invention Also relate to a kind of processing unit of video image.
Background technology
At present, intelligent transportation system has begun to take shape, if can be while intellectual traffic control and guiding is realized, to each Kind of road vehicle speed carries out real-time video monitoring and processing, this for improve traffic order, ensure traffic safety and Reducing traffic accident will play an important role.
In existing technology, to the travel speed of vehicle there are many detection method, traditional method has induction coil, swashs Flash ranging speed, radar velocity measurement, ultrasonic wave test the speed.But due to the defects of being individually present, effect is unsatisfactory in practical applications. For example, induction coil needs road pavement to be cut, meeting road pavement causes centainly to destroy, and maintenance cost is higher;Radar velocity measurement Using Doppler effect, the speed of object is calculated compared with the frequency displacement of transmitted wave by radar return, the system is for installation More demanding, velocity-measuring system needs face moving object direction, and measured deviation angle is necessarily less than 10 degree.And with image procossing The continuous development of technology obtains the magnitude of traffic flow, vehicle class automatically based on computer vision, image processing and pattern recognition The characteristics of type and Vehicle Speed become Recent study.
In addition, present inventor has also consulted patent of invention CN 103197090A, a kind of feature based is which described Point variation video frequency speed-measuring method, this method be by video probe to certain road Fixed Time Interval shooting continuous picture or Video is persistently shot, when there is mobile target to enter in the scene of video probe shooting, the feature of mobile object is extracted, passes through object The displacement of body characteristics and time calculate the speed of mobile object.
With reference to the more than prior art, present inventor in the implementation of the present invention, deposit in the prior art by discovery In following shortcoming:
(1) needed when calculating perspective relation in road surface selected characteristic point, and need to measure showing for corresponding video image Distance between the characteristic point of field, can not arbitrarily choose for characteristic point, need to meet the specific requirement in picture.Overall operation rises It is next complex, and the feature point for calibration on each monitoring road is needed on actual motion road, it is brought for actual traffic It is certain to influence.
(2) calculating track in perspective projection image according to vehicle characteristics shape can exist compared with great talent's error, be scaled to reality It also can there are errors, the velocity accuracy of calculating can not meet actual demand under the coordinate system of border.
(3) displacement mapped only in only consideration Y-direction of image and physical plane, the not consideration for X-direction, if Vehicle is run in picture into oblique line, then there is very big error, the velocity error being finally calculated for actual motion distance It can expand.
(4) method not had for the selection of vehicle characteristics point, and the accuracy of characteristic point directly affects most in picture The accuracy of terminal velocity.
(5) camera lens of current intelligent transportation product use zoom lens substantially, and zoom lens is on the one hand for each The adaptability of the scene of kind greatly enhances, but is difficult to calculate for the burnt section of real lens.This method calculates mapping relations very Important condition is both to be calculated in the case where knowing focal length, so the more difficult implementation on current mount scheme.
Therefore, accurate characteristic point how is extracted, and the movement velocity of vehicle is accurately calculated according to characteristic point information, Through becoming the technical issues of urgently to be resolved hurrily.
The content of the invention
The embodiment of the present invention provides a kind of video frequency speed-measuring method and equipment of video image, by the target vehicle detected The image space coordinate of characteristic point is mapped in pre-set second plane, then the fortune by characteristic point in the second plane The coordinate information of dynamic rail mark determines the accurate movement velocity of target vehicle, to solve the movement calculated in the prior art The problem of speed is inaccurate, also, can also ensure that the accuracy of feature point extraction.
The present invention pre-sets the first plane that the space coordinates of with good grounds camera determines first, according to the camera and institute State the first mapping of the second plane and first plane and second plane that the space coordinates of the first plane is determined Relation, this method include:
The image space coordinate of the characteristic point of target vehicle is obtained, according to the image space coordinate of the characteristic point by described in Characteristic point is mapped to first plane, and the characteristic point is mapped to second plane according to first mapping relations, Obtain plane coordinates of the characteristic point in second plane;
The movement velocity of the target vehicle is determined according to the plane coordinates.
In some embodiments, the present invention obtains the image space coordinate of the characteristic point of target vehicle, specifically includes:
Candidate region is determined from the target vehicle using marginal information algorithm, recycles machine learning algorithm from institute It states and characteristic point is determined in candidate region, obtain the image space coordinate of the characteristic point.
In some embodiments, the present invention also wraps before the image space coordinate of characteristic point of target vehicle is obtained It includes:
Determine visible planar using the space coordinates of the camera, according to the parameter of the visible planar and it is described can The distance of view plane to the camera determines the focal length of the camera, is determined according to the focal length and the Gaussian imaging equation Go out first plane, the perpendicular bisector of first plane is in vertical direction;
Using the camera and the space coordinates of first plane, determined in the horizontal direction from the camera to institute The projection of the first plane is stated, second plane is determined according to the space coordinates of the projection, second plane is described the The projection in the horizontal direction of one plane;
Utilize the pass of the space coordinates and the space coordinates of respective point in second plane of each point in first plane System determines the first mapping relations of first plane and second plane.
In some embodiments, the present invention obtains plane coordinates of the characteristic point in second plane, including:
Using the image space coordinate of the characteristic point and the focal length of the camera, the characteristic point is mapped to described First plane;
Using first mapping relations and vectorial translation algorithm, the characteristic point is mapped to second plane, Obtain plane coordinates of the characteristic point in second plane;
Using the relation of the image space coordinate and the plane coordinates of the characteristic point, the second mapping relations are determined.
In some embodiments, present invention determine that the movement velocity of the target vehicle, including:
Using second mapping relations, the movement locus coordinate of the characteristic point is mapped to second plane, is obtained To the movable information of the target vehicle;
The movement velocity of the target vehicle is determined according to the movable information.
Correspondingly, the embodiment of the present invention additionally provides a kind of processing unit of video image, which includes:
Determining module is sat for when detecting dynamic video frame, obtaining the image space of the characteristic point of target vehicle Mark, is mapped to first plane by the characteristic point according to the image space coordinate of the characteristic point, is reflected according to described first It penetrates relation and the characteristic point is mapped to second plane, obtain plane coordinates of the characteristic point in second plane;
Processing module, for determining the movement velocity of the target vehicle according to the plane coordinates.
In some embodiments, present invention additionally comprises extraction module, it is specifically used for:
Candidate region is determined from the target vehicle using marginal information algorithm, recycles machine learning algorithm from institute It states and characteristic point is determined in candidate region, obtain the image space coordinate of the characteristic point.
In some embodiments, the determining module of the invention is in the image space for the characteristic point for obtaining target vehicle Before coordinate, it is additionally operable to:
Determine visible planar using the space coordinates of the camera, according to the parameter of the visible planar and it is described can The distance of view plane to the camera determines the focal length of the camera, is determined according to the focal length and the Gaussian imaging equation Go out first plane, the perpendicular bisector of first plane is in vertical direction;
Using the camera and the space coordinates of first plane, determined in the horizontal direction from the camera to institute The projection of the first plane is stated, second plane is determined according to the space coordinates of the projection, second plane is described the The projection in the horizontal direction of one plane;
Utilize the pass of the space coordinates and the space coordinates of respective point in second plane of each point in first plane System determines the first mapping relations of first plane and second plane.
In some embodiments, the determining module of the invention is additionally operable to:
Using the image space coordinate of the characteristic point and the focal length of the camera, the characteristic point is mapped to described First plane;
Using first mapping relations and vectorial translation algorithm, the characteristic point is mapped to second plane, Obtain plane coordinates of the characteristic point in second plane;
Using the relation of the image space coordinate and the plane coordinates of the characteristic point, the second mapping relations are determined.
In some embodiments, present invention additionally comprises:
The determining module is additionally operable to, using second mapping relations, the movement locus coordinate of the characteristic point be reflected Second plane is mapped to, obtains the movable information of the target vehicle;
The processing module, specifically for determining the movement velocity of the target vehicle according to the movable information.
Compared with prior art, the advantageous effects for the technical solution that the embodiment of the present invention is proposed include:
The invention discloses the video frequency speed-measuring method and equipment of a kind of video image, the figure of the characteristic point of target vehicle is obtained Characteristic point is mapped to pre-set first plane, further according to pre- by image space coordinate according to the image space coordinate of characteristic point Characteristic point is mapped to the second plane by the first mapping relations first set, obtains plane coordinates of the characteristic point in the second plane;Root The movement velocity of target vehicle is determined according to plane coordinates.The present invention is first by obtaining the image space coordinate of characteristic point, then Characteristic point is mapped in the second plane using pre-set mapping relations, eventually by fortune of the characteristic point in the second plane Dynamic trace information determines the movement velocity of target vehicle, improves the precision of movement velocity calculating.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write Specifically noted structure is realized and obtained in book, claims and attached drawing.
Below by drawings and examples, technical scheme is described in further detail.
Description of the drawings
It, below will be to attached drawing needed in embodiment description in order to illustrate more clearly of technical scheme It is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, general for this field For logical technical staff, without creative efforts, other attached drawings are can also be obtained according to these attached drawings.
A kind of flow diagram for video frequency speed-measuring method that Fig. 1 is proposed by the embodiment of the present invention;
A kind of flow diagram of the speed-measuring method for video image that Fig. 2 is proposed by the specific embodiment of the invention;
The method schematic diagram for pre-setting the first plane that Fig. 3 is proposed by the specific embodiment of the invention;
The method schematic diagram for pre-setting the second plane that Fig. 4 is proposed by the specific embodiment of the invention;
The camera focus that Fig. 5 is proposed by the specific embodiment of the invention determines the schematic diagram of method.
A kind of structure diagram of the processing unit for video image that Fig. 6 is proposed by the embodiment of the present invention.
Specific embodiment
Just as described in background the invention, in the prior art, the extraction for the characteristic point of the objects such as vehicle is accurate It is larger to spend error existing for poor and target velocity computational methods, and causes the target speed finally calculated there are one The problem of determining error.
In view of more than the problems of the prior art, present applicant proposes a kind of video frequency speed-measuring methods.This method passes through phase The space coordinates of machine and the developed width on road surface are provided with some parameters in camera in advance, including with road surface corresponding the One plane, the second plane being projected out in the horizontal plane by the first plane and the mapping relations of the first plane and the second plane, In this way, after target vehicle is detected, it can be according to the mapping relations, by the image space coordinate computational problem of target vehicle Actual coordinates of motion computational problem is converted into, the movement velocity of target is being calculated according to the actual coordinates of motion, effectively Improve the accuracy of target vehicle movement velocity calculating.
Conceived based on foregoing invention, it is necessary to previously according to actual parameter in phase before the specific steps of the program are performed Set in machine the first plane, the second plane and the first mapping relations, the specific set-up mode to be, using the space coordinates of camera with And Gaussian imaging equation determines the first plane, the perpendicular bisector of the first plane is in vertical direction;Utilize camera and the first plane Space coordinates determine the second plane, the second plane is the projection in the horizontal direction of the first plane;Utilize camera, the first plane And second plane space coordinates, determine the first mapping relations of the first plane and the second plane.Thus in camera There is provided the first plane and the first mapping relations, after subsequent detection to target vehicle, it is possible to now map target vehicle Into the first plane, according to the first mapping relations, target vehicle is mapped in the second plane, specific mapping mode will be It is described in detail in subsequent method, details are not described herein.
It should be noted that in some specific embodiments, set in camera the first plane, the second plane and First mapping relations, it is also possible that determine visible planar using the space coordinates of camera, according to the parameter of visible planar and The distance of visible planar to camera determines the focal length of camera, and the first plane is determined according to focal length and Gaussian imaging equation;Profit With camera and the space coordinates of the first plane, the projection from camera to the first plane is determined in the horizontal direction, according to projection Space coordinates determine the second plane;It is sat using the space coordinates of each point in the first plane and the space of respective point in the second plane Target relation determines the first mapping relations of the first plane and the second plane.Here, mainly according to the space coordinates of camera with And the width parameter information on road surface defines the real focal length of camera, then determines accurate first further according to real focal length Mapping relations.
As shown in Figure 1, a kind of flow diagram of the video frequency speed-measuring method proposed by the embodiment of the present invention, including following Step:
Step S101, the image space coordinate of the characteristic point of target vehicle is obtained, according to the image space of the characteristic point The characteristic point is mapped to first plane by coordinate, the characteristic point is mapped to according to first mapping relations described in Second plane obtains plane coordinates of the characteristic point in second plane.
As stated in the Background Art, since the extraction poor accuracy and target velocity computational methods of characteristic point are existing by mistake Difference is larger, and causes the target speed finally calculated there are certain error, therefore, of the invention to be sat according to the space of camera It is marked with and the situation of real road, the first plane, the second plane and the first mapping relations is provided in camera, are subsequently examined again The actual motion trajectory coordinates of target vehicle are calculated according to the first mapping relations after measuring target vehicle, then pass through the actual fortune The accuracy for the movement velocity that dynamic trajectory coordinates calculate is greatly improved, in this manner it is possible to solve because of computational methods There are errors for result of calculation caused by there is error.
Specifically, camera have to the actual conditions that target vehicle is monitored it is following two:
Situation one, target vehicle are static in the visual range of camera, do not generate movement, and camera obtains target carriage at this time Characteristic point image space coordinate, after camera calibration to target vehicle moves, according to image space coordinate calculate mesh Mark the movement velocity of vehicle.
Situation two, target vehicle move in the visual range of camera, and the image for obtaining the characteristic point of the target vehicle is empty Between coordinate, then according to the image space coordinate calculate target vehicle movement velocity.
Both the above situation mainly considers that original state of the vehicle in the visual range of camera is stationary state, also It is motion state, after the image space coordinate of characteristic point is got, is calculated according to the motion state of target vehicle.
When this step is intended to detect that current target vehicle is kept in motion, default parameter in camera, meter are utilized The actual motion trace information of target vehicle is calculated, specifically, need first to go out characteristic point according to the parameter extraction of target vehicle, In the preferred embodiment of the present invention, the concrete mode for determining characteristic point is, true from target vehicle using marginal information algorithm Candidate region is made, machine learning algorithm is recycled to determine characteristic point from candidate region, obtains the image space of characteristic point Coordinate, the characteristic point information accuracy got by this way is high, in this manner it is possible to solve due to characteristic point information is inaccurate There is error in caused result of calculation.
Further, after the image space coordinate of characteristic point is extracted, using the image space coordinate of characteristic point with And the focal length of camera, characteristic point is mapped to the first plane;Using the first mapping relations and vectorial translation algorithm, by characteristic point The second plane is mapped to, obtains plane coordinates of the characteristic point in the second plane;Utilize the image space coordinate and plane of characteristic point The relation of coordinate determines the second mapping relations.In this way, according to pre-set first mapping relations in camera, by target carriage Space coordinates be converted into the actual coordinates of motion, finally calculate movement velocity further according to the actual coordinates of motion so that The movement velocity calculated is more accurate.
Step S102, the movement velocity of the target vehicle is determined according to the plane coordinates.
It, will using the first mapping relations when detecting that current target vehicle is kept in motion as described in step S101 Characteristic point is mapped to the second plane, and has obtained the second mapping relations, in the motion process of subsequent characteristics point, determines feature O'clock the second plane motion track information, then further according to the motion track information carry out movement velocity calculating.
This step is intended to calculate the movement velocity of target vehicle according to the motion track information determined, at some In specific embodiment, which can, using the second mapping relations, the movement locus coordinate of characteristic point is mapped to Two planes obtain the movable information of target vehicle;The movement velocity of target vehicle is determined according to movable information.It in this way, can Target vehicle changed into actual motion problems the problem of image space moves, then by actual movement locus to mesh Mark vehicle is calculated, and obtained movement velocity is more accurate.
It can be seen that compared with prior art, the advantageous effects bag for the technical solution that the embodiment of the present invention is proposed It includes:
The invention discloses the video frequency speed-measuring method and equipment of a kind of video image, the figure of the characteristic point of target vehicle is obtained Characteristic point is mapped to pre-set first plane, further according to pre- by image space coordinate according to the image space coordinate of characteristic point Characteristic point is mapped to the second plane by the first mapping relations first set, obtains plane coordinates of the characteristic point in the second plane;Root The movement velocity of target vehicle is determined according to plane coordinates.The present invention is first by obtaining the image space coordinate of characteristic point, then Characteristic point is mapped in the second plane using pre-set mapping relations, eventually by fortune of the characteristic point in the second plane Dynamic trace information determines the movement velocity of target vehicle, improves the precision of movement velocity calculating.
It should be noted that described embodiment is the part of the embodiment of the present invention, instead of all the embodiments. Based on the embodiments of the present invention, the institute that those of ordinary skill in the art are obtained on the premise of creative work is not made There is other embodiment, shall fall in the protection scope of this application.
Below in conjunction with the attached drawing in the present invention, clear, complete description is carried out to the technical solution in the present invention, is shown So, described embodiment is the part of the embodiment of the present invention, instead of all the embodiments.Based on the implementation in the present invention Example, those of ordinary skill in the art's all other embodiments obtained on the premise of creative work is not made all belong to In the scope of protection of the invention.
As described above, in the prior art, the calculating for the movement velocity of target vehicle exists and is led due to error is larger The problem of causing result of calculation inaccurate.Therefore, the embodiment of the present invention is set in camera apparatus in advance in order to solve the problem above-mentioned Put with corresponding first plane in road surface, then determining that second is flat according to the spatial relationship of camera apparatus and the first plane Face and mapping relations;According to the image space coordinate and mapping relations of target vehicle characteristic point, determine characteristic point The coordinate information of movement locus in two planes determines target vehicle eventually by the coordinate information for calculating the movement locus Actual motion speed, since mapping relations are determined according to the actual parameter of road and the real focal length of camera, so really The movement velocity made is more accurate compared with the prior art, and concrete implementation process will be explained in detail in subsequent steps It states, the flow diagram of embodiment is as shown in Figure 2.
The extracting method of characteristic point is made in also needing to for the present invention before specific implementation steps of the invention start It elaborates, specifically, be that feature is stable and recall rate requires height for the extraction key of target signature in image space, because The accuracy rate of characteristic point will directly influence the accuracy rate of final speed calculating on image.In vehicle target, most stable of spy Sign will belong to vehicle license plate characteristic, and in essence, the location algorithm of car plate can be divided into three classes:It is based on edge, based on color And based on machine learning.It all has respective advantage and disadvantage, for example, the algorithm based on edge is relatively simple and effect is basic It can meet the requirements, but for complex scene, flase drop can be relatively more;Location algorithm based on color can also fundamentally be calculated It is one kind based on edge, is to come together to position using colour edging or gray-scale Image Edge and color nothing but, based on color Algorithm of locating license plate of vehicle it is pretty good for high definition picture effect, but then effect is less apparent for general scene effect;It is based on The algorithm of machine learning carries out License Plate, it is important to which the training method that the feature found is become reconciled, many people utilize Adaboost+haar features carry out car plate detection, and from the point of view of experimental result, recall rate can reach more than 99%, but flase drop simultaneously Rate is also very high, and is difficult that the region of car plate is completely detected.If so individually use the algorithm of machine learning Or it is less feasible, but candidate region can be found first with marginal information, it is then gone with machine learning algorithm unless car plate Region, finally effect out can reach the requirement of speed calculating substantially, and the possibility of flase drop substantially reduces.
Therefore, the present invention is exactly on the basis of in view of the defects of above method, is found using first with marginal information License plate candidate area, then the extraction of target signature in image space is realized by the pinpoint method of machine learning algorithm, Final positioning accuracy error improves the accuracy of feature point extraction substantially within 1-2 pixels.
As shown in figure 3, the method schematic diagram for pre-setting the first plane proposed by the specific embodiment of the invention, it is known that Upright bar height a, upright bar to visual road surface distance b, target surface (i.e. the first plane) height h, camera focus f;Camera lens is sought to target surface Distance v.
Specifically, point A is camera installation point, DAED ' C are conllinear and on camera axis.Certain during correct focusing, on EC One point D ' can be imaged as the point D on target surface just.At this point, the image distance of D ' | AD | equal to the distance v of camera lens to target surface;The object distance of D ' U=| AD ' | cannot directly acquire, can use | AB | ≈ | AD ' |, and according to Gaussian imaging equation, camera lens is obtained to the distance v of target surface, Specific formula for calculation is as follows:
Wherein, Gaussian imaging equation isF is camera focus, and u isObject distance, v is image distance.
After target surface distance is obtained, the angle α of camera axis and road surface vertical line can be obtained, specific formula for calculation is as follows:
As shown in figure 4, the method schematic diagram for pre-setting the second plane proposed by the specific embodiment of the invention, first Using the plane of Fig. 3 as YZ planes, using road surface as X/Y plane, space coordinates are established.Point A works are crossed perpendicular to the straight line of plane, target Face rotates 180 ° around the straight line, and target surface is projected to road surface (i.e. the second plane).
Then, point A is crossed by any point N in target surface1, project to point N on road surface.By AN1N three point on a straight line N1→ N mapping relations formula (i.e. the first mapping relations) is as follows:
Further, after target vehicle is detected, video frame coordinate is mapped as road surface coordinate, specific embodiment Or by taking Fig. 3 as an example, note target surface Pixel Dimensions are p (such as 5.5 μm), and target surface height is h, and target surface width is w, specifically by video Any point N on frame0(x0,y0, 0) and map to the N of target plane1(x1,y1, 0) and following steps need to be passed through:
(1) video frame pixel coordinate transformation is target surface size, obtains N01(x01,y01,z01)。
(2) video frame overturns 180 ° by axis of ordinate intermediate value, and ordinate is multiplied by cos α, obtains N02(x02,y02,z02)。
(3) video frame is by vectorTranslate the projection weight in X/Y plane with target surface It closes, obtains N03(x03,y03,z03)。
(4) video frame coordinate maps to target surface, the normal vector of plane where target surface The equation of plane where can determine target surface with the point D (0, vsin α, a-vcos α) in target surface plane is vsin α (y- Vsin α)-vcos α (z-a+vcos α)=0, i.e. z=tan α (y-vsin α)-vcos α+a obtain N1(x1, y1,z1)
(5) video frame coordinate maps to road surface.Video frame and the mapping relations on road surface are obtained by formula (3) and formula (7) N0(x0,y0, 0) and → N (x, y, 0) (i.e. the second mapping relations).
Road surface is to mapping relations N (x, y, 0) → N of video frame0(x0,y0,0)。
Wherein, p is Pixel Dimensions, and h is high for target surface, and w is wide for target surface, and a is upright bar height.
In specific implement scene, upright bar can be in camera to visual road surface distance b and camera focus f, these parameters Sensor determines, and installation environment it is fixed in the case of be basically unchanged, can be configured by field survey and by interface.
It is being projected it should be noted that all coordinates of video frame are calculated by the second mapping relations of formula (8) Areal coordinate obtains the trajectory coordinates determined in motion event, then can specifically pass through the trajectory coordinates and time Information calculates the movement velocity of target, and can calculate accurate movement velocity by formula (8), and formula (9) it is then a preferred embodiment, can be flexibly set in actual application scenarios, these are all in the present invention Protection domain within.
As shown in figure 5, the camera focus proposed by the specific embodiment of the invention determines the schematic diagram of method, actually should With in scene, since zoom lens is stronger to the adaptability of scene, therefore zoom lens is more widely applied in project.But become Zoom lens can not artificially learn focal length size after changing focal length, and the present invention can be by calculating actual lane width and image track The mapping relations of width approximately calculate focal length size, and specific computational methods are as follows:
Known upright bar height a, upright bar can then be calculated to visual road surface distance b | AB | length can be obtained by engineering survey Ground lane width is W, then the size of focal length f can be calculated by similar triangle theory:
Wherein:R is the physical length (unit rice) of lane line in image space, and it is empty in image to obtain lane line by configuration Between in Pixel Dimensions length l (unit pixel), by picture traverse Wimg(unit pixel) and camera target surface width w (units Rice) physical length of lane line in image space can be calculated:
Formula (11) can be thus brought into formula (10), you can draw focal length size.
Based on the elaboration of more than mapping relations, after target vehicle is detected, the specific calculating process of movement velocity is:With Exemplified by Fig. 4, setting video frame number F0~Fn, the frame coordinate of characteristic point is (x0,y0)~(xn,yn).The characteristic point that can be asked by formula (8) Corresponding road surface coordinate (x '0,y′0)~(x 'n,y′n), then its actual distance is:Its In, FR is frame per second, then the timeThe speed formula of so target is as follows:
Wherein, n is the frame sum of a period of time, and i and i-1 are respectively previous frame and rear frame.
The technique effect of the present invention is described in detail below for specific application scenarios.
1st, outfield is actual builds the environment that tests the speed, and tests zoom lens focal length first and calculates effect, be respectively adopted 12mm, 25mm, 50mm tight shot verified, is surveyed scenario parameters first and is configured parameter and normally issues, and is checked by daily record by formula (10) (11) calculate the focal length value of gained, and result is calculated such as the zoom lens focal length of table 1 shown in comparison:
Table 1
It can be obtained by test result, fixed-focus focal length value differs very little with calculating focal length value, substantially meets speed and calculates requirement.
2nd, video frequency speed-measuring verification is carried out for multiple test environments, adaptability of this method to scene is examined, as a result such as table 2 Different scenes video frequency speed-measuring result shown in:
Table 2
In upper table, first two are 500W cameras, and latter two are 200W cameras, and actual measurement velocity amplitude is actual in road for automobile Speed of service value.It is long to the distance on visual road surface, focal length, Pixel Dimensions, frame per second, target surface to bar height, bar respectively in test process Seven parameters such as degree and target surface width are initialized, and wherein target surface ruler is calculated by original image size in 200W cameras Very little value, frame per second according to camera model gives analog value, and (bayonet 500W is 10 frames/second, and bayonet 200W is 15 frames/second, and electric police is 12.5 frames/second).
From the point of view of the absolute error value that tests the speed, the resultant error that tests the speed is smaller, more accurately.In debugging process, it is noted that bar is high It is affected with focal length two parameter to the result that tests the speed, bar to visual road surface distance, Pixel Dimensions influence result smaller.
Based on the same inventive concept of the above method, the processing that the embodiment of the present application also proposed a kind of video image fills It puts, which includes:
Determining module 62, for obtaining the image space coordinate of the characteristic point of target vehicle, according to the figure of the characteristic point The characteristic point is mapped to first plane by image space coordinate, is mapped the characteristic point according to first mapping relations To second plane, plane coordinates of the characteristic point in second plane is obtained;
Processing module 63, for determining the movement velocity of the target vehicle according to the plane coordinates.
In some embodiments, present invention additionally comprises extraction module 61, it is specifically used for:
Candidate region is determined from the target vehicle using marginal information algorithm, recycles machine learning algorithm from institute It states and characteristic point is determined in candidate region, obtain the image space coordinate of the characteristic point.
In some embodiments, the determining module 62 of the invention is empty in the image for obtaining the characteristic point of target vehicle Between before coordinate, be additionally operable to:
Determine visible planar using the space coordinates of the camera, according to the parameter of the visible planar and it is described can The distance of view plane to the camera determines the focal length of the camera, is determined according to the focal length and the Gaussian imaging equation Go out first plane, the perpendicular bisector of first plane is in vertical direction;
Using the camera and the space coordinates of first plane, determined in the horizontal direction from the camera to institute The projection of the first plane is stated, second plane is determined according to the space coordinates of the projection, second plane is described the The projection in the horizontal direction of one plane;
Utilize the pass of the space coordinates and the space coordinates of respective point in second plane of each point in first plane System determines the first mapping relations of first plane and second plane.
In some embodiments, the determining module 62 of the invention is additionally operable to:
Using the image space coordinate of the characteristic point and the focal length of the camera, the characteristic point is mapped to described First plane;
Using first mapping relations and vectorial translation algorithm, the characteristic point is mapped to second plane, Obtain plane coordinates of the characteristic point in second plane;
Using the relation of the image space coordinate and the plane coordinates of the characteristic point, the second mapping relations are determined.
In some embodiments, present invention additionally comprises:
The determining module 62 is additionally operable to using second mapping relations, by the movement locus coordinate of the characteristic point Second plane is mapped to, obtains the movable information of the target vehicle;
The processing module 63, specifically for determining the movement velocity of the target vehicle according to the movable information.
Compared with prior art, the advantageous effects for the technical solution that the embodiment of the present invention is proposed include:
The invention discloses the video frequency speed-measuring method and equipment of a kind of video image, the figure of the characteristic point of target vehicle is obtained Characteristic point is mapped to pre-set first plane, further according to pre- by image space coordinate according to the image space coordinate of characteristic point Characteristic point is mapped to the second plane by the first mapping relations first set, obtains plane coordinates of the characteristic point in the second plane;Root The movement velocity of target vehicle is determined according to plane coordinates.The present invention is first by obtaining the image space coordinate of characteristic point, then Characteristic point is mapped in the second plane using pre-set mapping relations, eventually by fortune of the characteristic point in the second plane Dynamic trace information determines the movement velocity of target vehicle, improves the precision of movement velocity calculating.
Modules can be integrated in one in the specific embodiment of the invention, can also be deployed separately, and above-mentioned module is closed And be a module, multiple submodule can also be further split into.
Through the above description of the embodiments, those skilled in the art can be understood that the embodiment of the present invention The mode of necessary general hardware platform can also be added to realize by software by hardware realization.Based on such reason Solution, the technical solution of the embodiment of the present invention can be embodied in the form of software product, which can be stored in one A non-volatile memory medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in, it is used including some instructions so that a meter It calculates machine equipment (can be personal computer, server or network side equipment etc.) and performs each implement scene of the embodiment of the present invention The method.
It will be appreciated by those skilled in the art that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, module in attached drawing or Flow is not necessarily implemented necessary to the embodiment of the present invention.
It will be appreciated by those skilled in the art that the module in device in implement scene can be described according to implement scene into Row is distributed in the device of implement scene, can also carry out one or more dresses that respective change is disposed other than this implement scene In putting.The module of above-mentioned implement scene can be merged into a module, can also be further split into multiple submodule.
The embodiments of the present invention are for illustration only, do not represent the quality of implement scene.
Disclosed above is only several specific implementation scenes of the embodiment of the present invention, and still, the embodiment of the present invention is not office It is limited to this, the changes that any person skilled in the art can think of should all fall into the business limitation scope of the embodiment of the present invention.

Claims (10)

1. a kind of video frequency speed-measuring method, which is characterized in that the first plane that the space coordinates of with good grounds camera determines is pre-set, The second plane and first plane determined according to the space coordinates of the camera and first plane and described the First mapping relations of two planes, this method include:
The image space coordinate of the characteristic point of target vehicle is obtained, according to the image space coordinate of the characteristic point by the feature Point is mapped to first plane, and the characteristic point is mapped to second plane according to first mapping relations, is obtained The characteristic point is in the plane coordinates of second plane;
The movement velocity of the target vehicle is determined according to the plane coordinates.
2. video frequency speed-measuring method as described in claim 1, which is characterized in that obtain the image space of the characteristic point of target vehicle Coordinate specifically includes:
Candidate region is determined from the target vehicle using marginal information algorithm, recycles machine learning algorithm from the time Characteristic point is determined in favored area, obtains the image space coordinate of the characteristic point.
3. video frequency speed-measuring method as described in claim 1, which is characterized in that empty in the image for obtaining the characteristic point of target vehicle Between before coordinate, further include:
Visible planar is determined using the space coordinates of the camera, according to the parameter of the visible planar and described visual flat The distance of face to the camera determines the focal length of the camera, and institute is determined according to the focal length and the Gaussian imaging equation The first plane is stated, the perpendicular bisector of first plane is in vertical direction;
Using the camera and the space coordinates of first plane, determined in the horizontal direction from the camera to described The projection of one plane determines second plane according to the space coordinates of the projection, and second plane is flat for described first Face projection in the horizontal direction;
Using the relation of the space coordinates of respective point in space coordinates and second plane of each point in first plane, really Make the first mapping relations of first plane and second plane.
4. video frequency speed-measuring method as described in claim 1, which is characterized in that obtain the characteristic point in second plane Plane coordinates, including:
Using the image space coordinate of the characteristic point and the focal length of the camera, the characteristic point is mapped to described first Plane;
Using first mapping relations and vectorial translation algorithm, the characteristic point is mapped to second plane, is obtained The characteristic point is in the plane coordinates of second plane;
Using the relation of the image space coordinate and the plane coordinates of the characteristic point, the second mapping relations are determined.
5. video frequency speed-measuring method as described in claim 1 or 4, which is characterized in that determine the movement velocity of the target vehicle, Including:
Using second mapping relations, the movement locus coordinate of the characteristic point is mapped to second plane, obtains institute State the movable information of target vehicle;
The movement velocity of the target vehicle is determined according to the movable information.
6. a kind of processing unit of video image, which is characterized in that the device includes:
Determining module, for obtaining the image space coordinate of the characteristic point of target vehicle, according to the image space of the characteristic point The characteristic point is mapped to first plane by coordinate, the characteristic point is mapped to according to first mapping relations described in Second plane obtains plane coordinates of the characteristic point in second plane;
Processing module, for determining the movement velocity of the target vehicle according to the plane coordinates.
7. processing unit as claimed in claim 6, which is characterized in that further include extraction module, be specifically used for:
Candidate region is determined from the target vehicle using marginal information algorithm, recycles machine learning algorithm from the time Characteristic point is determined in favored area, obtains the image space coordinate of the characteristic point.
8. processing unit as claimed in claim 6, which is characterized in that the determining module is obtaining the characteristic point of target vehicle Image space coordinate before, be additionally operable to:
Visible planar is determined using the space coordinates of the camera, according to the parameter of the visible planar and described visual flat The distance of face to the camera determines the focal length of the camera, and institute is determined according to the focal length and the Gaussian imaging equation The first plane is stated, the perpendicular bisector of first plane is in vertical direction;
Using the camera and the space coordinates of first plane, determined in the horizontal direction from the camera to described The projection of one plane determines second plane according to the space coordinates of the projection, and second plane is flat for described first Face projection in the horizontal direction;
Using the relation of the space coordinates of respective point in space coordinates and second plane of each point in first plane, really Make the first mapping relations of first plane and second plane.
9. processing unit as claimed in claim 6, which is characterized in that the determining module is additionally operable to:
Using the image space coordinate of the characteristic point and the focal length of the camera, the characteristic point is mapped to described first Plane;
Using first mapping relations and vectorial translation algorithm, the characteristic point is mapped to second plane, is obtained The characteristic point is in the plane coordinates of second plane;
Using the relation of the image space coordinate and the plane coordinates of the characteristic point, the second mapping relations are determined.
10. the processing unit as described in claim 6 or 9, which is characterized in that including:
The determining module is additionally operable to, using second mapping relations, the movement locus coordinate of the characteristic point is mapped to Second plane, obtains the movable information of the target vehicle;
The processing module, specifically for determining the movement velocity of the target vehicle according to the movable information.
CN201611084256.0A 2016-11-30 2016-11-30 Video speed measuring method and device for video image Active CN108122244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611084256.0A CN108122244B (en) 2016-11-30 2016-11-30 Video speed measuring method and device for video image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611084256.0A CN108122244B (en) 2016-11-30 2016-11-30 Video speed measuring method and device for video image

Publications (2)

Publication Number Publication Date
CN108122244A true CN108122244A (en) 2018-06-05
CN108122244B CN108122244B (en) 2022-02-01

Family

ID=62226223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611084256.0A Active CN108122244B (en) 2016-11-30 2016-11-30 Video speed measuring method and device for video image

Country Status (1)

Country Link
CN (1) CN108122244B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109785463A (en) * 2019-01-25 2019-05-21 芜湖智久机器人有限公司 A kind of carriage fault detection system and method based on speed
CN110310492A (en) * 2019-06-25 2019-10-08 重庆紫光华山智安科技有限公司 A kind of move vehicle speed-measuring method and device
RU2746057C1 (en) * 2020-04-17 2021-04-06 Акционерное общество "ЭЛВИС-НеоТек" Method for determining the trajectory of a car by video to detect violations of traffic rules

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604448A (en) * 2009-03-16 2009-12-16 北京中星微电子有限公司 A kind of speed-measuring method of moving target and system
CN102254318A (en) * 2011-04-08 2011-11-23 上海交通大学 Method for measuring speed through vehicle road traffic videos based on image perspective projection transformation
CN103093201A (en) * 2013-01-21 2013-05-08 信帧电子技术(北京)有限公司 Car logo locating and recognizing method and system
CN103197090A (en) * 2013-03-07 2013-07-10 上海电科智能系统股份有限公司 Video speed measuring method based on feature point change
CN103578109A (en) * 2013-11-08 2014-02-12 中安消技术有限公司 Method and device for monitoring camera distance measurement
US20150219758A1 (en) * 2014-01-31 2015-08-06 Applied Concepts, Inc. Mobile radar and visual tracking coordinate transformation
CN104899554A (en) * 2015-05-07 2015-09-09 东北大学 Vehicle ranging method based on monocular vision

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604448A (en) * 2009-03-16 2009-12-16 北京中星微电子有限公司 A kind of speed-measuring method of moving target and system
CN102254318A (en) * 2011-04-08 2011-11-23 上海交通大学 Method for measuring speed through vehicle road traffic videos based on image perspective projection transformation
CN103093201A (en) * 2013-01-21 2013-05-08 信帧电子技术(北京)有限公司 Car logo locating and recognizing method and system
CN103197090A (en) * 2013-03-07 2013-07-10 上海电科智能系统股份有限公司 Video speed measuring method based on feature point change
CN103578109A (en) * 2013-11-08 2014-02-12 中安消技术有限公司 Method and device for monitoring camera distance measurement
US20150219758A1 (en) * 2014-01-31 2015-08-06 Applied Concepts, Inc. Mobile radar and visual tracking coordinate transformation
CN104899554A (en) * 2015-05-07 2015-09-09 东北大学 Vehicle ranging method based on monocular vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DONGKYOUNG CHWA 等: ""Range and Motion Estimation of a Monocular Camera Using Static and Moving Objects"", 《 IEEE TRANSACTIONS ON CONTROL SYSTEMS TECHNOLOGY》 *
陈群: ""关于提高视频测速精度的研究"", 《中国优秀硕士学位论文全文数据库-信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109785463A (en) * 2019-01-25 2019-05-21 芜湖智久机器人有限公司 A kind of carriage fault detection system and method based on speed
CN110310492A (en) * 2019-06-25 2019-10-08 重庆紫光华山智安科技有限公司 A kind of move vehicle speed-measuring method and device
RU2746057C1 (en) * 2020-04-17 2021-04-06 Акционерное общество "ЭЛВИС-НеоТек" Method for determining the trajectory of a car by video to detect violations of traffic rules

Also Published As

Publication number Publication date
CN108122244B (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN110322702B (en) Intelligent vehicle speed measuring method based on binocular stereo vision system
CN110285793A (en) A kind of Vehicular intelligent survey track approach based on Binocular Stereo Vision System
CN109084724A (en) A kind of deep learning barrier distance measuring method based on binocular vision
CN105654507B (en) A kind of vehicle overall dimension measurement method based on the tracking of image behavioral characteristics
CN106290256B (en) Quantitative background schlieren method based on video measuring
CN109764858B (en) Photogrammetry method and system based on monocular camera
CN109931939A (en) Localization method, device, equipment and the computer readable storage medium of vehicle
Kumar et al. A semi-automatic 2D solution for vehicle speed estimation from monocular videos
CN108257137A (en) A kind of angle measurement method and system of the automatic interpretation of view-based access control model hot spot
CN106370884A (en) Vehicle speed measurement method based on binocular camera computer vision technology
CN112798811B (en) Speed measurement method, device and equipment
CN104361603B (en) Gun camera image target designating method and system
CN104964708B (en) A kind of road surface pit detection method based on vehicle-mounted binocular vision
CN108810473A (en) A kind of method and system for realizing GPS mapping camera views coordinates on a mobile platform
Wang et al. A novel gradient-based matching via voting technique for vision-based structural displacement measurement
Gorodnichev et al. On automated safety distance monitoring methods by stereo cameras
CN108122244A (en) The video frequency speed-measuring method and device of a kind of video image
CN105894511A (en) Calibration target setting method and device and parking auxiliary system
CN107589069A (en) A kind of contactless measurement of object collision recovery coefficient
CN108957024A (en) A kind of method, apparatus and electronic equipment of tachometric survey
CN114663473A (en) Personnel target positioning and tracking method and system based on multi-view information fusion
US20180040138A1 (en) Camera-based method for measuring distance to object (options)
CN103954220A (en) Ship motion state digital image measuring method in bridge collision test
JP3891181B2 (en) Method and apparatus for automatically calculating camera parameters
TW201907136A (en) Stereo image and laser scanning ranging integration method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant