CN108182376A - A kind of vehicle window localization method based on vehicle window Corner Detection - Google Patents

A kind of vehicle window localization method based on vehicle window Corner Detection Download PDF

Info

Publication number
CN108182376A
CN108182376A CN201711133210.8A CN201711133210A CN108182376A CN 108182376 A CN108182376 A CN 108182376A CN 201711133210 A CN201711133210 A CN 201711133210A CN 108182376 A CN108182376 A CN 108182376A
Authority
CN
China
Prior art keywords
width
vehicle window
platerect
height
left corner
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
CN201711133210.8A
Other languages
Chinese (zh)
Other versions
CN108182376B (en
Inventor
高飞
汪敏倩
刘浩然
葛粟
葛一粟
卢书芳
陆佳炜
肖刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201711133210.8A priority Critical patent/CN108182376B/en
Publication of CN108182376A publication Critical patent/CN108182376A/en
Application granted granted Critical
Publication of CN108182376B publication Critical patent/CN108182376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/59Context or environment of the image inside of a vehicle, e.g. relating to seat occupancy, driver state or inner lighting conditions
    • 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/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Abstract

A kind of vehicle window localization method based on vehicle window Corner Detection of the present invention, it is proposed that a kind of that vehicle window following two angle point, the method that window edge positioning is then carried out according to corner location are detected by SVM.Positioning action is carried out to vehicle window by using the method for the present invention, it must can effectively navigate to window edge, and there are inclined situations to position for vehicle window lower edges.

Description

A kind of vehicle window localization method based on vehicle window Corner Detection
Technical field
It is specifically a kind of that vehicle window following two is detected by SVM the present invention relates to computer vision and intelligent transportation field Angle point, the method that window edge positioning is then carried out according to corner location.
Background technology
With the continuous development of intelligent transportation field, at present for driving behavior in traffic safety monitoring system Detection and analysis be increasingly taken seriously.And the analysis that carry out driving behavior just must first navigate to position of driver, The accurate positionin of vehicle window then can substantially determine the position of driver, therefore vehicle window positioning is closed very much in driving behavior detection One step of key.
It is current to propose different vehicle window localization methods there are many scholar, wherein the technical solution being closer to the present invention For:Document (Pan's generation Ji intelligent transportation peccancy detection algorithm researches and software systems realize [D] Harbin Institute of Technology, 2016.) horizontal edge above and below vehicle window is carried out using Canny edge detections and the method for linear structure element opening operation to position, it should Method does not account for vehicle window when carrying out opening operation using linear structure element there are inclined situation, once vehicle window is upper and lower Edge somewhat tilts, and the horizontal edge up and down of opening operation vehicle rear window is carried out by linear structure element and can be also removed;Text It offers (marquis hall good fortune vehicle window detection technique research [D] Beijing Jiaotong University, 2012.) to propose first to position vehicle, Ran Hougen Window locations are tentatively obtained according to the ratio of headstock and vehicle window, Canny edge detections are carried out in vehicle window approximate region, then using mould Plate matches to carry out horizontal linear filtering, and the detection of vehicle window up-and-down boundary is then carried out using Hough transform, and this method uses Template matching method come to carry out horizontal linear filtering be also not account for vehicle window lower edges there are inclined situation, tilt Straight line by can equally be filtered out after template matches;Document (Yao Dongming, Han Anhua, the vehicle body that is waited to be detected based on vehicle window Color identification method research [J] information communications, 2017 (2):Canny edge detections 87-88.) is equally used to combine horizontal straight Line template filters and the method for Hough straight-line detection vehicle window horizontal stripes, there is also detection when the inclination of vehicle window lower edges not Situation about arriving, and window locations are not carried out with coarse localization and begins to horizontal stripes above and below detection vehicle window, this is likely to It detects the horizontal linear of vehicle roof, causes the situation of flase drop.
In conclusion there is following deficiencies for current vehicle window localization method:(1) exist for vehicle window lower edges and tilt Situation can't detect;(2) it easily detects the horizontal linear of vehicle roof, causes window edge flase drop.
Invention content
For the above problem present in existing vehicle window localization method, the present invention proposes one kind and detects vehicle by SVM Window following two angle point, the method that window edge positioning is then carried out according to corner location.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that include the following steps:
Step 1:License Plate is carried out to the coloured image image containing vehicle, the car plate position navigated to is denoted as square Shape region plateRect;
Step 2:According to car plate position plateRect define vehicle window lower left corner angle point detection zone detectRoiL and The detection zone detectRoiR of vehicle window lower right corner angle point;
Step 3:The candidate region of all vehicle window lower left corners angle point is detected using SVM in detectRoiL, is collected Close leftCornersList={ RLi| i=1,2 ..., n }, RLiRepresent i-th of vehicle window lower left corner angle point candidate region, n is represented The quantity of vehicle window lower left corner angle point candidate region;In detectRoiR all vehicle window lower right corner angle point is detected using SVM Candidate region obtains set rightCornersList={ RRj| j=1,2 ..., m }, RRjRepresent j-th of vehicle window lower right corner angle Point candidate region, m represent the quantity of vehicle window lower right corner angle point candidate region;
Step 4:It is determined respectively from leftCornersList and rightCornersList using scan matching method Final vehicle window lower left corner angle point region and vehicle window lower right corner angle point region, and be denoted as respectively winCornerRectL and winCornerRectR;
Step 5:Vehicle window lower edge detection zone is defined according to the position of winCornerRectL and winCornerRectR, It is denoted as winDownRect;
Step 6:WinDownRect regions part is intercepted in image image, obtains vehicle window lower edge detection zone figure Picture, and the obtained vehicle window lower edge detection zone image of interception is carried out image gray processing, the detection of Sobel horizontal edges and The binary image finally obtained is denoted as winDownImg by OTSU binarization operations;
Step 7:Floor projection is carried out to winDownImg, finds the vertical seat of floor projection value maximum in winDownImg Scale value is denoted as winDownLine;
Step 8:Vehicle window edge detection region is defined according to the position of winDownRect, is denoted as winUpRect;
Step 9:WinUpRect regions part is intercepted in image image, obtains vehicle window edge detection area image, And image gray processing, the detection of Sobel horizontal edges and OTSU are carried out to the vehicle window edge detection area image that interception obtains The binary image finally obtained is denoted as winUpImg by binarization operation;
Step 10:Floor projection, the bottom-up scanning in winUpImg, until scanning to a certain are carried out to winUpImg The floor projection value of position meets vehicle window top edge condition and then stops scanning, and the ordinate value of the position in winUpImg is denoted as WinUpLine if not finding the floor projection value for meeting vehicle window top edge condition, enables winUpLine= WinUpImg.heiht/2, wherein winUpImg.heiht are the height of winUpImg;
Step 11:According to the position and winDownLine of the position of winCornerRectL and winCornerRectR Position of the vehicle window in image image is calculated with winUpLine, is denoted as rectangle winRect.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that the vehicle window lower left corner in step 2 The detection zone detectRoiL of angle point and the detection zone detectRoiR of vehicle window lower right corner angle point are defined as follows:
2.1):DetectRoiL.x=plateRect.x-plateRect.width × 3;
2.2):DetectRoiL.y=plateRect.y-plateRect.width × 3.5;
2.3):DetectRoiL.width=plateRect.x+plateRect.width/2-detectRoi L.x;
2.4):DetectRoiL.height=plateRect.y-plateRect.width-detectRoiL .y;
2.5):DetectRoiR.x=plateRect.x+plateRect.width/2;
2.6):DetectRoiR.y=plateRect.y-plateRect.width × 3.5;
2.7):DetectRoiR.width=plateRect.width × 3.5;
2.8):DetectRoiR.height=plateRect.y-plateRect.width-detectRoiR .y.
Wherein plateRect.x is the upper left corner abscissa of plateRect, and plateRect.y is the upper left of plateRect Angle ordinate, plateRect.width are the width of plateRect, and the upper left corner that detectRoiL.x is detectRoiL is horizontal Coordinate, detectRoiL.y are the upper left corner ordinate of detectRoiL, and detectRoiL.width is the width of detectRoiL Degree, detectRoiL.height are the height of detectRoiL, and detectRoiR.x is the horizontal seat in the upper left corner of detectRoiR Mark, detectRoiR.y are the upper left corner ordinate of detectRoiR, and detectRoiR.width is the width of detectRoiR, DetectRoiR.height is the height of detectRoiR.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that in step 4 from Determine that final vehicle window lower left corner angle point region and vehicle window are right in leftCornersList and rightCornersList respectively The step of scan matching method in inferior horn angle point region, is as follows:
4.1):For each element RR in rightCornersListj, one is found from leftCornersList A element RLiSo that (RRj.y+RRj.height/2)–(RLi.y+RLi.height/2 absolute value) is minimum, and this is absolutely Value is less than plateRect.width/2, if finding the RL of the condition of satisfactioni, then by RRjAnd RLiIt is stored as a pair of of candidate angular Get off;
4.2):For each element RL in leftCornersListi, one is found from rightCornersList A element RRjSo that (RLi.y+RLi.height/2)–(RRj.y+RRj.height/2 absolute value) is minimum, and this is absolutely Value is less than plateRect.width/2, if finding the RR of the condition of satisfactionj, then by RRjAnd RLiIt is stored as a pair of of candidate angular Get off;
4.3):For the candidate angular pair stored in step 4.1) and step 4.2), only retain those in step 4.1) candidate angular pair stored and in step 4.2) is repeated;
4.4):For the candidate angular pair that step 4.3) remains, only choose one pair of which and cause (RRj.x+ RRj.width/2)–(RLi.x+RLi.width/2 maximum absolute value) then enables winCornerRectL be equal to what is chosen RLi, winCornerRectR is equal to the RR chosenj
Wherein RLi.x it is RLiUpper left corner abscissa, RLi.y it is RLiUpper left corner ordinate, RLi.width it is RLi's Width, RLi.height it is RLiHeight, RRj.x it is RRjUpper left corner abscissa, RRj.y it is RRjUpper left corner ordinate, RRj.width it is RRjWidth, RRj.height it is RRjHeight.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that vehicle window lower edge in step 5 Detection zone winDownRect is defined as follows:
5.1):WinDownRect.x=winCornerRectL.x;
5.2):WinDownRect.y=Top-(Buttom-Top)/2;
5.3):WinDownRect.width=winCornerRectR.x+winCornerRectR.width- winCornerRectL.x;
5.4):WinDownRect.height=(Buttom-Top) × 2;
Wherein winDownRect.x is the upper left corner abscissa of winDownRect, and winDownRect.y is The upper left corner ordinate of winDownRect, winDownRect.width are the width of winDownRect, Height of the winDownRect.height for winDownRect, Top=min (winCornerRectL.y, WinCornerRectR.y), Buttom=max (winCornerRectL.buttom, winCornerRectR.buttom), WinCornerRectL.x is the upper left corner abscissa of winCornerRectL, and winCornerRectL.y is The upper left corner ordinate of winCornerRectL, the lower left corner that winCornerRectL.buttom is winCornerRectL are indulged Coordinate, winCornerRectR.x are the upper left corner abscissa of winCornerRectR, and winCornerRectR.y is The upper left corner ordinate of winCornerRectR, the lower left corner that winCornerRectR.buttom is winCornerRectR are indulged Coordinate, winCornerRectR.width are the width of winCornerRectR, and min expressions take smaller, max from two numbers Expression takes the greater from two numbers.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that vehicle window top edge in step 8 Detection zone winUpRect is defined as follows:
8.1):WinUpRect.x=winDownRect.x;
8.2):WinUpRect.y=winDownRect.y-winDownRect.height;
8.3):WinUpRect.width=winDownRect.width;
8.4):WinUpRect.height=winDownRect.height;
Wherein winUpRect.x is the upper left corner abscissa of winUpRect, and winUpRect.y is the upper left of winUpRect Angle ordinate, winUpRect.width are the width of winUpRect, and winUpRect.height is the height of winUpRect.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that a certain position in step 10 The condition that floor projection value meets vehicle window top edge is as follows:
10.1):project[h]>projectThresh;
10.2):abs((projectLeft[h]-projectRight[h])/(winUpImg.width/2))<0.15.
Wherein h is the ordinate of image winUpImg, and project [h] represents that ordinate is at h in image winUpImg The sum of the floor projection value of floor projection value and ordinate at h-1, h-2, h-3, h-4, h-5, projectThresh represent pre- The projection value threshold value first set, projectLeft [h] represent that ordinate is at h in half rim portion of a left side of image winUpImg The sum of the floor projection value of floor projection value and ordinate at h-1, h-2, h-3, h-4, h-5, projectRight [h] are represented Floor projection value and ordinate of the ordinate at h are in h-1, h-2, h-3, h-4, h- in half rim portion of the right side of image winUpImg The sum of floor projection value at 5, winUpImg.width represent the width of image winUpImg, and abs expressions take absolute value.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that vehicle window is in image in step 11 The calculating of position winRect in image is as follows:
11.1):WinRect.x=winCornerRectL.x+winCornerRectL.width/2;
11.2):WinRect.y=winUpLine+winUpRect.y;
11.3):WinRect.width=winCornerRectR.x+winCornerRectR.width/2- winRect.x;
11.4):WinRect.height=winDownLine+winDownRect.y-winRect.y;
Wherein winRect.x is the upper left corner abscissa of winRect, and seat is indulged in the upper left corner that winRect.y is winRect Mark, winRect.width are the width of winRect, and winRect.height is the height of winRect, WinCornerRectL.width is the width of winCornerRectL.
Positioning action is carried out to vehicle window by using the method for the present invention, it must can effectively navigate to window edge, and And there are inclined situations to position for vehicle window lower edges.
Description of the drawings
Fig. 1 is the image image chosen in the embodiment of the present invention;
Fig. 2 be the embodiment of the present invention in plateRect, detectRoiL, detectRoiR, winCornerRectL and The position view of winCornerRectR;
Fig. 3 is the position view of winDownRect, winUpRect in the embodiment of the present invention;
Fig. 4 is the image winDownImg in the embodiment of the present invention;
Fig. 5 is the image winUpImg in the embodiment of the present invention;
Fig. 6 is vehicle window positioning result figure in the embodiment of the present invention.
Specific embodiment
It is specifically real that the vehicle window localization method based on vehicle window Corner Detection of the present invention is elaborated with reference to embodiment Apply mode.It should be appreciated that specific embodiment described herein is only used for explaining the present invention, it is not intended to limit the present invention.
A kind of vehicle window localization method based on vehicle window Corner Detection of the present invention, includes the following steps:
Step 1:License Plate is carried out to the coloured image image containing vehicle, the car plate position navigated to is denoted as square Shape region plateRect, the image image chosen in the present embodiment is as shown in Figure 1, the plateRect that License Plate obtains Position is as shown in Figure 2;
Step 2:According to car plate position plateRect define vehicle window lower left corner angle point detection zone detectRoiL and The detection zone detectRoiR of vehicle window lower right corner angle point, defines in the present embodiment according to plateRect positions DetectRoiL and detectRoiR regions are as shown in Figure 2;
Step 3:The candidate region of all vehicle window lower left corners angle point is detected using SVM in detectRoiL, is collected Close leftCornersList={ RLi| i=1,2 ..., n }, RLiRepresent i-th of vehicle window lower left corner angle point candidate region, n is represented The quantity of vehicle window lower left corner angle point candidate region;In detectRoiR all vehicle window lower right corner angle point is detected using SVM Candidate region obtains set rightCornersList={ RRj| j=1,2 ..., m }, RRjRepresent j-th of vehicle window lower right corner angle Point candidate region, m represent the quantity of vehicle window lower right corner angle point candidate region;
Step 4:It is determined respectively from leftCornersList and rightCornersList using scan matching method Final vehicle window lower left corner angle point region and vehicle window lower right corner angle point region, and be denoted as respectively winCornerRectL and WinCornerRectR, winCornerRectL the and winCornerRectR positions chosen in the present embodiment are as shown in Figure 2;
Step 5:Vehicle window lower edge detection zone is defined according to the position of winCornerRectL and winCornerRectR, WinDownRect is denoted as, the position of winDownRect is as shown in Figure 3 in the present embodiment;
Step 6:WinDownRect regions part is intercepted in image image, obtains vehicle window lower edge detection zone figure Picture, and the obtained vehicle window lower edge detection zone image of interception is carried out image gray processing, the detection of Sobel horizontal edges and The binary image finally obtained is denoted as winDownImg, obtained in the present embodiment by OTSU binarization operations WinDownImg images are as shown in Figure 4;
Step 7:Floor projection is carried out to winDownImg, finds the vertical seat of floor projection value maximum in winDownImg Scale value is denoted as winDownLine, and the winDownLine obtained in the present embodiment is equal to 129;
Step 8:Vehicle window edge detection region is defined according to the position of winDownRect, is denoted as winUpRect, at this The position of winUpRect is as shown in Figure 3 in embodiment;
Step 9:WinUpRect regions part is intercepted in image image, obtains vehicle window edge detection area image, And image gray processing, the detection of Sobel horizontal edges and OTSU are carried out to the vehicle window edge detection area image that interception obtains The binary image finally obtained is denoted as winUpImg by binarization operation, the winUpImg images obtained in the present embodiment As shown in Figure 5;
Step 10:Floor projection, the bottom-up scanning in winUpImg, until scanning to a certain are carried out to winUpImg The floor projection value of position meets vehicle window top edge condition and then stops scanning, and the ordinate value of the position in winUpImg is denoted as WinUpLine if not finding the floor projection value for meeting vehicle window top edge condition, enables winUpLine= WinUpImg.heiht/2, wherein winUpImg.heiht are the height of winUpImg, are obtained in the present embodiment The value of winUpLine is equal to 173;
Step 11:According to the position and winDownLine of the position of winCornerRectL and winCornerRectR Position of the vehicle window in image image is calculated with winUpLine, is denoted as rectangle winRect, calculates in the present embodiment The winRect regions arrived are as shown in Figure 6.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that the vehicle window lower left corner in step 2 The detection zone detectRoiL of angle point and the detection zone detectRoiR of vehicle window lower right corner angle point are defined as follows:
2.1):DetectRoiL.x=plateRect.x-plateRect.width × 3;
2.2):DetectRoiL.y=plateRect.y-plateRect.width × 3.5;
2.3):DetectRoiL.width=plateRect.x+plateRect.width/2-detectRoi L.x;
2.4):DetectRoiL.height=plateRect.y-plateRect.width-detectRoiL .y;
2.5):DetectRoiR.x=plateRect.x+plateRect.width/2;
2.6):DetectRoiR.y=plateRect.y-plateRect.width × 3.5;
2.7):DetectRoiR.width=plateRect.width × 3.5;
2.8):DetectRoiR.height=plateRect.y-plateRect.width-detectRoiR .y.
Wherein plateRect.x is the upper left corner abscissa of plateRect, and plateRect.y is the upper left of plateRect Angle ordinate, plateRect.width are the width of plateRect, and the upper left corner that detectRoiL.x is detectRoiL is horizontal Coordinate, detectRoiL.y are the upper left corner ordinate of detectRoiL, and detectRoiL.width is the width of detectRoiL Degree, detectRoiL.height are the height of detectRoiL, and detectRoiR.x is the horizontal seat in the upper left corner of detectRoiR Mark, detectRoiR.y are the upper left corner ordinate of detectRoiR, and detectRoiR.width is the width of detectRoiR, DetectRoiR.height is the height of detectRoiR.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that in step 4 from Determine that final vehicle window lower left corner angle point region and vehicle window are right in leftCornersList and rightCornersList respectively The step of scan matching method in inferior horn angle point region, is as follows:
4.1):For each element RR in rightCornersListj, one is found from leftCornersList A element RLiSo that (RRj.y+RRj.height/2)–(RLi.y+RLi.height/2 absolute value) is minimum, and this is absolutely Value is less than plateRect.width/2, if finding the RL of the condition of satisfactioni, then by RRjAnd RLiIt is stored as a pair of of candidate angular Get off;
4.2):For each element RL in leftCornersListi, one is found from rightCornersList A element RRjSo that (RLi.y+RLi.height/2)–(RRj.y+RRj.height/2 absolute value) is minimum, and this is absolutely Value is less than plateRect.width/2, if finding the RR of the condition of satisfactionj, then by RRjAnd RLiIt is stored as a pair of of candidate angular Get off;
4.3):For the candidate angular pair stored in step 4.1) and step 4.2), only retain those in step 4.1) candidate angular pair stored and in step 4.2) is repeated;
4.4):For the candidate angular pair that step 4.3) remains, only choose one pair of which and cause (RRj.x+ RRj.width/2)–(RLi.x+RLi.width/2 maximum absolute value) then enables winCornerRectL be equal to what is chosen RLi, winCornerRectR is equal to the RR chosenj
Wherein RLi.x it is RLiUpper left corner abscissa, RLi.y it is RLiUpper left corner ordinate, RLi.width it is RLi's Width, RLi.height it is RLiHeight, RRj.x it is RRjUpper left corner abscissa, RRj.y it is RRjUpper left corner ordinate, RRj.width it is RRjWidth, RRj.height it is RRjHeight.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that vehicle window lower edge in step 5 Detection zone winDownRect is defined as follows:
5.1):WinDownRect.x=winCornerRectL.x;
5.2):WinDownRect.y=Top-(Buttom-Top)/2;
5.3):WinDownRect.width=winCornerRectR.x+winCornerRectR.width- winCornerRectL.x;
5.4):WinDownRect.height=(Buttom-Top) × 2;
Wherein winDownRect.x is the upper left corner abscissa of winDownRect, and winDownRect.y is The upper left corner ordinate of winDownRect, winDownRect.width are the width of winDownRect, Height of the winDownRect.height for winDownRect, Top=min (winCornerRectL.y, WinCornerRectR.y), Buttom=max (winCornerRectL.buttom, winCornerRectR.buttom), WinCornerRectL.x is the upper left corner abscissa of winCornerRectL, and winCornerRectL.y is The upper left corner ordinate of winCornerRectL, the lower left corner that winCornerRectL.buttom is winCornerRectL are indulged Coordinate, winCornerRectR.x are the upper left corner abscissa of winCornerRectR, and winCornerRectR.y is The upper left corner ordinate of winCornerRectR, the lower left corner that winCornerRectR.buttom is winCornerRectR are indulged Coordinate, winCornerRectR.width are the width of winCornerRectR, and min expressions take smaller, max from two numbers Expression takes the greater from two numbers.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that vehicle window top edge in step 8 Detection zone winUpRect is defined as follows:
8.1):WinUpRect.x=winDownRect.x;
8.2):WinUpRect.y=winDownRect.y-winDownRect.height;
8.3):WinUpRect.width=winDownRect.width;
8.4):WinUpRect.height=winDownRect.height;
Wherein winUpRect.x is the upper left corner abscissa of winUpRect, and winUpRect.y is the upper left of winUpRect Angle ordinate, winUpRect.width are the width of winUpRect, and winUpRect.height is the height of winUpRect.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that a certain position in step 10 The condition that floor projection value meets vehicle window top edge is as follows:
10.1):project[h]>projectThresh;
10.2):abs((projectLeft[h]-projectRight[h])/(winUpImg.width/2))<0.15.
Wherein h is the ordinate of image winUpImg, and project [h] represents that ordinate is at h in image winUpImg The sum of the floor projection value of floor projection value and ordinate at h-1, h-2, h-3, h-4, h-5, projectThresh represent pre- The projection value threshold value first set is set as left one side of something that 750, projectLeft [h] represents image winUpImg in the present embodiment The sum of the floor projection value of floor projection value and ordinate of the ordinate at h at h-1, h-2, h-3, h-4, h-5 in part, Floor projection value and ordinate of the ordinate at h in half rim portion of the right side of projectRight [h] expression images winUpImg The sum of floor projection value at h-1, h-2, h-3, h-4, h-5, winUpImg.width represent the width of image winUpImg, Abs expressions take absolute value.
A kind of vehicle window localization method based on vehicle window Corner Detection, it is characterised in that vehicle window is in image in step 11 The calculating of position winRect in image is as follows:
11.1):WinRect.x=winCornerRectL.x+winCornerRectL.width/2;
11.2):WinRect.y=winUpLine+winUpRect.y;
11.3):WinRect.width=winCornerRectR.x+winCornerRectR.width/2- winRect.x;
11.4):WinRect.height=winDownLine+winDownRect.y-winRect.y;
Wherein winRect.x is the upper left corner abscissa of winRect, and seat is indulged in the upper left corner that winRect.y is winRect Mark, winRect.width are the width of winRect, and winRect.height is the height of winRect, WinCornerRectL.width is the width of winCornerRectL.
In the present embodiment, by handling above, it can be seen that the vehicle window region in Fig. 6 is accurately positioned out.

Claims (7)

1. a kind of vehicle window localization method based on vehicle window Corner Detection, includes the following steps:
Step 1:License Plate is carried out to the coloured image image containing vehicle, the car plate position navigated to is denoted as rectangle region Domain plateRect;
Step 2:The detection zone detectRoiL and vehicle window of vehicle window lower left corner angle point are defined according to car plate position plateRect The detection zone detectRoiR of lower right corner angle point;
Step 3:The candidate region of all vehicle window lower left corners angle point is detected using SVM in detectRoiL, is gathered LeftCornersList={ RLi| i=1,2 ..., n }, RLiRepresent i-th of vehicle window lower left corner angle point candidate region, n represents vehicle The quantity of window lower left corner angle point candidate region;The time of all vehicle window lower right corner angle point is detected using SVM in detectRoiR Favored area obtains set rightCornersList={ RRj| j=1,2 ..., m }, RRjRepresent j-th of vehicle window lower right corner angle point Candidate region, m represent the quantity of vehicle window lower right corner angle point candidate region;
Step 4:It is determined respectively finally from leftCornersList and rightCornersList using scan matching method Vehicle window lower left corner angle point region and vehicle window lower right corner angle point region, and be denoted as respectively winCornerRectL and winCornerRectR;
Step 5:Vehicle window lower edge detection zone is defined according to the position of winCornerRectL and winCornerRectR, is denoted as winDownRect;
Step 6:WinDownRect regions part is intercepted in image image, obtains vehicle window lower edge detection zone image, and Image gray processing, the detection of Sobel horizontal edges and OTSU bis- are carried out to the vehicle window lower edge detection zone image that interception obtains Value operates, and the binary image finally obtained is denoted as winDownImg;
Step 7:Floor projection is carried out to winDownImg, finds the ordinate value of floor projection value maximum in winDownImg It is denoted as winDownLine;
Step 8:Vehicle window edge detection region is defined according to the position of winDownRect, is denoted as winUpRect;
Step 9:WinUpRect regions part is intercepted in image image, obtains vehicle window edge detection area image, and right It intercepts obtained vehicle window edge detection area image and carries out image gray processing, the detection of Sobel horizontal edges and OTSU two-values Change operation, the binary image finally obtained is denoted as winUpImg;
Step 10:Floor projection, the bottom-up scanning in winUpImg, until scanning to a certain position are carried out to winUpImg Floor projection value meet vehicle window top edge condition and then stop scanning, the ordinate value of the position in winUpImg is denoted as WinUpLine if not finding the floor projection value for meeting vehicle window top edge condition, enables winUpLine= WinUpImg.heiht/2, wherein winUpImg.heiht are the height of winUpImg;
Step 11:According to the position and winDownLine of the position of winCornerRectL and winCornerRectR and Position of the vehicle window in image image is calculated in winUpLine, is denoted as rectangle winRect.
2. a kind of vehicle window localization method based on vehicle window Corner Detection as described in claim 1, it is characterised in that:In step 2 The detection zone detectRoiL's of the vehicle window lower left corner angle point and detection zone detectRoiR of vehicle window lower right corner angle point determines Justice is as follows:
2.1):DetectRoiL.x=plateRect.x-plateRect.width × 3;
2.2):DetectRoiL.y=plateRect.y-plateRect.width × 3.5;
2.3):DetectRoiL.width=plateRect.x+plateRect.width/2-detectRoi L.x;
2.4):DetectRoiL.height=plateRect.y-plateRect.width-detectRoiL .y;
2.5):DetectRoiR.x=plateRect.x+plateRect.width/2;
2.6):DetectRoiR.y=plateRect.y-plateRect.width × 3.5;
2.7):DetectRoiR.width=plateRect.width × 3.5;
2.8):DetectRoiR.height=plateRect.y-plateRect.width-detectRoiR .y.
Wherein plateRect.x is the upper left corner abscissa of plateRect, and the upper left corner that plateRect.y is plateRect is indulged Coordinate, plateRect.width are the width of plateRect, and detectRoiL.x is the upper left corner abscissa of detectRoiL, DetectRoiL.y is the upper left corner ordinate of detectRoiL, and detectRoiL.width is the width of detectRoiL, DetectRoiL.height is the height of detectRoiL, and detectRoiR.x is the upper left corner abscissa of detectRoiR, DetectRoiR.y is the upper left corner ordinate of detectRoiR, and detectRoiR.width is the width of detectRoiR, DetectRoiR.height is the height of detectRoiR.
3. a kind of vehicle window localization method based on vehicle window Corner Detection as described in claim 1, it is characterised in that:In step 4 Determine final vehicle window lower left corner angle point region and vehicle window respectively from leftCornersList and rightCornersList The step of scan matching method in lower right corner angle point region, is as follows:
4.1):For each element RR in rightCornersListj, an element is found from leftCornersList RLiSo that (RRj.y+RRj.height/2)–(RLi.y+RLi.height/2 absolute value) is minimum, and the absolute value is small In plateRect.width/2, if finding the RL of the condition of satisfactioni, then by RRjAnd RLiIt is stored as a pair of of candidate angular;
4.2):For each element RL in leftCornersListi, an element is found from rightCornersList RRjSo that (RLi.y+RLi.height/2)–(RRj.y+RRj.height/2 absolute value) is minimum, and the absolute value is small In plateRect.width/2, if finding the RR of the condition of satisfactionj, then by RRjAnd RLiIt is stored as a pair of of candidate angular;
4.3):For the candidate angular pair stored in step 4.1) and step 4.2), only retain those in step 4.1) and The candidate angular pair stored is repeated in step 4.2);
4.4):For the candidate angular pair that step 4.3) remains, only choose one pair of which and cause (RRj.x+RRj.width/ 2)–(RLi.x+RLi.width/2 maximum absolute value) then enables winCornerRectL be equal to the RL choseni, WinCornerRectR is equal to the RR chosenj
Wherein RLi.x it is RLiUpper left corner abscissa, RLi.y it is RLiUpper left corner ordinate, RLi.width it is RLiWidth, RLi.height it is RLiHeight, RRj.x it is RRjUpper left corner abscissa, RRj.y it is RRjUpper left corner ordinate, RRj.width it is RRjWidth, RRj.height it is RRjHeight.
4. a kind of vehicle window localization method based on vehicle window Corner Detection as described in claim 1, it is characterised in that:In step 5 Vehicle window lower edge detection zone winDownRect is defined as follows:
5.1):WinDownRect.x=winCornerRectL.x;
5.2):WinDownRect.y=Top-(Buttom-Top)/2;
5.3):WinDownRect.width=winCornerRectR.x+winCornerRectR.width- winCornerRectL.x;
5.4):WinDownRect.height=(Buttom-Top) × 2;
Wherein winDownRect.x is the upper left corner abscissa of winDownRect, and winDownRect.y is winDownRect's Upper left corner ordinate, winDownRect.width are the width of winDownRect, and winDownRect.height is The height of winDownRect, Top=min (winCornerRectL.y, winCornerRectR.y), Buttom=max (winCornerRectL.buttom, winCornerRectR.buttom), winCornerRectL.x are The upper left corner abscissa of winCornerRectL, winCornerRectL.y are the upper left corner ordinate of winCornerRectL, WinCornerRectL.buttom is the lower left corner ordinate of winCornerRectL, and winCornerRectR.x is The upper left corner abscissa of winCornerRectR, winCornerRectR.y are the upper left corner ordinate of winCornerRectR, WinCornerRectR.buttom is the lower left corner ordinate of winCornerRectR, and winCornerRectR.width is The width of winCornerRectR, min expressions take smaller from two numbers, and max expressions take the greater from two numbers.
5. a kind of vehicle window localization method based on vehicle window Corner Detection as described in claim 1, it is characterised in that:In step 8 Vehicle window edge detection region winUpRect is defined as follows:
8.1):WinUpRect.x=winDownRect.x;
8.2):WinUpRect.y=winDownRect.y-winDownRect.height;
8.3):WinUpRect.width=winDownRect.width;
8.4):WinUpRect.height=winDownRect.height;
Wherein winUpRect.x is the upper left corner abscissa of winUpRect, and the upper left corner that winUpRect.y is winUpRect is indulged Coordinate, winUpRect.width are the width of winUpRect, and winUpRect.height is the height of winUpRect.
6. a kind of vehicle window localization method based on vehicle window Corner Detection as described in claim 1, it is characterised in that:In step 10 The condition that the floor projection value of a certain position meets vehicle window top edge is as follows:
10.1):project[h]>projectThresh;
10.2):abs((projectLeft[h]-projectRight[h])/(winUpImg.width/2))<0.15.
Wherein h is the ordinate of image winUpImg, and project [h] represents level of the ordinate at h in image winUpImg The sum of the floor projection value of projection value and ordinate at h-1, h-2, h-3, h-4, h-5, projectThresh expressions are set in advance Fixed projection value threshold value is set as half rim portion of a left side that 750, projectLeft [h] represents image winUpImg in the present embodiment The sum of the floor projection value of floor projection value and ordinate of the middle ordinate at h at h-1, h-2, h-3, h-4, h-5, Floor projection value and ordinate of the ordinate at h in half rim portion of the right side of projectRight [h] expression images winUpImg The sum of floor projection value at h-1, h-2, h-3, h-4, h-5, winUpImg.width represent the width of image winUpImg, Abs expressions take absolute value.
7. a kind of vehicle window localization method based on vehicle window Corner Detection as described in claim 1, it is characterised in that:In step 11 The calculating of position winRect of the vehicle window in image image is as follows:
11.1):WinRect.x=winCornerRectL.x+winCornerRectL.width/2;
11.2):WinRect.y=winUpLine+winUpRect.y;
11.3):WinRect.width=winCornerRectR.x+winCornerRectR.width/2-wi nRect.x;
11.4):WinRect.height=winDownLine+winDownRect.y-winRect.y;
Wherein winRect.x is the upper left corner abscissa of winRect, and winRect.y is the upper left corner ordinate of winRect, WinRect.width is the width of winRect, and winRect.height is the height of winRect, WinCornerRectL.width is the width of winCornerRectL.
CN201711133210.8A 2017-11-15 2017-11-15 Vehicle window corner detection-based vehicle window positioning method Active CN108182376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711133210.8A CN108182376B (en) 2017-11-15 2017-11-15 Vehicle window corner detection-based vehicle window positioning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711133210.8A CN108182376B (en) 2017-11-15 2017-11-15 Vehicle window corner detection-based vehicle window positioning method

Publications (2)

Publication Number Publication Date
CN108182376A true CN108182376A (en) 2018-06-19
CN108182376B CN108182376B (en) 2020-12-08

Family

ID=62544971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711133210.8A Active CN108182376B (en) 2017-11-15 2017-11-15 Vehicle window corner detection-based vehicle window positioning method

Country Status (1)

Country Link
CN (1) CN108182376B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110059623A (en) * 2019-04-18 2019-07-26 北京字节跳动网络技术有限公司 Method and apparatus for generating information

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779267A (en) * 2011-05-12 2012-11-14 株式会社理光 Method and device for detection of specific object region in image
US20130101227A1 (en) * 2011-10-19 2013-04-25 Lee F. Holeva Identifying and evaluating possible horizontal and vertical lines intersecting potential pallet features
CN103324935A (en) * 2013-06-27 2013-09-25 中山大学 Method for vehicle positioning and region segmenting in image
CN103854029A (en) * 2014-02-21 2014-06-11 杭州奥视图像技术有限公司 Detection method for front automobile window top right corner point
CN103871052A (en) * 2014-02-21 2014-06-18 杭州奥视图像技术有限公司 Straight line detection-based safety belt detecting algorithm
CN104376561A (en) * 2014-11-19 2015-02-25 青岛海信网络科技股份有限公司 Safety belt detection method
CN105373783A (en) * 2015-11-17 2016-03-02 高新兴科技集团股份有限公司 Seat belt not-wearing detection method based on mixed multi-scale deformable component model
CN105469057A (en) * 2015-11-27 2016-04-06 成都神州数码索贝科技有限公司 Hough line detection and projection-based automobile window detection method
CN106250824A (en) * 2016-07-21 2016-12-21 乐视控股(北京)有限公司 Vehicle window localization method and system
CN106845482A (en) * 2017-01-23 2017-06-13 南京邮电大学盐城大数据研究院有限公司 A kind of license plate locating method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779267A (en) * 2011-05-12 2012-11-14 株式会社理光 Method and device for detection of specific object region in image
US20130101227A1 (en) * 2011-10-19 2013-04-25 Lee F. Holeva Identifying and evaluating possible horizontal and vertical lines intersecting potential pallet features
CN103324935A (en) * 2013-06-27 2013-09-25 中山大学 Method for vehicle positioning and region segmenting in image
CN103854029A (en) * 2014-02-21 2014-06-11 杭州奥视图像技术有限公司 Detection method for front automobile window top right corner point
CN103871052A (en) * 2014-02-21 2014-06-18 杭州奥视图像技术有限公司 Straight line detection-based safety belt detecting algorithm
CN104376561A (en) * 2014-11-19 2015-02-25 青岛海信网络科技股份有限公司 Safety belt detection method
CN105373783A (en) * 2015-11-17 2016-03-02 高新兴科技集团股份有限公司 Seat belt not-wearing detection method based on mixed multi-scale deformable component model
CN105469057A (en) * 2015-11-27 2016-04-06 成都神州数码索贝科技有限公司 Hough line detection and projection-based automobile window detection method
CN106250824A (en) * 2016-07-21 2016-12-21 乐视控股(北京)有限公司 Vehicle window localization method and system
CN106845482A (en) * 2017-01-23 2017-06-13 南京邮电大学盐城大数据研究院有限公司 A kind of license plate locating method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HONGJIN ZHU ET AL: "Moving Vehicle Detection and Tracking in Traffic Images Based on Horizontal Edges", 《TELKOMNIKA INDONESIAN JOURNAL OF ELECTRICAL ENGINEERING》 *
徐志刚 等: "基于角点检测和边缘提取的车牌定位方法", 《科学技术与工程》 *
高飞 等: "基于灰度跳变与字符间隔模式的车牌定位方法研究", 《计算机测量与控制》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110059623A (en) * 2019-04-18 2019-07-26 北京字节跳动网络技术有限公司 Method and apparatus for generating information

Also Published As

Publication number Publication date
CN108182376B (en) 2020-12-08

Similar Documents

Publication Publication Date Title
US9158979B2 (en) Vehicle vicinity monitoring device
KR101517181B1 (en) System and method for warning lane departure
EP1671216B1 (en) Moving object detection using low illumination depth capable computer vision
JP5900623B2 (en) Three-dimensional object detection apparatus and three-dimensional object detection method
JP4988786B2 (en) Boundary line recognition device
CN103984950B (en) A kind of moving vehicle brake light status recognition methods for adapting to detection on daytime
CN109948552B (en) Method for detecting lane line in complex traffic environment
CN105216797B (en) Method of overtaking and system
JP5787024B2 (en) Three-dimensional object detection device
CN107991671A (en) A kind of method based on radar data and vision signal fusion recognition risk object
JP4692344B2 (en) Image recognition device
CN105740782A (en) Monocular vision based driver lane-changing process quantization method
CN105260705B (en) A kind of driver&#39;s making and receiving calls behavioral value method suitable under multi-pose
Zou et al. Robust nighttime vehicle detection by tracking and grouping headlights
US9773174B2 (en) Vehicle detection method based on thermal imaging
CN104915642B (en) Front vehicles distance measuring method and device
CN108108656A (en) A kind of vehicle window accurate positioning method based on vehicle window Corner Detection and multi-direction projection
CN103593981A (en) Vehicle model identification method based on video
CN104700066A (en) Method and device for detecting whether driver wears safety belt or not
KR101809088B1 (en) Apparatus and method for forward collision warning
CN108182376A (en) A kind of vehicle window localization method based on vehicle window Corner Detection
KR101850794B1 (en) Parking assist appratus and method for assisting parking
KR101347886B1 (en) Method and Apparatus for Road Lane Recognition by Surface Region and Geometry Information
CN109101980B (en) Automobile weightlessness detection and control method based on machine learning
CN106355159A (en) Method for rapidly detecting zebra crossing based on vertical projection integration

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