CN109389643B - Parking space main direction judging method, system and storage medium - Google Patents

Parking space main direction judging method, system and storage medium Download PDF

Info

Publication number
CN109389643B
CN109389643B CN201710679324.6A CN201710679324A CN109389643B CN 109389643 B CN109389643 B CN 109389643B CN 201710679324 A CN201710679324 A CN 201710679324A CN 109389643 B CN109389643 B CN 109389643B
Authority
CN
China
Prior art keywords
line
angle
group
main direction
parking space
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.)
Active
Application number
CN201710679324.6A
Other languages
Chinese (zh)
Other versions
CN109389643A (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.)
Zongmu Technology Shanghai Co Ltd
Original Assignee
Zongmu Technology Shanghai Co Ltd
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 Zongmu Technology Shanghai Co Ltd filed Critical Zongmu Technology Shanghai Co Ltd
Priority to CN201710679324.6A priority Critical patent/CN109389643B/en
Publication of CN109389643A publication Critical patent/CN109389643A/en
Application granted granted Critical
Publication of CN109389643B publication Critical patent/CN109389643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a parking space main direction judging method, a parking space main direction judging system and a storage medium, which comprise the following steps: s01: acquiring a captured image, detecting line segments in the captured image, and grouping the detected line segments according to angles; s02: analyzing the position relation among the line segments in each group, and scoring according to a certain rule; s03: and selecting the most reliable angle group according to the score, extracting line segments in the most reliable angle group, calculating the average angle of the line segments, and defining the average angle as a main direction angle theta. The invention can filter out line segments formed by the interference of divergent environments such as light rays in the captured image, and adds the line segments formed by fixed environments such as vehicles, pillars, walls, car barriers and the like in the captured image into the credibility of the main direction angle group in the scoring process, thereby improving the effectiveness and accuracy of the detected main direction angle theta of the parking space.

Description

Parking space main direction judging method, system and storage medium
Technical Field
The invention relates to the technical field of vehicle-mounted electronics, in particular to a parking space main direction judging method, a parking space main direction judging system and a storage medium.
Background
The increase of the automobile storage quantity promotes the development of large-scale parking lots, and in twenty-first century, the large-scale parking lots are more and more, and the increasing of the scale of the parking lots brings a series of problems of parking and taking vehicles, so that the large-scale parking lots become the social problems generally faced by each large-scale and medium-scale city worldwide.
Currently, there are many ways to detect a parking space, and some measure the parking space by detecting the distance between two adjacent vehicles that have been parked, for example, patent document "parking space detection method" disclosed in chinese patent CN104916163B discloses a parking space detection method, which includes: the binocular image of the side edge of the running vehicle is collected, and the optical axis direction of image collection is perpendicular to the running direction and parallel to the bottom surface of the vehicle; detecting characteristic pixel points and distribution thereof contained in the binocular image, wherein the characteristic pixel points are used for representing characteristics of parking space drawing lines or vehicle shapes; judging whether any image in the binocular image contains all characteristic pixel points corresponding to a parking space drawing line, if so, prompting that the parking space is detected; and determining the distance between two obstacle vehicles parked on the parking space according to the characteristic pixel points and the distribution thereof in the binocular image, and prompting that the parking space is between the two obstacle vehicles if the distance is not smaller than a preset threshold value. However, this method for determining parking spaces is difficult to be applied when there are many free parking spaces.
As can be seen from the content of the last paragraph of the 13 th page of the specification and fig. 8 of the specification, the method for detecting the parking space in the technical scheme is to obtain the detected parking space by overlapping the target parking position and the real-time captured image after the target parking position is input in advance by the target parking position input device as disclosed in the patent document of the vehicle backward movement assisting device and the vehicle parking assisting device in chinese patent CN 100507786C.
Some of the detected parking spaces are also obtained by communicating a map drawing unit provided in an onboard Electronic Control Unit (ECU) itself with a map database of a host computer via a wireless transmission protocol, and obtaining accurate information of the parking spaces from the map database of the host computer. The "vehicle position detecting unit 15 detects the current position of the vehicle as vehicle position information based on the GPS signal received by the GPS (Global Positioning System) receiver as described in paragraph [0031] of the" navigation apparatus "patent document disclosed in chinese patent CN 102405395B, and the" map drawing unit 21 described in paragraph [0035] displays on the screen of the display 27 based on the map information acquired from the map database 11, thereby obtaining the parking space. However, the parking space acquisition method has higher requirements on the real-time performance of the communication transmission between the vehicle-mounted electronic control unit and the upper computer and the stability of signal intensity, and if signals such as an underground parking garage are not good, the parking space is difficult to detect and acquire by the technology.
At present, a mainstream parking space detection algorithm is that a parking space line in an image is detected by capturing the image, and then a parking space combination is performed based on the parking space line so as to detect a main direction of a parking space and further detect the parking space. However, the method is affected by the environment in the process of detecting the parking space lines, and a plurality of invalid line segments are detected in the early stage, which causes trouble to the later-stage parking space combination, for example, the workload of the later-stage parking space combination calculation is increased, the accuracy of the disturbance reduction direction positioning of the miscellaneous line segments is increased, and therefore the parking space lines acquired in the captured image are required to be effectively screened.
Disclosure of Invention
In order to solve the above and other potential technical problems, the invention provides a parking space main direction judging method, a system and a storage medium, firstly, the line segments formed by divergent environmental interference such as light in a captured image are filtered through steps S01-S03, and the line segments formed by fixed environments such as vehicles, pillars, walls, car barriers and the like in the captured image are added into the credibility of a main direction angle group in the scoring process, so that the effectiveness and the accuracy of the detected parking space main direction angle theta are improved. Secondly, extracting a first main direction line group and a second main direction line group from the original line group through the detected main direction angle theta of the parking space, judging a horizontal line group and a vertical line group through analyzing the mutual relations of the line segments in the first main direction line group and the second main direction line group, reducing the interference of the miscellaneous line segments, improving the accuracy of direction positioning, reducing the workload of post parking space combination calculation, and carrying out validity screening on the parking space lines acquired in the captured image.
A parking space main direction judging method comprises the following steps:
s01: acquiring a captured image, detecting line segments in the captured image, and grouping the detected line segments according to angles;
s02: analyzing the position relation among the line segments in each group, and scoring according to a certain rule;
s03: and selecting the most reliable angle group according to the score, extracting line segments in the most reliable angle group, calculating the average angle of the line segments, and defining the average angle as a main direction angle theta.
Further, in step S01, when the detected line segments are grouped according to angles, 180/γ angle groups are set with γ degrees as angle intervals, and then the line segments detected in the captured image are placed into the corresponding angle groups according to the angle values.
The angle intervals of the angle groups can be 4-8 degrees different, the larger the angle intervals of the angle groups are, the more the number of line segments entering the angle groups can be relatively large, but the relative error of calculating the main direction angle theta after the most reliable angle groups are selected is large, the smaller the angle intervals of the angle groups are, the less the number of line segments entering the angle groups can be relatively small, but the relative error of calculating the main direction angle theta after the most reliable angle groups are selected is small.
For example, in an interval of 5 degrees, 36 angle groups, i.e., (0, 5) are set; (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) and (175, 180) placing the line segments detected in the captured image into corresponding angle groups according to the angle values. In another embodiment, 30 angle groups, i.e., (0, 6), are set in intervals of 6 degrees; (6, 12); (12, 18); (18, 24); the line segments detected in the captured image are then placed into the corresponding angle sets according to their angle values (174, 180). In another embodiment, 45 angle groups are set, namely, (0, 4), in 4 degree intervals; (4, 8); (8, 12); (12, 16); the line segments detected in the captured image are then placed into the corresponding angle sets according to their angle values (176, 180).
In another embodiment, the number of angle groups is not divided by the number of angle groups, but the number n of angle groups is defined to divide the angle groups into the angle groups with any angle group number of 30-45, for example, the line segments detected in the captured image are divided into the angle groups with any angle group number according to angles, and the number n of angle groups is divided by 180 to obtain the corresponding angle group range (0, 180/n); (180/n, 360/n) and (180-180/n, 180).
Further, in a preferred embodiment, in step S02, the scoring rule is:
any line segment in the angle group is extracted and marked as a standard line, the position information of the standard line is recorded, the rest line segments in the angle group are compared with the positions of the standard line one by one, and if the position relation between the rest line segments and the standard line meets the geometric characteristics of the parking space line, the angle group is recorded to be added with a score and the rest line segments are discarded; if the position relation between the residual line segment and the standard line does not meet the geometric characteristics of the parking space line, the recording angle group is not divided and the residual line segment is abandoned; and obtaining the score x1 of the angle group after the angle group is scored for the same times as the number of the rest line segments.
Further, in a preferred embodiment, in step S02, the position relationship between the remaining line segment and the standard line satisfying the parking space line geometric feature is expressed as:
the distance between the residual line segment and the standard line is within the width range of the parking space line, and the width range of the parking space line is 10-15 cm;
and b, the distance between the rest line segment and the standard line is within the width range of the parking space, and the width range of the parking space is 1.3-2.5 meters.
Further, in a preferred embodiment, in step S02, when calculating the distance between the remaining line segment and the standard line in the geometric feature of the parking space line, the method further includes the following determining step S021:
giving a captured image coordinate origin, respectively representing two endpoints of a standard line and a residual line segment by coordinates of the coordinate origin, judging whether the residual line segment is overlapped with the standard line in two coordinate directions of the coordinate origin, if so, judging whether the width of the parking space line meets the geometric feature of the parking space line, if so, recording the angle group, adding a score, and discarding the residual line segment; if no record angle group is added, the rest line segment is discarded.
Further, in a preferred embodiment, in step S02, when calculating the distance between the remaining line segment and the standard line in the geometric feature of the parking space line, the method further includes the following determining step S022:
giving a coordinate origin of the captured image, respectively representing two endpoints of a standard line and a residual line segment by coordinates of the coordinate origin, judging whether the residual line segment is coincident with the standard line in two coordinate directions of the coordinate origin, if so, comparing and scoring the distance between the middle point of the coincident section and the line width range of the parking space line or the parking space width range.
Further, in step S03, when the most reliable angle group is selected, the score x1 of each angle group is counted, x2, x3, x4, xn, the angle group with the highest score is selected as the most trusted angle group.
Further, step S04: combining all the line segments in the captured images detected in the step S01 into an original line segment set; extracting all line segments parallel or nearly parallel to the main direction of the parking space in the original line segment set, and marking the line segments as a first main direction line group; extracting line segments which are perpendicular or nearly perpendicular to the main direction of the parking space in the original line segment set, and marking the line segments as a second main direction line group;
the mutual relations of line segments in the first main direction line group and the second main direction line group are analyzed, and if the line segments in the first main direction line group or the second main direction line group meet one of the following cd relations, the line segments are judged to be horizontal line segment groups;
c the adjacent line segments in the same group are parallel or approximately parallel;
d, the distance between adjacent line segments in the same group is in a distance threshold range;
if one of the following relations of ef exists in the first main direction line group or the second main direction line group, the first main direction line group or the second main direction line group is judged to be a vertical line segment group:
e, all line segments in the same group are on the same straight line or approximately on the same straight line;
f the number of line segments which can be extracted on the same straight line in the same group is larger than the vertical line threshold value specified by the vertical line segment group.
Further, in the step S04:
when the line segments which are parallel or nearly parallel to the main direction theta of the parking space are extracted from the original line segment set, the angle range of the extracted line segments is taken as a median value, and the side angle deviations of 0-alpha degrees are respectively taken to the two sides of the main direction theta of the parking space to form the angle deviation range (theta-alpha, theta+alpha) of the first main direction line group;
when the line segments perpendicular to or close to the main direction theta of the parking space are extracted from the original line segment set, the angle range of the extracted line segments is the median value of an angle value theta+pi/2 perpendicular to the main direction theta of the parking space, and the lateral angle deviations of 0-beta degrees are respectively taken from two sides of the angle value theta+pi/2 to form the angle deviation range (theta+pi/2-beta, theta+pi/2+beta) of the second main direction line set.
Preferably, in the step S04, the angle deviation range of the first main direction line set and the angle deviation range of the second main direction line set are both 3 degrees. In another embodiment, in the step S04, α and β in the angle deviation range of the first main direction line group and the angle deviation range of the second main direction line group are both 5 degrees.
Further, when the step S01 acquires the captured image and detects the line segment in the captured image, the method further includes a step of preprocessing the captured image.
The parking space main direction judging system comprises an image capturing module, a parking space main direction judging module and a parking space main direction judging module, wherein the image capturing module is used for acquiring a captured image; the line segment detection module is used for detecting line segments formed by gray level differences in the captured images; the angle grouping module is used for grouping the detected line segments according to the angles; the angle group scoring module is used for analyzing the position relation between the line segments in each group of angle groups and scoring according to a certain rule; the angle group selection module is used for selecting the most reliable angle group according to the score; and the main direction angle calculation module is used for extracting line segments in the most reliable angle group and calculating the average angle of the line segments as the main direction angle theta.
As described above, the present invention has the following advantageous effects:
in practical scene application, the line segments formed by detecting environmental interference such as light in the captured image are divergent and have no regularity. The line segments formed by the fixed environments such as vehicles, pillars, walls, car barriers and the like in the captured images are detected to be consistent with the main direction, so that the following effects exist when the main direction of the parking space is judged based on the method:
firstly, filtering out line segments formed by the interference of divergent environments such as light rays in a captured image through steps S01-S03, and adding the line segments formed by fixed environments such as vehicles, pillars, walls, car barriers and the like in the captured image into the credibility of a main direction angle group in the scoring process, so that the effectiveness and accuracy of the detected main direction angle theta of the parking space are improved.
Secondly, extracting a first main direction line group in an angle deviation range (theta-alpha, theta+alpha) with the main direction angle theta of the parking space and a second main direction line group in an angle deviation range (theta+pi/2-beta, theta+pi/2+beta) with the main direction angle theta of the parking space from an original line segment set through the detected main direction angle theta of the parking space, judging a horizontal line segment group and a vertical line segment group through analyzing the mutual relations of line segments in the first main direction line group and the second main direction line group, reducing the interference of a miscellaneous line segment, improving the accuracy of direction positioning, reducing the workload of post parking space combination calculation, and carrying out validity screening on the parking space lines acquired in a captured image.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a line segment diagram of the captured image of the present invention on the left and the detected captured image on the right.
Fig. 2 shows an image of a line segment image that is parallel or nearly parallel to the main direction of the parking space on the left side and an image of the original line segment set before screening on the right side.
Fig. 3 shows an image of a line segment image with the left side being vertical or nearly vertical to the main direction of the parking space being screened, and the right side being the original line segment set before screening.
Fig. 4 shows a line segment image perpendicular to the main direction of the parking space after filtering out line segments formed by divergent environmental interference such as a plurality of light rays.
Fig. 5 shows the gain of the line segment formed by the fixed environment of the vehicle, the pillar, the wall, the fence, etc. to the main direction of the parking space.
Fig. 6 shows a flow chart of the present invention.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be understood that the structures, proportions, sizes, etc. shown in the drawings are for illustration purposes only and should not be construed as limiting the invention to the extent that it can be practiced, since modifications, changes in the proportions, or otherwise, used in the practice of the invention, are not intended to be critical to the essential characteristics of the invention, but are intended to fall within the spirit and scope of the invention. Also, the terms such as "upper," "lower," "left," "right," "middle," and "a" and the like recited in the present specification are merely for descriptive purposes and are not intended to limit the scope of the invention, but are intended to provide relative positional changes or modifications without materially altering the technical context in which the invention may be practiced.
With reference to figures 1 to 6 of the drawings,
a parking space main direction judging method comprises the following steps:
s01: acquiring a captured image, detecting line segments in the captured image, and grouping the detected line segments according to angles;
s02: analyzing the position relation among the line segments in each group, and scoring according to a certain rule;
s03: and selecting the most reliable angle group according to the score, extracting line segments in the most reliable angle group, calculating the average angle of the line segments, and defining the average angle as a main direction angle theta.
Further, in step S01, when the detected line segments are grouped according to angles, 180/γ angle groups are set with γ degrees as angle intervals, and then the line segments detected in the captured image are placed into the corresponding angle groups according to the angle values.
The angle intervals of the angle groups can be 4-8 degrees different, the larger the angle intervals of the angle groups are, the more the number of line segments entering the angle groups can be relatively large, but the relative error of calculating the main direction angle theta after the most reliable angle groups are selected is large, the smaller the angle intervals of the angle groups are, the less the number of line segments entering the angle groups can be relatively small, but the relative error of calculating the main direction angle theta after the most reliable angle groups are selected is small.
For example, in an interval of 5 degrees, 36 angle groups, i.e., (0, 5) are set; (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) and (175, 180) placing the line segments detected in the captured image into corresponding angle groups according to the angle values. In another embodiment, 30 angle groups, i.e., (0, 6), are set in intervals of 6 degrees; (6, 12); (12, 18); (18, 24); the line segments detected in the captured image are then placed into the corresponding angle sets according to their angle values (174, 180). In another embodiment, 45 angle groups are set, namely, (0, 4), in 4 degree intervals; (4, 8); (8, 12); (12, 16); the line segments detected in the captured image are then placed into the corresponding angle sets according to their angle values (176, 180).
In another embodiment, the number of angle groups is not divided by the number of angle groups, but the number n of angle groups is defined to divide the angle groups into the angle groups with any angle group number of 30-45, for example, the line segments detected in the captured image are divided into the angle groups with any angle group number according to angles, and the number n of angle groups is divided by 180 to obtain the corresponding angle group range (0, 180/n); (180/n, 360/n) and (180-180/n, 180).
As a preferred embodiment, in step S02, the scoring rule is:
any line segment in the angle group is extracted and marked as a standard line, the position information of the standard line is recorded, the rest line segments in the angle group are compared with the positions of the standard line one by one, and if the position relation between the rest line segments and the standard line meets the geometric characteristics of the parking space line, the angle group is recorded to be added with a score and the rest line segments are discarded; if the position relation between the residual line segment and the standard line does not meet the geometric characteristics of the parking space line, the recording angle group is not divided and the residual line segment is abandoned; and obtaining the score x1 of the angle group after the angle group is scored for the same times as the number of the rest line segments.
In a preferred embodiment, in step S02, the position relationship between the remaining line segment and the standard line satisfying the geometric feature of the parking space line is expressed as:
the distance between the residual line segment and the standard line is within the width range of the parking space line, and the width range of the parking space line is 10-15 cm;
and b, the distance between the rest line segment and the standard line is within the width range of the parking space, and the width range of the parking space is 1.3-2.5 meters.
In a preferred embodiment, in step S02, when calculating the distance between the remaining line segments in the geometric feature of the parking space line and the standard line, the method further includes the following determination step S021:
giving a captured image coordinate origin, respectively representing two endpoints of a standard line and a residual line segment by coordinates of the coordinate origin, judging whether the residual line segment is overlapped with the standard line in two coordinate directions of the coordinate origin, if so, judging whether the width of the parking space line meets the geometric feature of the parking space line, if so, recording the angle group, adding a score, and discarding the residual line segment; if no record angle group is added, the rest line segment is discarded.
As a preferred embodiment, in step S02, when calculating the distance between the remaining line segment in the geometric feature of the parking space line and the standard line, the method further includes the following determination step S022:
giving a coordinate origin of the captured image, respectively representing two endpoints of a standard line and a residual line segment by coordinates of the coordinate origin, judging whether the residual line segment is coincident with the standard line in two coordinate directions of the coordinate origin, if so, comparing and scoring the distance between the middle point of the coincident section and the line width range of the parking space line or the parking space width range.
In step S03, as a preferred embodiment, when the most reliable angle group is selected, the score x1 of each angle group is counted, x2, x3, x4, xn, the angle group with the highest score is selected as the most trusted angle group.
As a preferred embodiment, step S04 is further included: combining all the line segments in the captured images detected in the step S01 into an original line segment set; extracting all line segments parallel or nearly parallel to the main direction of the parking space in the original line segment set, and marking the line segments as a first main direction line group; extracting line segments which are perpendicular or nearly perpendicular to the main direction of the parking space in the original line segment set, and marking the line segments as a second main direction line group;
the mutual relations of line segments in the first main direction line group and the second main direction line group are analyzed, and if the line segments in the first main direction line group or the second main direction line group meet one of the following cd relations, the line segments are judged to be horizontal line segment groups;
c the adjacent line segments in the same group are parallel or approximately parallel;
d, the distance between adjacent line segments in the same group is in a distance threshold range;
if one of the following relations of ef exists in the first main direction line group or the second main direction line group, the first main direction line group or the second main direction line group is judged to be a vertical line segment group:
e, all line segments in the same group are on the same straight line or approximately on the same straight line;
f the number of line segments which can be extracted on the same straight line in the same group is larger than the vertical line threshold value specified by the vertical line segment group.
As a preferred embodiment, in the step S04:
when the line segments which are parallel or nearly parallel to the main direction theta of the parking space are extracted from the original line segment set, the angle range of the extracted line segments is taken as a median value, and the side angle deviations of 0-alpha degrees are respectively taken to the two sides of the main direction theta of the parking space to form the angle deviation range (theta-alpha, theta+alpha) of the first main direction line group;
when the line segments perpendicular to or close to the main direction theta of the parking space are extracted from the original line segment set, the angle range of the extracted line segments is the median value of an angle value theta+pi/2 perpendicular to the main direction theta of the parking space, and the lateral angle deviations of 0-beta degrees are respectively taken from two sides of the angle value theta+pi/2 to form the angle deviation range (theta+pi/2-beta, theta+pi/2+beta) of the second main direction line set.
Preferably, in the step S04, the angle deviation range of the first main direction line set and the angle deviation range of the second main direction line set are both 3 degrees. In another embodiment, in the step S04, α and β in the angle deviation range of the first main direction line group and the angle deviation range of the second main direction line group are both 5 degrees.
As a preferred embodiment, the step S01 further includes a step of preprocessing the captured image when capturing the captured image and detecting line segments in the captured image.
The parking space main direction judging system comprises an image capturing module, a parking space main direction judging module and a parking space main direction judging module, wherein the image capturing module is used for acquiring a captured image; the line segment detection module is used for detecting line segments formed by gray level differences in the captured images; the angle grouping module is used for grouping the detected line segments according to the angles; the angle group scoring module is used for analyzing the position relation between the line segments in each group of angle groups and scoring according to a certain rule; the angle group selection module is used for selecting the most reliable angle group according to the score; and the main direction angle calculation module is used for extracting line segments in the most reliable angle group and calculating the average angle of the line segments as the main direction angle theta.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims of this invention, which are within the skill of those skilled in the art, be included within the spirit and scope of this invention.

Claims (8)

1. The parking space main direction judging method is characterized by comprising the following steps of:
s01: acquiring a captured image, detecting line segments in the captured image, and grouping the detected line segments according to angles; the grouping of the detected line segments according to the angles comprises two grouping modes: setting 180/gamma angle groups by taking gamma degrees as angle intervals, and putting line segments detected in the captured image into corresponding angle groups according to the angle values of the line segments; secondly, dividing the range of the angle interval by the number n of the defined angle groups;
s02: analyzing the position relation among the line segments in each group, and scoring according to a certain rule; wherein, the scoring rule is: any line segment in the angle group is extracted and marked as a standard line, the position information of the standard line is recorded, the rest line segments in the angle group are compared with the positions of the standard line one by one, and if the position relation between the rest line segments and the standard line meets the geometric characteristics of the parking space line, the angle group is recorded to be added with a score and the rest line segments are discarded; if the position relation between the residual line segment and the standard line does not meet the geometric characteristics of the parking space line, the recording angle group is not divided and the residual line segment is abandoned; the score x1 of the angle group is obtained after the angle group is scored for the same times as the number of the rest line segments; when the most reliable angle group is selected, counting the scores x1, x2, x3 and x 4. Xn of each angle group, and selecting the angle group with the highest score as the most reliable angle group;
s03: and selecting the most reliable angle group according to the score, extracting line segments in the most reliable angle group, calculating the average angle of the line segments, and defining the average angle as a main direction angle theta.
2. The parking space main direction judging method according to claim 1, wherein in step S02, the position relation between the remaining line segments and the standard line satisfying the parking space line geometric feature is expressed as:
the distance between the residual line segment and the standard line is within the width range of the parking space line, and the width range of the parking space line is 10-15 cm;
and b, the distance between the rest line segment and the standard line is within the width range of the parking space, and the width range of the parking space is 1.3-2.5 meters.
3. The parking space main direction judging method according to claim 2, wherein in step S02, when calculating the distance between the remaining line segment and the standard line in the geometric feature of the parking space line, further comprising the following judging steps S021 and S022:
step S021: giving a captured image coordinate origin, respectively representing two endpoints of a standard line and a residual line segment by coordinates of the coordinate origin, judging whether the residual line segment is overlapped with the standard line in two coordinate directions of the coordinate origin, if so, judging whether the width of the parking space line meets the geometric feature of the parking space line, if so, recording the angle group, adding a score, and discarding the residual line segment; if no record angle group is added, discarding the rest line segment;
step S022: giving a coordinate origin of the captured image, respectively representing two endpoints of a standard line and a residual line segment by coordinates of the coordinate origin, judging whether the residual line segment is coincident with the standard line in two coordinate directions of the coordinate origin, if so, comparing and scoring the distance between the middle point of the coincident section and the line width range of the parking space line or the parking space width range.
4. The parking space main direction judging method according to claim 3, further comprising step S04:
combining all the line segments in the captured images detected in the step S01 into an original line segment set; extracting all line segments parallel or nearly parallel to the main direction of the parking space in the original line segment set, and marking the line segments as a first main direction line group; extracting line segments which are perpendicular or nearly perpendicular to the main direction of the parking space in the original line segment set, and marking the line segments as a second main direction line group;
the mutual relations of line segments in the first main direction line group and the second main direction line group are analyzed, and if the line segments in the first main direction line group or the second main direction line group meet one of the following cd relations, the line segments are judged to be horizontal line segment groups;
c the adjacent line segments in the same group are parallel or approximately parallel;
d, the distance between adjacent line segments in the same group is in a distance threshold range;
if one of the following relations of ef exists in the first main direction line group or the second main direction line group, the first main direction line group or the second main direction line group is judged to be a vertical line segment group: e, all line segments in the same group are on the same straight line or approximately on the same straight line;
f the number of line segments which can be extracted on the same straight line in the same group is larger than the vertical line threshold value specified by the vertical line segment group.
5. The parking space main direction judging method according to claim 4, wherein in the step S04:
when the line segments which are parallel or nearly parallel to the main direction theta of the parking space are extracted from the original line segment set, the angle range of the extracted line segments is taken as a median value, and the side angle deviations of 0-alpha degrees are respectively taken to the two sides of the main direction theta of the parking space to form the angle deviation range (theta-alpha, theta+alpha) of the first main direction line group;
when the line segments perpendicular to or close to the main direction theta of the parking space are extracted from the original line segment set, the angle range of the extracted line segments is the median value of an angle value theta+pi/2 perpendicular to the main direction theta of the parking space, and the lateral angle deviations of 0-beta degrees are respectively taken from two sides of the angle value theta+pi/2 to form the angle deviation range (theta+pi/2-beta, theta+pi/2+beta) of the second main direction line set.
6. The parking space main direction judging method according to any one of claims 1 to 5, wherein when the step S01 acquires the captured image and detects a line segment in the captured image, the method further comprises a step of preprocessing the captured image.
7. Parking stall main direction judgment system, its characterized in that includes:
the image capturing module is used for acquiring a captured image;
the line segment detection module is used for detecting line segments formed by gray level differences in the captured images;
the angle grouping module is used for grouping the detected line segments according to the angles; the grouping of the detected line segments according to the angles comprises two grouping modes: setting 180/gamma angle groups by taking gamma degrees as angle intervals, and putting line segments detected in the captured image into corresponding angle groups according to the angle values of the line segments; secondly, dividing the range of the angle interval by the number n of the defined angle groups;
the angle group scoring module is used for analyzing the position relation between the line segments in each group of angle groups and scoring according to a certain rule; wherein, the scoring rule is: any line segment in the angle group is extracted and marked as a standard line, the position information of the standard line is recorded, the rest line segments in the angle group are compared with the positions of the standard line one by one, and if the position relation between the rest line segments and the standard line meets the geometric characteristics of the parking space line, the angle group is recorded to be added with a score and the rest line segments are discarded; if the position relation between the residual line segment and the standard line does not meet the geometric characteristics of the parking space line, the recording angle group is not divided and the residual line segment is abandoned; the score x1 of the angle group is obtained after the angle group is scored for the same times as the number of the rest line segments; when the most reliable angle group is selected, counting the scores x1, x2, x3 and x 4. Xn of each angle group, and selecting the angle group with the highest score as the most reliable angle group;
the angle group selection module is used for selecting the most reliable angle group according to the score;
and the main direction angle calculation module is used for extracting line segments in the most reliable angle group and calculating the average angle of the line segments as the main direction angle theta.
8. A computer-readable storage medium having stored thereon a computer program, characterized by: the program is to implement the steps of the method of any of claims 1 to 5 when executed by a processor.
CN201710679324.6A 2017-08-10 2017-08-10 Parking space main direction judging method, system and storage medium Active CN109389643B (en)

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 CN109389643A (en) 2019-02-26
CN109389643B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112747734B (en) * 2019-10-31 2024-04-30 深圳拓邦股份有限公司 Method, system and device for adjusting direction of environment map

Citations (8)

* Cited by examiner, † Cited by third party
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
吴晓刚 ; .倒车辅助***车位线识别方法研究.测绘通报.2017,(07),全文. *

Also Published As

Publication number Publication date
CN109389643A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
CN106919915B (en) Map road marking and road quality acquisition device and method based on ADAS system
CN110443225B (en) Virtual and real lane line identification method and device based on feature pixel statistics
CN107341453B (en) Lane line extraction method and device
CN110501018B (en) Traffic sign information acquisition method for high-precision map production
CN109583280A (en) Lane detection method, apparatus, equipment and storage medium
WO2018133851A1 (en) Point cloud data processing method and apparatus, and computer storage medium
WO2018068653A1 (en) Point cloud data processing method and apparatus, and storage medium
CN110705458B (en) Boundary detection method and device
US9037403B2 (en) Intensity map-based localization with adaptive thresholding
WO2015096717A1 (en) Positioning method and device
CN102997926B (en) A kind of method for obtaining navigation data
JP2018092501A (en) On-vehicle image processing apparatus
CN102208013A (en) Scene matching reference data generation system and position measurement system
CN102222236A (en) Image processing system and position measurement system
CN105551016A (en) Method and device of road edge identification on the basis of laser-point cloud
CN109871787B (en) Obstacle detection method and device
CN111179152A (en) Road sign identification method and device, medium and terminal
CN101523439A (en) Method and apparatus for detecting objects from terrestrial based mobile mapping data
WO2008130219A1 (en) Method of and apparatus for producing road information
JP2015114126A (en) Vehicle location detection device
JP6615066B2 (en) Information processing apparatus, information processing method, and program
EP4120123A1 (en) Scan line-based road point cloud extraction method
CN109635737A (en) Automobile navigation localization method is assisted based on pavement marker line visual identity
JP2009205403A (en) Road sign recognition device and road sign recognition method
CN109613544B (en) Expressway sight distance detection method based on laser radar

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