CN102867414B - Vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration - Google Patents

Vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration Download PDF

Info

Publication number
CN102867414B
CN102867414B CN201210295293.1A CN201210295293A CN102867414B CN 102867414 B CN102867414 B CN 102867414B CN 201210295293 A CN201210295293 A CN 201210295293A CN 102867414 B CN102867414 B CN 102867414B
Authority
CN
China
Prior art keywords
image
coordinate system
pixel
camera
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210295293.1A
Other languages
Chinese (zh)
Other versions
CN102867414A (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.)
Hunan University
Changsha University of Science and Technology
Original Assignee
Hunan University
Changsha University of Science and Technology
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 Hunan University, Changsha University of Science and Technology filed Critical Hunan University
Priority to CN201210295293.1A priority Critical patent/CN102867414B/en
Publication of CN102867414A publication Critical patent/CN102867414A/en
Application granted granted Critical
Publication of CN102867414B publication Critical patent/CN102867414B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Traffic Control Systems (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration. The vehicle queue length measurement method based on the PTZ camera fast calibration comprises the following steps of choosing two vertically-crossed traffic markings to form a T-shaped scaling reference and establishing a conversion relation between coordinates of pixels in an image and coordinates of roadway corresponding points in a world coordinate system according to the defined models of the image coordinate system and the world coordinate system; acquiring video images of a traffic monitoring scene by adopting a PTZ camera, setting an ROI (Region Of Interests) of a lane, detecting the vehicle queue state in the ROI by the adoption of an adaptive background update algorithm and textural features, and acquiring the pixels and pixel coordinates of the tails of the vehicle queues; converting the detected pixel coordinates of the tails of the vehicle queues into the world coordinate and finally computing the length of the vehicle queues. The tail position of the vehicle queues is judged according to the textural features, and the measurement of length of the vehicle queues is finished by the combination of the camera, so that the vehicle queue length measurement method based on the PTZ camera fast calibration, disclosed by the invention, has the advantages of low cost, strong embedded type, and the like.

Description

A kind of vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration
Technical field
The present invention relates to a kind of vehicle queue length measuring method, particularly a kind of vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration.
Background technology
Along with economic fast development, city automobile owning amount is more and more, and traffic congestion is one of difficult problem of urban development always.Intelligent transportation system is one of effective way of solving urban traffic blocking.The intersection of most domestic traffic is at present all to adopt timing controlled traffic lights, and the time span that traffic lights switch is changeless.Due to complicacy and randomness that vehicle flowrate changes, the defect of this fixed allocation mode more highlights, and therefore, has progressively carried out the fixed allocation time and to Intelligent time, has distributed the research of transition.Urban traffic signal command system carries out Intelligent time to intersection signal and divides timing, need to obtain the telecommunication flow information of road.Wherein intersection vehicle queue length is one of important parameter in intelligent transportation system.
The mode of obtaining telecommunication flow information mainly contains the modes such as ground induction coil, video identification, Floating Car estimation.Because ground induction coil is placed in the fixed position of road, although the accurate number of measuring vehicle, aspect measuring vehicle queue length, error is larger.Publication No. is that the patent of CN102024323A discloses a kind of method of extracting vehicle queue length based on floating car data, the method is first by section matching technique, before extracting crossing, section, ordinary queue waits for that the Floating Car vehicle GPS passing through obtains halt position, then Floating Car halt is added up apart from the position distribution variation of crossing, estimated queue length.
Intelligent traffic monitoring system based on video analysis, has the advantages such as the transport information of obtaining is many, monitoring range large, simple installation, and more domestic and international researcher tends to carry out Vehicle length by computer vision technique and automatically extract.The people such as Zhu Xiaoshan propose to improve the vehicle queue length detection method of Canny edge detection algorithm.Rourke and Bell have proposed a kind of traffic queue detection method based on FFT.The people such as Li Weibin utilize gradient difference and colour-difference to separately win a complete information of picking up the car, and adopt the telescopic window length detection of ranking.Publication No. is that the patent of CN101936730A discloses method and the device that a kind of vehicle queue length detects, and adopts daytime and adopts car light characteristic to detect respectively queuing vehicle platoon at three frame difference methods and morphology, night.
Chinese scholars mainly lays particular emphasis on by the Pixel Information of vehicle queue in video analysis detected image, but the research for the vehicle platoon length computation in conjunction with camera calibration is less, PTZ (Pan/Tilt/Zoom) video camera particularly, because of its inside and outside parameter frequent variations, calculate the more aobvious difficulty of vehicle queue's queue length.
In existing scaling method, traditional camera marking method will be used specific calibrating block conventionally, and calibration point setting up procedure is loaded down with trivial details.Self-calibrating method need to be controlled CCTV camera and do rigid motion for several times, and the image under different visual angles is carried out to characteristic parameter coupling, is not suitable for the normally fixing application scenario of CCTV camera in traffic scene.
Feature for traffic monitoring scene, Nelson, the people such as Granttham and George adopts the traffic video monitoring system camera marking method based on simple imaging model, directly utilizes rectangle that in traffic scene, lane line angle point in road surface forms to realize the demarcation of focal length of camera and direction parameter.Invention CN1564581A has announced a kind of urban transportation and has monitored and under environment, adopt on road surface several special straight lines as spotting, the method for calibrating camera focal length and space external parameter.Said method is based upon on three-dimensional mapping model basis, need to solidify camera model partial interior parameter, and needed known conditions is more, has reduced the usable range of calibration algorithm.
The people such as Fathy utilize the method for camera calibration to set up 2D image coordinate and to the transformation model of 3D world coordinates, calculate the length of queue.For the parameter to video camera is demarcated, the method needs coordinate and the corresponding point coordinate in image coordinate system of known four points in world coordinate system in advance.Coordinate points obtain inconvenience, practical application bothers, and in actual scene, is not easy to obtain such coordinate points, and needs the extra scaling reference of placing.The people such as Fung utilize existing lane line to complete camera calibration, only need to know the width in track, that although lane width is followed certain standard and easily obtain, in this algorithm, traffic marking must possess rectangular characteristic, and adaptability also has some limitations.The people such as Li Bo propose to adopt two line segments of conllinear in pavement strip and another parallel lines as demarcating masterplate, but the height of video camera must be known.Said method exists the witness marker thing of particular geometric feature to choose difficulty, constraint condition the defect such as to be difficult for obtaining, in practical application, to have some limitations.
Summary of the invention
The above-mentioned technical matters existing in order to solve the length measurement method of existing vehicle queue queue, the invention provides a kind of vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration.
The technical scheme that the present invention solves the problems of the technologies described above comprises the following steps:
1) use the video image of PTZ video camera Real-time Obtaining traffic monitoring scene;
2) two traffic marking choosing square crossing in image form T-shaped camera calibration reference substance, obtain the pixel coordinate of four end points in T-shaped scaling reference, measure the wherein distance between any two of three points of conllinear, and measure the distance that a bit arrives in addition this straight line;
3) set up model and the corresponding relation thereof of image coordinate system and world coordinate system, solve the inside and outside parameter of video camera, set up the conversion relation between the coordinate of image slices vegetarian refreshments and the coordinate of world coordinate system road surface corresponding point;
4) in image, choose stop line from track to the lane detection district presetting as vehicle queue's information detection zone, i.e. interest domain ROI, follow-up processing procedure is limited in ROI; For any pixel (x, y), adopt the Tamura textural characteristics of its place neighborhood image piece to weigh the degree of roughness of this pixel, be designated as F crs(x, y), by F crs(x, y) is as the pixel gray-scale value of grain background image; Go through all over the neighborhood roughness value F that calculates each pixel crs(x, y), forms the background image B that a width characterizes textural characteristics crs, and background image with sunshine light change can adaptive updates;
5) textural characteristics of the textural characteristics of realtime graphic and background image is compared, extract foreground image, through morphology, process and obtain the smooth of the edge, complete imperforate binaryzation foreground image, be vehicle queue's information, from the stop line of track to track queuing direction, adopt the algorithm search queue tail position of mobile detection window, obtain the image coordinate of tail of the queue pixel N;
6) the coordinate system conversion relation of setting up according to camera calibration, is scaled road surface corresponding point at the coordinate figure of world coordinate system by the image coordinate of tail of the queue pixel N, the queue length of vehicle queue while calculating traffic jam.
The present invention by extracting static background in video, adopt textural characteristics, in video, isolate non-target context or moving target, in differentiating track after vehicle queue's state, according to camera calibration, obtain inside and outside parameter, set up the conversion relation of corresponding point in world coordinate system and image coordinate system, finally realize the vision measurement of vehicle queue length.The features such as the present invention has camera calibration target and chooses easily, additionally places scaling reference, and robustness easy and simple to handle, vehicle queue's state recognition that scaling method has is good.
The present invention has the following advantages:
In monitoring scene without video camera sign reference substance is additionally set, make full use of geometric properties and the dimensional data of existing traffic marking, the scaling method of camera parameters is simple and convenient.
2. the present invention adopts the vehicle queue's information in texture feature extraction background image, causes the transient change of illumination while having avoided vehicle to cross video camera, and the method that adopts background automatically to upgrade, and can adapt to the variation of difference light at sunshine period.
3. the present invention makes full use of the video image information that the existing CCTV camera of traffic intersection gathers, and is easily embedded into traffic information management platform, has advantages of that cost is low, embedded strong.
Accompanying drawing explanation
Fig. 1 is process flow diagram of the present invention.
Fig. 2 gets traffic marking as the schematic diagram of camera calibration reference substance in the present invention.
Fig. 3 is the camera model figure in the present invention.
Fig. 4 be scaling reference of the present invention and in camera model the schematic diagram of position relationship.
Fig. 5 is boost line schematic diagram in camera calibration of the present invention.
Fig. 6 is the schematic diagram of the embodiment of the present invention.
Embodiment
Measuring principle of the present invention is as follows:
(1) two traffic marking choosing square crossing form T-shaped scaling reference, and through measuring the spacing between two of known collinear three points, with the outer vertical range that a bit arrives this straight line of line, obtain the pixel coordinate of four unique points in image, solve again the inside and outside parameter of camera calibration, set up the conversion relation of point coordinate and image coordinate system pixel coordinate in world coordinate system;
(2) in the monitor video of traffic scene, extract image sequence, extract the textural characteristics of background image in region, track, set up grain background image; The interest domain in track is set in image, extracts the textural characteristics of track interest domain in realtime graphic, carry out automatic comparison differentiation with the textural characteristics of respective regions in background image, search and obtain the position of vehicle queue's afterbody in image;
(3), according to the location of pixels of the vehicle platoon afterbody of searching, the point coordinate that subscript conversion is world coordinate system, finally calculates the length of the vehicle platoon of queuing up in world coordinate system.
The concrete steps of above-mentioned measuring principle are:
(1) Fast Calibration of video camera
The present invention adopts pinhole camera modeling, suppose in traffic monitoring scene traffic be smooth, without curling, and ignore the distortion of video camera.The inside and outside parameter of video camera comprises focal distance f, tiltangleθ, rotationangleφ and track and world coordinate system transverse axis angle α etc.
Step 1, sets up the model of image coordinate system and world coordinate system.
World coordinate system X w-Y w: X waxle was defined as cam lens center and was parallel to the plane of ccd sensor and the intersection on ground, Y waxle was defined as camera optical axis and perpendicular to the plane on ground and the intersection on ground, Y waxle positive dirction is along road surface directed forward, X waxle positive dirction is that level is pointed to right-hand; Its initial point O wbe defined as X waxle and Y wthe point of crossing of axle, as shown in Figure 3.
Image coordinate system XOY: in image, establish image and be of a size of M * N, initial point is defined as image geometry center [(M-1)/2, (N-1)/2].In image, X-axis level is pointed to left, and Y-axis is vertically pointed to below, as shown in Figure 3.
When video camera is overlooked in traffic scene scaling reference, the angle of optical axis and road plane is θ.The angle of lane line and world coordinate system is α.The rotation angle of its optical axis of camera intrinsic is φ, when video camera level is installed, and rotationangleφ=0.When the non-level of video camera, installing, there is angle in bottom and the horizontal line of video camera CCD, and rotationangleφ is not 0, need to be by image rotation φ angle, and the error of bringing while installing with the non-level of correcting camera.
Step 2, chooses with reference to demarcating thing.Because the traffic marking such as driveway edge line and driveway separatrix have specific dimensions and geometric configuration, therefore, on the traffic marking in traffic scene, choose three conllinear terminal A, B, C on track boundary dotted line, suppose at world coordinate system X wy win coordinate be respectively (X a, Y a), (X b, Y b) and (X c, Y c).Measure end points distance between any two, terminal A B spacing is h 1, terminal A C spacing is h 2.Cross certain 1 D that certain end points is picked up the car on the perpendicular line of boundary dotted line, and measure this to the distance d between point of crossing 1.According to standard criterion, h 1, h 2and d 1value both can from handbook, find also can actual measurement.
Three terminal A, B, C and pixel corresponding to vertical point D that in image, obtain lane line, be respectively a, b, c and d, the coordinate in image coordinate system XY be respectively (x ' a, y ' a), (x ' b, y ' b), (x ' c, y ' c) and (x ' d, y ' d).
Step 3 is made boost line in image, obtains the required data of camera calibration.
When the non-level of video camera is installed, between the bottom of ccd sensor and horizontal line, there is rotationangleφ.The value of angle φ can be calculated and be obtained by described below formula.In view of the impact of rotationangleφ, for meeting method described in the invention, need to correct the non-level of video camera, the error of bringing be installed by the corresponding rotation φ of the image obtaining angle before calibrating camera, the postrotational coordinate figure of a, b, c and d is
x i y i = cos φ - sin φ sin φ cos φ x i ′ x i ′ ( i = a , b , c , d ) - - - ( 1 )
Calculate intermediate variable Y A ′ = h 1 h 2 ( y b - y c ) ( y a - y b ) h 2 - ( y a - y c ) h 1 - - - ( 2 )
λ = ( Y A ′ + h 1 ) · y b - Y A ′ · y a h 1 - - - ( 3 )
In world coordinate system, cross the C point of lane line and make parallel and X waxle is made parallel lines, crosses the A point of lane line and makes parallel and Y waxle is made parallel lines, and both meet at A ' point.A ' spot projection is a ' to the point in image, and its coordinate is (x a', y c), wherein
x a ′ = λ - y c λ - y a x a - - - ( 4 )
In image, cross d point and make horizontal line, with the intersection point of a, b, c place straight line be e point.E point pixel coordinate is (x e, y e), as shown in Figure 5.
Step 4, solves lane line and world coordinate system transverse axis angle α.
The coordinate figure that a, the b trying to achieve according to image rotation φ angle, c and d are 4, obtains lane line and world coordinate system transverse axis angle α meets following expression.
sin 2 α = λ - y a λ - y c 2 d 1 ( x c - x a ′ ) h 2 | x e - x a |
In above formula x ethe horizontal ordinate that in the plane of delineation, e is ordered, x afor the horizontal ordinate that A is ordered, h 2for AC distance between two points, d 1spacing for road surface two parallel lines.
So basis sin α = 1 - cos 2 α 2 , α = arcsin ( 1 - cos 2 α 2 ) - - - ( 5 )
Step 5, solves the rotationangleφ of external parameters of cameras.
After calculating the angle α of lane line and world coordinate system transverse axis, by the scaling reference D point coordinate that respective pixel coordinate transformation is world coordinate system in image, computing formula is as follows.
Y d = λ - y a λ - y d · h 1 h 2 ( y b - y c ) ( y a - y b ) h 2 - ( y a - y c ) h 1 sin α - - - ( 6 )
X d = λ - y c λ - y d h 2 cos α x c - x a ′ x d - - - ( 7 )
Supposed straight line and straight line L that D is ordered 1vertically meet at B point, the coordinate that is in like manner world coordinate system by the coordinate transformation of pixel b.Finally calculating | the distance of DB|, is D point to A, B, 3 place straight line L of C 1distance.
In order to solve φ, interval according to formula (1) image rotating, repeating step three, four, five at φ ∈ [15 °, 15 °].Adopt in Levenberg-Marquardt algorithm search φ ∈ [15 °, 15 °] interval, make
φ=argmin(|DB|) (8)
Step 6, solves the depression angle θ of external parameters of cameras
After solving rotationangleφ, obtain the coordinate figure (x of 4 of a, b after image rotation φ, c and d a, y a), (x b, y b), (x c, y c) and (x d, y d).
Calculate sin θ = λ d 1 sin α 1 x e - x a 1 Y A ′ sin α , Therefore the depression angle θ of video camera can solve according to following formula.
θ = arcsin [ d 1 · λ sin 2 α · ( x e - x a ) · Y A ′ ] - - - ( 9 )
Step 7, solves the focal distance f of video camera
According to the value of the depression angle θ trying to achieve and intermediate variable λ, can calculate the focal distance f of video camera, have
f = λ tan θ - - - ( 10 )
(2) video image analysis of vehicle queue's situation
In order to extract track vehicle queue situation in video, the present invention adopts textural characteristics from background image, to extract moving target, and concrete step is as follows:
Step 1 arranges vehicle queue's surveyed area in image, i.e. interest domain ROI, choose from track traffic stop line to predetermined lane detection district as vehicle queue detection zone.For every two field picture of video, only the surveyed area arranging is carried out to the calculating of view data.
Step 2, the roughness of each neighborhood of pixels in computed image.If the neighborhood of pixel G (x, y) is 2 in image k* 2 kthe window of individual pixel, adopts Tamura textural characteristics method to calculate the roughness of this neighborhood image piece, is designated as F crs(x, y), and calculate one by one the roughness of the neighborhood image piece of each pixel in surveyed area, by the neighborhood roughness value F of each pixel crs(x, y) forms image that a width is new as textural characteristics background image B crs.
Step 3, adopts Gauss model analysis, from background image, extracts foreground image F img.
B in publicity above crs(x, y) represents the roughness value of pixel (x, y) in grain background image, F crs(x, y) represents the roughness of current pixel (x, y) neighborhood piece of living in.If the gaussian probability of this pixel is greater than threshold value T, represent that this point is foreground pixel.
If there is some isolated points and local hole, adopt morphology disposal route first do corrosion treatment, to remake expansion process, obtain the smooth of the edge, complete foreground image, i.e. vehicle queue's binary image.
Step 4 to track queuing direction, adopts the algorithm search queue tail position of mobile detection window from the stop line of track, acquisition tail of the queue pixel coordinate N (x ' n, y ' n).
Step 5, gets present frame f 1and front cross frame image f 2and f 3carry out frame difference and analyse, computing method are as follows.
f 12 ( x , y ) = 1 | f 1 ( x , y ) - f 2 ( x , y ) | > T 0 otherwise
f 23 ( x , y ) = 1 | f 3 ( x , y ) - f 2 ( x , y ) | > T 0 otherwise
f ( x , y ) = 1 f 12 ( x , y ) = 1 and f 23 ( x , y ) = 1 0 otherwise
By the difference between image, obtain binaryzation frame difference image.What conventionally obtain due to the poor binary image of frame is contour of object, certainly exists some isolated points during the moving target of extraction, the local tiny area that noise etc. cause, hole or the problem such as discontinuous.In image is processed, adopt morphology disposal route to do a corrosion treatment, remove local tiny area and isolated point in video image.And then carry out twice expansion process and make foreground target thing marginal portion obtain smoothly, finally obtaining complete moving target.
Step 6, because traffic monitoring background can slowly change with factors such as sunshines, therefore, textural characteristics background image carries out slowly upgrading in real time according to formula (11),
B crs ( t + 1 , x , y ) = a · B crs ( t , x , y ) + ( 1 - a ) · F crs ( t , x , y ) f ( x , y ) = 1 or F img ( x , y ) = 0 B crs ( t , x , y ) F img ( x , y ) = 1 - - - ( 11 )
Wherein, a is undated parameter, represents the speed of change of background.B crs(t, x, y) is the value of pixel (x, y) in t frame grain background image, F crs(t, x, y) is the neighborhood image piece roughness value of pixel (x, y) in current frame image, B crs(t+1, x, y) is the grain background image after upgrading.If the f (x, y) in bulk region is 1, represent that in track, having moving vehicle, the vehicle in track is not in queueing condition, need to be to background real-time update.If F img(x, y)=1, represent that in track, vehicle has formed queue queue, can not upgrade background, while avoiding the long-time static queuing of vehicle, by foreground image, by publicity (11), upgraded and to become background, when vehicle setting in motion, to have produced frame poor, i.e. f (x, y) after becoming 1, then real-time update background image.
(3) measurement of vehicle queue length
Image by Traffic Surveillance Video process obtain vehicle queue's tail of the queue position (x ' n, y ' n), by camera calibration, obtained the rotationangleφ of lane line and world coordinate system transverse axis angle α and video camera.
First, solve the rotationangleφ of video camera, make it meet image coordinate system that the present invention sets up and the conversion relation of world coordinate system.According to the coordinate (x of rotationangleφ pixel n n, y n) be
x n y n = cos φ - sin φ sin φ cos φ x n ′ y n ′
Secondly, by (the x of the coordinate of pixel n in image coordinate system n, y n) be scaled (X of world coordinate system corresponding point N n, Y n), reduction formula is as follows:
Y n = λ - y a λ - y n · h 1 h 2 ( y b - y c ) ( y a - y b ) h 2 - ( y a - y c ) h 1 sin α
X n = λ - y c λ - y n h 2 cos α x c - x a ′ x n
Finally, calculate vehicle queue length the present invention uses digital camera to obtain the video image of traffic monitoring scene, in conjunction with video camera quick calibrating method and digital image processing techniques, detects traffic intersection vehicle queue length, reaches the collection of arithmetic for real-time traffic flow parameter.
As shown in Figure 1, the present invention adopts PTZ video camera to obtain the video image that road traffic monitors scene, the interest domain ROI on road surface is set, adopt the vehicle queue's state in interest domain on textural characteristics detection background image, by the Fast Calibration of video camera, set up the corresponding conversion relation of image coordinate system and world coordinate system, the tail of the queue pixel coordinate detecting is converted into world coordinates value, calculates the length of vehicle queue.Pan/Tilt/Zoom camera, i.e. Pan (translation), Tilt (inclination), Zoom (zoom), can level, vertically change the video camera of visual angle and zoom, for video monitoring system.
In sum, implementation process brief overview of the present invention is following steps:
1) the PTZ video camera of installing by traffic intersection, Real-time Obtaining road conditions video image information;
2), the image information of obtaining from video camera, choose the traffic marking with particular geometric feature and dimensional data, as shown in Figure 2.In the traffic marking on road surface, to choose three conllinear terminal A, B, C on track boundary dotted line, and obtain these three end points distance between any two, terminal A B spacing is h 1, terminal A C spacing is h 2.Cross certain 1 D that certain end points is picked up the car on the perpendicular line of boundary dotted line, and measure this to the distance d between point of crossing 1.
According to the coordinate system schematic diagram shown in Fig. 3, the coordinate of above-mentioned four end points in image be respectively (x ' a, y ' a), (x ' b, y ' b), (x ' c, y ' c) and (x ' d, y ' d).
Video camera be not complete level while installing, the base of ccd sensor, along there is the anglec of rotation with horizontal line, supposes that rotation angle is φ, first a, b, c and tetra-pixel coordinates of d is rotated, and has
x i y i = cos φ - sin φ sin φ cos φ x i ′ y i ′ (wherein i=a, b, c, d) (1)
Calculate intermediate variable Y A ′ = h 1 h 2 ( y b - y c ) ( y a - y b ) h 2 - ( y a - y c ) h 1 - - - ( 2 )
λ = ( Y A ′ + h 1 ) · y b - Y A ′ · y a h 1 - - - ( 3 )
Auxiliary point A ' as shown in Figure 4 in world coordinate system, pixel corresponding in image is a ', the horizontal ordinate that pixel is a ' is
x a ′ = λ - y c λ - y a x a - - - ( 4 )
In image, cross d point and make horizontal line, with the intersection point of a, b, c place straight line be e point.E point pixel coordinate is (x e, y e), known straight line L 1slope be k, intercept is b, as shown in Figure 5.The horizontal ordinate x that in the plane of delineation, e is ordered eby following formula, be calculated as
x e = y b - b k
Foundation again sin 2 α = λ - y a λ - y c 2 d 1 ( x c - x a ′ ) h 2 | x e - x a | , Obtain the angle α of lane line and world coordinate system transverse axis.
By the scaling reference D point coordinate that respective pixel coordinate transformation is world coordinate system in image, computing formula is as follows.
Y d = λ - y a λ - y d · h 1 h 2 ( y b - y c ) ( y a - y b ) h 2 - ( y a - y c ) h 1 sin α - - - ( 6 )
X d = λ - y c λ - y d h 2 cos α x c - x a ′ x d - - - ( 7 )
Supposed straight line and straight line L that D is ordered 1vertically meet at B point, the coordinate that is in like manner world coordinate system by the coordinate transformation of pixel b, calculates | and the distance of DB|, is D point to A, B, 3 place straight line L of C 1distance.
Solve in the process of φ, in φ ∈ [15 °, 15 °] interval, repetition, according to formula (1) to formula (7), is obtained again | the value of DB|.Adopt in Levenberg-Marquardt algorithm search φ ∈ [15 °, 15 °] interval, make
φ=argmin(|DB|) (8)
(2) video image analysis of vehicle queue's situation
First, vehicle queue's surveyed area is set in image, i.e. interest domain ROI, choose from track traffic stop line to predetermined lane detection district as vehicle queue detection zone.As shown in Figure 6.
Secondly, the Tamura texture value of employing pixel (x, y) place neighborhood image piece is weighed the roughness of this dot image, is designated as F crs(x, y), by the neighborhood roughness value F of each pixel crs(x, y) forms image that a width is new as textural characteristics background image B crs.
Then, because traffic monitoring background can slowly change with factors such as sunshines, for example the grain background image on daytime is with regard to obviously different nights, and therefore, textural characteristics background image carries out in real time slowly renewal according to formula (11).But
B crs ( t + 1 , x , y ) = a · B crs ( t , x , y ) + ( 1 - a ) · F crs ( t , x , y ) f ( x , y ) = 1 or F img ( x , y ) = 0 B crs ( t , x , y ) F img ( x , y ) = 1 - - - ( 11 )
Employing Gauss model is analyzed, and from background image, extracts foreground image F img.
Through morphology disposal route, obtain the smooth of the edge, complete foreground image, i.e. vehicle queue's binary image.
Finally, from the stop line of track, to track queuing direction, adopt the algorithm search queue tail position of mobile detection window, acquisition tail of the queue pixel coordinate N (x ' n, y ' n), as shown in Figure 6.
(3) measurement of vehicle queue length
After obtaining accurate φ angle, through image process obtain vehicle queue's tail of the queue position n (x ' n, y ' n), first according to formula (1), pixel n is rotated to rectification.According to the coordinate (x of rotationangleφ pixel n n, y n) be
x n y n = cos φ - sin φ sin φ cos φ x n ′ y n ′
Secondly, by (the x of the coordinate of pixel n in image coordinate system n, y n) be scaled (X of world coordinate system corresponding point N n, Y n), reduction formula is as follows:
Y n = λ - y a λ - y n · h 1 h 2 ( y b - y c ) ( y a - y b ) h 2 - ( y a - y c ) h 1 sin α
X n = λ - y c λ - y n h 2 cos α x c - x a ′ x n
Finally, calculate vehicle queue length, L = ( X n ) 2 + ( Y n ) 2 .

Claims (6)

1. the vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration, comprises the following steps:
1) use the video image of PTZ video camera Real-time Obtaining traffic monitoring scene;
2) two traffic marking choosing square crossing in image form T-shaped camera calibration reference substance, obtain the pixel coordinate of four end points in T-shaped scaling reference, measure the wherein distance between any two of three points of conllinear, and measure the distance that thirdly arrives straight line between another 2;
3) set up model and the corresponding relation thereof of image coordinate system and world coordinate system, solve the inside and outside parameter of video camera, set up the conversion relation between the coordinate of image pixel and the coordinate of world coordinate system road surface corresponding point;
4) in image, choose stop line from track to the lane detection district presetting as vehicle queue's information detection zone, i.e. interest domain ROI, follow-up processing procedure is limited in ROI; For any pixel P (x, y), adopt the textural characteristics of its place neighborhood image piece to weigh the degree of roughness of this pixel, be designated as F crs(x, y), by F crs(x, y) is as the pixel gray-scale value of grain background image; Go through all over the neighborhood roughness value F that calculates each pixel crs(x, y), forms the background image B that a width characterizes textural characteristics crs, and background image with sunshine light change can adaptive updates;
5) textural characteristics of the textural characteristics of realtime graphic and background image is compared, extract foreground image, after processing, morphology obtains the smooth of the edge, complete imperforate binaryzation foreground image, be vehicle queue's information, from the stop line of track, to track queuing direction, search for, adopt the algorithm search queue tail position of mobile detection window, obtain the image coordinate of tail of the queue pixel N;
6) the coordinate system conversion relation of setting up according to camera calibration, is scaled road surface corresponding point at the coordinate figure of world coordinate system by the image coordinate of tail of the queue pixel N, the queue length of vehicle queue while calculating traffic jam.
2. the camera calibration reference substance the vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration according to claim 1, described step 2), chooses track boundary dotted line L 1the A of upper conllinear, B, 3 end points of C, and known these three end points distance between any two, terminal A B spacing is h 1, terminal A C spacing is h 2, the line L of outer another D of certain end points in A, B, C and line 2perpendicular to L 1, D point is to straight line L 1distance be d 1; And known A, B, C, the D coordinate in image be respectively a (x ' a, y ' a), b (x ' b, y ' b), c (x ' c, y ' c) and d (x ' d, y ' d).
3. the image coordinate system the vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration according to claim 1, described step 3) and model and the corresponding relation thereof of world coordinate system, world coordinate system X w-Y w: X waxle was defined as cam lens center and was parallel to the plane of ccd sensor and the intersection on ground, Y waxle was defined as camera optical axis and perpendicular to the plane on ground and the intersection on ground, Y waxle positive dirction is along camera directed forward, X waxle positive dirction is that level is pointed to right-hand; Its initial point O wbe defined as X waxle and Y wthe point of crossing of axle; Image coordinate system XOY: in image, establish image and be of a size of M * N, initial point is defined as image geometry center [(M-1)/2, (N-1)/2], in image, X-axis level is pointed to left, and Y-axis is vertically pointed to below; When video camera is overlooked in traffic scene scaling reference, the angle of optical axis and road plane is θ, and the angle of lane line and world coordinate system is α, and the rotation angle of its optical axis of camera intrinsic is φ.
4. the inside and outside parameter step that solves video camera the vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration according to claim 1, described step 3) is:
When the non-complete level of video camera is installed, there is the anglec of rotation in bottom and the horizontal line of ccd sensor, supposes that rotation angle is φ, first a, b, c and tetra-pixel coordinates of d is rotated, and has
(wherein i=a, b, c, d) (1)
And ask intermediate variable
The horizontal ordinate of auxiliary point a ' in computed image
In image, cross d point and make horizontal line, with a, b, c place straight line L 1intersection point be e point, e point pixel coordinate is (x e, y e), the horizontal ordinate x that in the plane of delineation, e is ordered efor
Foundation again obtain the angle α of lane line and world coordinate system transverse axis;
The coordinate that is world coordinate system by the coordinate transformation of pixel d in image, computing formula is as follows,
Suppose to cross straight line and the straight line L that D is ordered in world coordinate system 1vertically meet at B point, in image, the coordinate of corresponding point pixel b can be scaled the coordinate of world coordinate system according to formula (6), (7), calculates | and the distance of DB|, is D point to A, B, 3 place straight line L of C 1distance;
Adopt in Levenberg-Marquardt algorithm search φ ∈ [15 °, 15 °] interval, make
φ=argmin(|DB|) (8) 。
5. the vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration according to claim 1, described step 4) use the textural characteristics value of each neighborhood of pixels image block to set up grain background image, in grain background image, the gray-scale value of certain pixel is the roughness value of this neighborhood of pixels image block.
6. the step vehicle queue length measuring method based on Pan/Tilt/Zoom camera Fast Calibration according to claim 1, described step 6) is:
After obtaining rotationangleφ, through image process and range searching obtain vehicle queue's tail of the queue position n (x ' n, y ' n), first according to formula (9), pixel n is rotated to rectification, the pixel n (x after rectification n, y n) be
Secondly, by (the x of the coordinate of pixel n in image coordinate system n, y n) be scaled (X of world coordinate system corresponding point N n, Y n), reduction formula is as follows:
Finally, calculate vehicle queue length,
CN201210295293.1A 2012-08-18 2012-08-18 Vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration Expired - Fee Related CN102867414B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210295293.1A CN102867414B (en) 2012-08-18 2012-08-18 Vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210295293.1A CN102867414B (en) 2012-08-18 2012-08-18 Vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration

Publications (2)

Publication Number Publication Date
CN102867414A CN102867414A (en) 2013-01-09
CN102867414B true CN102867414B (en) 2014-12-10

Family

ID=47446266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210295293.1A Expired - Fee Related CN102867414B (en) 2012-08-18 2012-08-18 Vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration

Country Status (1)

Country Link
CN (1) CN102867414B (en)

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258425B (en) * 2013-01-29 2015-07-01 中山大学 Method for detecting vehicle queuing length at road crossing
CN103247181A (en) * 2013-04-17 2013-08-14 同济大学 Intelligent traffic light controller based on video vehicle queue length detection and control method thereof
CN103268706B (en) * 2013-04-18 2015-02-18 同济大学 Method for detecting vehicle queue length based on local variance
CN103456170A (en) * 2013-04-22 2013-12-18 天津工业大学 Vehicle speed and vehicle queue length detection method based on machine vision
CN103366568B (en) * 2013-06-26 2015-10-07 东南大学 Traffic section vehicle queue's video detecting method and system
CN103456172B (en) * 2013-09-11 2016-01-27 无锡加视诚智能科技有限公司 A kind of traffic parameter measuring method based on video
CN103489313A (en) * 2013-09-24 2014-01-01 长沙理工大学 Method and system for detecting motorcade length
CN103985251B (en) * 2014-04-21 2016-03-02 东南大学 A kind of method and system of vehicle queue length measuring and calculating
CN105224908A (en) * 2014-07-01 2016-01-06 北京四维图新科技股份有限公司 A kind of roadmarking acquisition method based on orthogonal projection and device
CN104835142B (en) * 2015-03-10 2017-11-07 杭州电子科技大学 A kind of vehicle queue length detection method based on textural characteristics
CN106856004A (en) * 2015-12-07 2017-06-16 朱森 A kind of camera marking method
CN105448111A (en) * 2015-12-18 2016-03-30 南京信息工程大学 Intelligent traffic light system based on FPGA and control method thereof
CN106898023B (en) * 2017-01-22 2020-06-09 中山大学 Method and system for measuring vehicle head distance based on video image
CN108573189B (en) * 2017-03-07 2020-01-10 杭州海康威视数字技术股份有限公司 Method and device for acquiring queuing information
CN107464427B (en) * 2017-07-17 2019-09-10 东南大学 A kind of queuing vehicle length detecting systems and method
CN107748894A (en) * 2017-10-26 2018-03-02 辽宁省颅面复原技术重点实验室 A kind of video presence strange land reconstructing method
CN107945523B (en) * 2017-11-27 2020-01-03 北京华道兴科技有限公司 Road vehicle detection method, traffic parameter detection method and device
CN108415011B (en) * 2018-02-08 2021-09-28 长安大学 Method for realizing vehicle queuing detection based on multi-target tracking radar
CN111754581A (en) * 2019-03-28 2020-10-09 阿里巴巴集团控股有限公司 Camera calibration method, roadside sensing equipment and intelligent traffic system
CN111815966B (en) * 2019-04-12 2022-08-09 杭州海康威视数字技术股份有限公司 Queuing length prediction method and device, computing equipment and storage medium
CN112150553B (en) * 2019-06-27 2024-03-29 北京魔门塔科技有限公司 Calibration method and device of vehicle-mounted camera
CN110363988B (en) * 2019-07-11 2021-05-28 南京慧尔视智能科技有限公司 System and method for calculating vehicle passing efficiency at intersection
CN113327291B (en) * 2020-03-16 2024-03-22 天目爱视(北京)科技有限公司 Calibration method for 3D modeling of remote target object based on continuous shooting
CN111554109B (en) * 2020-04-21 2021-02-19 河北万方中天科技有限公司 Signal timing method and terminal based on queuing length
CN111781600B (en) * 2020-06-18 2023-05-30 重庆工程职业技术学院 Vehicle queuing length detection method suitable for signalized intersection scene
CN112489456B (en) * 2020-12-01 2022-01-28 山东交通学院 Signal lamp regulation and control method and system based on urban trunk line vehicle queuing length
CN114897655B (en) * 2022-07-12 2022-10-28 深圳市信润富联数字科技有限公司 Vision-based epidemic prevention control method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1605829A (en) * 2004-11-11 2005-04-13 天津大学 Device and method for field calibration of vision measurement system
CN101345890A (en) * 2008-08-28 2009-01-14 上海交通大学 Camera calibration method based on laser radar
CN101727671A (en) * 2009-12-01 2010-06-09 湖南大学 Single camera calibration method based on road surface collinear three points and parallel line thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002099739A1 (en) * 2001-06-05 2002-12-12 Matrox Electronic Systems Ltd. Model-based recognition of objects using a calibrated image system
JP2003141527A (en) * 2001-11-07 2003-05-16 Japan Science & Technology Corp Calibration device and method for multiple point-of-view image processing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1605829A (en) * 2004-11-11 2005-04-13 天津大学 Device and method for field calibration of vision measurement system
CN101345890A (en) * 2008-08-28 2009-01-14 上海交通大学 Camera calibration method based on laser radar
CN101727671A (en) * 2009-12-01 2010-06-09 湖南大学 Single camera calibration method based on road surface collinear three points and parallel line thereof

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JP特开2003-141527A 2003.05.16 *
李勃等.路况PTZ摄像机自动标定方法.《北京邮电大学学报》.2009,第32卷第24-29页. *
路况PTZ摄像机自动标定方法;李勃等;《北京邮电大学学报》;20090430;第32卷;第24-29页 *

Also Published As

Publication number Publication date
CN102867414A (en) 2013-01-09

Similar Documents

Publication Publication Date Title
CN102867414B (en) Vehicle queue length measurement method based on PTZ (Pan/Tilt/Zoom) camera fast calibration
EP3581890B1 (en) Method and device for positioning
CN111551958B (en) Mining area unmanned high-precision map manufacturing method
EP3519770B1 (en) Methods and systems for generating and using localisation reference data
CN108802785B (en) Vehicle self-positioning method based on high-precision vector map and monocular vision sensor
US8970701B2 (en) System and method for predicting vehicle location
Guan et al. Automated road information extraction from mobile laser scanning data
Guan et al. Using mobile LiDAR data for rapidly updating road markings
KR101569919B1 (en) Apparatus and method for estimating the location of the vehicle
JP4363295B2 (en) Plane estimation method using stereo images
JP5714940B2 (en) Moving body position measuring device
US7689347B2 (en) Traffic signal light control system and method
JP6442834B2 (en) Road surface height shape estimation method and system
US11004233B1 (en) Intelligent vision-based detection and ranging system and method
Nguyen et al. Compensating background for noise due to camera vibration in uncalibrated-camera-based vehicle speed measurement system
CN109801327B (en) Urban waterlogging depth information extraction method based on video data
CN104616502A (en) License plate identification and positioning system based on combined type vehicle-road video network
CN112308913B (en) Vehicle positioning method and device based on vision and vehicle-mounted terminal
Konrad et al. Localization in digital maps for road course estimation using grid maps
Janda et al. Road boundary detection for run-off road prevention based on the fusion of video and radar
CN109635737A (en) Automobile navigation localization method is assisted based on pavement marker line visual identity
CN109241855B (en) Intelligent vehicle travelable area detection method based on stereoscopic vision
CN114898296A (en) Bus lane occupation detection method based on millimeter wave radar and vision fusion
Cai et al. Measurement of vehicle queue length based on video processing in intelligent traffic signal control system
CN112749584B (en) Vehicle positioning method based on image detection and vehicle-mounted terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20141210

Termination date: 20150818

EXPY Termination of patent right or utility model