CN102842039B - Road image detection method based on Sobel operator - Google Patents

Road image detection method based on Sobel operator Download PDF

Info

Publication number
CN102842039B
CN102842039B CN201210239496.9A CN201210239496A CN102842039B CN 102842039 B CN102842039 B CN 102842039B CN 201210239496 A CN201210239496 A CN 201210239496A CN 102842039 B CN102842039 B CN 102842039B
Authority
CN
China
Prior art keywords
slope
sub
point
image
sobel operator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210239496.9A
Other languages
Chinese (zh)
Other versions
CN102842039A (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.)
Hohai University HHU
Original Assignee
Hohai University HHU
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 Hohai University HHU filed Critical Hohai University HHU
Priority to CN201210239496.9A priority Critical patent/CN102842039B/en
Publication of CN102842039A publication Critical patent/CN102842039A/en
Application granted granted Critical
Publication of CN102842039B publication Critical patent/CN102842039B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a road image detection method based on a Sobel operator. The road image detection method comprises the following steps of: firstly, finding out one point belonging to a straight line, and defining the slope of the straight line passing the point; dividing a set slope region into ten sub-regions, that is, the width of each sub-region is one tenth of the width of the set slope region; setting an accumulator nj (j is not less than 1 and not more than 10) for each sub-region and initializing the value of each accumulator to be zero; scanning an image from top to bottom and left to right point by point; when a target pixel is encountered, calculating the slope m between the pixel and the unknown point p0, and adding 1 to the value of the accumulator of the sub-region, to which the m value belongs. According to the road image detection method based on the Sobel operator, the algorithm is simple and feasible, and the calculation workload is simplified; during the image detection process under noise conditions, the continuous detection edge, the accurate positioning and the good recognition effect are achieved, and moreover the inhabiting capacity for noises can be greatly improved.

Description

A kind of road image detection method based on Sobel operator
Technical field
The present invention relates to a kind of identification and disposal route of road image, especially a kind of road image detection method based on Sobel operator, belongs to the digital image processing field in electronic information subject.
Background technology
The most basic feature of image is edge, identify one to as if from its edge, the edge of the different piece most important feature of pattern-recognition often in image.Relative to other characteristics of image such as texture, color of target, marginal information well can reflect the shape facility of object.Contained abundant internal information in image border, be the reflection of local image characteristic uncontinuity, it indicates the termination in a region and the beginning in another region.On the direction moved towards along edge, pixel change is mild, violent perpendicular to pixel change on the direction of edge trend.In the vision navigation system of intelligent vehicle, the direction in vehicle current driving path and the position relationship between vehicle and road are the important informations that vehicle control system realizes automobile navigation, and these information can be determined by location road boundary.Therefore, the rim detection of image has key effect in the primary treatment of digital image system.
It is basis target and background made a distinction that edge detecting technology extracts edge.Image edge extraction method can be divided into three major types: the first kind is based on certain fixing local operation's method, as the differential method, and fitting process etc., they belong to classical edge extracting method; Equations of The Second Kind is then take energy minimization as the overall extracting method of criterion, it is characterized in that using strict mathematical method to analyze this problem, one-dimensional value cost function extracts foundation as optimum, extracts edge from the viewpoint of global optimum, as relaxation method, analysis of neural network method etc.; The image edge extraction method that 3rd class is the new technology of getting up with development in recent years such as wavelet transformation, mathematical morphology, fractal theories is representative, in above edge detection algorithm, differentiating operator rim detection instrument the most effective.
Roberts operator, Prewitt operator all carry out rim detection to image as convolution with template; LOG operator is first smoothing to image, and recycling Laplace operator carries out rim detection to image; Whether Canny operator first carries out gaussian filtering to image, then makes " non-maximum restraining " to image gradient, be edge finally by threshold decision pixel.In calculated amount and computation complexity, LOG operator and Canny operator the most complicated, calculated amount is also maximum.
Summary of the invention
Goal of the invention: for problems of the prior art with not enough, the invention provides the road image detection method based on Sobel operator.
The most basic feature of image is edge, and relative to other characteristics of image such as texture, color of target, marginal information well can reflect the shape facility of object.Contained abundant internal information in image border, be the reflection of local image characteristic uncontinuity, it indicates the termination in a region and the beginning in another region.
Sobel operator carries out rim detection to image as convolution with template; Carry out edge extracting to through pretreated image, then feature extraction is carried out to useful road boundary information, to obtain the road Identification result that system needs.
Technical scheme: a kind of road image detection method based on Sobel operator, comprises the steps:
The first, Sobel operator makes convolution with template to road image, carries out rim detection;
Sobel operator edge detection device is defined as lower column vector image f (x, y) in the gradient of position (x, y):
▿ f = G x G y = ∂ f ∂ x ∂ f ∂ y
Know from vector analysis, the maximum rate of change direction of f of gradient vector (x, y) point coordinates, if:
S(i,j)=max(G x,G y)
Edge detection method sets thresholding T exactly, then S (i, j) > T is marginal point, and approximate gradient calculation formula is:
G x=(z 7+2z 8+z 9)-(z 1+2z 2+z 3)
G y=(z 3+2z 6+z 9)-(z 1+2z 4+z 7)
This approximate gradient operator is as follows by the template representation of 3 × 3:
z 1 z 2 z 3
z 4 z 5 z 6
z 7 z 8 z 9
The second, based on Sobel operator identification road image;
(1) the some p belonged on straight line is found 0, be (x by the coordinate definition of this known point 0, y 0), will p be passed through 0straight slope be defined as m, then the pass of coordinate and slope is (y-y 0)=m (x-x 0);
(2) the slope interval of setting is divided into 10 sub-ranges, namely the width in each sub-range is 1/10 of setting slope interval width;
(3) for each sub-range arranges a totalizer n j(1≤j≤10);
(4) value of each totalizer of initialization is 0;
(5) from top to bottom, from left to right point by point scanning image, when running into object pixel, by formula m i=(y i-y 0)/(x i-x 0) and formula calculate itself and known point p 0between slope m, which sub-range is m value belong to and just the value of which sub-range totalizer is added 1;
(6) after scanning full processing region, be that maximum sub-range and adjacent two sub-ranges (totally 3 sub-ranges) thereof are interval as the slope of submitting a tender next time using the value of totalizer, repeat above-mentioned (2) to (5) step, until the width in slope interval is less than setting slope detection precision.
Beneficial effect: compared with prior art, road image detection method based on Sobel operator provided by the present invention, in to various situation road image rim detection effect in, Sobel operator not only calculated amount is little, and algorithm is simple, and all more satisfactory to the image Detection results under various noise conditions, affected by noise smaller, the edge of testing result is relatively more continuous, and location is also relatively more accurate, and erroneous judgement point is less.In the application that this requirement of real-time of road Identification of Intelligent Vehicle System is higher, the practical value of Sobel operator is higher, and Detection results is better, can meet the request for utilization of system.In characteristic curve extracts, employing Sobel operator is carried out edge extracting to through pretreated image, then feature extraction is carried out to useful road boundary information, to obtain the road Identification result that system needs.
Accompanying drawing explanation
Fig. 1 is the testing result comparison diagram not being subject to embodiment of the present invention when polluting and other algorithms at road image;
Fig. 2 be the embodiment of the present invention and other algorithms add salt-pepper noise road-edge detection results contrast figure;
Fig. 3 be the embodiment of the present invention and other algorithms add white Gaussian noise road-edge detection results contrast figure;
Fig. 4 is the linear vehicle diatom testing result figure crossing known point of the embodiment of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, illustrate the present invention further, these embodiments should be understood only be not used in for illustration of the present invention and limit the scope of the invention, after having read the present invention, the amendment of those skilled in the art to the various equivalent form of value of the present invention has all fallen within the application's claims limited range.
Sobel operator edge detection device lays stress on the pixel close to template center, is generally used for the simple operator at horizontal and vertical edge.Sobel operator is a gradient operator, and the first order derivative of a width digital picture is the approximate value based on various two-dimensional gradient.Image f (x, y) is defined as lower column vector in the gradient of position (x, y):
▿ f = G x G y = ∂ f ∂ x ∂ f ∂ y
Know from vector analysis, the maximum rate of change direction of f of gradient vector (x, y) point coordinates.If:
S(i,j)=max(G x,G y)
Edge detection method based on gradient sets thresholding T exactly, then S (i, j) > T is marginal point, owing to directly asking the G of image x, G yvery difficult, so usually adopt its approximate formula, z 5and neighbor, a kind of approximate gradient calculation formula is:
G x=(z 7+2z 8+z 9)-(z 1+2z 2+z 3)
G y=(z 3+2z 6+z 9)-(z 1+2z 4+z 7)
This approximate gradient operator is as follows by the template representation of 3 × 3:
z 1 z 2 z 3
z 4 z 5 z 6
z 7 z 8 z 9
One, to cross known point straight-line detection, concrete steps are as follows:
Basic thought first finds the some p belonged on straight line 0, be (x by the coordinate definition of this known point 0, y 0), will p be passed through 0straight slope be defined as m, then the pass of coordinate and slope is (y-y 0)=m (x-x 0).
Concrete steps:
(1) the slope interval of setting is divided into 10 sub-ranges, namely the width in each sub-range is 1/10 of setting slope interval width.
(2) for each sub-range arranges a totalizer n j(1≤j≤10).
(3) value of each totalizer of initialization is 0.
(4) from top to bottom, from left to right point by point scanning image, when running into object pixel, by formula m i=(y i-y 0)/(x i-x 0) and formula calculate itself and known point p 0between slope m, which sub-range is m value belong to and just the value of which sub-range totalizer is added 1.
(5) after scanning full processing region, be that maximum sub-range and adjacent two sub-ranges (totally 3 sub-ranges) thereof are interval as the slope of submitting a tender next time using the value of totalizer, repeat above-mentioned (1) to (4) step, until the width in slope interval is less than setting slope detection precision.Its result as shown in Figure 4.
Two, Sobel operator edge detection experimental result:
(1) without additive noise road-edge detection
Be not subject to testing result when polluting as shown in Figure 1 at image, obtain conclusion: several operator all relatively, all detects the general profile of white line for the most obvious track road white line detection result.Prewitt operator is detecting close to having certain advantage in the Road of 45 degree because it has non-isotropy; The continuous edge that Rebort operator and LOG operator obtain and clear, but do not reflect the actual characteristic of road truly; Although Canny operator also can detect boundary profile, image outline contrast is not high, not easy to identify, makes subsequent extracted lane line more difficult; The road boundary of Sobel operator extraction connects complete, and it is careful that edge line divides, and has very high Position location accuracy.
(2) salt-pepper noise road-edge detection is added
In the collection of sleety weather road with in identifying, add a large amount of salt-pepper noises in the field of view that vision system collects, have a strong impact on the edge extracting to barrier in road image.Original road image is added into the salt-pepper noise that noise density is 0.01,
Then to pollute road image carry out filtering and rim detection, experimental result is as shown in Figure 2.
Conclusion can be obtained: salt-pepper noise all creates very large impact to the testing result of several differentiating operator.Wherein, the detection integrality of Prewitt operator to road right boundary white line has a great impact, and substantially can not detect the border of road.To the Detection results of the track white line of image road boundary better, edge is comparatively complete for Canny operator and Robert operator, but because shake effect creates a large amount of block spots in the image after detecting; The location of testing result to the complete white line of road of LOG operator is inaccurate, creates a large amount of erroneous judgements; In Sobel operator testing result, road boundary white line and left and right edges are obtained for complete detection and locate comparatively accurately, but are also extracted a large amount of garbages simultaneously.
(3) white Gaussian noise road-edge detection is added
In original image, add average is 0, and variance is the white Gaussian noise of 0.005, and testing result as shown in Figure 3, can obtain conclusion: the testing result of Robert operator produces breakpoint and erroneous judgement due to white Gaussian noise, and road image is relatively a little by noise pollution.LOG operator itself has smooth function, and comparatively strong to the filtering ability of white Gaussian noise, the complete detection of edge details is not too large to final road image rim detection influential effect.Canny operator and Prewitt operator affect seriously by white Gaussian noise, and inspection vehicle diatom very fuzzy, Sobe operator inspection vehicle diatom is more clear, affects less by white Gaussian noise.
In sum, in road image detects, Sobe operator has that Detection results, fast operation, noise resisting ability are strong, boundary alignment performance advantage accurately.

Claims (1)

1., based on a road image detection method for Sobel operator, it is characterized in that, comprise the steps:
The first, Sobel operator makes convolution with template to road image, carries out rim detection;
Sobel operator edge detection device is defined as lower column vector image f (x, y) in the gradient of position (x, y):
▿ f = G x G y = ∂ f ∂ x ∂ f ∂ y
Know from vector analysis, the maximum rate of change direction of f (x, y) of gradient vector ▽ f point coordinates, if:
S(i,j)=max(G x,G y)
Edge detection method sets thresholding T exactly, then S (i, j) > T is marginal point, and approximate gradient calculation formula is:
G x=(z 7+2z 8+z 9)-(z 1+2z 2+z 3)
G y=(z 3+2z 6+z 9)-(z 1+2z 4+z 7)
This approximate gradient operator is as follows by the template representation of 3 × 3:
z 1 z 2 z 3 z 4 z 5 z 6 z 7 z 8 z 9
The second, based on Sobel operator identification road image;
(1) the some p belonged on lane line straight line is found 0, by this known point p 0coordinate definition be (x 0, y 0), will by some p 0straight slope be defined as m, then the pass of coordinate and slope is (y-y 0)=m (x-x 0);
(2) the slope interval of setting is divided into 10 sub-ranges, namely the width in each sub-range is 1/10 of setting slope interval width;
(3) for each sub-range arranges a totalizer n j(1≤j≤10);
(4) value of each totalizer of initialization is 0;
(5) from top to bottom, from left to right point by point scanning image, when running into object pixel, by formula m i=(y i-y 0)/(x i-x 0) and formula calculate it and oneself knows a p 0between slope, which sub-range is slope value belong to and just the value of which sub-range totalizer is added 1;
(6) after scanning full processing region, be that maximum sub-range and adjacent two sub-ranges thereof are interval as the slope calculated next time using the value of totalizer, repeat above-mentioned (2) to (5) step, until the width in slope interval is less than setting slope detection precision.
CN201210239496.9A 2012-07-11 2012-07-11 Road image detection method based on Sobel operator Expired - Fee Related CN102842039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210239496.9A CN102842039B (en) 2012-07-11 2012-07-11 Road image detection method based on Sobel operator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210239496.9A CN102842039B (en) 2012-07-11 2012-07-11 Road image detection method based on Sobel operator

Publications (2)

Publication Number Publication Date
CN102842039A CN102842039A (en) 2012-12-26
CN102842039B true CN102842039B (en) 2015-06-24

Family

ID=47369376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210239496.9A Expired - Fee Related CN102842039B (en) 2012-07-11 2012-07-11 Road image detection method based on Sobel operator

Country Status (1)

Country Link
CN (1) CN102842039B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103413136B (en) * 2013-08-01 2016-08-10 西北工业大学 A kind of detection method of infrared image mesohigh line
CN103954275B (en) * 2014-04-01 2017-02-08 西安交通大学 Lane line detection and GIS map information development-based vision navigation method
CN106370403A (en) * 2016-08-22 2017-02-01 南京信息工程大学 Instant frequency estimation method based on edge detection
CN106446790A (en) * 2016-08-30 2017-02-22 上海交通大学 Method for tracking and analyzing traffic video flow of fixed camera
CN106778661A (en) * 2016-12-28 2017-05-31 深圳市美好幸福生活安全系统有限公司 A kind of express lane line detecting method based on morphological transformation and adaptive threshold
CN109308468B (en) * 2018-09-21 2021-09-24 电子科技大学 Lane line detection method
CN110852243B (en) * 2019-11-06 2022-06-28 中国人民解放军战略支援部队信息工程大学 Road intersection detection method and device based on improved YOLOv3
CN111123953B (en) * 2020-01-09 2022-11-01 重庆弘玑隆程科技有限公司 Particle-based mobile robot group under artificial intelligence big data and control method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916373A (en) * 2010-08-11 2010-12-15 西安电子科技大学 Road semiautomatic extraction method based on wavelet detection and ridge line tracking
US20110103648A1 (en) * 2003-07-18 2011-05-05 Lockheed Martin Corporation Method and apparatus for automatic object identification
CN102436644A (en) * 2011-11-02 2012-05-02 南京物联网研究院发展有限公司 Unstructured road detection method based on adaptive edge registration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110103648A1 (en) * 2003-07-18 2011-05-05 Lockheed Martin Corporation Method and apparatus for automatic object identification
CN101916373A (en) * 2010-08-11 2010-12-15 西安电子科技大学 Road semiautomatic extraction method based on wavelet detection and ridge line tracking
CN102436644A (en) * 2011-11-02 2012-05-02 南京物联网研究院发展有限公司 Unstructured road detection method based on adaptive edge registration

Also Published As

Publication number Publication date
CN102842039A (en) 2012-12-26

Similar Documents

Publication Publication Date Title
CN102842039B (en) Road image detection method based on Sobel operator
CN104217427B (en) Lane line localization method in a kind of Traffic Surveillance Video
CN104008645B (en) One is applicable to the prediction of urban road lane line and method for early warning
CN109583280A (en) Lane detection method, apparatus, equipment and storage medium
Rasmussen Texture-Based Vanishing Point Voting for Road Shape Estimation.
CN103177246B (en) Based on the dual model Lane detection method of dynami c block division
Wang et al. Lane detection based on random hough transform on region of interesting
Labayrade et al. In-vehicle obstacles detection and characterization by stereovision
EP1796043A2 (en) Object detection
CN106951879A (en) Multiple features fusion vehicle checking method based on camera and millimetre-wave radar
CN101620732A (en) Visual detection method of road driving line
CN105760812A (en) Hough transform-based lane line detection method
CN105005771A (en) Method for detecting full line of lane based on optical flow point locus statistics
CN102982304B (en) Utilize polarized light image to detect the method and system of vehicle location
CN107909047B (en) Automobile and lane detection method and system applied to automobile
CN104050477A (en) Infrared image vehicle detection method based on auxiliary road information and significance detection
CN104700072A (en) Lane line historical frame recognition method
CN103065299B (en) Ultrasonoscopy edge extracting method and device
CN109685827B (en) Target detection and tracking method based on DSP
CN105303153A (en) Vehicle license plate identification method and apparatus
CN112001216A (en) Automobile driving lane detection system based on computer
CN105426868A (en) Lane detection method based on adaptive region of interest
CN103077531A (en) Grayscale target automatic tracking method based on marginal information
CN103593981A (en) Vehicle model identification method based on video
CN105608429A (en) Differential excitation-based robust lane line detection method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150624

Termination date: 20180711