CN108491810A - Vehicle limit for height method and system based on background modeling and binocular vision - Google Patents
Vehicle limit for height method and system based on background modeling and binocular vision Download PDFInfo
- Publication number
- CN108491810A CN108491810A CN201810265169.8A CN201810265169A CN108491810A CN 108491810 A CN108491810 A CN 108491810A CN 201810265169 A CN201810265169 A CN 201810265169A CN 108491810 A CN108491810 A CN 108491810A
- Authority
- CN
- China
- Prior art keywords
- pixel
- point
- image
- pixel point
- binocular
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000012937 correction Methods 0.000 claims abstract description 15
- 238000001514 detection method Methods 0.000 claims abstract description 14
- 239000000284 extract Substances 0.000 claims abstract description 8
- 239000011159 matrix material Substances 0.000 claims description 24
- 239000013598 vector Substances 0.000 claims description 9
- 238000002474 experimental method Methods 0.000 claims description 8
- 238000005259 measurement Methods 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 4
- 239000012141 concentrate Substances 0.000 claims description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 2
- 241000208340 Araliaceae Species 0.000 claims 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims 1
- 235000003140 Panax quinquefolius Nutrition 0.000 claims 1
- 235000008434 ginseng Nutrition 0.000 claims 1
- 238000003384 imaging method Methods 0.000 abstract description 6
- 230000008901 benefit Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 238000007476 Maximum Likelihood Methods 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/94—Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
- G06T7/33—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Geometry (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses the vehicle limit for height method and system based on background modeling and binocular vision, the vehicle limit for height method includes:Step 1 carries out binocular correction to the binocular vision image of acquisition;Step 2 is established benchmark image and is updated background model, and extracts body movement foreground from benchmark image;Step 3 carries out shadow Detection and morphology denoising successively to the image of body movement foreground;Step 4 extracts car body profile, obtains the location information of the maximum pixel point and minimum pixel point of car body;Step 5 carries out Feature Points Matching in binocular vision image, to obtain the parallax information of maximum pixel point and minimum pixel point;Step 6 is based on binocular vision geometrical principle, calculates height of the carbody;Step 7 sends out alarm when height of the carbody is more than upper height limit threshold value.The present invention is easy to operate, and speed is high, adaptable, once target vehicle enters binocular imaging region, you can realize real-time height detection.
Description
Technical field
The invention belongs to technical field of computer vision, more particularly to the vehicle limit for height based on background modeling and binocular vision
Method and system.
Background technology
With flourishing for Modern City Traffic, the Ka Qiao of superelevation truck, the incidence for hitting the accidents such as bridge, rollover
Cumulative year after year.Vehicle supervision department's majority use is added the measures such as limit for height mark and height-limiting bar and is taken precautions against, but such traffic thing
Therefore still happen occasionally, accident can cause to damage to vehicle and height limiter itself, or even cause casualties.Currently, having
Non-contact vehicle limit for height instrument based on ultrasonic wave, laser and infrared ray, but have more expensive, bad adaptability, debugging it is difficult,
The shortcomings of rate of false alarm is high.Therefore, seeking a kind of new vehicle limit for height method seems very significant.
Background modeling is a kind of important technology of target detection, is used for moving target from video sequence image from background
Segmentation extracts in image, to obtain the profile information of target prospect object[1].The difficult point of background modeling is ambient light
According to variation, the multimode state property of background and the shade etc. of moving object.In numerous algorithm of target detection based on background modeling
In, ViBe algorithms are because it is few with committed memory, initialization is fast, good, the software and hardware good compatibility of function admirable, anti-noise ability etc. is excellent
It puts and is widely used[2].Car body foreground segmentation based on background modeling can be well by car body profile information from video sequence
It extracts, and then car body profile can be measured with technique of binocular stereoscopic vision in image.
Technique of binocular stereoscopic vision is a kind of important technology in machine vision, it is the visual characteristic for imitating human eye, profit
Human eye is simulated with the video camera of two different locations.Technique of binocular stereoscopic vision mainly uses principle of parallax, from different imagings
Image information is obtained in equipment, and then obtains the three-dimensional geometric information of object.Binocular vision 3 D measurement technology have it is non-contact,
The advantages that system structure is simple, at low cost, speed is fast, precision is higher, thus it is widely used in three-dimensional measurement field[3]。
Accordingly, it is considered to advantage of the combination in terms of target detection and measurement of background modeling and binocular vision technology, together
When for current vehicle limit for height method limitation, propose a kind of vehicle limit for height method based on background modeling and binocular vision, show
It obtains very significant.
Following bibliography involved in text:
[1]Kim,H..Adaptive selection of model histograms in block-based
background subtraction[J].Electronics Letters,2012,(8):434-435.
[2]Barnich,O.,Van Droogenbroeck,M..ViBe:A Universal Background
Subtraction Algorithm for Video Sequences[J].IEEE Transactions on Image
Processing,2011,(6):1709-1724.
[3] Liu Haoran, Zhang Wenming, Liu Bin realize research [J] photons of three-dimensional measurement of objects based on binocular stereo vision
Journal, 2009, (7):1830-1834.
Invention content
The object of the present invention is to provide the vehicle limit for height method and system based on background modeling and binocular vision, vehicles of the present invention
Limit for height method has the characteristics that untouchable, speed is fast, easy to operate and adaptable.
Vehicle limit for height method provided by the invention based on background modeling and binocular vision, including:
Step 1 carries out binocular correction to the binocular vision image of acquisition, makes left view and right view horizontal aligument;
Step 2, for a view as benchmark image, another view is right as image to be matched in optional binocular vision image
Background model is established and updated to benchmark image, and body movement foreground is extracted from benchmark image;
Step 3 carries out shadow Detection to the image of body movement foreground and eliminates shade and morphology de-noising successively
Processing obtains car body prospect profile;
Step 4 extracts car body profile, obtains the location information of the maximum pixel point and minimum pixel point of car body, wherein
Location information refers to the coordinate of maximum pixel point and minimum pixel point under the image pixel coordinates system of benchmark image;
Step 5 carries out Feature Points Matching, to obtain highest in the binocular vision image after step 1 binocular corrects
Pixel and its match point and minimum pixel point in image to be matched and its match point in image to be matched regard
Poor information;
Step 6 is based on binocular vision according to the location information and parallax information of maximum pixel point and minimum pixel point
Geometrical principle calculates height of the carbody;
Step 7 sends out alarm when height of the carbody is more than upper height limit threshold value.
Further, binocular vision imagery exploitation binocular vision 3 D measurement device acquires, the binocular vision 3 D
Measuring device includes horizontally disposed binocular camera, and the camera coordinates system Y-axis vertical level of binocular camera.
Further, in step 1, the binocular vision image to acquisition carries out binocular correction, further comprises:
Sub-step 110 carries out monocular calibration respectively to binocular camera, obtain each monocular cam Intrinsic Matrix,
Outer parameter matrix and distortion factor;
Sub-step 120 carries out stereo calibration and three-dimensional correction to binocular camera using outer parameter matrix, and is reflected
The structural parameters of position relationship between binocular camera;
Sub-step 130 is based on monocular cam using Intrinsic Matrix, outer parameter matrix, distortion factor and structural parameters
Between geometry site, binocular vision image is corrected, left view and right view horizontal aligument are made.
Further, in step 2, background model is established and updated to benchmark image using ViBe methods, is further comprised:
Sub-step 210 establishes a background sample collection to each pixel x in benchmark image;
Sub-step 220, the background sample collection of initialized pixel point x, specially:Picture is randomly selected in first frame benchmark image
Several neighbor pixel points of vegetarian refreshments x, with neighbor pixel point the pixel value initialized pixel point x of RGB color background sample
This collection;
Sub-step 230, according to the pixel value of pixel x at a distance from each background sample, sentence in its current background sample set
Disconnected pixel x is background dot or sport foreground point;
Described judges pixel x for background dot or sport foreground point, specially:
By distance compared with threshold distance R, if the background sample number no more than R at a distance from pixel x pixel values reaches
Threshold value #min, then pixel x be considered as background dot, be otherwise considered as sport foreground point;Threshold distance R and threshold value #min pass through
Experiment is repeated several times to determine;
Sub-step 240, when pixel x is judged as background dot, the current background sample set and picture of update pixel x
The current background sample set of a random neighbor pixel of vegetarian refreshments x;
Sub-step 250 is then counted when pixel x is judged as sport foreground point;Once pixel x is in continuous n frames
It is judged as sport foreground point in benchmark image, then updates the current background sample set of pixel x;N values are determined according to experiment;
Sub-step 260 executes sub-step 230~250, to realize the real-time of background model frame by frame to each frame benchmark image
Update.
Further, in sub-step 240 and sub-step 250, the current background sample set of the update pixel x,
Specially:
The current background sample set of pixel x has the probability of 1/ φ to be updated;When update, using the pixel value of pixel x
A background sample in the current background sample set of random replacement pixel x;
Meanwhile sub-step 240, the current background sample set of a random neighbor pixel of the update pixel x, tool
Body is:
Randomly choose a neighbor pixel point of pixel x, the current background sample set of the neighbor pixel point has that 1/ φ's is general
Rate is updated;When update, using a back of the body in the current background sample set of the pixel value random replacement of the pixel x neighbor pixel point
Scape sample;
Parameter phi rule of thumb, experiment and actual demand artificially set.
Further, in step 3, shadow Detection is carried out to the image of body movement foreground and eliminates shade, specially:
Sub-step 310 traverses all pixels point in the image of body movement foreground;
Sub-step 320 constructs two vectors to current pixel point x in RGB colorWithPoint B indicates current
The background sample of pixel x concentrates any point, point F to indicate that current pixel point x corresponds to the point in RGB color, and point O is to indicate
The origin of three-dimensional orthogonal coordinate system in RGB color;
Sub-step 330, works as vectorWithAngle be not less than 90 degree when, current pixel point x is judged to shadow spots simultaneously
Remove it;Work as vectorWithAngle be less than 90 degree when, to next pixel execute sub-step 320~330.
Further, step 5 further comprises:
Sub-step 510, using surf characteristic matching methods, the benchmark image after being corrected to step 1 binocular and image to be matched
Carry out Feature Points Matching;
Sub-step 520 obtains maximum pixel point and minimum pixel point obtained by step 4 and is waiting for using matched characteristic point pair
Match the match point in image;
Sub-step 530, according to maximum pixel point, the match point of minimum pixel point and maximum pixel point, minimum pixel point
Coordinate under respective image pixel coordinates system obtains maximum pixel point and its match point and minimum pixel point and its
Parallax information with point.
Further, step 6 further comprises:
Sub-step 610, according to the seat of maximum pixel point and minimum pixel point under the image pixel coordinates system of benchmark image
Mark calculates the three-dimensional coordinate under the camera coordinates system of maximum pixel point and minimum pixel the point camera corresponding to benchmark image;
Sub-step 620 calculates height of the carbody according to the three-dimensional coordinate of maximum pixel point and minimum pixel point.
Vehicle limit for height system provided by the invention based on background modeling and binocular vision, including:
First module is used for carrying out binocular correction to the binocular vision image of acquisition, keeps left view and right view level right
It is accurate;
Second module, for a view in optional binocular vision image as benchmark image, another view is as to be matched
Image is established benchmark image and is updated background model, and extracts body movement foreground from benchmark image;
Third module carries out shadow Detection for the image to body movement foreground and eliminates shade and form successively
Denoising is learned, car body prospect profile is obtained;
4th module obtains the location information of the maximum pixel point and minimum pixel point of car body for extracting car body profile,
Wherein, location information refers to the coordinate of maximum pixel point and minimum pixel point under the image pixel coordinates system of benchmark image;
5th module, for carrying out Feature Points Matching in the binocular vision image after binocular corrects, to obtain highest
Pixel and its match point and minimum pixel point in image to be matched and its match point in image to be matched regard
Poor information;
6th module is used for location information and parallax information according to maximum pixel point and minimum pixel point, based on double
Visually feel geometrical principle, calculates height of the carbody;
7th module is used for, when height of the carbody is more than upper height limit threshold value, sending out alarm.
Compared with prior art, the present invention has following advantageous effect:
(1) easy to operate:Tested vehicle is only needed to enter the binocular imaging region of binocular camera, you can to realize and survey in real time
Amount is not necessarily to the operation of any complexity.
(2) speed is fast:After vehicle enters binocular imaging region, target vehicle true altitude can be measured immediately, without waiting
Time.
(3) adaptable:Background modeling is carried out to current measuring environment background using ViBe methods, is suitable for comparatively multiple
Miscellaneous measuring environment, to the of less demanding of measuring environment.
Description of the drawings
Fig. 1 is the overall flow figure of the embodiment of the present invention;
Fig. 2 is the schematic diagram that height of the carbody is calculated using binocular vision geometrical principle, in figure, 1- left views, and 2- right views.
Specific implementation mode
In order to illustrate more clearly of the present invention and/or technical solution in the prior art, below originally by control description of the drawings
The specific implementation mode of invention.It should be evident that drawings in the following description are only some embodiments of the invention, for this
For the those of ordinary skill of field, without creative efforts, others are can also be obtained according to these attached drawings
Attached drawing, and obtain other embodiments.
Referring to Fig. 1, the specific implementation process of the vehicle limit for height method based on background modeling and binocular vision, including:
S100 acquires the binocular vision image in binocular imaging region, and the binocular vision image includes that left view and the right side regard
Figure.
In present embodiment, binocular vision image is acquired using binocular vision 3 D measurement device.To establish a water
Binocular camera level is fixed in photographic tripod using microspur frame, utilizes level meter by flat Binocular Stereo Vision System
Adjustment binocular camera makes binocular camera shooting head erect, to ensure the Y-axis vertical level of the camera coordinates system of left camera, establishes
Using the camera coordinates system of left camera as the three dimensions of world coordinate system.For the ease of subsequent image processing, adjustment binocular is taken the photograph
As the focal length of head, RGB gains, contrast, exposure parameter, white balance parameter are consistent so that left view and right view are without apparent poor
It is different.
S200 carries out binocular correction to the binocular vision image of acquisition, makes left view and right view horizontal aligument.
This step further comprises:
S210 carries out monocular calibration respectively to binocular camera, obtains the Intrinsic Matrix of each monocular cam, outer parameter
Matrix and distortion factor.
More specifically, conventional Zhang Zhengyou standardizations can be used, monocular calibration is carried out respectively to binocular camera, it is described
Zhang Zhengyou standardizations, including:Using a black and white gridiron pattern as calibrated reference, the tessellated angle of black and white is adjusted, difference is obtained
The tessellated angle point information of black and white under angle;Based on angle point information, each monocular cam is solved using Maximum Likelihood Estimation Method
Intrinsic Matrix, outer parameter matrix and distortion factor.
In the present invention, the Intrinsic Matrix includes the respective focal length of left and right camera and imaging origin;It is described
Outer parameter matrix include the respective spin matrix of left and right camera and translation vector.
S220 carries out stereo calibration and three-dimensional correction using outer parameter matrix to binocular camera.
More specifically, Bouguet methods can be used, stereo calibration and three-dimensional correction is carried out to binocular camera.The solid
Calibration and three-dimensional correction, including:Based on outer parameter matrix, the structural parameters of position relationship between reflection binocular camera are obtained;Profit
Polar curve correction is carried out to binocular camera with structural parameters, keeps the optical axis of binocular camera parallel, to forward direction horizontal aligument.
In the present invention, the structural parameters include the spin matrix R and translation vector T between binocular camera.
S230 utilizes Intrinsic Matrix, outer parameter matrix, distortion factor and structural parameters, based on several between monocular cam
What position relationship, corrects binocular vision image, makes left view and right view horizontal aligument.
A view is as benchmark image in the optional binocular vision images of S300, and another view is as image to be matched, to base
Quasi- image establishes background model, and body movement foreground is extracted from benchmark image.
In present embodiment, by convention, image on the basis of left view is selected, selects right view for figure to be matched
Picture.
In this step, gauss hybrid models method, average background modelling, CodeBook can be used in the foundation of background model
The conventional methods such as method, ViBe methods.Wherein, since ViBe methods have many advantages, such as that committed memory is few, initialization is fast, anti-noise ability is good,
It is particularly suitable for the application scenarios of the present invention.
The detailed process for establishing background model will be provided by taking ViBe methods as an example below:
S310 establishes a background sample collection M (x) to each pixel x in benchmark image, is denoted as:
M (x)={ v1,v2,...,vN} (1)
In formula (1), viIndicate a point of i-th of background sample namely RGB color in background sample collection M (x);i
=1,2 ..., N.
The background sample collection of 1 frame benchmark image all pixels point constitutes the background model of the frame benchmark image.
S320 sets first frame benchmark image and corresponds to moment t=0, NG(x) neighbour of pixel x in first frame benchmark image is indicated
Pixel point set is occupied, the background sample collection M (x) of pixel x is initialized using first frame benchmark image, more specifically, with
Machine chooses NG(x) N number of neighbor pixel point in, with N number of neighbor pixel point RGB color pixel value initial background sample
This collection M (x).
Background sample collection M after initialization0(x) it is denoted as:
M0(x)={ v0(y|y∈NG(x))} (2)
In formula (2), y indicates NG(x) the random neighbor pixel in;v0(y|y∈NG(x)) indicate y in RGB color
Pixel value.
S330 calculates separately pixel x pixel values and N number of background sample in its current background sample set to each pixel x
This distance, and judge pixel x for background dot or sport foreground point.
Range formula is shown in formula (3):
di=| v (x)-vi| (3)
In formula (3), v (x) indicates the pixel value of pixel x, viIt indicates in the current background sample set of pixel x i-th
Background sample, diIndicate pixel x at a distance from i-th of background sample.
By diCompared with threshold distance R, if the background sample number no more than threshold distance R at a distance from pixel x reaches
Threshold value #min, then pixel x be considered as background dot, be otherwise considered as sport foreground point.Threshold distance R and threshold value #min pass through
Experiment is repeated several times to determine, wherein threshold value #min value ranges are 1~20.
S340 when pixel x is considered as background dot, the current background sample set of update pixel x and pixel x's
The current background sample set of random neighbor pixel.
The current background sample set of pixel x is updated, specially:
When pixel x is considered as background dot, then the current background sample set of pixel x has the probability of 1/ φ to be updated;
When update, using a background sample in the current background sample set of v (x) random replacement pixels x.Parameter phi is rule of thumb, again
Retrial is tested and actual demand is artificially set, and in general, φ takes higher value, it is difficult to rapidly adapt to the update of background sample collection;
And φ takes smaller value, then the update of background sample collection is easily affected by noise.In the present embodiment, the update φ of background sample collection takes
16。
The current background sample set of the random neighbor pixel of pixel x is updated, specially:
When pixel x is considered as background dot, a neighbor pixel point of random selection pixel x, to the neighbor pixel point
Current background sample set be updated;Likewise, the current background sample set of the neighbor pixel point has the probability of 1/ φ by more
Newly;When update, using a background sample in the current background sample set of v (x) the random replacements neighbor pixel point.Parameter phi takes
Value is the same as the φ values when current background sample set for updating pixel x.
S350 is considered as sport foreground point as pixel x, then counts.When pixel x in continuous n frames benchmark image equal quilts
Be considered as sport foreground point, then the current background sample set of pixel x has the probability of 1/ φ to be updated, when update, using v (x) with
A background sample in the current background sample set of machine replacement pixel point x.N values determine by camera number of pictures per second, generally, camera
Number of pictures per second is more, then n takes higher value;Conversely, n takes smaller value;N specifically can obtain optimum value by experiment.
S360 repeats step S330~S350, with real-time update background model, to adapt to environment to next frame benchmark image
Variation.
S400 shadow Detection is carried out successively to the image of the step S300 body movement foregrounds extracted and eliminate shade and
Morphology denoising.
The detection shade simultaneously eliminates shade, specially:
Traverse all pixels point in the image of body movement foreground, to current pixel point x, in RGB color, with R, G,
Tri- pixel values of B are respectively reference axis, establish three-dimensional orthogonal coordinate system, and point O is origin.Construct two vectorsWithPoint B
Any point is concentrated for the background sample of current pixel point x, the pixel value v (x) that point F is current pixel point x is corresponding in RGB color sky
Between point, will be vectorialWithAngle be denoted asHave:
The judging rules of shadow spots are:
In formula (5), M (x) indicates the shadow spots attribute of current pixel point x;Shadow indicates that the point is shadow spots;
Foreground indicates that the point is foreground point.According toValue, you can obtain shadow spots and foreground point, and remove car body fortune
Shadow spots in the image of dynamic foreground.
The morphology denoising, including:Fortune is carried out out successively to the body movement foreground image after elimination shade
Calculation and closed operation, with to image denoising;Meanwhile foreground part is obtained using connection domain method, and contour area is deleted less than default
The foreground part of area threshold, profile, that is, car body prospect profile of reservation.
S500 extracts car body profile, and obtains the location information of the maximum pixel point and minimum pixel point of car body.
More specifically, the location information of the maximum pixel point and minimum pixel point of car body is obtained, including:Traverse car body profile
Upper pixel, through comparing, obtains the position of maximum pixel point and minimum pixel point to obtain the location information of all pixels point
Information.In present embodiment, location information is using coordinate representation under the image pixel coordinates system of benchmark image, by highest picture
The coordinate of vegetarian refreshments and minimum pixel point is denoted as (x_high, y_high), (x_low, y_low) respectively.
S600 carries out the benchmark image after binocular correction to step S200 and image to be matched carries out Feature Points Matching, obtains
The parallax information of maximum pixel point and minimum pixel point in benchmark image and image to be matched.
This step specifically includes:
S610 utilizes surf characteristic matching methods, is matched to body movement foreground in benchmark image and image to be matched,
Obtain initial matching characteristic point pair;Initial matching characteristic point pair is screened using Euclidean distance.Two pixel of characteristic point centering
Euclidean distance it is smaller, then matching effect is better;
S620 obtains maximum pixel point and minimum pixel point in image to be matched using the matching characteristic point pair after screening
Match point, maximum pixel point and its match point in image to be matched are referred to as the matching characteristic point pair of peak;Equally
, minimum pixel point and its match point in image to be matched are referred to as the matching characteristic point pair of minimum point.
S630 is due to left camera and the equal forward direction horizontal aligument of right camera, then the matching characteristic point pair of peak and most
The matching characteristic point of low spot is to the difference of the abscissa under respective image pixel coordinates system, i.e. parallax value.
S700 is according to the position of the Intrinsic Matrix of binocular camera, outer parameter matrix, maximum pixel point and minimum pixel point
It sets and parallax information calculates height of the carbody using binocular vision geometrical principle.
This step specifically includes:
Coordinates of the S710 according to maximum pixel point and minimum pixel point under the image pixel coordinates system of benchmark image calculates
Three-dimensional coordinate under the camera coordinates system of maximum pixel point and minimum pixel the point camera corresponding to benchmark image, is shown in formula
(6)~(7).
S720 calculates height of the carbody, sees formula (8) according to the three-dimensional coordinate of maximum pixel point and minimum pixel point.
Formula (6)~(8) are as follows:
Car_height=Y_high-Y_low (8)
Formula (6)~(8), Y_high and Y_low are respectively the Y of maximum pixel point and minimum pixel point under camera coordinates system
Coordinate;TxIndicate the baseline length between binocular camera;cyTo be imaged origin ordinate;D_high and d_low is respectively peak
Matching characteristic point pair and minimum point matching characteristic point pair parallax value;Car_height is height of the carbody.
The schematic diagram of height of the carbody is calculated referring to Fig. 2 using binocular vision geometrical principle, and in figure, P1, P2 indicate vehicle respectively
Highs and lows on body, point P1It is leftWith point P1It is rightFor the matching characteristic point pair of peak, point P2It is leftWith point P2It is rightFor minimum point
Matching characteristic point pair;U1O1V1Indicate the image pixel coordinates system of left view, U2O2V2Indicate the image pixel coordinates of right view
System, Ocl-XclYclZclIndicate the camera coordinates system of left camera, Ocr-XcrYcrZcrIndicate the camera coordinates system of right camera.
S800 judges whether height of the carbody is more than upper height limit threshold value h_max, if so, sending out alarm;Otherwise, do not appoint
Where is managed, and height of the carbody detection is continued.
Be described in above-described embodiment illustrate the present invention, though text in illustrated by specific term, not
Protection scope of the present invention can be limited with this, be familiar with this technical field personage can understand the present invention spirit with it is right after principle
It changes or changes and reaches equivalent purpose, and this equivalent change and modification, should all be covered by right institute circle
Determine in scope.
Claims (9)
1. the vehicle limit for height method based on background modeling and binocular vision, characterized in that including:
Step 1 carries out binocular correction to the binocular vision image of acquisition, makes left view and right view horizontal aligument;
Step 2, a view is as benchmark image in optional binocular vision image, and another view is as image to be matched, to benchmark
Background model is established and updated to image, and body movement foreground is extracted from benchmark image;
Step 3 carries out shadow Detection to the image of body movement foreground and eliminates shade and morphology denoising successively,
Obtain car body prospect profile;
Step 4 extracts car body profile, obtains the location information of the maximum pixel point and minimum pixel point of car body, wherein position
Information refers to the coordinate of maximum pixel point and minimum pixel point under the image pixel coordinates system of benchmark image;
Step 5 carries out Feature Points Matching, to obtain maximum pixel in the binocular vision image after step 1 binocular corrects
The parallax of point and its match point and minimum pixel point and its match point in image to be matched in image to be matched is believed
Breath;
Step 6 is based on binocular vision geometry according to the location information and parallax information of maximum pixel point and minimum pixel point
Principle calculates height of the carbody;
Step 7 sends out alarm when height of the carbody is more than upper height limit threshold value.
2. the vehicle limit for height method based on background modeling and binocular vision as described in claim 1, it is characterized in that:
Binocular vision imagery exploitation binocular vision 3 D measurement device acquires, and the binocular vision 3 D measurement device includes water
The binocular camera of flat setting, and the camera coordinates system Y-axis vertical level of binocular camera.
3. the vehicle limit for height method based on background modeling and binocular vision as claimed in claim 2, it is characterized in that:
In step 1, the binocular vision image to acquisition carries out binocular correction, further comprises:
Sub-step 110 carries out monocular calibration respectively to binocular camera, obtains the Intrinsic Matrix of each monocular cam, outer ginseng
Matrix number and distortion factor;
Sub-step 120 carries out stereo calibration and three-dimensional correction to binocular camera using outer parameter matrix, and obtains reflection binocular
The structural parameters of position relationship between camera;
Sub-step 130, using Intrinsic Matrix, outer parameter matrix, distortion factor and structural parameters, based between monocular cam
Geometry site corrects binocular vision image, makes left view and right view horizontal aligument.
4. the vehicle limit for height method based on background modeling and binocular vision as described in claim 1, it is characterized in that:
In step 2, background model is established and updated to benchmark image using ViBe methods, is further comprised:
Sub-step 210 establishes a background sample collection to each pixel x in benchmark image;
Sub-step 220, the background sample collection of initialized pixel point x, specially:Pixel is randomly selected in first frame benchmark image
Several neighbor pixel points of x, with neighbor pixel point the pixel value initialized pixel point x of RGB color background sample collection;
Sub-step 230, according to the pixel value of pixel x at a distance from each background sample, judge picture in its current background sample set
Vegetarian refreshments x is background dot or sport foreground point;
Described judges pixel x for background dot or sport foreground point, specially:
By distance compared with threshold distance R, if the background sample number no more than R at a distance from pixel x pixel values reaches thresholding
Value #min, then pixel x be considered as background dot, be otherwise considered as sport foreground point;Threshold distance R and threshold value #min are by multiple
Experiment is repeated to determine;
Sub-step 240, when pixel x is judged as background dot, the current background sample set and pixel of update pixel x
The current background sample set of a random neighbor pixel of x;
Sub-step 250 is then counted when pixel x is judged as sport foreground point;Once pixel x is in continuous n frames benchmark
It is judged as sport foreground point in image, then updates the current background sample set of pixel x;N values are determined according to experiment;
Sub-step 260 executes sub-step 230~250 frame by frame to each frame benchmark image, with realize background model in real time more
Newly.
5. the vehicle limit for height method based on background modeling and binocular vision as claimed in claim 4, it is characterized in that:
In sub-step 240 and sub-step 250, the current background sample set of the update pixel x, specially:
The current background sample set of pixel x has the probability of 1/ φ to be updated;When update, the pixel value using pixel x is random
A background sample in the current background sample set of replacement pixel point x;
Meanwhile sub-step 240, the current background sample set of a random neighbor pixel of the update pixel x, specifically
For:
A neighbor pixel point of pixel x is randomly choosed, the current background sample set of the neighbor pixel point has the probability quilt of 1/ φ
Update;When update, using a background sample in the current background sample set of the pixel value random replacement of the pixel x neighbor pixel point
This;
Parameter phi rule of thumb, experiment and actual demand artificially set.
6. the vehicle limit for height method based on background modeling and binocular vision as described in claim 1, it is characterized in that:
In step 3, shadow Detection is carried out to the image of body movement foreground and eliminates shade, specially:
Sub-step 310 traverses all pixels point in the image of body movement foreground;
Sub-step 320 constructs two vectors to current pixel point x in RGB colorWithPoint B indicates current pixel
The background sample of point x concentrates any point, point F to indicate that current pixel point x corresponds to the point in RGB color, and point O is to indicate RGB
The origin of three-dimensional orthogonal coordinate system in color space;
Sub-step 330, works as vectorWithAngle be not less than 90 degree when, current pixel point x is judged to shadow spots and is removed
It;Work as vectorWithAngle be less than 90 degree when, to next pixel execute sub-step 320~330.
7. the vehicle limit for height method based on background modeling and binocular vision as described in claim 1, it is characterized in that:
Step 5 further comprises:
Sub-step 510, using surf characteristic matching methods, benchmark image and image to be matched after being corrected to step 1 binocular carry out
Feature Points Matching;
Sub-step 520 obtains maximum pixel point and minimum pixel point obtained by step 4 to be matched using matched characteristic point pair
Match point in image;
Sub-step 530, according to maximum pixel point, minimum pixel point and maximum pixel point, minimum pixel point match point each
From image pixel coordinates system under coordinate, obtain maximum pixel point and its match point and minimum pixel point and its match point
Parallax information.
8. the vehicle limit for height method based on background modeling and binocular vision as described in claim 1, it is characterized in that:
Step 6 further comprises:
Sub-step 610, according to the coordinate of maximum pixel point and minimum pixel point under the image pixel coordinates system of benchmark image, meter
Calculate the three-dimensional coordinate under the camera coordinates system of maximum pixel point and minimum pixel the point camera corresponding to benchmark image;
Sub-step 620 calculates height of the carbody according to the three-dimensional coordinate of maximum pixel point and minimum pixel point.
9. the vehicle limit for height system based on background modeling and binocular vision, characterized in that including:
First module is used for carrying out binocular correction to the binocular vision image of acquisition, makes left view and right view horizontal aligument;
Second module, is used in optional binocular vision image a view as benchmark image, another view as image to be matched,
Background model is established and updated to benchmark image, and body movement foreground is extracted from benchmark image;
Third module carries out shadow Detection for the image to body movement foreground and eliminates shade and morphology disappears successively
It makes an uproar processing, obtains car body prospect profile;
4th module obtains the location information of the maximum pixel point and minimum pixel point of car body for extracting car body profile,
In, location information refers to the coordinate of maximum pixel point and minimum pixel point under the image pixel coordinates system of benchmark image;
5th module, for carrying out Feature Points Matching in the binocular vision image after binocular corrects, to obtain maximum pixel
The parallax of point and its match point and minimum pixel point and its match point in image to be matched in image to be matched is believed
Breath;
6th module is used for location information and parallax information according to maximum pixel point and minimum pixel point, is based on binocular vision
Feel geometrical principle, calculates height of the carbody;
7th module is used for, when height of the carbody is more than upper height limit threshold value, sending out alarm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810265169.8A CN108491810A (en) | 2018-03-28 | 2018-03-28 | Vehicle limit for height method and system based on background modeling and binocular vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810265169.8A CN108491810A (en) | 2018-03-28 | 2018-03-28 | Vehicle limit for height method and system based on background modeling and binocular vision |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108491810A true CN108491810A (en) | 2018-09-04 |
Family
ID=63316640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810265169.8A Pending CN108491810A (en) | 2018-03-28 | 2018-03-28 | Vehicle limit for height method and system based on background modeling and binocular vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108491810A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109409311A (en) * | 2018-11-07 | 2019-03-01 | 上海为森车载传感技术有限公司 | A kind of limit for height method for early warning based on binocular stereo vision |
CN109740524A (en) * | 2018-12-29 | 2019-05-10 | 斑马网络技术有限公司 | The vehicle monitoring method and device of monocular vision |
CN110348313A (en) * | 2019-06-14 | 2019-10-18 | 深圳市超级视觉科技有限公司 | Billiards table model update method, device, computer equipment and storage medium |
CN110401937A (en) * | 2019-04-19 | 2019-11-01 | 王君 | Instant big data transmit-receive platform |
CN110889873A (en) * | 2019-11-26 | 2020-03-17 | 中国科学院光电研究院 | Target positioning method and device, electronic equipment and storage medium |
CN111612833A (en) * | 2020-05-15 | 2020-09-01 | 内蒙古能建数字信息科技有限公司 | Real-time detection method for height of running vehicle |
CN112776777A (en) * | 2019-11-08 | 2021-05-11 | 郑州宇通客车股份有限公司 | Vehicle and height-limiting anti-collision control method thereof |
CN112991369A (en) * | 2021-03-25 | 2021-06-18 | 湖北工业大学 | Method for detecting overall dimension of running vehicle based on binocular vision |
CN113511115A (en) * | 2021-05-28 | 2021-10-19 | 南昌智能新能源汽车研究院 | Binocular vision-based intelligent control method for automobile seat posture |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102938057A (en) * | 2012-10-19 | 2013-02-20 | 株洲南车时代电气股份有限公司 | Vehicle shadow eliminating method and device |
CN105956539A (en) * | 2016-04-27 | 2016-09-21 | 武汉大学 | Method for height measurement of human body based on background modeling and binocular vision |
CN205827680U (en) * | 2016-07-19 | 2016-12-21 | 安徽中汇规划勘测设计研究院股份有限公司 | Intelligent Garage Management System and city intelligent parking space information system |
-
2018
- 2018-03-28 CN CN201810265169.8A patent/CN108491810A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102938057A (en) * | 2012-10-19 | 2013-02-20 | 株洲南车时代电气股份有限公司 | Vehicle shadow eliminating method and device |
CN105956539A (en) * | 2016-04-27 | 2016-09-21 | 武汉大学 | Method for height measurement of human body based on background modeling and binocular vision |
CN205827680U (en) * | 2016-07-19 | 2016-12-21 | 安徽中汇规划勘测设计研究院股份有限公司 | Intelligent Garage Management System and city intelligent parking space information system |
Non-Patent Citations (1)
Title |
---|
魏岩 等: "《结合RGB颜色特征和纹理特征的消影算法》", 《计算机技术与发展》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109409311A (en) * | 2018-11-07 | 2019-03-01 | 上海为森车载传感技术有限公司 | A kind of limit for height method for early warning based on binocular stereo vision |
CN109740524A (en) * | 2018-12-29 | 2019-05-10 | 斑马网络技术有限公司 | The vehicle monitoring method and device of monocular vision |
CN110401937A (en) * | 2019-04-19 | 2019-11-01 | 王君 | Instant big data transmit-receive platform |
CN110348313A (en) * | 2019-06-14 | 2019-10-18 | 深圳市超级视觉科技有限公司 | Billiards table model update method, device, computer equipment and storage medium |
CN112776777A (en) * | 2019-11-08 | 2021-05-11 | 郑州宇通客车股份有限公司 | Vehicle and height-limiting anti-collision control method thereof |
CN110889873A (en) * | 2019-11-26 | 2020-03-17 | 中国科学院光电研究院 | Target positioning method and device, electronic equipment and storage medium |
CN111612833A (en) * | 2020-05-15 | 2020-09-01 | 内蒙古能建数字信息科技有限公司 | Real-time detection method for height of running vehicle |
CN112991369A (en) * | 2021-03-25 | 2021-06-18 | 湖北工业大学 | Method for detecting overall dimension of running vehicle based on binocular vision |
CN112991369B (en) * | 2021-03-25 | 2023-11-17 | 湖北工业大学 | Method for detecting outline size of running vehicle based on binocular vision |
CN113511115A (en) * | 2021-05-28 | 2021-10-19 | 南昌智能新能源汽车研究院 | Binocular vision-based intelligent control method for automobile seat posture |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108491810A (en) | Vehicle limit for height method and system based on background modeling and binocular vision | |
CN105956539B (en) | A kind of Human Height measurement method of application background modeling and Binocular Vision Principle | |
CN105023010B (en) | A kind of human face in-vivo detection method and system | |
CN110956661B (en) | Method for calculating dynamic pose of visible light and infrared camera based on bidirectional homography matrix | |
CN108171787A (en) | A kind of three-dimensional rebuilding method based on the detection of ORB features | |
CN106570899B (en) | Target object detection method and device | |
CN106033614B (en) | A kind of mobile camera motion object detection method under strong parallax | |
CN105913013A (en) | Binocular vision face recognition algorithm | |
CN112017243B (en) | Medium visibility recognition method | |
WO2023155483A1 (en) | Vehicle type identification method, device, and system | |
CN113313116B (en) | Underwater artificial target accurate detection and positioning method based on vision | |
CN102982334A (en) | Sparse parallax obtaining method based on target edge features and gray scale similarity | |
CN106991378A (en) | Facial orientation detection method, detection means and electronic installation based on depth | |
CN116188558B (en) | Stereo photogrammetry method based on binocular vision | |
CN107590444A (en) | Detection method, device and the storage medium of static-obstacle thing | |
CN112561996A (en) | Target detection method in autonomous underwater robot recovery docking | |
CN111047636B (en) | Obstacle avoidance system and obstacle avoidance method based on active infrared binocular vision | |
CN113128430B (en) | Crowd gathering detection method, device, electronic equipment and storage medium | |
Shen et al. | Depth map enhancement method based on joint bilateral filter | |
CN112016558B (en) | Medium visibility recognition method based on image quality | |
CN109443319A (en) | Barrier range-measurement system and its distance measuring method based on monocular vision | |
CN116758149A (en) | Bridge structure displacement detection method based on unmanned aerial vehicle system | |
CN116563370A (en) | Distance measurement method and speed measurement method based on monocular computer vision | |
CN113723432B (en) | Intelligent identification and positioning tracking method and system based on deep learning | |
CN115239801A (en) | Object positioning method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180904 |
|
RJ01 | Rejection of invention patent application after publication |