CN105182320A - Depth measurement-based vehicle distance detection method - Google Patents

Depth measurement-based vehicle distance detection method Download PDF

Info

Publication number
CN105182320A
CN105182320A CN201510419488.6A CN201510419488A CN105182320A CN 105182320 A CN105182320 A CN 105182320A CN 201510419488 A CN201510419488 A CN 201510419488A CN 105182320 A CN105182320 A CN 105182320A
Authority
CN
China
Prior art keywords
vehicle
car plate
frame image
target vehicle
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510419488.6A
Other languages
Chinese (zh)
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.)
ANHUI QINGXIN INTERNET INFORMATION TECHNOLOGY Co Ltd
Original Assignee
ANHUI QINGXIN INTERNET INFORMATION TECHNOLOGY 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 ANHUI QINGXIN INTERNET INFORMATION TECHNOLOGY Co Ltd filed Critical ANHUI QINGXIN INTERNET INFORMATION TECHNOLOGY Co Ltd
Priority to CN201510419488.6A priority Critical patent/CN105182320A/en
Publication of CN105182320A publication Critical patent/CN105182320A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/12Systems for determining distance or velocity not using reflection or reradiation using electromagnetic waves other than radio waves

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a depth measurement-based vehicle distance detection method. The method includes the following steps that: relevant parameters of a license plate detection classifier and two vehicle-mounted cameras are acquired; a front target vehicle in images acquired by the vehicle-mounted cameras is positioned; the license plate of the front target vehicle in the images acquired by the vehicle-mounted cameras is tracked respectively; the position of the central point of the license plate in the current frames of images acquired by the two vehicle-mounted cameras is obtained; the three-dimensional coordinates of the position of the central point of the license plate in a world coordinate system are obtained; three-dimensional coordinate transformation is carried out, so that the distance from the target vehicle to the vehicle-mounted cameras can be obtained; and the distance from the vehicle-mounted cameras to the head of a local vehicle is subtracted from the distance from the target vehicle to the vehicle-mounted cameras, so that the distance from the target vehicle to the head of the local vehicle can be obtained. According to the depth measurement-based vehicle distance detection method of the invention, a machine vision learning algorithm is adopted, and the position of the front vehicle can be precisely positioned; repeat positioning of the license plate is carried out based on target tracking technologies; the distance between the two vehicles can be calculated precisely based on binocular stereo vision. The depth measurement-based vehicle distance detection method has the advantages of higher speed and more accurate vehicle distance calculation.

Description

A kind of vehicle distance detecting method based on depth survey
Technical field
The present invention relates to safe driving technical field, specifically a kind of vehicle distance detecting method based on depth survey.
Background technology
In daily motor vehicle driving, enough spacing is kept to be the most effective means avoiding rear-end collision with front truck.And for the judgement of spacing, mainly obtained by the experience range estimation of driver, there is wretched insufficiency in this mode: first, the sitting posture of driver and the difference at visual angle, can relatively large deviation be there is in the result of range estimation, especially on a highway, because the speed of a motor vehicle is too fast, acquisition spacing more accurately cannot be estimated at all; Secondly, drive for a long time often to make driver attention not concentrate, easily ignore and judge to there is comparatively big error with the spacing of front truck or spacing, and then cause traffic hazard.
In recent years, there are some spacing detection techniques, mainly contain following a few class:
(1) physically based deformation ranging technology, such technology, mainly through transmitting and receiving ultrasound wave or infrared laser line, obtains the distance with preceding vehicle.There is more deficiency in this technology: equipment cost is high, and telemeasurement error is comparatively large, is subject to the impact of preceding object thing and causes flase drop, can exist interfering with each other simultaneously when multiple vehicle uses.
(2) based on video processing technique, as Chinese patent application CN104392629A discloses a kind of method and apparatus of inspection vehicle distance, Chinese patent CN101941438B discloses a kind of safe distance between vehicles intelligence measuring and controlling device and method, such technology is mainly through video image processing technology, on each two field picture of video, obtain the feature relevant to front vehicles, according to depth of field mapping table or three-dimensional measurement technology, obtain the spacing with front truck.The advantage of this method is that cost is low, Active measuring, wide adaptability, and its shortcoming is that algorithm is more complicated, and location front vehicles out of true, spacing error calculated is larger.
Summary of the invention
The object of the present invention is to provide that a kind of algorithm speed is faster, spacing calculates the more accurate vehicle distance detecting method based on depth survey.
Technical scheme of the present invention is:
Based on a vehicle distance detecting method for depth survey, comprise the following steps:
(1) correlation parameter that car plate detects sorter and two vehicle-mounted vidicons is obtained;
(2) judge whether to need detection and location objects ahead vehicle again, if so, then perform step (3), if not, then perform step (4);
(3) detect car plate position in sorter and image based on the car plate obtained and, apart from the distance of image lower boundary, locate the objects ahead vehicle in the image of a wherein vehicle-mounted vidicon collection; Detect car plate location similarity in sorter and image based on car plate again, locate the objects ahead vehicle in the image of another vehicle-mounted vidicon collection;
(4) car plate of objects ahead vehicle in the image of two vehicle-mounted vidicons collections is followed the tracks of respectively, namely according to the car plate position of target vehicle in previous frame image, the car plate position of target vehicle in prediction current frame image;
(5) the car plate center position of target vehicle in the current frame image of two vehicle-mounted vidicons collections is obtained respectively;
(6) according to the correlation parameter of vehicle-mounted vidicon, obtain the three-dimensional coordinate of car plate center position in world coordinate system of target vehicle in the current frame image of two vehicle-mounted vidicons collections, be the three-dimensional coordinate of coordinate system with vehicle-mounted vidicon by described three-dimensional coordinate transformation one-tenth in world coordinate system, obtain the distance of target vehicle apart from vehicle-mounted vidicon;
(7) distance of described target vehicle distance vehicle-mounted vidicon is deducted the distance of vehicle-mounted vidicon apart from this car headstock, namely obtain the distance of target vehicle apart from this car headstock.
The described vehicle distance detecting method based on depth survey, in step (1), described acquisition car plate detects sorter, comprising:
In a, positive and negative 30 degree of collection front, the license plate image of different distance is as the positive sample of training;
B, detect sorter file based on haar characteristic sum adaboost learning algorithm training car plate.
The described vehicle distance detecting method based on depth survey, in step (1), the correlation parameter of described acquisition two vehicle-mounted vidicons, comprising:
A, in the common visual field of two vehicle-mounted vidicons, place the scaling board of a width gridiron pattern pattern, use two vehicle-mounted vidicons to gather scaling board image respectively;
The angle position of b, conversion scaling board, until two vehicle-mounted vidicons acquire five width scaling board images respectively;
C, on each width scaling board image, obtain all gridiron patterns two dimension angular coordinate;
D, based on the classical calibration algorithm of Zhang Zhengyou, obtain the correlation parameter formula of vehicle-mounted vidicon:
K = s f x × k x 0 u 0 0 f y × k y v 0 0 0 1
R = r 1 r 2 r 3 r 4 r 5 r 6 r 7 r 8 r 9
T = t 1 t 2 t 3
Wherein, K represents the Intrinsic Matrix of vehicle-mounted vidicon, f x, f yrepresent the effective focal length of camera lens, k x, k yrepresent distortion factor, (u 0, v 0) representing picture centre, s represents the uncertain graphical rule factor, and R, T are all outer parameter matrixs of vehicle-mounted vidicon, represents respectively from world coordinates and is tied to rotational transformation matrix between vehicle-mounted vidicon coordinate system and translation transformation matrix.
The described vehicle distance detecting method based on depth survey, step (3), comprising:
A, based on obtain car plate detect sorter, detect first vehicle-mounted vidicon collection image in track, front whether there is car plate;
B, judge whether vehicle corresponding to car plate obtained is positioned at current lane, is if so, considered as effective car plate, if not, is considered as invalid car plate;
If c only exists an effective car plate, then it can be used as target license plate; If there is multiple effective car plate, then the target license plate in the image selecting car plate position in image to gather as first vehicle-mounted vidicon apart from minimum effective car plate apart from image lower boundary, vehicle corresponding to target license plate is target vehicle;
D, detect sorter based on the car plate obtained, obtains all candidate license plate in the image of second vehicle-mounted vidicon collection;
Target license plate in e, the image that gathers with first vehicle-mounted vidicon is for standard, all candidate license plate in the image of second vehicle-mounted vidicon collection are carried out Similarity Measure with it respectively, select candidate license plate corresponding to maximum similarity to be target license plate in the image that gathers of second vehicle-mounted vidicon, vehicle corresponding to target license plate is target vehicle.
The described vehicle distance detecting method based on depth survey, in step (4), the described car plate position according to target vehicle in previous frame image, the car plate position of target vehicle in prediction current frame image, comprising:
A, in previous frame image, the car plate central point of target vehicle is saved as impact point, and the car plate band of position of target vehicle is saved as the plate template of target vehicle in current frame image after surrounding expansion;
B, impact point to be followed the tracks of, based on kalman Filter Principle, the position of car plate central point in current frame image of target of prediction vehicle;
C, car plate size based on target vehicle in position in current frame image of the car plate central point of target vehicle of prediction and previous frame image, according to following formula, obtain the Plate searching rectangular area of target vehicle in current frame image:
r e c t . x = c e n t e r . x - c a r _ w i d t h * 0.7 r e c t . y = c e n t e r . y - c a r _ h e i g h t r e c t . w i d t h = c a r _ w i d t h * 1.4 r e c t . h e i g h t = c a r _ h e i g h t * 2
Wherein, rect.x, rect.y represent upper left corner horizontal ordinate and the ordinate of the Plate searching rectangular area rect of target vehicle in current frame image respectively, center.x, center.y represent the position horizontal ordinate of the car plate central point of the target vehicle of prediction in current frame image and ordinate respectively, rect.width, rect.height represent width and the height of the Plate searching rectangular area rect of target vehicle in current frame image respectively, and car_width, car_height represent car plate width and the height of target vehicle in previous frame image respectively;
D, in current frame image target vehicle Plate searching rectangular area in, plate template is used to carry out search spread, to each traversal position, according to following formula, calculate the degree of confidence that this traversal position belongs to target vehicle car plate position, the traversal position selecting maximum confidence corresponding is as the car plate position of target vehicle in current frame image:
conf i j = 1 255 * N Σ Σ f ( i + x , j + y ) - M ( x , y )
Wherein, conf ijrepresent that current traversal position belongs to the degree of confidence of target vehicle car plate position, N represents the pixel quantity of the plate template of target vehicle in current frame image, M (x, y) represent that the plate template of target vehicle in current frame image is at (x, y) grey scale pixel value at place, f (i+x, j+y) represent in the Plate searching rectangular area of target vehicle in current frame image, with current traversal position top left co-ordinate (i, j) place is benchmark, the grey scale pixel value at skew (x, y) place.
The described vehicle distance detecting method based on depth survey, step (5), comprising:
A, according to following formula, obtain the binary image bin (x, y) of the car plate band of position of target vehicle in current frame image:
b i n ( x , y ) = 255 f ( x , y ) - 1 n Σ i = 1 N f ( x i , y i ) ≥ T 0 f ( x , y ) - 1 n Σ i = 1 N f ( x i , y i ) ≥ T
Wherein, f (x, y) represents the grey scale pixel value at the car plate band of position (x, the y) place of target vehicle in current frame image, f (x i, y i) representing grey scale pixel value in N neighborhood centered by (x, y), n represents the number of pixels in the N neighborhood centered by (x, y), and T represents binary-state threshold;
B, to obtain binary image carry out morphology operations, remove interference;
C, obtain the car plate center position of target vehicle in current frame image according to following formula:
c e n t e r . x = Σ x i * b i n ( x i , y i ) Σ b i n ( x i , y i ) c e n t e r . y = Σ y i * b i n ( x i , y i ) Σ b i n ( x i , y i )
Wherein, center.x, center.y represent horizontal ordinate and the ordinate of the car plate center position of target vehicle in current frame image respectively, bin (x i, y i) represent (x in binary image i, y i) grey scale pixel value at place.
The described vehicle distance detecting method based on depth survey, step (6), comprising:
A, based on following Binocular vision photogrammetry principle type, obtain the three-dimensional coordinate of car plate center position in world coordinate system (X, Y, Z) of target vehicle in the current frame image that two vehicle-mounted vidicons gather:
s 1 u 1 v 1 1 = K 1 × [ R 1 | T 1 ] X Y Z 1 s r u r v r 1 = K r × [ R r | T r ] X Y Z 1
Wherein, s l, K l, R l, T lbe the correlation parameter of first vehicle-mounted vidicon, (u l, v l) be the car plate center position coordinate of target vehicle in the current frame image that gathers of first vehicle-mounted vidicon, s r, K r, R r, T rbe the correlation parameter of second vehicle-mounted vidicon, (u r, v r) be the car plate center position coordinate of target vehicle in the current frame image that gathers of second vehicle-mounted vidicon;
B, according to following formula, described three-dimensional coordinate transformation in world coordinate system is become the three-dimensional coordinate being coordinate system with first vehicle-mounted vidicon, obtains the distance of target vehicle apart from first vehicle-mounted vidicon:
X c Y c Z c 1 = [ R 1 | T 1 ] X Y Z 1
Wherein, (X, Y, Z) represents the three-dimensional coordinate of car plate center position in world coordinate system of target vehicle in the current frame image that above-mentioned steps a obtains, (X c, Y c, Z c) represent the three-dimensional coordinate being coordinate system with first vehicle-mounted vidicon, Z crepresent the distance of car plate center position apart from first vehicle-mounted vidicon of target vehicle in current frame image, as the distance of objects ahead vehicle apart from first vehicle-mounted vidicon.
The described vehicle distance detecting method based on car plate position, also comprises: when described target vehicle is less than default safe distance apart from the distance of this car headstock time, carry out audio alert.
As shown from the above technical solution, the present invention adopts machine vision learning algorithm, accurately locates front vehicle position, and based target tracking technique carries out the resetting of car plate, based on binocular stereo vision accurate Calculation vehicle distances; Compared with the conventional method, algorithm speed is faster, and spacing calculates more accurate.
Accompanying drawing explanation
Fig. 1 is binocular stereo vision schematic diagram, and wherein equipment 1 is first vehicle-mounted vidicon being positioned at left side, and equipment 2 is second vehicle-mounted vidicon being positioned at right side;
Fig. 2 is method flow diagram of the present invention;
Fig. 3 is the gridiron pattern scaling board image gathered;
Fig. 4 is that positive sample image trained by car plate detection sorter;
Fig. 5 is car plate Detection results figure;
Fig. 6 is the binary image of the car plate band of position;
Fig. 7 is car plate center position figure.
Embodiment
The present invention is further illustrated below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, what the three-dimensional measurement algorithm in the present embodiment adopted is technique of binocular stereoscopic vision, and two vehicle-mounted vidicons adopt parallel placement, and the parallax range between them is L.
As shown in Figure 2, a kind of vehicle distance detecting method based on depth survey, comprises the following steps:
S1, judge whether to need initializes system parameters, if needed, enter step S2, otherwise, enter step S3.
S2, initializes system parameters, systematic parameter comprises the correlation parameter that car plate detects sorter and vehicle-mounted vidicon, and concrete demarcating steps is as follows:
S21, obtain the correlation parameter of vehicle-mounted vidicon, specifically parameter matrix outside the Intrinsic Matrix of vehicle-mounted vidicon and position.Before system life's work, obtain the correlation parameter of two vehicle-mounted vidicons, this is the requisite program of binocular stereo vision, the classical calibration algorithm that what the scaling method in the present embodiment adopted is based on Zhang Zhengyou, and concrete demarcating steps is as follows:
S211, in the common visual field of two vehicle-mounted vidicons, place the scaling board of a width gridiron pattern pattern, use two vehicle-mounted vidicons to gather a width scaling board image respectively, as shown in Figure 3.
S212, convert the angle position of scaling board, again gather a width scaling board image according to step S211.
S213, repetition step S212, until two vehicle-mounted vidicons acquire five width scaling board images respectively.
S214, on each width scaling board image, obtain all gridiron patterns two dimension angular coordinate.
S215, based on classical theory of calibration, obtain the correlation parameter formula of vehicle-mounted vidicon:
K = s f x × k x 0 u 0 0 f y × k y v 0 0 0 1
R = r 1 r 2 r 3 r 4 r 5 r 6 r 7 r 8 r 9
T = t 1 t 2 t 3
Wherein, K is the Intrinsic Matrix of vehicle-mounted vidicon, and intrinsic parameter refers to that those can describe the physical parameter of vehicle-mounted vidicon image-forming principle and imaging characteristic, comprises the effective focal length f of camera lens x, f ywith distortion factor k x, k yand picture centre (u 0, v 0) and uncertain graphical rule factor s.R, T are the outer parameter matrixs of vehicle-mounted vidicon, outer parameter refers to those geometric parameters that can represent the particular location of vehicle-mounted vidicon in selected world coordinate system, comprises and is tied to rotational transformation matrix between vehicle-mounted vidicon coordinate system and translation transformation matrix from world coordinates.
S22, acquisition car plate detect sorter, and concrete steps are as follows:
In S221, positive and negative 30 degree of collection vehicle front, the license plate image of different distance is as the positive sample of training, as shown in Figure 4;
S222, based on haar characteristic sum adaboost learning algorithm, training car plate detects sorter file.
S3, judge whether to need to detect front vehicles, if needed, enter step S4, otherwise, enter step S5.
S4, detection front vehicles, judge whether the dead ahead of current lane exists target vehicle, as shown in Figure 5, concrete steps are as follows for effect:
S41, the car plate detection sorter obtained based on step S2, detect track, front in the image of first vehicle-mounted vidicon collection and whether there is car plate;
S42, judge whether vehicle corresponding to car plate obtained is positioned at current lane, if not, be considered as invalid car plate, if, be considered as effective car plate;
If S43 only exists an effective car plate, then it can be used as target license plate; If there is multiple effective car plate, the target license plate in the image selecting its position in the picture to gather as first vehicle-mounted vidicon apart from minimum effective car plate apart from image lower boundary, vehicle corresponding to target license plate is target vehicle;
S44, the car plate detection sorter obtained based on step S2, obtain all candidate license plate in the image of second vehicle-mounted vidicon collection;
S45, with step S43 obtain target license plate for standard, all candidate license plate that step S44 obtains are carried out Similarity Measure with it, select candidate license plate corresponding to maximum similarity to be target license plate in the image that gathers of second vehicle-mounted vidicon, vehicle corresponding to target license plate is target vehicle.
S5, tracking objects ahead vehicle, according to the car plate position in previous frame image, the prediction position of car plate in current frame image, each two field picture is avoided all to carry out the car plate detection and location of repetition, in the image of two vehicle-mounted vidicon collections, perform identical tracking step respectively, concrete steps are as follows:
S51, renewal tracking data, mainly in previous frame image, preserve car plate central point as tracking target point, and the car plate band of position is saved as the plate template of current frame image after surrounding expansion;
S52, impact point to be followed the tracks of, mainly based on kalman Filter Principle, the prediction position of car plate central point in current frame image;
S53, selection Plate searching rectangular area, mainly based on the car plate size in the car plate center position predicted and previous frame image, according to following formula, obtain the approximate region scope rect of car plate in current frame image:
r e c t . x = c e n t e r . x - c a r _ w i d t h * 0.7 r e c t . y = c e n t e r . y - c a r _ h e i g h t r e c t . w i d t h = c a r _ w i d t h * 1.4 r e c t . h e i g h t = c a r _ h e i g h t * 2
Wherein, rect.x, rect.y represent upper left corner horizontal ordinate and the ordinate of Plate searching rectangular area rect in current frame image respectively, center.x, center.y represent the position horizontal ordinate of the car plate central point of prediction in current frame image and ordinate respectively, rect.width, rect.height represent width and the height of rect respectively, and car_width, car_height represent width and the height of the car plate obtained in previous frame image respectively.
S54, accurately positioning licence plate position, main method is: in the Plate searching rectangular area of current frame image, plate template is used to carry out search spread, each travels through position, according to following formula, calculate the degree of confidence that this traversal position belongs to car plate position, the traversal position selecting maximum confidence corresponding is as the optimal location of car plate in current frame image:
conf i j = 1 255 * N Σ Σ f ( i + x , j + y ) - M ( x , y )
Wherein, conf ijrepresent that current traversal position belongs to the degree of confidence of car plate position, N represents the pixel quantity of the plate template of current frame image, M (x, y) represents the gray-scale value of plate template at pixel (x, y) place, f (i+x, j+y) represent in the Plate searching rectangular area of current frame image, with top left co-ordinate (i, j) place, current traversal position for benchmark, the grey scale pixel value at skew (x, y) place.
S6, the car plate center position obtained in current frame image, concrete steps are as follows:
S61, according to following formula, obtain the binary image bin (x, y) of the car plate band of position in current frame image, effect as shown in Figure 6:
b i n ( x , y ) = 255 f ( x , y ) - 1 n Σ i = 1 N f ( x i , y i ) ≥ T 0 f ( x , y ) - 1 n Σ i = 1 N f ( x i , y i ) ≥ T
Wherein, f (x, y) is the grey scale pixel value at the car plate band of position (x, y) place in current frame image, f (x i, y i) be grey scale pixel value in N neighborhood centered by (x, y), n is the number of pixels in the N neighborhood centered by (x, y), and T is binary-state threshold.
S62, morphology operations, remove the interference that area is less.
S63, according to following formula, obtain the car plate center position center in current frame image, effect as shown in Figure 7:
c e n t e r . x = Σ x i * b i n ( x i , y i ) Σ b i n ( x i , y i ) c e n t e r . y = Σ y i * b i n ( x i , y i ) Σ b i n ( x i , y i )
Wherein, center.x, center.y are horizontal ordinate and the ordinate of car plate center position in current frame image respectively, bin (x i, y i) be (x in binary image i, y i) grey scale pixel value at place.
The distance of S7, acquisition target vehicle, concrete steps are as follows:
S71, based on following Binocular vision photogrammetry principle type, obtain the three-dimensional coordinate of car plate center position in world coordinate system (X, Y, Z) in current frame image:
s 1 u 1 v 1 1 = K 1 × [ R 1 | T 1 ] X Y Z 1 s r u r v r 1 = K r × [ R r | T r ] X Y Z 1
Wherein, s l, K l, R l, T lthe correlation parameter of first vehicle-mounted vidicon, (u l, v l) be car plate center position coordinate in the image that gathers of first vehicle-mounted vidicon, s r, K r, R r, T rthe correlation parameter of second vehicle-mounted vidicon, (u r, v r) be car plate center position coordinate in the image that gathers of second vehicle-mounted vidicon.
S72, carry out three-dimensional system of coordinate conversion according to following formula:
X c Y c Z c 1 = [ R 1 | T 1 ] X Y Z 1
Wherein, (X, Y, Z) is the three-dimensional coordinate of car plate center position in world coordinate system that step S71 obtains, (X c, Y c, Z c) be coordinate system with first vehicle-mounted vidicon three-dimensional coordinate, Z crepresent the distance of car plate center position apart from first vehicle-mounted vidicon, as the distance of objects ahead vehicle apart from first vehicle-mounted vidicon.
S73, correction target vehicle distances, because vehicle-mounted vidicon is all generally be placed on vehicle interior, the target vehicle distance that step S72 obtains contains the distance of this car headstock apart from vehicle-mounted vidicon, therefore, according to following formula, obtain the distance Z of final this car headstock apart from the front truck tailstock:
Z=Z c-Z car
Wherein, Z cthe distance of vehicle-mounted vidicon apart from front truck, Z carthe distance of vehicle-mounted vidicon apart from this car headstock.
S8, audio alert, according to the safe distance arranged in advance, if the spacing of reality is less than safe distance, audio alert, reminds driver to adjust spacing in time, safe driving.
The above embodiment is only be described the preferred embodiment of the present invention; not scope of the present invention is limited; under not departing from the present invention and designing the prerequisite of spirit; the various distortion that those of ordinary skill in the art make technical scheme of the present invention and improvement, all should fall in protection domain that claims of the present invention determine.

Claims (8)

1. based on a vehicle distance detecting method for depth survey, it is characterized in that, comprise the following steps:
(1) correlation parameter that car plate detects sorter and two vehicle-mounted vidicons is obtained;
(2) judge whether to need detection and location objects ahead vehicle again, if so, then perform step (3), if not, then perform step (4);
(3) detect car plate position in sorter and image based on the car plate obtained and, apart from the distance of image lower boundary, locate the objects ahead vehicle in the image of a wherein vehicle-mounted vidicon collection; Detect car plate location similarity in sorter and image based on car plate again, locate the objects ahead vehicle in the image of another vehicle-mounted vidicon collection;
(4) car plate of objects ahead vehicle in the image of two vehicle-mounted vidicons collections is followed the tracks of respectively, namely according to the car plate position of target vehicle in previous frame image, the car plate position of target vehicle in prediction current frame image;
(5) the car plate center position of target vehicle in the current frame image of two vehicle-mounted vidicons collections is obtained respectively;
(6) according to the correlation parameter of vehicle-mounted vidicon, obtain the three-dimensional coordinate of car plate center position in world coordinate system of target vehicle in the current frame image of two vehicle-mounted vidicons collections, be the three-dimensional coordinate of coordinate system with vehicle-mounted vidicon by described three-dimensional coordinate transformation one-tenth in world coordinate system, obtain the distance of target vehicle apart from vehicle-mounted vidicon;
(7) distance of described target vehicle distance vehicle-mounted vidicon is deducted the distance of vehicle-mounted vidicon apart from this car headstock, namely obtain the distance of target vehicle apart from this car headstock.
2. the vehicle distance detecting method based on depth survey according to claim 1, is characterized in that, in step (1), described acquisition car plate detects sorter, comprising:
In a, positive and negative 30 degree of collection front, the license plate image of different distance is as the positive sample of training;
B, detect sorter file based on haar characteristic sum adaboost learning algorithm training car plate.
3. the vehicle distance detecting method based on depth survey according to claim 1, is characterized in that, in step (1), the correlation parameter of described acquisition two vehicle-mounted vidicons, comprising:
A, in the common visual field of two vehicle-mounted vidicons, place the scaling board of a width gridiron pattern pattern, use two vehicle-mounted vidicons to gather scaling board image respectively;
The angle position of b, conversion scaling board, until two vehicle-mounted vidicons acquire five width scaling board images respectively;
C, on each width scaling board image, obtain all gridiron patterns two dimension angular coordinate;
D, based on the classical calibration algorithm of Zhang Zhengyou, obtain the correlation parameter formula of vehicle-mounted vidicon:
K = s f x × k x 0 u 0 0 f y × k y v 0 0 0 1
R = r 1 r 2 r 3 r 4 r 5 r 6 r 7 r 8 r 9
T = t 1 t 2 t 3
Wherein, K represents the Intrinsic Matrix of vehicle-mounted vidicon, f x, f yrepresent the effective focal length of camera lens, k x, k yrepresent distortion factor, (u 0, v 0) representing picture centre, s represents the uncertain graphical rule factor, and R, T are all outer parameter matrixs of vehicle-mounted vidicon, represents respectively from world coordinates and is tied to rotational transformation matrix between vehicle-mounted vidicon coordinate system and translation transformation matrix.
4. the vehicle distance detecting method based on depth survey according to claim 1, is characterized in that, step (3), comprising:
A, based on obtain car plate detect sorter, detect first vehicle-mounted vidicon collection image in track, front whether there is car plate;
B, judge whether vehicle corresponding to car plate obtained is positioned at current lane, is if so, considered as effective car plate, if not, is considered as invalid car plate;
If c only exists an effective car plate, then it can be used as target license plate; If there is multiple effective car plate, then the target license plate in the image selecting car plate position in image to gather as first vehicle-mounted vidicon apart from minimum effective car plate apart from image lower boundary, vehicle corresponding to target license plate is target vehicle;
D, detect sorter based on the car plate obtained, obtains all candidate license plate in the image of second vehicle-mounted vidicon collection;
Target license plate in e, the image that gathers with first vehicle-mounted vidicon is for standard, all candidate license plate in the image of second vehicle-mounted vidicon collection are carried out Similarity Measure with it respectively, select candidate license plate corresponding to maximum similarity to be target license plate in the image that gathers of second vehicle-mounted vidicon, vehicle corresponding to target license plate is target vehicle.
5. the vehicle distance detecting method based on depth survey according to claim 1, is characterized in that, in step (4), and the described car plate position according to target vehicle in previous frame image, the car plate position of target vehicle in prediction current frame image, comprising:
A, in previous frame image, the car plate central point of target vehicle is saved as impact point, and the car plate band of position of target vehicle is saved as the plate template of target vehicle in current frame image after surrounding expansion;
B, impact point to be followed the tracks of, based on kalman Filter Principle, the position of car plate central point in current frame image of target of prediction vehicle;
C, car plate size based on target vehicle in position in current frame image of the car plate central point of target vehicle of prediction and previous frame image, according to following formula, obtain the Plate searching rectangular area of target vehicle in current frame image:
r e c t . x = c e n t e r . x - c a r _ w i d t h * 0.7 r e c t . y = c e n t e r . y - c a r _ h e i g h t r e c t . w i d t h = c a r _ w i d t h * 1.4 r e c t . h e i g h t = c a r _ h e i g h t * 2
Wherein, rect.x, rect.y represent upper left corner horizontal ordinate and the ordinate of the Plate searching rectangular area rect of target vehicle in current frame image respectively, center.x, center.y represent the position horizontal ordinate of the car plate central point of the target vehicle of prediction in current frame image and ordinate respectively, rect.width, rect.height represent width and the height of the Plate searching rectangular area rect of target vehicle in current frame image respectively, and car_width, car_height represent car plate width and the height of target vehicle in previous frame image respectively;
D, in current frame image target vehicle Plate searching rectangular area in, plate template is used to carry out search spread, to each traversal position, according to following formula, calculate the degree of confidence that this traversal position belongs to target vehicle car plate position, the traversal position selecting maximum confidence corresponding is as the car plate position of target vehicle in current frame image:
conf i j = 1 255 * N Σ Σ f ( i + x , j + y ) - M ( x , y )
Wherein, conf ijrepresent that current traversal position belongs to the degree of confidence of target vehicle car plate position, N represents the pixel quantity of the plate template of target vehicle in current frame image, M (x, y) represent that the plate template of target vehicle in current frame image is at (x, y) grey scale pixel value at place, f (i+x, j+y) represent in the Plate searching rectangular area of target vehicle in current frame image, with current traversal position top left co-ordinate (i, j) place is benchmark, the grey scale pixel value at skew (x, y) place.
6. the vehicle distance detecting method based on depth survey according to claim 1, is characterized in that, step (5), comprising:
A, according to following formula, obtain the binary image bin (x, y) of the car plate band of position of target vehicle in current frame image:
b i n ( x , y ) = 255 f ( x , y ) - 1 n Σ i = 1 N f ( x i , y i ) ≥ T 0 f ( x , y ) - 1 n Σ i = 1 N f ( x i , y i ) ≥ T
Wherein, f (x, y) represents the grey scale pixel value at the car plate band of position (x, the y) place of target vehicle in current frame image, f (x i, y i) representing grey scale pixel value in N neighborhood centered by (x, y), n represents the number of pixels in the N neighborhood centered by (x, y), and T represents binary-state threshold;
B, to obtain binary image carry out morphology operations, remove interference;
C, obtain the car plate center position of target vehicle in current frame image according to following formula:
c e n t e r . x = Σx i * b i n ( x i . y i ) Σ b i n ( x i . y i ) c e n t e r . y = Σy i * b i n ( x i , y i ) Σ b i n ( x i . y i )
Wherein, center.x, center.y represent horizontal ordinate and the ordinate of the car plate center position of target vehicle in current frame image respectively, bin (x i, y i) represent (x in binary image i, y i) grey scale pixel value at place.
7. the vehicle distance detecting method based on depth survey according to claim 1, is characterized in that, step (6), comprising:
A, based on following Binocular vision photogrammetry principle type, obtain the three-dimensional coordinate of car plate center position in world coordinate system (X, Y, Z) of target vehicle in the current frame image that two vehicle-mounted vidicons gather:
s 1 u 1 v 1 1 = K 1 × [ R 1 | T 1 ] X Y Z 1 s r u r v r 1 = K r × [ R r | T r ] X Y Z 1
Wherein, s 1, K 1, R 1, T 1be the correlation parameter of first vehicle-mounted vidicon, (u 1, v 1) be the car plate center position coordinate of target vehicle in the current frame image that gathers of first vehicle-mounted vidicon, s r, K r, R r, T rbe the correlation parameter of second vehicle-mounted vidicon, (u r, v r) be the car plate center position coordinate of target vehicle in the current frame image that gathers of second vehicle-mounted vidicon;
B, according to following formula, described three-dimensional coordinate transformation in world coordinate system is become the three-dimensional coordinate being coordinate system with first vehicle-mounted vidicon, obtains the distance of target vehicle apart from first vehicle-mounted vidicon:
X c Y c Z c 1 = [ R 1 | T 1 ] X Y Z 1
Wherein, (X, Y, Z) represents the three-dimensional coordinate of car plate center position in world coordinate system of target vehicle in the current frame image that above-mentioned steps a obtains, (X c, Y c, Z c) represent the three-dimensional coordinate being coordinate system with first vehicle-mounted vidicon, Z crepresent the distance of car plate center position apart from first vehicle-mounted vidicon of target vehicle in current frame image, as the distance of objects ahead vehicle apart from first vehicle-mounted vidicon.
8. the vehicle distance detecting method based on car plate position according to claim 1, is characterized in that, also comprise: when described target vehicle is less than default safe distance apart from the distance of this car headstock time, carry out audio alert.
CN201510419488.6A 2015-07-14 2015-07-14 Depth measurement-based vehicle distance detection method Pending CN105182320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510419488.6A CN105182320A (en) 2015-07-14 2015-07-14 Depth measurement-based vehicle distance detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510419488.6A CN105182320A (en) 2015-07-14 2015-07-14 Depth measurement-based vehicle distance detection method

Publications (1)

Publication Number Publication Date
CN105182320A true CN105182320A (en) 2015-12-23

Family

ID=54904520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510419488.6A Pending CN105182320A (en) 2015-07-14 2015-07-14 Depth measurement-based vehicle distance detection method

Country Status (1)

Country Link
CN (1) CN105182320A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740797A (en) * 2016-01-27 2016-07-06 大连楼兰科技股份有限公司 Image processing based abnormal vehicle detection method
CN105809143A (en) * 2016-03-25 2016-07-27 北京环境特性研究所 Vehicle alignment checking method based on image recognition cross drone
CN107290738A (en) * 2017-06-27 2017-10-24 清华大学苏州汽车研究院(吴江) A kind of method and apparatus for measuring front vehicles distance
CN108074260A (en) * 2017-11-15 2018-05-25 深圳市诺龙技术股份有限公司 A kind of method and apparatus of target object object positioning
CN108108680A (en) * 2017-12-13 2018-06-01 长安大学 A kind of front vehicle identification and distance measuring method based on binocular vision
CN108399403A (en) * 2018-02-28 2018-08-14 重庆大学 A kind of vehicle distance detecting method calculated based on car plate size
CN110008862A (en) * 2019-03-22 2019-07-12 哈尔滨工业大学(深圳) A kind of vehicle target detection method and relevant apparatus
CN110177256A (en) * 2019-06-17 2019-08-27 北京影谱科技股份有限公司 A kind of tracking video data acquisition methods and device
CN110197104A (en) * 2018-02-27 2019-09-03 杭州海康威视数字技术股份有限公司 Distance measuring method and device based on vehicle
CN110940982A (en) * 2019-11-29 2020-03-31 径卫视觉科技(上海)有限公司 Method for identifying front target of vehicle and corresponding equipment
CN111746545A (en) * 2020-06-29 2020-10-09 中国联合网络通信集团有限公司 Vehicle distance detection method and device and vehicle distance reminding method and device
US11188776B2 (en) 2019-10-26 2021-11-30 Genetec Inc. Automated license plate recognition system and related method
US11367267B2 (en) 2018-02-08 2022-06-21 Genetec Inc. Systems and methods for locating a retroreflective object in a digital image
CN114659489A (en) * 2022-03-11 2022-06-24 苏州清研微视电子科技有限公司 Front vehicle distance detection method and device based on convex lens imaging principle

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110135156A1 (en) * 2009-12-04 2011-06-09 Chao-Ho Chen Method of Locating License Plate of Moving Vehicle
CN103148837A (en) * 2012-11-16 2013-06-12 Tcl集团股份有限公司 Method and apparatus for measuring vehicle distance and automobile
CN104463220A (en) * 2014-12-19 2015-03-25 深圳市捷顺科技实业股份有限公司 License plate detection method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110135156A1 (en) * 2009-12-04 2011-06-09 Chao-Ho Chen Method of Locating License Plate of Moving Vehicle
CN103148837A (en) * 2012-11-16 2013-06-12 Tcl集团股份有限公司 Method and apparatus for measuring vehicle distance and automobile
CN104463220A (en) * 2014-12-19 2015-03-25 深圳市捷顺科技实业股份有限公司 License plate detection method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗丹等: "基于OpenCV的双目立体视觉测距", 《大众科技》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740797A (en) * 2016-01-27 2016-07-06 大连楼兰科技股份有限公司 Image processing based abnormal vehicle detection method
CN105809143B (en) * 2016-03-25 2018-12-04 北京环境特性研究所 The neat wire examination method of vehicle mark based on image recognition cross drone
CN105809143A (en) * 2016-03-25 2016-07-27 北京环境特性研究所 Vehicle alignment checking method based on image recognition cross drone
CN107290738A (en) * 2017-06-27 2017-10-24 清华大学苏州汽车研究院(吴江) A kind of method and apparatus for measuring front vehicles distance
CN108074260A (en) * 2017-11-15 2018-05-25 深圳市诺龙技术股份有限公司 A kind of method and apparatus of target object object positioning
CN108108680A (en) * 2017-12-13 2018-06-01 长安大学 A kind of front vehicle identification and distance measuring method based on binocular vision
US11830256B2 (en) 2018-02-08 2023-11-28 Genetec Inc. Systems and methods for locating a retroreflective object in a digital image
US11367267B2 (en) 2018-02-08 2022-06-21 Genetec Inc. Systems and methods for locating a retroreflective object in a digital image
CN110197104A (en) * 2018-02-27 2019-09-03 杭州海康威视数字技术股份有限公司 Distance measuring method and device based on vehicle
CN108399403A (en) * 2018-02-28 2018-08-14 重庆大学 A kind of vehicle distance detecting method calculated based on car plate size
CN108399403B (en) * 2018-02-28 2020-09-08 重庆大学 Vehicle distance detection method based on license plate size calculation
CN110008862A (en) * 2019-03-22 2019-07-12 哈尔滨工业大学(深圳) A kind of vehicle target detection method and relevant apparatus
CN110008862B (en) * 2019-03-22 2021-03-30 哈尔滨工业大学(深圳) Vehicle target detection method and related device
CN110177256A (en) * 2019-06-17 2019-08-27 北京影谱科技股份有限公司 A kind of tracking video data acquisition methods and device
US11188776B2 (en) 2019-10-26 2021-11-30 Genetec Inc. Automated license plate recognition system and related method
CN110940982B (en) * 2019-11-29 2023-09-12 径卫视觉科技(上海)有限公司 Vehicle front destination identification method and corresponding device
CN110940982A (en) * 2019-11-29 2020-03-31 径卫视觉科技(上海)有限公司 Method for identifying front target of vehicle and corresponding equipment
CN111746545A (en) * 2020-06-29 2020-10-09 中国联合网络通信集团有限公司 Vehicle distance detection method and device and vehicle distance reminding method and device
CN114659489A (en) * 2022-03-11 2022-06-24 苏州清研微视电子科技有限公司 Front vehicle distance detection method and device based on convex lens imaging principle

Similar Documents

Publication Publication Date Title
CN105182320A (en) Depth measurement-based vehicle distance detection method
CN102737236B (en) Method for automatically acquiring vehicle training sample based on multi-modal sensor data
CN106919915B (en) Map road marking and road quality acquisition device and method based on ADAS system
CN107738612B (en) Automatic parking space detection and identification system based on panoramic vision auxiliary system
EP3418943B1 (en) Object detecting apparatus, object detecting method, and computer-readable medium
CN105070098A (en) Vehicle distance detection method based on license plate position
CN109460709B (en) RTG visual barrier detection method based on RGB and D information fusion
CA2950791C (en) Binocular visual navigation system and method based on power robot
EP4145393A1 (en) Vehicle localization
CN103400392B (en) Binocular vision navigation system and method based on Intelligent Mobile Robot
Broggi et al. Visual perception of obstacles and vehicles for platooning
CN109344687B (en) Vision-based obstacle detection method and device and mobile device
Taylor et al. A real-time approach to stereopsis and lane-finding
Peng et al. A smartphone-based obstacle sensor for the visually impaired
US20060111841A1 (en) Method and apparatus for obstacle avoidance with camera vision
CN105046225A (en) Vehicle distance detection method based on tail detection
WO2005086079A1 (en) Method and apparatus for differentiating pedestrians, vehicles, and other objects
KR101667835B1 (en) Object localization using vertical symmetry
CN114419098A (en) Moving target trajectory prediction method and device based on visual transformation
CN115100423B (en) System and method for realizing real-time positioning based on view acquisition data
CN112906777A (en) Target detection method and device, electronic equipment and storage medium
Ponsa et al. On-board image-based vehicle detection and tracking
Golovnin et al. Video processing method for high-definition maps generation
CN111256651B (en) Week vehicle distance measuring method and device based on monocular vehicle-mounted camera
KR102003387B1 (en) Method for detecting and locating traffic participants using bird's-eye view image, computer-readerble recording medium storing traffic participants detecting and locating program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20151223