Summary of the invention
In view of this, the embodiment of the present invention provides recognition methods and the device of a kind of road boundary, roadside can be improved
The accuracy of boundary's identification.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of identification side of road boundary is provided
Method.
A kind of recognition methods of road boundary, comprising: travelable region is determined according to the area image of acquisition;Described in determination
It can travel the largest contours in region;The straight line portion in the largest contours in the travelable region is detected by Hough transformation algorithm
Point, and the road boundary is identified according to the straight line portion.
Optionally, the step of travelable region being determined according to the area image of acquisition, comprising: raw according to the area image
At area image characteristic pattern;It is designated as can travel the mark in region or non-travelable region for area image characteristic pattern addition
Label;The travelable region in the area image characteristic pattern is determined according to the label.
Optionally, according to the area image formation zone characteristics of image figure the step of, comprising: to the area image into
Row process of convolution and down-sampled processing, to generate characteristic pattern;Deconvolution processing is carried out to the characteristic pattern, to generate the region
Characteristics of image figure, wherein the corresponding fisrt feature for being designated as can travel region of each pixel of the area image characteristic pattern
It is worth and is designated as the Second Eigenvalue in non-travelable region.
Optionally, it is designated as can travel the label in region or non-travelable region for area image characteristic pattern addition
Step, comprising: the corresponding the First Eigenvalue of each pixel of the area image characteristic pattern and second spy
Value indicative, in which: if the First Eigenvalue is greater than the Second Eigenvalue, be designated as can travel for the addition of respective pixel point
The label in region;If the First Eigenvalue be less than the Second Eigenvalue, for respective pixel point addition be designated as it is non-can
The label of running region;If the First Eigenvalue is equal to the Second Eigenvalue, according to by the First Eigenvalue and
The instruction of the corresponding characteristic value of specified array index of the constituted array of Second Eigenvalue corresponds to for the addition of respective pixel point
Label.
Optionally it is determined that the step of largest contours in the travelable region, comprising: according to each of the travelable region
Pixel generates connected domain;The boundary line in largest connected domain in the connected domain is searched, according to the determination of the boundary line
It can travel the largest contours in region.
According to another aspect of an embodiment of the present invention, a kind of identification device of road boundary is provided.
A kind of identification device of road boundary, comprising: can travel area determination module, for the area image according to acquisition
Determine travelable region;Largest contours determining module, for determining the largest contours in the travelable region;Road boundary identification
Module, the straight line portion in largest contours for detecting the travelable region by Hough transformation algorithm, and according to described
Straight line portion identifies the road boundary.
Optionally, the travelable area determination module is also used to: according to area image formation zone characteristics of image
Figure;It is designated as can travel the label in region or non-travelable region for area image characteristic pattern addition;According to the label
Determine the travelable region in the area image characteristic pattern.
Optionally, the travelable area determination module includes area image characteristic pattern generation module, is used for: to the area
Area image carries out process of convolution and down-sampled processing, to generate characteristic pattern;Deconvolution processing is carried out to the characteristic pattern, to generate
The area image characteristic pattern, wherein each pixel of the area image characteristic pattern is corresponding to be designated as can travel region
The First Eigenvalue and the Second Eigenvalue for being designated as non-travelable region.
Optionally, the travelable area determination module further includes label adding module, is used for: the area image
The corresponding the First Eigenvalue of each pixel of characteristic pattern and the Second Eigenvalue, in which: if the fisrt feature
Value is greater than the Second Eigenvalue, then is designated as can travel the label in region for the addition of respective pixel point;If described first is special
Value indicative is less than the Second Eigenvalue, then the label in non-travelable region is designated as the addition of respective pixel point;If described
One characteristic value is equal to the Second Eigenvalue, then according to by the First Eigenvalue and the constituted array of the Second Eigenvalue
The instruction of the specified corresponding characteristic value of array index adds corresponding label for respective pixel point.
Optionally, the largest contours determining module is also used to: being generated and is connected according to each pixel in the travelable region
Logical domain;The boundary line in largest connected domain in the connected domain is searched, to determine the travelable region according to the boundary line
Largest contours.
Another aspect according to an embodiment of the present invention, provides a kind of identification device of road boundary.
A kind of identification device of road boundary, comprising: one or more processors;Memory, for storing one or more
A program, when one or more of programs are executed by one or more of processors, so that one or more of places
Manage the recognition methods that device realizes road boundary.
Another aspect according to an embodiment of the present invention, provides a kind of computer-readable medium.
A kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor
The recognition methods of road boundary is realized when row.
One embodiment in foregoing invention has the following advantages that or the utility model has the advantages that the area image determination according to acquisition can
Then running region determines the largest contours in travelable region, last to identify road roadside according to the largest contours that can travel region
Boundary.It can be improved the accuracy of road boundary identification, realize that road boundary identifies to robust (or healthy and strong).
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment
With explanation.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention
Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize
It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together
Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the key step schematic diagram of the recognition methods of road boundary according to an embodiment of the present invention.
As shown in Figure 1, the recognition methods of the road boundary of the embodiment of the present invention mainly includes the following steps, namely S101 to step
Rapid S103.
Step S101: travelable region is determined according to the area image of acquisition.
Step S101 can specifically include: according to area image formation zone characteristics of image figure;For the area image feature
Figure addition is designated as can travel the label in region or non-travelable region;It is determined in the area image characteristic pattern according to the label
It can travel region.
Wherein, according to area image formation zone characteristics of image figure it the step of, can specifically include: area image carried out
Then process of convolution and down-sampled processing carry out deconvolution processing to characteristic pattern to generate characteristic pattern, with formation zone image spy
Sign figure.
By taking the resolution ratio of the area image of the equipment such as camera acquisition is A*B pixel as an example, convolutional Neural net can be passed through
The convolutional layer of network carries out process of convolution to area image and passes through the down-sampled layer of convolutional neural networks to extract the feature of image
Down-sampled processing is carried out to area image, the image down after extracting feature is to the size needed, so that calculation amount is reduced,
Process of convolution and down-sampled processing alternately, such as can carry out by one or more convolutional layers the process of convolution of image,
Then the down-sampled processing of image is carried out by a down-sampled layer, then the convolution of image is carried out by one or more convolutional layers
Processing etc..Area image is carried out to obtain characteristic pattern after process of convolution and down-sampled processing, this feature figure is the area than acquisition
The small characteristic pattern of area image.Include multiple convolutional layers and down-sampled layer in above-mentioned convolutional neural networks, can use existing
The convolutional neural networks such as convolutional neural networks, such as SqueezeNet, AlexNet, VGG are realized, can also be used customized
Network, i.e., customized several convolutional layers and down-sampled layer, to carry out feature extraction to image.Convolutional neural networks can be with one
A warp lamination connection, the warp lamination are used to carry out deconvolution processing to characteristic pattern, by carrying out at deconvolution to characteristic pattern
Reason, can be reduced to this feature figure the size of the area image of acquisition, and obtain the area image characteristic pattern of 2*A*B, wherein
2 indicate the quantity of each pixel corresponding eigenvalue, and A and B respectively indicate the height and width (pixel number) of area image characteristic pattern.
Each pixel of area image characteristic pattern is corresponding to be designated as can travel the First Eigenvalue in region and be designated as non-
It can travel the Second Eigenvalue in region.Wherein, the pixel that the First Eigenvalue can be corresponding position belongs to travelable region
Probability, the pixel that Second Eigenvalue can be corresponding position belong to the probability in non-travelable region.
The step of label for being designated as can travel region or non-travelable region is added for area image characteristic pattern, specifically may be used
To include: the corresponding the First Eigenvalue of each pixel and Second Eigenvalue of comparison domain characteristics of image figure, in which: if the
One characteristic value is greater than Second Eigenvalue, then is designated as can travel the label in region for the addition of respective pixel point;If fisrt feature
Value is less than Second Eigenvalue, then the label in non-travelable region is designated as the addition of respective pixel point;If the First Eigenvalue etc.
In Second Eigenvalue, then according to by the corresponding feature of specified array index of the First Eigenvalue and the constituted array of Second Eigenvalue
The instruction of value adds corresponding label for respective pixel point.It can i.e., it is possible to which each pixel of area image characteristic pattern is belonged to
The probability of running region with belong to the probability in travelable region two probability values and be compared, according in two probability values compared with
Big person determines that the pixel belongs to travelable region or non-travelable region, and adds corresponding label.For example, a certain pixel
It is 0.4 that the probability for belonging to travelable region, which is 0,6, belongs to the probability in non-travelable region, it is determined that the pixel belongs to feasible
Region is sailed, is designated as can travel the label in region for pixel addition.For another example, the corresponding the First Eigenvalue of a certain pixel and
Second Eigenvalue (being respectively the probability for belonging to travelable region and non-travelable region) is 0.5 and 0.5, then by fisrt feature
Value and the constituted array of Second Eigenvalue { the First Eigenvalue, Second Eigenvalue }={ 0.5,0.5 }, can be according to by first spy
The instruction of the corresponding characteristic value of specified array index of value indicative and the constituted array of Second Eigenvalue, determining that the pixel belongs to can
Running region or non-travelable region, and add corresponding label.Wherein, it is first that specified array index, which can preassign,
Array index or second array index, it is assumed that specified array index is first array index, then the pixel belongs to feasible
Region is sailed, is designated as can travel the label in region for pixel addition;Assuming that specified array index is second array index,
Then the pixel belongs to non-travelable region, and the label in non-travelable region is designated as pixel addition.
Being designated as, which can travel the label in region, is designated as the label in non-travelable region, to be number, for example, being designated as
The label that can travel region is 1, is represented within road boundary, can running region;The label for being designated as non-travelable region is
0, it represents except road boundary, i.e. traveling-prohibited area.In conjunction with the example above, add for each pixel of area image characteristic pattern
After adding corresponding label, the output matrix (label matrix can also be claimed) of an A*B is obtained, which is made of 0 and 1.
This step determines that travelable region can be by a network Jing Guo machine learning according to the area image of acquisition
Structure realizes, which includes above-mentioned convolutional neural networks and warp lamination, machine learning specifically can using with
The methods of machine gradient descent method optimizes present network architecture.
Step S102: the largest contours in travelable region are determined.
Step S102 can specifically include: generate connected domain according to each pixel in travelable region;It searches in connected domain
The boundary line in largest connected domain, to determine the largest contours in travelable region according to boundary line.Wherein, the number of the connected domain of generation
Amount can be at least one, if only generating a connected domain, which is largest connected domain.With A*B's
The label for being designated as can travel region in output matrix (can also label matrix) is referred to as 1, is designated as the label in non-travelable region
For 0, the pixel that can be 1 according to label in label matrix generates connected domain, and searches in the connected domain of the generation
Largest connected domain boundary line, with obtain can travel region boundary line, this can travel region boundary line be can travel region and
The boundary line of traveling-prohibited area can determine the largest contours that can travel region by the boundary line.
Step S103: road boundary is identified according to the largest contours in travelable region.
In daily life, the boundary of many roads is all straight line, such as the roadside of car lane, campus road
Boundary, they are all straight line in short-range.The embodiment of the present invention can be detected by Hough transformation algorithm and be can travel
Straight line portion in the largest contours in region can specifically find out the pixel for meeting linear characteristic in the largest contours
Come, then detects to obtain the straight line portion in largest contours according to these pixels for meeting linear characteristic.According to largest contours
In straight line portion can identify to obtain road boundary, specifically, the most marginal pixel of each straight line portion can be connected
Come, so that identification obtains including the boundary of each straight line portion being road boundary.
The embodiment of the present invention is partitioned into travelable road using convolutional neural networks and warp lamination from area image
Face, then the boundary profile on the method extraction road surface with the largest connected domain boundary line of lookup, then with Hough transformation from boundary profile
Identification obtains the straight border of road, and convolutional neural networks and warp lamination even depth learning method are applied to road boundary
Identification, the feature for overcoming prior art extraction is poor and lead to the defect of Boundary Recognition inaccuracy, can be improved road boundary
The accuracy of identification, and can easily extract the boundary profile on road surface and then identify the boundary of road, be easy and robust (or
Claim healthy and strong) realize that road boundary identifies.
Fig. 2 is the main modular schematic diagram of the identification device of road boundary according to an embodiment of the present invention.
As shown in Fig. 2, the identification device 200 of the road boundary of the embodiment of the present invention specifically includes that travelable region determines
Module 201, largest contours determining module 202, road boundary identification module 203.
It can travel area determination module 201 to be used to determine travelable region according to the area image of acquisition.
Specifically, can travel area determination module 201 can according to area image formation zone characteristics of image figure, then for
The addition of area image characteristic pattern is designated as can travel the label in region or non-travelable region, finally determines region according to the label
Travelable region in characteristics of image figure.
Can travel area determination module 201 may include area image characteristic pattern generation module, be used for: carry out to area image
Process of convolution and down-sampled processing, to generate characteristic pattern;Deconvolution processing is carried out to characteristic pattern, with formation zone characteristics of image
Figure, wherein each pixel of area image characteristic pattern is corresponding to be designated as can travel the First Eigenvalue in region and be designated as non-
It can travel the Second Eigenvalue in region.
Can travel area determination module 201 may also include label adding module, be used for: comparison domain characteristics of image figure it is every
The corresponding the First Eigenvalue of a pixel and Second Eigenvalue, in which: if the First Eigenvalue is greater than Second Eigenvalue, for phase
Pixel addition is answered to be designated as can travel the label in region;If the First Eigenvalue is less than Second Eigenvalue, for respective pixel
Point addition is designated as the label in non-travelable region;If the First Eigenvalue is equal to Second Eigenvalue, according to by fisrt feature
The instruction of the corresponding characteristic value of specified array index of value and the constituted array of Second Eigenvalue corresponds to for the addition of respective pixel point
Label.
Wherein, the pixel that the First Eigenvalue can be corresponding position belongs to the probability in travelable region, Second Eigenvalue
The pixel that can be corresponding position belongs to the probability in non-travelable region.
Specified array index can preassign as first array index or second array index, it is assumed that specified array
Under be designated as first array index, then the pixel belongs to travelable region, for the pixel addition be designated as can travel region
Label;Assuming that specified array index is second array index, then the pixel belongs to non-travelable region, for the pixel
Addition is designated as the label in non-travelable region.
Largest contours determining module 202 is for determining the largest contours in travelable region.
Largest contours determining module 202 specifically can generate at least one connection according to each pixel in travelable region
Domain;The boundary line in largest connected domain at least one connected domain is searched, to obtain can travel the most bull wheel in region by boundary line
It is wide.Wherein, it should be noted that if only generating a connected domain, which is largest connected domain.
Road boundary identification module 203 is used to identify road boundary according to the largest contours that can travel region.
Road boundary identification module 203 can specifically be detected in the largest contours that can travel region by Hough transformation algorithm
Straight line portion, then identify to obtain road boundary according to the straight line portion in the largest contours.
It comprising travelable region and can not be travelled in the area image of the equipment such as the camera of embodiment of the present invention acquisition
Region, the boundary in two kinds of regions seek to identification travelable region boundary, road roadside according to an embodiment of the present invention
The accuracy of road boundary identification can be improved in the identification device on boundary, be easy and robust (or healthy and strong) realize that road boundary is known
Not.
In addition, the specific implementation content of the identification device of road boundary in embodiments of the present invention, road described above
It has been described in detail in the recognition methods on boundary, therefore has no longer illustrated in this duplicate contents.
Fig. 3 is shown can be using the recognition methods of the road boundary of the embodiment of the present invention or the identification device of road boundary
Exemplary system architecture 300.
As shown in figure 3, system architecture 300 may include terminal device 301,302,303, network 304 and server 305.
Network 304 between terminal device 301,302,303 and server 305 to provide the medium of communication link.Network 304 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 301,302,303 and be interacted by network 304 with server 305, to receive or send out
Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 301,302,303
The application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 301,302,303 can be the various electronic equipments with display screen and supported web page browsing, packet
Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 305 can be to provide the server of various services, such as utilize terminal device 301,302,303 to user
The shopping class website browsed provides the back-stage management server supported.Back-stage management server can look into the information received
It askes the data such as request to carry out the processing such as analyzing, and processing result (such as query result) is fed back into terminal device.
It should be noted that the recognition methods of road boundary provided by the embodiment of the present invention can by terminal device 301,
302,303 or server 305 execute, correspondingly, the identification device of road boundary may be disposed at terminal device 301,302,303 or
In server 305.
It should be understood that the number of terminal device, network and server in Fig. 3 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
Below with reference to Fig. 4, it illustrates the calculating of the terminal device or server that are suitable for being used to realize the embodiment of the present application
The structural schematic diagram of machine system 400.Terminal device or server shown in Fig. 4 are only an example, should not be to the application reality
The function and use scope for applying example bring any restrictions.
As shown in figure 4, computer system 400 includes central processing unit (CPU) 401, it can be read-only according to being stored in
Program in memory (ROM) 402 or be loaded into the program in random access storage device (RAM) 403 from storage section 408 and
Execute various movements appropriate and processing.In RAM 403, also it is stored with system 400 and operates required various programs and data.
CPU 401, ROM 402 and RAM 403 are connected with each other by bus 404.Input/output (I/O) interface 405 is also connected to always
Line 404.
I/O interface 405 is connected to lower component: the importation 406 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 407 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 408 including hard disk etc.;
And the communications portion 409 of the network interface card including LAN card, modem etc..Communications portion 409 via such as because
The network of spy's net executes communication process.Driver 410 is also connected to I/O interface 405 as needed.Detachable media 411, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 410, in order to read from thereon
Computer program be mounted into storage section 408 as needed.
Particularly, disclosed embodiment, the process of key step schematic diagram description above can be implemented according to the present invention
For computer software programs.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on meter
Computer program on calculation machine readable medium, the computer program include the program generation for method shown in execution flow chart
Code.In such embodiments, which can be downloaded and installed from network by communications portion 409, and/or
It is mounted from detachable media 411.When the computer program is executed by central processing unit (CPU) 401, execute the application's
The above-mentioned function of being limited in system.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In this application, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In application, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet
Include travelable area determination module 201, largest contours determining module 202, road boundary identification module 203.Wherein, these modules
Title do not constitute the restriction to the module itself under certain conditions, for example, can travel area determination module 201 can be with
It is described as " for determining the module in travelable region according to the area image of acquisition ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be
Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes
Obtaining the equipment includes: to determine travelable region according to the area image of acquisition;Determine the largest contours in the travelable region;It is logical
It crosses Hough transformation algorithm and detects straight line portion in the largest contours in the travelable region, and identified according to the straight line portion
The road boundary.
Technical solution according to an embodiment of the present invention determines travelable region according to the area image of acquisition, then determines
It can travel the largest contours in region, it is last to identify road boundary according to the largest contours that can travel region.It can be improved roadside
The accuracy of boundary's identification, be easy and robust (or healthy and strong) realize that road boundary identifies.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright
It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any
Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention
Within.