CN109389643A - Parking stall principal direction judgment method, system and storage medium - Google Patents
Parking stall principal direction judgment method, system and storage medium Download PDFInfo
- Publication number
- CN109389643A CN109389643A CN201710679324.6A CN201710679324A CN109389643A CN 109389643 A CN109389643 A CN 109389643A CN 201710679324 A CN201710679324 A CN 201710679324A CN 109389643 A CN109389643 A CN 109389643A
- Authority
- CN
- China
- Prior art keywords
- line
- group
- angle
- line segment
- parking stall
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 239000000284 extract Substances 0.000 claims abstract description 18
- 238000012360 testing method Methods 0.000 claims abstract description 10
- 238000001514 detection method Methods 0.000 claims description 11
- 239000012141 concentrate Substances 0.000 claims description 4
- 239000004020 conductor Substances 0.000 claims description 3
- 238000002203 pretreatment Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims 1
- 238000004590 computer program Methods 0.000 claims 1
- 230000007613 environmental effect Effects 0.000 abstract description 5
- 230000008569 process Effects 0.000 abstract description 3
- 238000012216 screening Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 241000209094 Oryza Species 0.000 description 2
- 235000007164 Oryza sativa Nutrition 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 235000009566 rice Nutrition 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The present invention provides parking stall principal direction judgment method, system and storage medium, comprising the following steps: S01: obtaining capture image and detects the line segment in capture image, will test out line segment and be grouped according to angle;S02: analyzing the positional relationship the line segment in each group, is given a mark according to certain rule;S03: most believable angle group is chosen according to score, and extracts the line segment in most believable angle group, the average angle of line segment is calculated, is defined as principal direction angle, θ.The present invention may filter that the diversities environmental disturbances such as light are formed by line segment in capture image, and the fixed environments such as vehicle, pillar, wall side, arrester in image will be captured and be formed by the confidence level of line segment addition principal direction angle group in scoring process, and then improve the validity of the parking stall principal direction angle, θ detected, accuracy.
Description
Technical field
The present invention relates to vehicle electronics technical fields, more particularly to parking stall principal direction judgment method, system and storage
Medium.
Background technique
The increase of car ownership promotes the development of large parking lot, and since marching toward 21st century, ours is big
Type parking lot is more and more, and being growing for parking lot scale, brings a series of the problem of parking with picking up the car, has become
The social concern that each large- and-medium size cities generally face in world wide.
Currently, detection parking stall mode have very much, somewhat by detect parked completion two neighboring vehicle it
Between spacing measure parking stall, as disclosed in Chinese patent CN104916163B " position detecting method of parking " patent document,
One kind is disclosed to park position detecting method, comprising: the binocular image of acquisition driving vehicle side, the optical axis direction of Image Acquisition with
Driving direction is vertical, and parallel with vehicle bottom surface;Detect feature pixel and its distribution included in binocular image, it is described
Feature pixel is used to characterize the feature of parking position setting-out or vehicle shape;Judge whether contain in any image in binocular image
There are all feature pixels for corresponding to parking position setting-out, if then prompt detects parking position;According in binocular image
Feature pixel and its distribution determine the spacing between the two obstacle vehicles to berth on parking position, if the spacing is not less than default
Threshold values then prompts between the two obstacles vehicle as parking position.But the method on this measurement parking stall is more in idle parking position
In the case where be difficult to be applicable in.
For another example " vehicle backward movement assist device and vehicle parking assist device " disclosed in Chinese patent CN100507786C
Patent document, the content and Figure of description 8 in specification final stage of page 13 are it is found that detect parking in the technical solution
The method of position is to pre-enter target parking position by target parking position input unit and then pass through target parking position
Detection parking stall is obtained with being superimposed for real-time capture image.
It is that the map depiction portion itself having by vehicle-mounted electronic control unit (ECU) passes through there are also detection parking stall
The communication of the map data base of wireless transmission protocol and host computer, obtains the accurate letter on parking stall from the map data base of host computer
Breath." this vehicle described in [0031] section in " navigation device " patent document as disclosed in 102405395 B of Chinese patent CN
Position detection part 15 detects this vehicle based on by GPS (Global Positioning System) the received GPS signal of receiver
Current location, as this truck position information, " and " map depiction portion 21 is based on from map datum as described in [0035] section
The cartographic information that library 11 obtains, shows on the picture of display 27 " parking stall is obtained with this.But this parking stall obtains
Method is higher to the stability requirement of the real-time and signal strength of the communication transfer of vehicle-mounted electronic control unit and host computer, such as
The poor signals such as fruit underground parking garage are then difficult that parking stall is detected and obtained with this technology.
Currently, the parking stall detection algorithm of mainstream is then based on by capturing image, detecting the parking stall line in image
Parking stall line carries out parking stall and combines and then detect parking stall principal direction and then detect parking stall.But in detection parking stall line process
In it is affected by environment, there are many invalid line segment that detected early period, to later period parking stall combination cause to perplex, such as increase later period vehicle
The workload of bit combination calculating and the interference for increasing miscellaneous line segment reduce the precision of direction positioning, so in need in capture image
The parking stall line of acquisition carries out validity screening.
Summary of the invention
In order to solve above-mentioned and other potential technical problems, the present invention provides a kind of parking stall principal direction judgement sides
Method, system and storage medium, first, the diversities environmental disturbances such as light in capture image are filtered out by step S01~S03
The line segment being formed by, and the fixed environments such as vehicle, pillar, wall side, arrester in capture image are formed by line segment and are being beaten
The confidence level of addition principal direction angle group during point, and then improve the validity, accurate of the parking stall principal direction angle, θ detected
Degree.Second, then the parking stall principal direction angle, θ by detecting, it is concentrated from original line segments and extracts the first line of direction,principal group and second
Line of direction,principal group, and by the correlation of line segment in the first line of direction,principal group of analysis, the second line of direction,principal group, determine horizontal line
Section group and vertical segment group reduce the interference of miscellaneous line segment, improve the precision of direction positioning, reduce the work that the combination of later period parking stall calculates
It measures, the parking stall line to obtain in capture image carries out validity screening.
A kind of parking stall principal direction judgment method, comprising the following steps:
S01: obtaining capture image and detects the line segment in capture image, will test out line segment and is divided according to angle
Group;
S02: analyzing the positional relationship the line segment in each group, is given a mark according to certain rule;
S03: most believable angle group is chosen according to score, and extracts the line segment in most believable angle group, calculates line segment
Average angle, be defined as principal direction angle, θ.
Further, in step S01, when will test out line segment and being grouped according to angle, using γ degree as angular interval,
180/ γ angle group is set, then is put into the line segment detected in image is captured in corresponding angle group according to its angle value.
The angular interval of angle group can be differed with 4 °~8 °, the line segment of the more big then entry angle group of the angular interval of angle group
Quantity can relatively more but larger, the angle of angle group of selecting relative error when calculating principal direction angle, θ after most believable angle group
Degree section is smaller, and the line segment quantity of entry angle group can be relatively smaller but selects calculating principal direction angle, θ after most believable angle group
When relative error it is smaller.
For example, 36 angle groups, i.e. (0,5) are arranged with 5 degree for section;(5,10);(10,15);(15,20);(20,
25);(25,30);(30,35);(35,40);(40,45);(45,50);(50,55);(55,60);(60,65);(65,70);
(70,75);(75,80);(80,85);(85,90) (175,180) will capture the line segment detected in image again
It is put into corresponding angle group according to its angle value.In another embodiment, with 6 degree for section, 30 angle groups are set, i.e.,
(0,6);(6,12);(12,18);(18,24);(174,180) will capture the line segment root detected in image again
It is put into corresponding angle group according to its angle value.In another embodiment, with 4 degree for section, 45 angle groups are set, i.e., (0,
4);(4,8);(8,12);(12,16);(176,180) will capture the line segment detected in image according to its angle again
Angle value is put into corresponding angle group.
In another embodiment, angle group number is not divided with angular interval range, but to define of angle group
Number n exists to divide angular interval range, such as the line segment detected in capture image according to angular divisions for angle group quantity
Any of 30~45 angle group, then corresponding angular interval range (0,180/n) is obtained divided by angle group number n by 180;
(180/n, 360/n) (180-180/n, 180).
Further, in a preferred embodiment, in step S02, marking rule are as follows:
It extracts any line segment mark in angle group and is denoted as normal line, the location information of record standard line will remain in the angle group
Remaining line segment is one by one compared with standard line position, if the positional relationship of remaining line segment and normal line meets parking stall line geometry feature
When, it records the angle group and adds one point and abandon the residue line segment;If the positional relationship of remaining line segment and normal line is unsatisfactory for parking stall
When line geometry feature, record angle group bonus point and does not abandon the residue line segment;Angle group is by identical as remaining line segment quantity
Score number after, obtain the score x1 of the angle group.
Further, in a preferred embodiment, in step S02, the positional relationship of the residue line segment and normal line is full
Sufficient parking stall line geometry character representation are as follows:
The distance between a residue line segment and normal line are within the scope of the line line thickness of parking stall, the parking stall line line thickness
Range is 10~15 centimetres;
The distance between b residue line segment and normal line in the width range of parking stall, the parking stall width range is 1.3~
2.5 rice.
Further, in a preferred embodiment, in step S02, remaining line segment and mark in parking stall line geometry feature are calculated
Further include following judgment step S021 when the distance between directrix:
Capture image coordinate origin is given, two endpoints of normal line and remaining line segment are used to the coordinate of coordinate origin respectively
It indicates, judges that whether remaining line segment is overlapped with normal line on two coordinate directions of coordinate origin, sentences again if having coincidence
Determine whether parking stall line line thickness meets parking stall line geometry feature, adds one point if then recording the angle group and abandon the residue line
Section;Bonus point and the residue line segment is not abandoned if not recording angle group.
Further, in a preferred embodiment, in step S02, remaining line segment and mark in parking stall line geometry feature are calculated
Further include following judgment step S022 when the distance between directrix:
Capture image coordinate origin is given, two endpoints of normal line and remaining line segment are used to the coordinate of coordinate origin respectively
It indicates, judges that whether remaining line segment is overlapped with normal line on two coordinate directions of coordinate origin, if there is coincidence, takes coincidence
The midpoint distance of section compared with parking stall line line thickness range or parking stall width range, give a mark.
Further, in step S03, when choosing most believable angle group, score x1, x2, the x3 of all angles group are counted,
X4xn selects the highest angle group of its mid-score for most believable angle group.
Further, further include step S04: combining the line segment in all capture images detected in step S01
At original line segments collection;It extracts original line segments and concentrates all line segments being parallel or nearly parallel with parking stall principal direction, be labeled as first
Line of direction,principal group;Original line segments concentration and the vertical or near vertical line segment of parking stall principal direction are extracted, the second principal direction is labeled as
Line group;
Analyze the first line of direction,principal group, in the second line of direction,principal group line segment correlation, if the first line of direction,principal group or
First what the second line of direction,principal group middle conductor was all satisfied following cd relationship is determined as horizontal line section group;
Parallel or less parallel between adjacent segments in same group of c;
Spacing in same group of d between adjacent segments is within the scope of spacing threshold;
If first the first line of direction,principal group or the second line of direction,principal group line segment are determined as vertical line there are following ef relationship
Section group:
All line segments in same group of e on the same line or it is approximate on the same line;
It can extract the vertical line that the line segment quantity on same straight line is greater than vertical segment group defined in same group of f
Threshold value.
Further, in the step S04:
When extracting the line segment that original line segments are concentrated and principal direction θ in parking stall is parallel or nearly parallel, the angle of line segment is extracted
Range takes 0 °~α ° of side angular deviation to the two sides of parking stall principal direction angle, θ using parking stall principal direction angle, θ as intermediate value respectively
To form the angular deviation range (θ-α, θ+α) of the first line of direction,principal group;
When extracting the line segment that original line segments are concentrated and principal direction θ in parking stall is vertical or near vertical, the angle of line segment is extracted
Range takes 0 ° using the angle value θ+pi/2 perpendicular with parking stall principal direction angle, θ as intermediate value, to angle value θ+pi/2 two sides respectively
~β ° of side angular deviation is to form the angular deviation range (θ+pi/2-β, θ+pi/2+β) of the second line of direction,principal group.
Preferably, in the step S04, the angle of the angular deviation range of the first line of direction,principal group and the second line of direction,principal group
The α and β spent in deviation range is 3 degree.In another embodiment, in the step S04, the angle of the first line of direction,principal group is inclined
α and β in the angular deviation range of poor range and the second line of direction,principal group are 5 degree.
It further, further include to capture when the step S01 obtains capture image and detects the line segment in capture image
Image carries out pre-treatment step.
Parking stall principal direction judges system, including, image capture module, for obtaining capture image;Line segment detection module is used
Gray scale difference is formed by line segment in detection capture image;Angle is grouped module, for will test out line segment according to angle
Degree is grouped;Angle group grading module, for analyzing the positional relationship the line segment in each group of angle group, according to
Certain rule is given a mark;Angle group chooses module, for choosing most believable angle group according to score;Principal direction goniometer
Module is calculated, the line segment in most believable angle group is used for and extracts, the average angle for calculating line segment is main orientation angle θ.
As described above, of the invention has the advantages that
In actual scene application, detect that capturing the environmental disturbances such as light in image to be formed by line segment is diverging,
It has not regulation.And detect in capture image the fixed environments such as vehicle, pillar, wall side, arrester be formed by line segment with
Principal direction is consistent, so there are following effects when judging parking stall principal direction based on this method:
First, the line that the diversities environmental disturbances such as light are formed by capture image is filtered out by step S01~S03
Section, and the fixed environments such as vehicle, pillar, wall side, arrester in capture image are formed by line segment addition in scoring process
The confidence level of principal direction angle group, and then improve the validity of the parking stall principal direction angle, θ detected, accuracy.
Second, then the parking stall principal direction angle, θ by detecting, it concentrates and extracts and principal direction angle in parking stall from original line segments
θ is at an angle of the first line of direction,principal group of deviation range (θ-α, θ+α) and is at an angle of deviation range (θ with parking stall principal direction angle, θ
+ pi/2-β, θ+pi/2+β) the second line of direction,principal group, and pass through the first line of direction,principal group of analysis, line segment in the second line of direction,principal group
Correlation, determine horizontal line section group and vertical segment group, reduce the interference of miscellaneous line segment, improve the precision of direction positioning, subtract
The workload that small later period parking stall combination calculates, the parking stall line to obtain in capture image carry out validity screening.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 display left side is the line chart detected in capture image on the right side of capture image of the invention.
Fig. 2 display left side is screening for the line segment image right side being parallel or nearly parallel with parking stall principal direction filtered out
The image of preceding original line segments collection.
Fig. 3 display left side is screening for the line segment image right side vertical or near vertical with parking stall principal direction filtered out
The image of preceding original line segments collection.
Fig. 4 show after screening and filtering falls line segment that the diversities environmental disturbances such as multiple light are formed by with the main side in parking stall
To vertical line segment image.
Fig. 5 shows that the fixed environments such as vehicle, pillar, wall side, arrester are formed by what line segment judged parking stall principal direction
Gain.
Fig. 6 is shown as flow diagram of the invention.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Other advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from
Various modifications or alterations are carried out under spirit of the invention.It should be noted that in the absence of conflict, following embodiment and implementation
Feature in example can be combined with each other.
It should be clear that this specification structure depicted in this specification institute accompanying drawings, ratio, size etc., only to cooperate specification to be taken off
The content shown is not intended to limit the invention enforceable qualifications so that those skilled in the art understands and reads, therefore
Do not have technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the present invention
Under the effect of can be generated and the purpose that can reach, it should all still fall in disclosed technology contents and obtain the model that can cover
In enclosing.Meanwhile cited such as "upper" in this specification, "lower", "left", "right", " centre " and " one " term, be also only
Convenient for being illustrated for narration, rather than to limit the scope of the invention, relativeness is altered or modified, in no essence
It changes under technology contents, when being also considered as the enforceable scope of the present invention.
Referring to FIG. 1 to FIG. 6,
A kind of parking stall principal direction judgment method, comprising the following steps:
S01: obtaining capture image and detects the line segment in capture image, will test out line segment and is divided according to angle
Group;
S02: analyzing the positional relationship the line segment in each group, is given a mark according to certain rule;
S03: most believable angle group is chosen according to score, and extracts the line segment in most believable angle group, calculates line segment
Average angle, be defined as principal direction angle, θ.
Further, in step S01, when will test out line segment and being grouped according to angle, using γ degree as angular interval,
180/ γ angle group is set, then is put into the line segment detected in image is captured in corresponding angle group according to its angle value.
The angular interval of angle group can be differed with 4 °~8 °, the line segment of the more big then entry angle group of the angular interval of angle group
Quantity can relatively more but larger, the angle of angle group of selecting relative error when calculating principal direction angle, θ after most believable angle group
Degree section is smaller, and the line segment quantity of entry angle group can be relatively smaller but selects calculating principal direction angle, θ after most believable angle group
When relative error it is smaller.
For example, 36 angle groups, i.e. (0,5) are arranged with 5 degree for section;(5,10);(10,15);(15,20);(20,
25);(25,30);(30,35);(35,40);(40,45);(45,50);(50,55);(55,60);(60,65);(65,70);
(70,75);(75,80);(80,85);(85,90) (175,180) will capture the line segment detected in image again
It is put into corresponding angle group according to its angle value.In another embodiment, with 6 degree for section, 30 angle groups are set, i.e.,
(0,6);(6,12);(12,18);(18,24);(174,180) will capture the line segment root detected in image again
It is put into corresponding angle group according to its angle value.In another embodiment, with 4 degree for section, 45 angle groups are set, i.e., (0,
4);(4,8);(8,12);(12,16);(176,180) will capture the line segment detected in image according to its angle again
Angle value is put into corresponding angle group.
In another embodiment, angle group number is not divided with angular interval range, but to define of angle group
Number n exists to divide angular interval range, such as the line segment detected in capture image according to angular divisions for angle group quantity
Any of 30~45 angle group, then corresponding angular interval range (0,180/n) is obtained divided by angle group number n by 180;
(180/n, 360/n) (180-180/n, 180).
As a preferred embodiment, in a preferred embodiment, in step S02, marking rule are as follows:
It extracts any line segment mark in angle group and is denoted as normal line, the location information of record standard line will remain in the angle group
Remaining line segment is one by one compared with standard line position, if the positional relationship of remaining line segment and normal line meets parking stall line geometry feature
When, it records the angle group and adds one point and abandon the residue line segment;If the positional relationship of remaining line segment and normal line is unsatisfactory for parking stall
When line geometry feature, record angle group bonus point and does not abandon the residue line segment;Angle group is by identical as remaining line segment quantity
Score number after, obtain the score x1 of the angle group.
In a preferred embodiment, in step S02, it is several that the positional relationship of the residue line segment and normal line meets parking stall line
What character representation are as follows:
The distance between a residue line segment and normal line are within the scope of the line line thickness of parking stall, the parking stall line line thickness
Range is 10~15 centimetres;
The distance between b residue line segment and normal line in the width range of parking stall, the parking stall width range is 1.3~
2.5 rice.
As a preferred embodiment, in a preferred embodiment, in step S02, remaining line in parking stall line geometry feature is calculated
Further include following judgment step S021 when the distance between section and normal line:
Capture image coordinate origin is given, two endpoints of normal line and remaining line segment are used to the coordinate of coordinate origin respectively
It indicates, judges that whether remaining line segment is overlapped with normal line on two coordinate directions of coordinate origin, sentences again if having coincidence
Determine whether parking stall line line thickness meets parking stall line geometry feature, adds one point if then recording the angle group and abandon the residue line
Section;Bonus point and the residue line segment is not abandoned if not recording angle group.
As a preferred embodiment, in a preferred embodiment, in step S02, remaining line in parking stall line geometry feature is calculated
Further include following judgment step S022 when the distance between section and normal line:
Capture image coordinate origin is given, two endpoints of normal line and remaining line segment are used to the coordinate of coordinate origin respectively
It indicates, judges that whether remaining line segment is overlapped with normal line on two coordinate directions of coordinate origin, if there is coincidence, takes coincidence
The midpoint distance of section compared with parking stall line line thickness range or parking stall width range, give a mark.
As a preferred embodiment, in step S03, when choosing most believable angle group, the score x1 of all angles group is counted,
X2, x3, x4xn select the highest angle group of its mid-score for most believable angle group.
It as a preferred embodiment, further include step S04: by the line in all capture images detected in step S01
Section is combined into original line segments collection;It extracts original line segments and concentrates all line segments being parallel or nearly parallel with parking stall principal direction, label
For the first line of direction,principal group;Original line segments concentration and the vertical or near vertical line segment of parking stall principal direction are extracted, is labeled as second
Line of direction,principal group;
Analyze the first line of direction,principal group, in the second line of direction,principal group line segment correlation, if the first line of direction,principal group or
First what the second line of direction,principal group middle conductor was all satisfied following cd relationship is determined as horizontal line section group;
Parallel or less parallel between adjacent segments in same group of c;
Spacing in same group of d between adjacent segments is within the scope of spacing threshold;
If first the first line of direction,principal group or the second line of direction,principal group line segment are determined as vertical line there are following ef relationship
Section group:
All line segments in same group of e on the same line or it is approximate on the same line;
It can extract the vertical line that the line segment quantity on same straight line is greater than vertical segment group defined in same group of f
Threshold value.
As a preferred embodiment, in the step S04:
When extracting the line segment that original line segments are concentrated and principal direction θ in parking stall is parallel or nearly parallel, the angle of line segment is extracted
Range takes 0 °~α ° of side angular deviation to the two sides of parking stall principal direction angle, θ using parking stall principal direction angle, θ as intermediate value respectively
To form the angular deviation range (θ-α, θ+α) of the first line of direction,principal group;
When extracting the line segment that original line segments are concentrated and principal direction θ in parking stall is vertical or near vertical, the angle of line segment is extracted
Range takes 0 ° using the angle value θ+pi/2 perpendicular with parking stall principal direction angle, θ as intermediate value, to angle value θ+pi/2 two sides respectively
~β ° of side angular deviation is to form the angular deviation range (θ+pi/2-β, θ+pi/2+β) of the second line of direction,principal group.
Preferably, in the step S04, the angle of the angular deviation range of the first line of direction,principal group and the second line of direction,principal group
The α and β spent in deviation range is 3 degree.In another embodiment, in the step S04, the angle of the first line of direction,principal group is inclined
α and β in the angular deviation range of poor range and the second line of direction,principal group are 5 degree.
As a preferred embodiment, when the step S01 obtains capture image and detects the line segment in capture image, further include
Pre-treatment step is carried out to capture image.
Parking stall principal direction judges system, including, image capture module, for obtaining capture image;Line segment detection module is used
Gray scale difference is formed by line segment in detection capture image;Angle is grouped module, for will test out line segment according to angle
Degree is grouped;Angle group grading module, for analyzing the positional relationship the line segment in each group of angle group, according to
Certain rule is given a mark;Angle group chooses module, for choosing most believable angle group according to score;Principal direction goniometer
Module is calculated, the line segment in most believable angle group is used for and extracts, the average angle for calculating line segment is main orientation angle θ.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology all without departing from the spirit and scope of the present invention, carries out modifications and changes to above-described embodiment.Cause
This, includes that institute is complete without departing from the spirit and technical ideas disclosed in the present invention for usual skill in technical field such as
At all equivalent modifications or change, should be covered by the claims of the present invention.
Claims (10)
1. a kind of parking stall principal direction judgment method, which comprises the following steps:
S01: obtaining capture image and detects the line segment in capture image, will test out line segment and is grouped according to angle;
S02: analyzing the positional relationship the line segment in each group, is given a mark according to certain rule;
S03: most believable angle group is chosen according to score, and extracts the line segment in most believable angle group, calculates the flat of line segment
Equal angle is defined as principal direction angle, θ.
2. principal direction judgment method in parking stall according to claim 1, which is characterized in that in step S01, will test out line
When section is grouped according to angle, there are two types of packet modes: 180/ γ angle group is arranged using γ degree as angular interval in one,
The line segment detected in image will be captured again to be put into corresponding angle group according to its angle value;Secondly to define of angle group
N is counted to divide angular interval range.
3. principal direction judgment method in parking stall according to claim 2, which is characterized in that in step S02, marking rule are as follows:
It extracts any line segment mark in angle group and is denoted as normal line, the location information of record standard line, by remaining line segment in the angle group
One by one compared with standard line position, if the positional relationship of remaining line segment and normal line meets parking stall line geometry feature, record
The angle group adds one point and abandons the residue line segment;If it is special that the positional relationship of remaining line segment and normal line is unsatisfactory for parking stall line geometry
When sign, record angle group bonus point and does not abandon the residue line segment;Angle group is by score time identical with remaining line segment quantity
After number, the score x1 of the angle group is obtained;When choosing most believable angle group, score x1, x2, the x3 of all angles group are counted,
X4xn selects the highest angle group of its mid-score for most believable angle group.
4. principal direction judgment method in parking stall according to claim 3, which is characterized in that in step S02, the residue line segment
Meet parking stall line geometry character representation with the positional relationship of normal line are as follows:
The distance between a residue line segment and normal line are within the scope of the line line thickness of parking stall, the parking stall line line thickness range
It is 10~15 centimetres;
In the width range of parking stall, the parking stall width range is 1.3~2.5 meters for the distance between b residue line segment and normal line.
5. principal direction judgment method in parking stall according to claim 4, which is characterized in that in step S02, it is several to calculate parking stall line
Further include following judgment step S021 and step S022 in what feature when remaining the distance between line segment and normal line:
Step S021: giving capture image coordinate origin, and two endpoints of normal line and remaining line segment are used coordinate origin respectively
Coordinate representation, judge on two coordinate directions of coordinate origin whether remaining line segment is overlapped with normal line, if there is coincidence
Then determine whether parking stall line line thickness meets parking stall line geometry feature again, adds one point if then recording the angle group and abandon this
Remaining line segment;Bonus point and the residue line segment is not abandoned if not recording angle group;
Step S022: giving capture image coordinate origin, and two endpoints of normal line and remaining line segment are used coordinate origin respectively
Coordinate representation, judge on two coordinate directions of coordinate origin whether remaining line segment is overlapped with normal line, if there is coincidence,
It takes the midpoint distance for being overlapped section compared with parking stall line line thickness range or parking stall width range, give a mark.
6. principal direction judgment method in parking stall according to claim 5, which is characterized in that further include step S04:
Line segment in all capture images detected in step S01 is combined into original line segments collection;Extract original line segments collection
In all line segments being parallel or nearly parallel with parking stall principal direction, be labeled as the first line of direction,principal group;Original line segments are extracted to concentrate
The vertical or near vertical line segment with parking stall principal direction is labeled as the second line of direction,principal group;
Analyze the first line of direction,principal group, in the second line of direction,principal group line segment correlation, if the first line of direction,principal group or second
First what line of direction,principal group middle conductor was all satisfied following cd relationship is determined as horizontal line section group;
Parallel or less parallel between adjacent segments in same group of c;
Spacing in same group of d between adjacent segments is within the scope of spacing threshold;
If first the first line of direction,principal group or the second line of direction,principal group line segment are determined as vertical segment group there are following ef relationship:
All line segments in same group of e on the same line or it is approximate on the same line;
It can extract the vertical line threshold that the line segment quantity on same straight line is greater than vertical segment group defined in same group of f
Value.
7. principal direction judgment method in parking stall according to claim 6, which is characterized in that in the step S04:
When extracting the line segment that original line segments are concentrated and principal direction θ in parking stall is parallel or nearly parallel, the angular range of line segment is extracted
Using parking stall principal direction angle, θ as intermediate value, take 0 °~α ° of side angular deviation with group respectively to the two sides of parking stall principal direction angle, θ
At the angular deviation range (θ-α, θ+α) of the first line of direction,principal group;
When extracting the line segment that original line segments are concentrated and principal direction θ in parking stall is vertical or near vertical, the angular range of line segment is extracted
Using the angle value θ+pi/2 perpendicular with parking stall principal direction angle, θ as intermediate value, 0 °~β ° is taken respectively to angle value θ+pi/2 two sides
Side angular deviation to form the angular deviation range (θ+pi/2-β, θ+pi/2+β) of the second line of direction,principal group.
8. described in any item parking stall principal direction judgment methods according to claim 1~7, which is characterized in that the step S01 is obtained
It further include that pre-treatment step is carried out to capture image when taking capture image and detecting the line segment in capture image.
9. parking stall principal direction judges system characterized by comprising
Image capture module, for obtaining capture image;
Line segment detection module is formed by line segment for detecting gray scale difference in capture image;
Angle is grouped module, is grouped for will test out line segment according to angle;
Angle group grading module, for analyzing the positional relationship the line segment in each group of angle group, according to certain
Rule is given a mark;
Angle group chooses module, for choosing most believable angle group according to score;
Principal direction angle calculation module is used for and extracts the line segment in most believable angle group, and the average angle for calculating line segment is
Principal direction angle, θ.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the program is by processor
The step in the method as described in claim 1 to 8 any claim is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710679324.6A CN109389643B (en) | 2017-08-10 | 2017-08-10 | Parking space main direction judging method, system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710679324.6A CN109389643B (en) | 2017-08-10 | 2017-08-10 | Parking space main direction judging method, system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109389643A true CN109389643A (en) | 2019-02-26 |
CN109389643B CN109389643B (en) | 2024-02-06 |
Family
ID=65414321
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710679324.6A Active CN109389643B (en) | 2017-08-10 | 2017-08-10 | Parking space main direction judging method, system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109389643B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112747734A (en) * | 2019-10-31 | 2021-05-04 | 深圳拓邦股份有限公司 | Environment map direction adjusting method, system and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010107457A (en) * | 2008-10-31 | 2010-05-13 | Aisin Aw Co Ltd | Vehicle-mounted navigation device and program for determination of azimuth changed position of vehicle |
DE102011015935A1 (en) * | 2011-04-02 | 2012-10-04 | Valeo Schalter Und Sensoren Gmbh | Method for determining a correction value for the measurement of a target angle with a radar device, driver assistance system and motor vehicle |
CN102968634A (en) * | 2012-11-23 | 2013-03-13 | 南京大学 | Method for extracting parking lot structure under main direction restriction |
CN103453913A (en) * | 2013-08-29 | 2013-12-18 | 镇江青思网络科技有限公司 | Integrated positioning method of vehicle in parking lot |
DE102012018112A1 (en) * | 2012-09-13 | 2014-03-13 | Valeo Schalter Und Sensoren Gmbh | Method for determining the orientation of a parking space, parking assistance system and motor vehicle |
CN104608766A (en) * | 2014-12-29 | 2015-05-13 | 李德毅 | Automatic parking method and system used for intelligent vehicle through parking memory stick |
CN104933409A (en) * | 2015-06-12 | 2015-09-23 | 北京理工大学 | Parking space identification method based on point and line features of panoramic image |
DE102015015059A1 (en) * | 2015-11-20 | 2017-05-24 | Audi Ag | Method for detection and localization of a garage and motor vehicle |
-
2017
- 2017-08-10 CN CN201710679324.6A patent/CN109389643B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010107457A (en) * | 2008-10-31 | 2010-05-13 | Aisin Aw Co Ltd | Vehicle-mounted navigation device and program for determination of azimuth changed position of vehicle |
DE102011015935A1 (en) * | 2011-04-02 | 2012-10-04 | Valeo Schalter Und Sensoren Gmbh | Method for determining a correction value for the measurement of a target angle with a radar device, driver assistance system and motor vehicle |
DE102012018112A1 (en) * | 2012-09-13 | 2014-03-13 | Valeo Schalter Und Sensoren Gmbh | Method for determining the orientation of a parking space, parking assistance system and motor vehicle |
CN102968634A (en) * | 2012-11-23 | 2013-03-13 | 南京大学 | Method for extracting parking lot structure under main direction restriction |
CN103453913A (en) * | 2013-08-29 | 2013-12-18 | 镇江青思网络科技有限公司 | Integrated positioning method of vehicle in parking lot |
CN104608766A (en) * | 2014-12-29 | 2015-05-13 | 李德毅 | Automatic parking method and system used for intelligent vehicle through parking memory stick |
CN104933409A (en) * | 2015-06-12 | 2015-09-23 | 北京理工大学 | Parking space identification method based on point and line features of panoramic image |
DE102015015059A1 (en) * | 2015-11-20 | 2017-05-24 | Audi Ag | Method for detection and localization of a garage and motor vehicle |
Non-Patent Citations (1)
Title |
---|
吴晓刚;: "倒车辅助系统车位线识别方法研究" * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112747734A (en) * | 2019-10-31 | 2021-05-04 | 深圳拓邦股份有限公司 | Environment map direction adjusting method, system and device |
CN112747734B (en) * | 2019-10-31 | 2024-04-30 | 深圳拓邦股份有限公司 | Method, system and device for adjusting direction of environment map |
Also Published As
Publication number | Publication date |
---|---|
CN109389643B (en) | 2024-02-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110501018B (en) | Traffic sign information acquisition method for high-precision map production | |
US20200041284A1 (en) | Map road marking and road quality collecting apparatus and method based on adas system | |
CN102208013B (en) | Landscape coupling reference data generation system and position measuring system | |
CN110705458B (en) | Boundary detection method and device | |
CN114526745B (en) | Drawing construction method and system for tightly coupled laser radar and inertial odometer | |
CN106296814B (en) | Highway maintenance detection and virtual interactive interface method and system | |
CN106525057A (en) | Generation system for high-precision road map | |
CN111275960A (en) | Traffic road condition analysis method, system and camera | |
CN108759823B (en) | Low-speed automatic driving vehicle positioning and deviation rectifying method on designated road based on image matching | |
CN104183127A (en) | Traffic surveillance video detection method and device | |
EP3842735B1 (en) | Position coordinates estimation device, position coordinates estimation method, and program | |
CN104616502A (en) | License plate identification and positioning system based on combined type vehicle-road video network | |
CN105608417A (en) | Traffic signal lamp detection method and device | |
CN110018503B (en) | Vehicle positioning method and positioning system | |
CN104422426B (en) | The method and apparatus that vehicle navigation information is provided in overpass region | |
CN111160132B (en) | Method and device for determining lane where obstacle is located, electronic equipment and storage medium | |
Gressenbuch et al. | Mona: The munich motion dataset of natural driving | |
CN110111018B (en) | Method, device, electronic equipment and storage medium for evaluating vehicle sensing capability | |
CN113566779B (en) | Vehicle course angle estimation method based on linear detection and digital map matching | |
CN115083203B (en) | Method and system for inspecting parking in road based on image recognition berth | |
CN109389643A (en) | Parking stall principal direction judgment method, system and storage medium | |
CN108981729A (en) | Vehicle positioning method and device | |
CN115440071B (en) | Automatic driving illegal parking detection method | |
CN115900732A (en) | Combined navigation method and system based on roadside camera and vehicle-mounted unit | |
CN114895274A (en) | Guardrail identification method |
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 |