CN110188689A - Virtual driving target collision detection method based on real scene modeling - Google Patents

Virtual driving target collision detection method based on real scene modeling Download PDF

Info

Publication number
CN110188689A
CN110188689A CN201910463552.9A CN201910463552A CN110188689A CN 110188689 A CN110188689 A CN 110188689A CN 201910463552 A CN201910463552 A CN 201910463552A CN 110188689 A CN110188689 A CN 110188689A
Authority
CN
China
Prior art keywords
target
anchor
frame
collision
virtual driving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910463552.9A
Other languages
Chinese (zh)
Other versions
CN110188689B (en
Inventor
宋永端
沈志熙
李聃
曾海林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University
Original Assignee
Chongqing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University filed Critical Chongqing University
Priority to CN201910463552.9A priority Critical patent/CN110188689B/en
Publication of CN110188689A publication Critical patent/CN110188689A/en
Application granted granted Critical
Publication of CN110188689B publication Critical patent/CN110188689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24137Distances to cluster centroïds
    • G06F18/2414Smoothing the distance, e.g. radial basis function networks [RBFN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • G06T3/06
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30261Obstacle
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/21Collision detection, intersection

Abstract

The invention discloses a kind of virtual driving target collision detection methods based on real scene modeling, comprising steps of 1) shooting the virtual driving scene of vehicle front by virtual camera, and obtain coordinate of the collision target on imaging plane by target detection;2) the picture plane vertical height of collision target is obtained according to the plane coordinates of collision target;3) according to as plane vertical height is to the regression equation of practical fore-and-aft distance, the fore-and-aft distance of operation vehicle and collision target is calculated;4) according to as the regression equation between the lateral Safe width of plane and actual range, obtaining as the lateral Safe width of plane, 5) according to the target position detected, judge whether target will collide with virtual driving vehicle.The present invention solves the technical problem that collision detection is carried out in the virtual driving scene modeled based on real scene.

Description

Virtual driving target collision detection method based on real scene modeling
Technical field
The present invention relates to automobile virtual driving technical field, in particular to a kind of virtual driving based on real scene modeling Target collision detection method.
Background technique
In order to improve driver training validity and training effect, need to add pedestrian and vehicle in driving simulation system, Virtual driving vehicle is needed to hide pedestrian and vehicle in drive simulating, and the premise hidden is that driving simulation system is able to detect and touches Target is hit, and target is accurately positioned.
Traditional virtual driving scene is generated by 3 d modeling software, therefore collision targets such as people, vehicle in scene Coordinate position be known, it may be convenient to carry out target collision detection.But it corresponds to and is virtually driven based on what real scene modeled System is sailed, the position coordinates of people, vehicle spray collision target in system are unknown quantity, therefore in the void modeled based on real scene It is a technical problem that target collision detection is carried out in quasi- control loop.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of virtual driving target collision detections based on real scene modeling Method, to solve to carry out the technical problem of target collision detection in the virtual driving scene modeled based on real scene.
The present invention is based on the virtual driving target collision detection methods of real scene modeling, comprising the following steps:
1) virtual driving scene of vehicle front is shot by the way that the virtual camera of virtual driving vehicle drive position is arranged in, and Coordinate [x of the collision target on virtual camera imaging plane is obtained by target detection1,y1,x2,y2], (x in coordinate1,y1) table Show the top left co-ordinate of collision target rectangle frame, (x2,y2) indicate collision target rectangle frame bottom right angular coordinate;Described is virtual Driving Scene is made of sphere model and the real scene video being attached on sphere model inner wall;
2) according to the plane coordinates [x of collision target1,y1,x2,y2] obtain collision target picture plane vertical height h, h= y2
3) according to as plane vertical height h is to the regression equation of practical fore-and-aft distance D, operation vehicle and collision is calculated The fore-and-aft distance D of target;
D=2.908 × 10-7·h3-3.069×10-4·h2+0.08266·h+0.252 (1)
4) according to as the regression equation between plane lateral Safe width w and actual range D, virtual driving vehicle is obtained As the lateral Safe width w of plane;
W=-0.03093D3+2.916·D2-85.9·D+832 (2);
5) collision judgment:
First judge whether virtual driving vehicle will occur longitudinal impact with target, if fore-and-aft distance D is less than the safety of the vehicle When braking distance, then longitudinal impact may occur for judgement, when fore-and-aft distance D is greater than the safe stopping distance of the vehicle, then sentence It is disconnected that longitudinal impact will not occur;
Then under the premise of with target longitudinal impact may occur for virtual driving vehicle, continue according to target rectangle frame The abscissa x of the right and left1And x2To determine whether side collision will occur, ifAndThen judge that virtual driving vehicle will not occur side collision with target and otherwise judge virtual driving With target side collision can occur for vehicle;Aforementioned middle wtFor the pixel overall width of picture captured by virtual camera.
Further, it in the step 1), detects collision target and obtains its coordinate on virtual camera imaging plane [x1,y1,x2,y2] the step of it is as follows:
A: to virtual driving scene image as original image before the vehicle of extraction virtual camera shooting;
B: being used as input picture to be passed to feature extraction network after carrying out scaling to original image, defeated by feature extraction network Characteristic pattern is obtained out;
C: characteristic pattern is passed to RPN network, RPN network will be corresponding with each pixel on characteristic pattern on input picture Point as anchor point, using anchor point as the center of anchor frame, each anchor point position generates several anchor frames over an input image;
D: inputting convolutional layer for the characteristic image with anchor frame information, by convolutional layer output image input Softmax classification Device carries out two classified calculating of target/background, tentatively judges that anchor frame content belongs to target or background, obtains several targets; Characteristic image is inputted into another convolutional layer simultaneously, convolutional layer output image is calculated by frame regression model, is corrected The translational movement and change of scale of anchor frame;
E: frame modification is carried out to all anchor frames according to the translational movement of obtained amendment anchor frame and change of scale;
F: according to the target classification score in step d in Softmax classifier calculated result, by the side of score from high to low Formula sequence, by anchor before the anchor frame in the high target of score comes, by anchor after the anchor frame in the low target of score comes, so All anchor frames are arranged successively, and extract several forward anchor frames;
G: the part for exceeding image boundary in extracted each anchor frame is removed;
H: non-maxima suppression processing is carried out to extracted anchor frame, removes the repetition anchor frame of each target;
I: it sorts remaining anchor frame, mentions from high to low again according to target classification score in Softmax classifier calculated result Forward several anchor frames are taken to export as candidate target, candidate target=[x1, y1, x2, y2], (x1, y1) is the anchor frame upper left corner Coordinate, (x2, y2) are anchor frame bottom right angular coordinate;
J: the grid for being 7*7 by the corresponding characteristic pattern region division of each candidate target, and to each grid Max pooling processing is carried out, Output Size is the candidate target characteristic pattern of 7*7;
K: pedestrian, vehicle are particularly belonged to still by full articulamentum and Softmax classifier calculated candidate target characteristic pattern Background exports all kinds of probability vectors;Return the positional shift for obtaining each candidate target characteristic pattern using frame again simultaneously Amount corrects target anchor frame again, obtains the final coordinate [x of collision target1,y1,x2,y2]。
Further, the feature extraction network in the step b is SRN network, and expression formula is as follows:
yn=y0+y1+y2+...+yn-1+fn(yn-1) (3)
F in formulan() indicates with certain BN layers tactic, Relu activation primitive and convolutional layer, convolutional layer, that is, residual error Unit, y0For the input of network, ynFor the output of network;
The SRN network structure includes 1 initial convolutional layer C1 and 3 sparse residual unit set C2, C3 and C4, In each sparse residual unit set stacked by m sparse residual units;The sparse residual unit is by multiple with certain BN layers tactic, Relu activation primitive and convolutional layer composition, number are determined by length factor l;The length factor l can For controlling initial characteristics y0Influence to network output, each sparse residual unit have identical length factor.
Further, in the step c, using anchor point as the center of anchor frame, frame side length is defined at each anchor point is respectively 128,256,512 and frame length-width ratio be respectively 1:2,1:1,2:1 amount to 9 anchor frames.
Further, in the step h non-maxima suppression processing the following steps are included:
1. selecting multiple anchor frames belonging to a certain target;
2. according to Softmax classifier calculated in step d as a result, being first less than the probability that content belongs to target in anchor frame 0.5 anchor frame removes, then by content in anchor frame belong to the anchor frame of the maximum probability of target and remaining anchor frame carry out one by one it is be overlapped Degree judgement illustrates that two anchor frames belong to same target, retains maximum probability anchor frame, it is smaller to remove probability if threshold value is higher than setting value That anchor frame;Otherwise, illustrate that two anchor frame category different targets, two anchor frames retain simultaneously;
3. select multiple anchor frames belonging to next target, continue step 1.-treatment process 2., until completing whole mesh The screening of anchor frame belonging to marking.
Beneficial effects of the present invention:
1, the present invention is based on the virtual driving target collision detection method of real scene modeling, collision target is being detected Afterwards, the conversion formula between coordinate by target in the pixel coordinate in scene image and in three dimensions, obtains The picture plane of fore-and-aft distance D and vehicle developed width when distance is D between virtual driving vehicle and collision target is lateral Safe width w, to solve the technology for obtaining collision target coordinate in the virtual driving scene modeled based on real scene Problem;And it is further realized in virtual driving scene by D and w, is between virtual driving vehicle and collision target The no judgement that side collision and longitudinal impact can occur can improve the virtual driving training validity based on real scene modeling.
2, it the present invention is based on the virtual driving target collision detection method of real scene modeling, is used in target detection The object detection method based on sparse residual error neural network, weaken initial feature input to the shadow of overall network model It rings, while also enriching the output feature of network, improve precision of prediction height.
Detailed description of the invention
Fig. 1 is virtual driving scene sphere model figure;
Fig. 2 is residual unit structure chart, and BN is input layer in figure, and RELU is activation primitive, and conv is convolutional layer;
Fig. 3 is locally-attached SRN network, and length factor l=2 in figure indicates that the number of sparse residual unit is 2;
Fig. 4 is target detection flow chart;
Fig. 5 is the overall structure figure of SRN network;
Fig. 6 is object detection results figure;
Fig. 7 is spherical projection model;
Fig. 8 is the perspective projection model of camera;
Fig. 9 is laterally security range schematic diagram, when there is collision target in w, then it represents that side collision can occur;
Figure 10 is the mapping curve figure of distance and pixels tall;
Figure 11 is the mapping curve figure of pixel wide and distance.
Specific embodiment
The invention will be further described with reference to the accompanying drawings and examples.
The virtual driving target collision detection method that the present embodiment is modeled based on real scene, comprising the following steps:
1) virtual driving scene of vehicle front is shot by the way that the virtual camera of virtual driving vehicle drive position is arranged in, and Coordinate [x of the collision target on virtual camera imaging plane is obtained by target detection1,y1,x2,y2], (x in coordinate1,y1) table Show the top left co-ordinate of collision target rectangle frame, (x2,y2) indicate collision target rectangle frame bottom right angular coordinate;Described is virtual Driving Scene is made of sphere model and the real scene video being attached on sphere model inner wall;
2) according to the plane coordinates [x of collision target1,y1,x2,y2] obtain collision target picture plane vertical height h, h= y2
3) according to as plane vertical height h is to the regression equation of practical fore-and-aft distance D, operation vehicle and collision is calculated The fore-and-aft distance D of target;
D=2.908 × 10-7·h3-3.069×10-4·h2+0.08266·h+0.252 (1)
4) according to as the regression equation between plane lateral Safe width w and actual range D, virtual driving vehicle is obtained As the lateral Safe width w of plane;
W=-0.03093D3+2.916·D2-85.9·D+832 (2);
5) collision judgment:
First judge whether virtual driving vehicle will occur longitudinal impact with target, if fore-and-aft distance D is less than the safety of the vehicle When braking distance, then longitudinal impact may occur for judgement, when fore-and-aft distance D is greater than the safe stopping distance of the vehicle, then sentence It is disconnected that longitudinal impact will not occur;
Then under the premise of with target longitudinal impact may occur for virtual driving vehicle, continue according to target rectangle frame The abscissa x of the right and left1And x2To determine whether side collision will occur, ifAndThen judge that virtual driving vehicle will not occur side collision with target and otherwise judge virtual driving With target side collision can occur for vehicle;Aforementioned middle wtFor the pixel overall width of picture captured by virtual camera.
In the present embodiment, in the step 1), detects collision target and obtain its seat on virtual camera imaging plane Mark [x1,y1,x2,y2] the step of it is as follows:
A: to virtual driving scene image as original image before the vehicle of extraction virtual camera shooting;It is mentioned in the present embodiment The original image resolution taken is 2706*1738.
B: being used as input picture to be passed to feature extraction network after carrying out scaling to original image, defeated by feature extraction network Characteristic pattern is obtained out.The feature extraction network is SRN network, and SRN network expression is as follows:
yn=y0+y1+y2+...+yn-1+fn(yn-1) (3)
F in formulan() indicates with certain BN layers tactic, Relu activation primitive and convolutional layer, convolutional layer, that is, residual error Unit, y0For the input of network, ynFor the output of network.
SRN network structure described in the present embodiment includes 1 initial convolutional layer C1 and 3 sparse residual unit set C2, C3 and C4, wherein there is m sparse residual units in each sparse residual unit set.The sparse residual unit is by multiple It is formed with certain BN layers tactic, Relu activation primitive and convolutional layer (i.e. residual unit), number is determined by length factor l It is fixed;The length factor l can be used to control initial characteristics y0Influence to network output, each sparse residual unit has identical Length factor.In the present embodiment C2, C3, C4 set in sparse residual unit number m be all 2, sparse residual unit length because Sub- l is 2, and network-wide factor k is 1, and each sparse residual unit convolution kernel size is 3*3, and convolution kernel weight uses MSRA method is initialized.In the present embodiment, original image is by scaling at 3 channel RGB, the input figure of size 800*600 Piece.It inputs picture C1 incoming first and carries out convolution, C1 includes the convolution kernel that 96 scales are 7*7, and convolution step-length stride is set It is set to 2.Meanwhile in order to obtain edge feature information, setting pixel filling pad is 3.After C1 carries out convolution, size is obtained C2 is input to for the characteristic pattern of 400*300*96.It is 96, pad 1 that each convolutional layer convolution kernel number is arranged in C2, in set First convolutional layer setting stride is 2, remaining each layer stride is 1.After C2 gathers convolution, export 200*150*96's Characteristic pattern.A convolutional layer includes 128 convolution kernels in C3, and pad and stride setting are identical as C2.Pass through C3, characteristic pattern ruler It is very little to become 100*75*128.A convolutional layer includes 256 convolution kernels in C4, and pad and stride setting are identical as C2, C3.Through Cross C4, the convolution characteristic pattern of last SRN network output 50*38*256.
C: characteristic pattern is passed to RPN network, RPN network will be corresponding with each pixel on characteristic pattern on input picture Point as anchor point, using anchor point as the center of anchor frame, each anchor point position generates several anchor frames over an input image.The present embodiment Defined at each anchor point frame side length be respectively 128,256,512 and frame length-width ratio be respectively 1:2,1:1,2:1 Amount to 9 anchor frames, it is 50*38*9=17100 that the present embodiment, which has the anchor frame number generated altogether,.
D: inputting convolutional layer for the characteristic image with anchor frame information, by convolutional layer output image input Softmax classification Device carries out two classified calculating of target/background, tentatively judges that anchor frame content belongs to target (pedestrian or vehicle) or background, obtains Several targets;Specifically: characteristic pattern is sent into a convolution kernel having a size of 1*1, the convolutional layer that convolution nuclear volume is 18, convolution The each point of nuclear volume character pair figure has 9 anchor frames, at the same each anchor frame content be likely to be two kinds of target or background as a result, Therefore Output Size is 50*38*18.Output image is sent into Softmax classifier, specially softmax classifier carries out two Classification, judges that anchor frame content is target or background.
Characteristic image is inputted into another convolutional layer simultaneously, convolutional layer output image is calculated by frame regression model, The translational movement and change of scale of amendment anchor frame are obtained, specifically: characteristic pattern is sent into a convolution kernel having a size of 1*1, convolution kernel The convolutional layer that quantity is 36, each point of convolution nuclear volume character pair figure has 9 anchor frames, while each anchor frame passes through anchor point Coordinate (Ax,Ay) and anchor frame length and width Ah、Aw4 data indicate in total, therefore Output Size is 50*39*36;Export image It is calculated by frame regression model, obtains the translational movement and change of scale of amendment anchor frame.
E: frame modification is carried out to all anchor frames according to the translational movement of obtained amendment anchor frame and change of scale.
F: according to the target classification score in step d in Softmax classifier calculated result, by the side of score from high to low Formula sequence, by anchor before the anchor frame in the high target of score comes, by anchor after the anchor frame in the low target of score comes, so All anchor frames are arranged successively, and extract 6000 forward anchor frames.
G: the part for exceeding image boundary in extracted each anchor frame is removed;
H: non-maxima suppression processing is carried out to extracted 6000 anchor frames, removal repeats anchor frame, the specific steps are as follows:
1. selecting multiple anchor frames belonging to a certain target;
2. according to Softmax classifier calculated in step d as a result, being first less than the probability that content belongs to target in anchor frame 0.5 anchor frame removes, then by content in anchor frame belong to the anchor frame of the maximum probability of target and remaining anchor frame carry out one by one it is be overlapped Degree judgement illustrates that two anchor frames belong to same target, retains maximum probability anchor frame, it is smaller to remove probability if threshold value is higher than setting value That anchor frame;Otherwise, illustrate that two anchor frame category different targets, two anchor frames retain simultaneously;
3. select multiple anchor frames belonging to next target, continue step 1.-treatment process 2., until completing whole mesh The screening of anchor frame belonging to marking.
I: it sorts remaining anchor frame, mentions from high to low again according to target classification score in Softmax classifier calculated result Preceding 300 anchor frames are taken to export as candidate target, candidate target=[x1, y1, x2, y2], (x1, y1) is anchor frame upper left corner seat Mark, (x2, y2) are anchor frame bottom right angular coordinate.
J: the grid for being 7*7 by the corresponding characteristic pattern region division of each candidate target, and to each grid Max pooling processing is carried out, Output Size is the candidate target characteristic pattern of 7*7;
K: pedestrian, vehicle are particularly belonged to still by full articulamentum and Softmax classifier calculated candidate target characteristic pattern Background exports all kinds of probability vectors;Return the positional shift for obtaining each candidate target characteristic pattern using frame again simultaneously Amount corrects target anchor frame again, obtains the final coordinate [x of collision target1,y1,x2,y2]。
D=2.908 × 10 are obtained in the present embodiment-7·h3-3.069×10-4·h2+ 0.08266h+0.252 and w=- 0.03093·D3+2.916·D2The method of two equations of linear regression of -85.9D+832 is as follows:
Because the true environment of shooting is added to sphere mould at panoramic video by the virtual driving scene built in the present embodiment In type, and common recording shooting action is lost on three-dimensional real world information MAP to two dimensional image plane The depth information of object in environment, to cause can not obtain the position of the object in the scene.In order to realize virtual driving system The collision judgment function of system, needs to find out the mapping relations of true environment coordinate system Yu scenic picture coordinate system.
Since panoramic video to be attached on the inner surface of sphere model, essence is a kind of real world scenery to sphere mould The spherical projection on type surface, i.e., orthogonal projection of the 3D point to spherical surface in realistic space, and in the point and space of spherical surface image 3D point is one-to-one.Different from common perspective projection model, spherical projection model is as shown in fig. 7, ball S origin is in figure O, radius r, spherical surface are the panoramic picture of attachment, and coordinate system OXYZ is the right angle seat for defining target object in spherical panorama picture Mark system, the optical center of spherical camera is also used as with time point O.Connection space 3D point Pc=(Xc,Yc,Zc) with optical center O, hand over Spherical Surface S in Point p=(x, y, z).For ease of calculation, for the point of panoramic picture on spherical surface, using spherical coordinateMode carry out table Show, the relational expression with rectangular coordinate system are as follows:
Because of centre of sphere O, coordinate p on panorama, the 3D point P in realistic spacecCollinearly, p and P can be obtainedcRelationship:
WhereinIt enablesHave:
P=λ Pc (6)
In actual photographed, there is the relationships of rotation and translation for the reference coordinate of camera coordinates and real world, if R For spin matrix, T is translation vector, then has:
Pc=RPw+T (7)
Mapping relations between spherical panorama picture coordinate and real world reference coordinate as a result, are as follows:
P=λ [R | T] Pw (8)
Wherein, spin matrix R and translation vector T is and shoots camera attribute decision used.
It is used to carry out the image apart from modeling in the present embodiment, is by being placed in sphere model optical center position in system Virtual camera shoots the scenic picture flat image obtained of spherome surface, therefore there is also have spherical panorama picture seat Mapping relations between mark and flat image coordinate, this mapping relations can be illustrated by the perspective projection model of camera, As shown in figure 8, setting camera coordinates system as (XP,YP,ZP), photo coordinate system is (w, h), and pixel coordinate system is (u, v), according to Similar triangle theory can obtain:
Light forms an analog quantity on imaging plane, by the way that the analog quantity is sampled and quantified, can obtain picture Coordinate value on pixel planes.There are scalings and translation transformation between pixel planes and imaging plane.If on imaging plane As after being mapped to pixel planes, respective coordinates are exaggerated α times on u axis, β times are exaggerated on v axis, origin translation cw, ch, i.e., Obtain following equation:
Arrangement formula (9) and (10), the mapping relations that camera coordinates system and pixel coordinate system can be obtained are shown below:
It can be obtained by formula (11), target range camera is remoter, ZPBigger, then u, v are smaller, as position imaging plane lower edge It is remoter.Therefore, the distance of target range shooting point in space can be judged by the vertical pixel height of target in plane picture.
R, T, α, β, c in above-mentioned modelwAnd chIt is to determine that acquisition process is more multiple by the outer ginseng and internal reference attribute of camera It is miscellaneous, while will also result in accurate coordinate mapping relations there is also factors such as optical path distortions and being difficult to seek.The present embodiment is using inverse To thinking, the distance value in true coordinate and the pixel value in corresponding flat image coordinate are first counted by calibration experiment, then Using the method for data regression, the mapping relations between two kinds of data are found out, establish scene distance model.
Because judging that vehicle collision needs to obtain the distance model in both direction: one be along track direction it is longitudinal away from From model, one is perpendicular to the laterally security range model of track direction.What fore-and-aft distance model D=f (h) was mainly obtained is In scenic picture the vertical pixel height of target object and the object at a distance from the true environment medium shot point between pass System.
The width of roadway that laterally security Range Representation virtual driving vehicle needs to occupy in front sections of road, i.e. vehicle Clear could normally travel within this range.The range is determined by vehicle width and reserved safety allowance.As shown in figure 9, L in figureDFor real road width, LCFor actual vehicle width, LSFor safety allowance, therefore lateral practical safe range LR=LC+ 2·LS, actual range of the D between tested point and camera, w LRWhen distance is D, lateral pixel corresponding in scenic picture is wide Degree.As shown in Figure 9, pixel wide w is determined at a distance from camera by target developed width and target in picture, therefore is set lateral Safe range model is w=G (LR,D).Due to vehicle width LCWith safety allowance LSFor fixed value, LRFor constant, thus it is lateral Safe range model can be converted into w=g (D).
First analyze D=f (h).If dependent variable is D, if there is relational expression:
D=b0+b1h1+b2h2+…+bmhm+ε (12)
Wherein, ε is the stochastic variable of zero-mean, h1,h2,…,hmFor controllable variable, b0,b1,…,bmFor unknown ginseng Number, then deserving to be called formula (12) is multiple linear regression model (m > 1).It is assumed that h1,h2,…,hm, D, carry out n times random experiment, obtain Observed value is hi1,hi2,…,him,Di, i=1,2 ..., n then have Di=b0+b1hi1+b2hi2+…+bnhini, often assume that ε1, ε2,…,εnObey independent same distribution N (0, σ2).Claim
For m member equation of linear regression,Referred to as sample point (h1,h2,…,hm) at regressand value, wherein It is b respectively0,b1,b2,…,bmEstimation.
Finally, test to the regression equation being built such that, i.e. (h1,h2,…,hm) whether have an impact to D, and still Linear, this just needs null hypothesis H0:b1=b2=...=bm=0.For this purpose, the amount of taking statistics:
Wherein, SSRFor regression sum of square, SSReFor residual sum of squares (RSS).It is demonstrated in mathematical statistics, if H0It sets up, then F It obeys the F that freedom degree is (m, n-m-1) and is distributed F (m, n-m-1).Given significance η, by p (F > Fη)=η, tabling look-up can obtain Fη.As F > FηWhen, refuse H0, i.e., at significance η, h1,h2,…,hmSignificant to the linear effect of D, regression equation is intentional Justice;Otherwise regression equation is meaningless.
Observation data needed for regression modeling are from practical bracketing, all parameters of calibration experiment in the present embodiment All domain car is thought as standard according to the driver of height 1.7m and the 9th generation of Dongfeng Honda.Through measuring, driver is in operator seat tune After whole good steering position, vertical height is 1.2m, vehicle width 1.8m to eyes from the ground.According to virtual driving system collision judgment Actual requirement carries out calibration measurement for the distance between traveling front 0m to 50m.It measures from 2m, is measured every 1m Once, it until at 50m, measures 49 times altogether.Simultaneously, it is contemplated that the safety allowance of vehicle width refers to automobile in experiment Width increases 20cm, every time in the straight-bar of the transversely placed and fixed length 2m in measurement point position, to record transverse width.Record Resulting observation data are as shown in table 1.
1 calibration experiment data record of table
Meanwhile for the ease of analysis, the mapping curve figure observed between data in observation data is depicted, such as Figure 10 and 11 It is shown.
It can be obtained by Figure 10 and 11, be in smooth non-linear relation between D and h, D and w, it can be using nonlinear regression to the mould Type is fitted.
By analyzing the mapping relations of D=f (h) above, can be seen that by nominal data curve graph, D and h are in three between the two Secondary curved line relation, therefore choose following regression model and carry out nonlinear regression modeling:
D=b0+b1h+b2h2+b3h3+ε (15)
Wherein, h is as plane vertical pixel height, and D is actual range, and ε is the stochastic variable of zero-mean, (b0,b1,b2) The unknown parameter acquired is needed for regression modeling.
For the ease of carrying out modeling analysis, if h1=h, h2=h2, h3=h3.By h1、h2、h3Substituting into equation (15) can be by it It is shown to be converted into two variable linear regression such as (16):
D=b0+b1h+b2h2+b3h3+ε (16)
Its corresponding binary linear regression equation are as follows:
Wherein,It is parameter (b0,b1,b2,b3) estimated value,For point (h1,h2,h3) at regressand value.
Using least square method to parameter (b0,b1,b2,b3) estimated, it can acquire as plane vertical height h is to reality The regression equation of fore-and-aft distance D are as follows:
D=2.908 × 10-7·h3-3.069×10-4·h2+0.08266·h+0.252 (18)
Finally, passing through null hypothesis H0:b1=b2=b3Whether=0 examine (18) significant, easily calculates:
Total sum of squares
Residual sum of squares (RSS)
Regression sum of square
SSR=SST-SSRe=6207
By formula (14) amount of taking statistics F ≈ 75.145, significance η=0.01 is given, by p (F > Fη)=0.01, looks into F Known to (m, n-m-1)=F (3,45) distribution table: Fη(3,45)=4.31.Due to: F=75.145 > 4.31, therefore gained recurrence side Formula (18) is significant.
Similarly, for substituting into its data and being calculated as the relationship between plane lateral Safe width w and actual range D, It obtains:
W=-0.03093D3+2.916·D2-85.9·D+832 (19)
By can be calculated 177.6 > 4.31 of F ≈, so, regression equation (19) is significant.
The fore-and-aft distance D used in the present embodiment is demonstrated by above-mentioned analysis and as the lateral Safe width w of plane It can be used to do target collision detection in the virtual driving scene modeled based on real scene.
Finally, it is stated that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although referring to compared with Good embodiment describes the invention in detail, those skilled in the art should understand that, it can be to skill of the invention Art scheme is modified or replaced equivalently, and without departing from the objective and range of technical solution of the present invention, should all be covered at this In the scope of the claims of invention.

Claims (5)

1. the virtual driving target collision detection method based on real scene modeling, which comprises the following steps:
1) virtual driving scene of vehicle front is shot by the way that the virtual camera of virtual driving vehicle drive position is arranged in, and passed through Target detection obtains coordinate [x of the collision target on virtual camera imaging plane1,y1,x2,y2], (x in coordinate1,y1) indicate to touch Hit the top left co-ordinate of target rectangle frame, (x2,y2) indicate collision target rectangle frame bottom right angular coordinate;The virtual driving Scene is made of sphere model and the real scene video being attached on sphere model inner wall;
2) according to the plane coordinates [x of collision target1,y1,x2,y2] obtain collision target picture plane vertical height h, h=y2
3) according to as plane vertical height h is to the regression equation of practical fore-and-aft distance D, operation vehicle and collision target is calculated Fore-and-aft distance D;
D=2.908 × 10-7·h3-3.069×10-4·h2+0.08266·h+0.252 (1)
4) according to as the regression equation between plane lateral Safe width w and actual range D, the picture for obtaining virtual driving vehicle is flat Surface side is to Safe width w;
W=-0.03093D3+2.916·D2-85.9·D+832 (2);
5) collision judgment:
First judge whether virtual driving vehicle will occur longitudinal impact with target, if fore-and-aft distance D is less than the safety arrestment of the vehicle Apart from when, then judgement longitudinal impact may occur, when fore-and-aft distance D be greater than the vehicle safe stopping distance when, then judge not Longitudinal impact can occur
Then under the premise of with target longitudinal impact may occur for virtual driving vehicle, continue according to target rectangle frame or so The abscissa x on both sides1And x2To determine whether side collision will occur, ifAndThen judge that virtual driving vehicle will not occur side collision with target and otherwise judge virtual driving With target side collision can occur for vehicle;Aforementioned middle wtFor the pixel overall width of picture captured by virtual camera.
2. the virtual driving target collision detection method according to claim 1 based on real scene modeling, feature It is: in the step 1), detects collision target and obtain its coordinate [x on virtual camera imaging plane1,y1,x2,y2] The step of it is as follows:
A: to virtual driving scene image as original image before the vehicle of extraction virtual camera shooting;
B: it is used as input picture to be passed to feature extraction network after carrying out scaling to original image, is exported by feature extraction network To characteristic pattern;
C: being passed to RPN network for characteristic pattern, and RPN network is by point corresponding with each pixel on characteristic pattern on input picture As anchor point, using anchor point as the center of anchor frame, each anchor point position generates several anchor frames over an input image;
D: will with anchor frame information characteristic image input convolutional layer, by convolutional layer output image input Softmax classifier into Two classified calculatings of row target/background tentatively judge that anchor frame content belongs to target or background, obtain several targets;Simultaneously Characteristic image is inputted into another convolutional layer, convolutional layer output image is calculated by frame regression model, obtains amendment anchor frame Translational movement and change of scale;
E: frame modification is carried out to all anchor frames according to the translational movement of obtained amendment anchor frame and change of scale;
F: it according to the target classification score in step d in Softmax classifier calculated result, is arranged in the way of from high to low by score Sequence, by anchor before the anchor frame in the high target of score comes, by anchor after the anchor frame in the low target of score comes, so by institute Some anchor frames are arranged successively, and extract several forward anchor frames;
G: the part for exceeding image boundary in extracted each anchor frame is removed;
H: non-maxima suppression processing is carried out to extracted anchor frame, removes the repetition anchor frame of each target;
I: sorting remaining anchor frame from high to low again according to target classification score in Softmax classifier calculated result, and extraction is leaned on Preceding several anchor frames are exported as candidate target, candidate target=[x1, y1, x2, y2], and (x1, y1) is anchor frame top left co-ordinate, (x2, y2) is anchor frame bottom right angular coordinate;
J: the grid for being 7*7 by the corresponding characteristic pattern region division of each candidate target, and each grid is carried out Max pooling processing, Output Size are the candidate target characteristic pattern of 7*7;
K: particularly belonging to pedestrian, vehicle or background by full articulamentum and Softmax classifier calculated candidate target characteristic pattern, Export all kinds of probability vectors;Return the position offset for obtaining each candidate target characteristic pattern using frame again simultaneously, then Secondary amendment target anchor frame obtains the final coordinate [x of collision target1,y1,x2,y2]。
3. the virtual driving target collision detection method according to claim 2 based on real scene modeling, feature Be: the feature extraction network in the step b is SRN network, and expression formula is as follows:
yn=y0+y1+y2+...+yn-1+fn(yn-1) (3)
F in formulan() indicates with certain BN layers tactic, Relu activation primitive and convolutional layer, convolutional layer, that is, residual unit, y0For the input of network, ynFor the output of network;
The SRN network structure includes 1 initial convolutional layer C1 and 3 sparse residual unit set C2, C3 and C4, wherein often A sparse residual unit set is stacked by m sparse residual units;The sparse residual unit is by multiple with certain sequence BN layer, Relu activation primitive and the convolutional layer of arrangement form, and number is determined by length factor l;The length factor l can be used to Control initial characteristics y0Influence to network output, each sparse residual unit have identical length factor.
4. the virtual driving target collision detection method according to claim 2 based on real scene modeling, feature Be: in the step c, using anchor point as the center of anchor frame, it is respectively 128,256,512 that frame side length is defined at each anchor point And frame length-width ratio is respectively total 9 anchor frames of 1:2,1:1,2:1.
5. the virtual driving target collision detection method according to claim 2 based on real scene modeling, feature Be: the processing of non-maxima suppression in the step h the following steps are included:
1. selecting multiple anchor frames belonging to a certain target;
2. according to Softmax classifier calculated in step d as a result, content in anchor frame is first belonged to the probability of target less than 0.5 Anchor frame removes, then content in anchor frame is belonged to the anchor frame of the maximum probability of target and remaining anchor frame carries out degree of overlapping one by one and sentences It is disconnected, if threshold value is higher than setting value, illustrates that two anchor frames belong to same target, retain maximum probability anchor frame, remove probability it is lesser that A anchor frame;Otherwise, illustrate that two anchor frame category different targets, two anchor frames retain simultaneously;
3. select multiple anchor frames belonging to next target, continue step 1.-treatment process 2., until completing target complete institute Belong to the screening of anchor frame.
CN201910463552.9A 2019-05-30 2019-05-30 Virtual driving target collision detection method based on real scene modeling Active CN110188689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910463552.9A CN110188689B (en) 2019-05-30 2019-05-30 Virtual driving target collision detection method based on real scene modeling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910463552.9A CN110188689B (en) 2019-05-30 2019-05-30 Virtual driving target collision detection method based on real scene modeling

Publications (2)

Publication Number Publication Date
CN110188689A true CN110188689A (en) 2019-08-30
CN110188689B CN110188689B (en) 2022-11-29

Family

ID=67718928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910463552.9A Active CN110188689B (en) 2019-05-30 2019-05-30 Virtual driving target collision detection method based on real scene modeling

Country Status (1)

Country Link
CN (1) CN110188689B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111123948A (en) * 2019-12-31 2020-05-08 北京新能源汽车技术创新中心有限公司 Vehicle multidimensional perception fusion control method and system and automobile
CN111833598A (en) * 2020-05-14 2020-10-27 山东科技大学 Automatic traffic incident monitoring method and system for unmanned aerial vehicle on highway
CN112183461A (en) * 2020-10-21 2021-01-05 广州市晶华精密光学股份有限公司 Vehicle interior monitoring method, device, equipment and storage medium
CN113552950A (en) * 2021-08-06 2021-10-26 上海炫伍科技股份有限公司 Virtual and real interaction method for virtual cockpit

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191568A1 (en) * 2002-04-09 2003-10-09 Breed David S. Method and system for controlling a vehicle
JP2004164335A (en) * 2002-11-13 2004-06-10 Mazda Motor Corp Planning support program, method, system and storage medium
US20060040239A1 (en) * 2004-08-02 2006-02-23 J. J. Keller & Associates, Inc. Driving simulator having articial intelligence profiles, replay, hazards, and other features
US20150104757A1 (en) * 2013-10-15 2015-04-16 Mbfarr, Llc Driving assessment and training method and apparatus
CN105015411A (en) * 2015-07-03 2015-11-04 河南工业技术研究院 Automobile microwave radar anti-collision early-warning method and system based on video fusion
JP2016085326A (en) * 2014-10-24 2016-05-19 三菱プレシジョン株式会社 Vehicle driving simulation device
CN105898337A (en) * 2015-11-18 2016-08-24 乐视网信息技术(北京)股份有限公司 Panoramic video display method and device
CN105966396A (en) * 2016-05-13 2016-09-28 江苏大学 Vehicle collision avoidance control method based on driver collision avoidance behavior
JP2017009717A (en) * 2015-06-19 2017-01-12 国立大学法人秋田大学 Bicycle driving simulator
CN107888894A (en) * 2017-10-12 2018-04-06 浙江零跑科技有限公司 A kind of solid is vehicle-mounted to look around method, system and vehicle-mounted control device
US20180246515A1 (en) * 2017-02-28 2018-08-30 Mitsubishi Electric Research Laboratories, Inc. Vehicle Automated Parking System and Method
US20180286268A1 (en) * 2017-03-28 2018-10-04 Wichita State University Virtual reality driver training and assessment system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191568A1 (en) * 2002-04-09 2003-10-09 Breed David S. Method and system for controlling a vehicle
JP2004164335A (en) * 2002-11-13 2004-06-10 Mazda Motor Corp Planning support program, method, system and storage medium
US20060040239A1 (en) * 2004-08-02 2006-02-23 J. J. Keller & Associates, Inc. Driving simulator having articial intelligence profiles, replay, hazards, and other features
US20150104757A1 (en) * 2013-10-15 2015-04-16 Mbfarr, Llc Driving assessment and training method and apparatus
JP2016085326A (en) * 2014-10-24 2016-05-19 三菱プレシジョン株式会社 Vehicle driving simulation device
JP2017009717A (en) * 2015-06-19 2017-01-12 国立大学法人秋田大学 Bicycle driving simulator
CN105015411A (en) * 2015-07-03 2015-11-04 河南工业技术研究院 Automobile microwave radar anti-collision early-warning method and system based on video fusion
CN105898337A (en) * 2015-11-18 2016-08-24 乐视网信息技术(北京)股份有限公司 Panoramic video display method and device
CN105966396A (en) * 2016-05-13 2016-09-28 江苏大学 Vehicle collision avoidance control method based on driver collision avoidance behavior
US20180246515A1 (en) * 2017-02-28 2018-08-30 Mitsubishi Electric Research Laboratories, Inc. Vehicle Automated Parking System and Method
US20180286268A1 (en) * 2017-03-28 2018-10-04 Wichita State University Virtual reality driver training and assessment system
CN107888894A (en) * 2017-10-12 2018-04-06 浙江零跑科技有限公司 A kind of solid is vehicle-mounted to look around method, system and vehicle-mounted control device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘旭: "虚拟驾驶半物理仿真平台研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》 *
谢振清: "基于Unity3D的虚拟装配技术研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111123948A (en) * 2019-12-31 2020-05-08 北京新能源汽车技术创新中心有限公司 Vehicle multidimensional perception fusion control method and system and automobile
CN111123948B (en) * 2019-12-31 2023-04-28 北京国家新能源汽车技术创新中心有限公司 Vehicle multidimensional sensing fusion control method and system and automobile
CN111833598A (en) * 2020-05-14 2020-10-27 山东科技大学 Automatic traffic incident monitoring method and system for unmanned aerial vehicle on highway
CN112183461A (en) * 2020-10-21 2021-01-05 广州市晶华精密光学股份有限公司 Vehicle interior monitoring method, device, equipment and storage medium
CN113552950A (en) * 2021-08-06 2021-10-26 上海炫伍科技股份有限公司 Virtual and real interaction method for virtual cockpit

Also Published As

Publication number Publication date
CN110188689B (en) 2022-11-29

Similar Documents

Publication Publication Date Title
CN110188689A (en) Virtual driving target collision detection method based on real scene modeling
CN108596101B (en) Remote sensing image multi-target detection method based on convolutional neural network
CN104183127B (en) Traffic surveillance video detection method and device
CN110032949A (en) A kind of target detection and localization method based on lightweight convolutional neural networks
CN111091105A (en) Remote sensing image target detection method based on new frame regression loss function
CN109284704A (en) Complex background SAR vehicle target detection method based on CNN
CN105354568A (en) Convolutional neural network based vehicle logo identification method
CN110533695A (en) A kind of trajectory predictions device and method based on DS evidence theory
CN106780546B (en) The personal identification method of motion blur encoded point based on convolutional neural networks
CN109299644A (en) A kind of vehicle target detection method based on the full convolutional network in region
CN106023257A (en) Target tracking method based on rotor UAV platform
CN103984936A (en) Multi-sensor multi-feature fusion recognition method for three-dimensional dynamic target recognition
CN105184857A (en) Scale factor determination method in monocular vision reconstruction based on dot structured optical ranging
CN106022266A (en) Target tracking method and target tracking apparatus
CN102289822A (en) Method for tracking moving target collaboratively by multiple cameras
CN103942786B (en) The self adaptation block objects detection method of unmanned plane visible ray and infrared image
Yan et al. A novel data augmentation method for detection of specific aircraft in remote sensing RGB images
CN108416798A (en) A kind of vehicle distances method of estimation based on light stream
Saputra et al. Sim-to-real learning for casualty detection from ground projected point cloud data
CN110517285A (en) The minimum target following of large scene based on estimation ME-CNN network
CN111353481A (en) Road obstacle identification method based on laser point cloud and video image
CN115761684A (en) AGV target recognition and attitude angle resolving method and system based on machine vision
Jiangzhou et al. Research on real-time object detection algorithm in traffic monitoring scene
CN109325963A (en) A kind of bus passenger three-dimensional track classification method based on SVM
CN113762195A (en) Point cloud semantic segmentation and understanding method based on road side RSU

Legal Events

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