CN114943954B - Parking space detection method, device and system - Google Patents

Parking space detection method, device and system Download PDF

Info

Publication number
CN114943954B
CN114943954B CN202210856157.9A CN202210856157A CN114943954B CN 114943954 B CN114943954 B CN 114943954B CN 202210856157 A CN202210856157 A CN 202210856157A CN 114943954 B CN114943954 B CN 114943954B
Authority
CN
China
Prior art keywords
parking space
parking
frame
point
position information
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
CN202210856157.9A
Other languages
Chinese (zh)
Other versions
CN114943954A (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.)
Suzhou Moshi Intelligent Technology Co ltd
Original Assignee
Suzhou Moshi Intelligent Technology 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 Suzhou Moshi Intelligent Technology Co ltd filed Critical Suzhou Moshi Intelligent Technology Co ltd
Priority to CN202210856157.9A priority Critical patent/CN114943954B/en
Publication of CN114943954A publication Critical patent/CN114943954A/en
Application granted granted Critical
Publication of CN114943954B publication Critical patent/CN114943954B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/586Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of parking space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/16Anti-collision systems
    • G08G1/168Driving aids for parking, e.g. acoustic or visual feedback on parking space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Abstract

The invention discloses a parking space detection method, a device and a system, wherein the parking space detection method comprises the steps of obtaining a target image around a vehicle; detecting a parking stall frame in a target image to obtain parking stall frame information, wherein the parking stall frame information comprises position information of a peak of the parking stall frame in the target image; dividing the target image into a plurality of grids, detecting parking space angular points in the target image based on the grids to obtain more accurate parking space angular point information, wherein the parking space angular point information identifies the target grid where the parking space angular points are located and position information of the parking space angular points in the target grid; and according to the position information of the parking space angular points. And correcting the position information of the top point of the parking space frame, and determining the region where the corrected parking space frame is located as a parking space region. The detection accuracy can be improved.

Description

Parking space detection method, device and system
Technical Field
The invention relates to the technical field of automatic driving, in particular to a parking space detection method, device and system.
Background
With the rapid development of the automatic driving technology, the automatic parking technology based on the low-speed scene is widely applied. The automatic parking technology means that a vehicle is automatically parked in a position without manual control.
At present, different automatic parking systems can adopt different methods to sense parking spaces so as to perform automatic parking. One type of automatic parking system is based on radar to sense parking spaces. The automatic parking system can detect the parking space between two vehicles, but cannot detect the parking space marked on the open ground. Another type of automatic parking system is based on cameras to sense the parking space. The automatic parking system can identify the parking spaces marked on the open ground, is less limited, and is developed rapidly at present.
Some camera-based automatic parking systems now detect parking spaces by means of angular point detection. When the corner points of the parking spaces are not clear, the condition of missing detection or false detection exists. The detection precision needs to be improved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a parking space detection method, apparatus, system and computer readable storage medium, which can improve detection accuracy and robustness.
The invention provides a parking space detection method on the one hand, which comprises the following steps:
acquiring a target image around a vehicle;
detecting a parking stall frame in the target image to obtain parking stall frame information, wherein the parking stall frame information comprises position information of a peak of the parking stall frame in the target image;
dividing the target image into a plurality of grids, detecting parking space angular points in the target image based on the grids to obtain parking space angular point information, wherein the parking space angular point information identifies the target grid where the parking space angular points are located and position information of the parking space angular points in the target grid; and
and correcting the position information of the top point of the parking space frame according to the position information of the corner point of the parking space, and determining the region of the corrected parking space frame as a parking space region.
In some embodiments, the dividing the target image into a plurality of grids comprises:
dividing the target image into a plurality of grids according to a preset rule, so that when a plurality of parking space angular points exist in the target image, the parking space angular points correspond to the target grids one by one;
the position information of the parking space frame vertex of the parking space frame is corrected according to the position information of the parking space angular point, and the method comprises the following steps:
and if the position information of the top point of the parking space frame is determined to be located in the target grid according to the position information of the top point of the parking space frame, correcting the position information of the top point of the parking space frame into the position information of the corner point of the parking space in the target grid where the top point of the parking space frame is located.
In some embodiments, the method further comprises:
if at least part of the vertexes of the parking space frame are determined not to be located in the target grid according to the position information of the vertexes of the parking space frame, determining the region type of each pixel point in the region where the parking space frame is located, wherein the region type comprises a parking space region and a non-parking space region;
if the occupation ratio of the area type of the pixel points belonging to the non-parking space area exceeds a first threshold value in the area of the parking space frame, determining the area of the parking space frame as the non-parking space area.
In some embodiments, the method further comprises:
determining the number of the vertexes of the parking stall frame in each target grid according to the position information of the vertexes of the parking stall frame, and determining the target grids with the number of the vertexes of the parking stall frame not higher than a number threshold as undetermined grids;
if a plurality of grids to be determined exist, matching the parking space angular points in the grids to be determined two by two, wherein for any two parking space angular points for matching, if the distance between the two parking space angular points accords with the preset parking space side length and the included angle of the direction angles of the two parking space angular points is within the threshold angle range, determining the region of the parking space to be determined by taking the two parking space angular points as the reference, wherein the direction angle is the direction of the parking space angular point pointing to the opposite side in the parking space region;
determining the region type of each pixel point in the region where the to-be-determined vehicle location region is located, wherein the region type comprises a parking space region and a non-parking space region;
and if the area type of the pixel points in the to-be-determined parking space area exceeds a second threshold value, determining the to-be-determined parking space area as a parking space area.
In some embodiments, the parking space angle point information further includes a shape type of each parking space angle point, wherein the shape types of the parking space angle points include a T-shape and an L-shape;
the step of determining the target grids with the number of the vertexes of the parking space frame not higher than the number threshold as the undetermined grids comprises the following steps:
for the target grids where the L-shaped parking stall angular points are located, determining the target grids with the number of the vertexes of the parking stall frame not higher than 0 as undetermined grids;
and determining the target grids with the number of the vertexes of the parking stall frame not higher than 1 as undetermined grids for the target grids with the T-shaped parking stall angle points.
In some embodiments, the modifying the position information of the top of the parking space frame according to the position information of the corner of the parking space includes:
and correcting the position information of the top point of the parking space frame on one side of the parking space access opening of the parking space frame according to the position information of the parking space angular point on one side of the parking space access opening.
In some embodiments, after the position information of the top point of the parking space frame located at the parking space entrance and exit side of the parking space frame is corrected, the method further includes:
and correcting the position information of the vertexes of other uncorrected parking frames in the parking frames by taking the corrected position information of the vertexes of the parking frames as a reference.
In some embodiments, the modifying, according to the position information of the parking space angular point, the position information of the vertexes of the partial parking space frame of the parking space frame includes:
and correcting the position information of the top point of the parking space frame positioned on one side of the parking space access according to the position information of the parking space angular point positioned on one side of the parking space access.
The invention also provides a parking space detection device, which comprises:
the image acquisition module is used for acquiring a target image around the vehicle;
the parking space frame detection module is used for detecting a parking space frame in the target image to obtain parking space frame information, and the parking space frame information comprises position information of a peak of the parking space frame;
the parking space angular point detection module is used for dividing the target image into a plurality of grids, detecting parking space angular points in the target image based on the grids, and obtaining parking space angular point information, wherein the parking space angular point information comprises the target grid where the parking space angular points are located and position information of the parking space angular points in the target grid; and
and the correction module is used for correcting the position information of the top point of the parking space frame according to the position information of the corner point of the parking space, and determining the corrected area where the parking space frame is located as a parking space area.
In another aspect, the present invention also provides a computer-readable storage medium for storing a computer program, which when executed by a processor implements the method as described above.
In another aspect, the present invention further provides a parking space detection system, which includes a processor and a memory, where the memory is used to store a computer program, and when the computer program is executed by the processor, the method is implemented.
In some embodiments of this application, carry out parking stall frame detection and parking stall angular point detection respectively to the target image around the vehicle, and when carrying out parking stall angular point detection, carry out the mesh division to the target image, detect the parking stall angular point based on the net, make the positional information precision of parking stall angular point can be higher, thereby can be based on the positional information of parking stall angular point, revise the positional information at the parking stall frame summit of parking stall frame, can reach the purpose that improves the regional detection precision of parking stall.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are schematic and are not to be understood as limiting the invention in any way, and in which:
fig. 1 shows a schematic flow chart of a parking space detection method according to an embodiment of the present application;
FIG. 2 illustrates a schematic diagram of a target image provided by an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an image inspection model according to an embodiment of the present application;
FIG. 4 illustrates a schematic diagram of meshing a target image provided by an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a location of a target grid in a target image according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating a location of a target grid in a target image according to another embodiment of the present application;
FIG. 7 is a schematic diagram illustrating the position of a pending mesh in a target image as provided by another embodiment of the present application;
fig. 8 shows a schematic block diagram of a parking space detection device according to an embodiment of the present application;
fig. 9 shows a schematic diagram of a parking space detection system provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Before explaining the scheme of the present application, an image detection model of the present application will be explained. The image detection module can detect the target image including the parking space area. Please refer to fig. 3, which is a schematic structural diagram of an image detection model according to an embodiment of the present application. The image detection model comprises a feature extraction module, a segmentation module, a parking space frame detection module and a parking space angular point detection module.
In some embodiments, the feature extraction module is configured to perform feature extraction on the target image. The features extracted by the feature extraction module include mesh features obtained by meshing a target image and original image features (image features not subjected to meshing).
In some embodiments, the segmentation module may perform pixel-level region classification on the target image according to the original image features extracted by the feature extraction module. Specifically, the area categories may include parking areas and non-parking areas. The segmentation module may output a region class for each pixel in the target image.
In some embodiments, the parking space frame detection module may detect the parking space frame in the target image according to the original image feature extracted by the feature extraction module. The parking space angular point detection module can detect the parking space angular points in the target image according to the grid features and the original image features extracted by the feature extraction module. The following describes the parking space frame and the parking space angular point.
Please refer to fig. 2, which is a schematic diagram of a target image according to an embodiment of the present application. In some embodiments, the parking space frame refers to a frame formed by a parking space line defining a parking space area in the target image. In fig. 2, a frame formed by the vehicle position lines within the dotted line is a parking space frame. The parking space frame is located in a parking space area. The crossing nodical for parking stall frame summit of two car position lines of parking stall frame. For example, in fig. 2, the position marked as a is a parking space frame vertex. The opening that two car position lines of parking stall frame do not intersect and form is the parking stall access & exit. For example, in fig. 2, the openings between ab are parking space entrances and exits.
In some embodiments, if the parking space area is not completely embodied in the target image, for example, the target image only includes a half parking space area (the other half parking space area is not photographed), and the top point of the parking space frame may also be an intersection point where the vehicle location line intersects with the boundary of the target image.
In some embodiments, the parking space angular point refers to an angular point of a parking space region. For example, in the dashed frame in fig. 2, the points at the 4 corner positions are the parking space corner points. Theoretically, for the same corner position in the target image (for example, the corner position of the upper right area in the dashed frame in fig. 2), the parking space corner point and the parking space frame vertex should be the same and coincident point. However, because the detection modes of the parking space frame detection module and the parking space angular point detection module are different, the position of the top point of the parking space frame detected by the parking space frame detection module and the position of the parking space angular point detected by the parking space angular point detection module are different from each other in general aiming at the same corner position in the target image. In addition, due to different characteristics of the detection modes, the position information of the parking space angle points detected by the parking space angle point detection module can be generally more accurate, and subsequent related descriptions can be specifically referred to, which is not repeated herein.
Based on the image detection model, the parking space detection method is provided. The parking space detection method can be applied to electronic equipment with an image recognition function. Electronic devices include, but are not limited to, in-vehicle control devices, computers, remote servers communicatively connected to vision devices. Please refer to fig. 1, which is a schematic flow chart of a parking space detection method according to an embodiment of the present application. The parking space detection method includes steps S11 to S14.
Step S11, a target image around the vehicle is acquired.
In some embodiments, 4 visual devices (e.g., fisheye cameras) may be installed on the front, back, left, and right of the vehicle for image acquisition, and a Bird's Eye View (BEV) top View may be constructed by stitching.
It is understood that the position and number of the vision devices mounted on the vehicle can be adjusted according to actual conditions, and the application is not limited thereto.
And S12, detecting the parking space frame in the target image to obtain parking space frame information, wherein the parking space frame information comprises position information of a peak of the parking space frame.
In some embodiments, for an image detection model that has been trained, according to the original image features extracted by the feature extraction module, the parking space frame detection module may detect a parking space frame in the target image, and output a parking space frame message for each detected parking space frame. The following description will be given taking a parking space frame in a dotted line frame of fig. 2 as an example.
In some embodiments, the parking space frame information is used to identify attribute information of the parking space frame in the target image, including but not limited to parking space frame reference point information, position information of a parking space frame vertex of the parking space frame in the target image, inclination information of the parking space frame in the target image, side length information of the parking space frame in the target image, and a parking space frame type. The following description is made separately.
In some embodiments, the parking box reference point may refer to a point in the target image that replaces the parking box. For example, the pixel coordinates of the point in the target image are used as the pixel coordinates of the parking space frame in the target image. The parking space frame reference point can be a point in the area where the parking space frame is located in the target image.
Reference is also made to fig. 2. In this embodiment, it is considered that the vehicle usually collects the image of the parking space area at a position near the parking space entrance and exit side when the vehicle collects the image. Because the farther the vehicle is, the less obvious the characteristics of the acquired image are, the closer the point to the parking space entrance can be selected as the parking space frame reference point. Specifically, assuming that the distance from one side of the parking space entrance to the other opposite side is L in the parking space frame, the parking space frame reference point may be located at a position L/3 away from the center of the parking space entrance, i.e., at position C in fig. 2.
In some embodiments, the parking space frame reference point information may include pixel coordinates of the parking space frame reference point in a pixel coordinate system. In fig. 2, the pixel coordinate system uses the lower left vertex of the target image as the origin O of the coordinate system, the X-axis is toward the right, and the Y-axis is upward. It is understood that the division of the pixel coordinate system may be performed according to actual situations, such as taking the lower right vertex of the target image as the coordinate system origin O of the pixel coordinate system.
In some embodiments, the position information of the frame vertex of the frame in the target image may be determined based on the frame reference point. Specifically, the parking space frame coordinate system can be established by taking the parking space frame reference point as the origin of the coordinate system. The X axis of the parking space frame coordinate system is parallel to one side of the parking space frame, and the Y axis is perpendicular to the X axis. And the position information of the top point of the parking space frame in the target image is the coordinate of the top point of the parking space frame in the parking space frame coordinate system.
In some embodiments, the inclination information of the parking space frame in the target image may refer to respective inclination angles of two parking space lines intersected by the parking space frame in the pixel coordinate system. For example, in fig. 2, one of the parking space lines l1 intersects with the other parking space line l2, an inclination angle of the parking space line l1 with respect to the X axis of the pixel coordinate system is α, and an inclination angle of the parking space line l2 with respect to the Y axis of the pixel coordinate system is β.
In some embodiments, the side length information of the parking space frame in the target image may be determined based on the parking space frame reference point. Specifically, the side length information of the parking space frame in the target image may include vertical distances from the reference points of the parking space frame to the parking space lines of the parking space frame, respectively.
In some embodiments, the parking stall frame type may be used to identify whether a parking stall in the area where the parking stall frame is located is occupied. If the parking space in the area where the parking space frame is located is occupied, the type of the parking space frame can be marked as occupied; if the parking space in the area where the parking space frame is located is unoccupied, the type of the parking space frame can be marked as unoccupied.
The above is a related introduction for the parking stall frame information.
Step S13, dividing the target image into a plurality of grids, detecting parking space angular points in the target image based on the grids to obtain parking space angular point information, wherein the parking space angular point information identifies the target grid where the parking space angular points are located and position information of the parking space angular points in the target grid.
Referring to fig. 4 in combination, a schematic diagram of mesh division of a target image is provided according to an embodiment of the present application.
In some embodiments, when the target image is divided into grids, the target image may be divided into a plurality of grids according to a preset rule, so that when a plurality of parking space angle points exist in the target image, the parking space angle points correspond to the target grids in which the parking space angle points are located one to one.
In the present embodiment, each grid has a size of 32 × 32 pixels.
In some embodiments, for an image detection model that has been trained, according to the grid features and the original image features extracted by the feature extraction module, the parking space corner detection module may perform parking space corner detection on a target image divided into a plurality of grids to obtain parking space corner information.
In some embodiments, the information of the parking stall corner point can be output in grid units. Take fig. 4 as an example. For each grid in fig. 4, information of a parking space corner can be obtained. For any grid, the parking space angle point information may include identification information of whether the parking space angle point exists in the grid. For example, 1 may be used to indicate that a grid has a parking space corner point, and 0 may be used to indicate that the parking space corner point does not have a parking space corner point.
In some embodiments, for a target grid with a parking space angle point, the parking space angle point information may further include position information of the parking space angle point in the target grid. The position information of the parking space corner points in the target grid can be determined based on the central point of the target grid. Specifically, the grid coordinate system may be established with the center point of the target grid as the origin of the coordinate system. The X-axis of the grid coordinate system is parallel to one of the edges of the target grid and the Y-axis is perpendicular to the X-axis. The position information of the parking space angular point can be coordinate information of the parking space angular point under a grid coordinate system.
In some embodiments, for any target mesh, a mesh coordinate system may be determined based on the center point of the target mesh. The position information of the parking space corner points in the target grid can be determined based on the grid coordinate system of the target grid. For ease of understanding, FIG. 4 illustratively shows a grid coordinate system in which two target grids are present. The position information of the parking space angular point a is coordinate information of the parking space angular point a under a grid coordinate system xoy, and the position information of the parking space angular point b is coordinate information of the parking space angular point b under a grid coordinate system x ' o ' y '.
In some embodiments, for the situation that the parking space corner point is located on the grid line, a target grid line where the parking space corner point is located may be determined first, then a grid including the target grid line is determined, and a grid coordinate system is established based on one of the grids to determine the position information of the parking space corner point. For example, for the parking space angular point d in fig. 4, a grid coordinate system may be established for the grid on the left side of the parking space angular point d to determine the position information of the parking space angular point d; or a grid coordinate system can be established for the grid on the right side of the parking space angular point d to determine the position information of the parking space angular point d.
In some embodiments, the parking space angle point information further includes a shape type of each parking space angle point, wherein the shape types of the parking space angle points include a T-shape and an L-shape. Taking fig. 4 as an example, the parking space angular point d is T-shaped, and the parking space angular point b is L-shaped.
In some embodiments, the parking space angle point information may further include a direction angle of each parking space angle point. The direction angle of the parking space angular point is the direction of the parking space angular point pointing to the opposite side in the parking space area. For example, in fig. 4, the direction angle of the parking space angle point d is the direction in which a points to B.
In this embodiment, it is considered that the vehicle usually collects the image of the parking space area at a position near the parking space entrance and exit side when the vehicle collects the image. In the collected image, the top point of the parking space frame on one side of the parking space entrance and exit has obvious characteristics, so that when the parking space angle point in the target image is detected, only the parking space angle point on one side of the parking space entrance and exit can be detected. In the following description of the scheme, the scheme is explained based on detecting the corner point of the parking space on one side of the parking space entrance.
The above is a related introduction for the information of the parking space corner.
It can be understood that the execution sequence of step S12 and step S13 may not be sequential, that is, according to the features extracted by the feature extraction module, the parking space frame detection module and the parking space angle point detection module may respectively and simultaneously perform detection according to the features extracted by the feature extraction module. Of course, the steps may be performed in order, for example, step S12 is performed first, and then step S13 is performed; alternatively, step S13 is executed first, and then step S12 is executed.
In some embodiments, for an image detection model that has been trained, in addition to performing the above steps S12 and S13, the segmentation module of the image detection model may also output the segmentation result of the target image according to the original image features extracted by the feature extraction module. And the segmentation result is used for identifying the region type of each pixel point in the target image.
And S14, correcting the position information of the top point of the parking space frame according to the position information of the corner point of the parking space, and determining the region where the corrected parking space frame is located as a parking space region.
In some embodiments, in step S14, the position information of the top point of the parking space frame on the side of the parking space entrance is corrected according to the position information of the parking space corner point on the side of the parking space entrance.
In some embodiments, the parking space frame is obtained by the parking space frame detection module based on the whole target image, and the accuracy is low; and the parking stall angular point is that parking stall angular point detection module is based on the grid detects and obtains, and the precision can be higher. Aiming at the top points and the corner points of the parking space frame at the same corner position (such as the top points and the corner points of the parking space frame at the circular dotted line frame in fig. 4), the position information of the top points of the parking space frame can be corrected by using the position information of the corner points of the parking space, so that the detected parking space frame is corrected, and the parking space detection precision is improved.
Furthermore, although the position deviation exists between the frame vertex and the frame corner at the same corner position, the position deviation is not too large, so that the frame vertex and the frame corner in the same target grid can be determined as the frame vertex and the frame corner at the same corner position. For the top points and the corner points of the parking stall frames in the same target grid, the position information precision of the corner points of the parking stall is higher than that of the top points of the parking stall frames, so that the position information of the top points of the parking stall frames can be corrected into the position information of the corner points of the parking stall frames, and the purpose of correcting the parking stall frames is achieved.
Based on the above description, in some embodiments, if it is determined that the vertex of the parking space frame is located in the target grid according to the position information of the vertex of the parking space frame (that is, there is a situation that the vertex of the parking space frame and the corner of the parking space are located in the same grid), the position information of the vertex of the parking space frame may be modified into the position information of the corner of the parking space in the target grid where the vertex of the parking space frame is located. Referring to fig. 5 in combination, a schematic diagram of a position of a target grid in a target image is provided according to an embodiment of the present application. In fig. 5, the gray grid is assumed to be a target grid located at one side of the parking space entrance (i.e., a grid located at a parking space corner point located at one side of the parking space entrance). If the top point of the parking space frame is located in one of the gray grids, the position information of the top point of the parking space frame can be corrected into the position information of the parking space angular point in the corresponding gray grid. Therefore, the parking space frame is corrected, and the detection precision of the parking space frame is improved.
In some embodiments, after the position information of the vertex of the parking space frame on the side of the parking space entrance and exit of the parking space frame is corrected, the position information of the vertex of the other uncorrected parking space frame in the parking space frame may be corrected by using the corrected position information of the vertex of the parking space frame as a reference, and then the area where the corrected parking space frame is located may be determined as the parking space area. Here, a parking space frame in a dotted line frame of fig. 5 is taken as an example for explanation. After the parking space frame vertex a and the parking space frame vertex b are corrected, the parking space frame vertex a can be used as an initial position, the position of the parking space frame vertex c is corrected according to the direction angle of the parking space angle point in the target grid where the parking space frame vertex a is located and the side length of the parking space frame, the parking space frame vertex b is used as an initial position, and the position of the parking space frame vertex d is corrected according to the direction angle of the parking space angle point in the target grid where the parking space frame vertex b is located and the side length of the parking space frame. The side length of the parking space frame can be preset according to the side length of a conventional parking space frame. For example, generally, if the distance from the edge where the parking space entrance is located to the opposite edge is 8 pixels, the length of the parking space frame is set to be 8 pixels in advance.
Referring to fig. 6 in combination, a schematic diagram of a position of a target grid in a target image is provided according to another embodiment of the present application. Similar to fig. 5, the gray grid in fig. 6 is a target grid located at one side of the parking space gateway. In the area within the dotted line frame, it is assumed that when the parking space frame is detected, a parking space frame exists in the area, and the top of the parking space frame is located at the position a, the position b, the position c and the position d. Theoretically, the parking space angular point detection module should detect the corresponding parking space angular point at the angular point positions where the position a and the position b are located. But in fact, the angular point positions of the position a and the position b do not have the corresponding parking space angular points to match with the vertexes of the parking space frame. In this case, on one hand, the position where the top point of the parking stall frame does not exist may be detected because the parking stall frame detection module performs misjudgment when detecting the parking stall frame; another aspect may be that the characteristic of the parking space angle point in the region is not obvious, so that the parking space angle point detection module does not detect the parking space angle point.
In order to solve the problem, the parking space detection can be carried out by combining the output result of the segmentation module. Specifically, if it is determined that at least part of the vertices of the parking frame are not located in the target grid (i.e., at least part of the vertices of the parking frame are not located in the same grid as the corners of the parking space), it may be determined that the detection of the vertices of the parking frame is inaccurate. In view of this, the area where the parking space frame is located may be determined according to the parking space frame reference point information of the parking space frame, the inclination information of the parking space frame in the target image, and the side length information, and then the area category to which each pixel point in the area where the parking space frame is located belongs may be determined. If the occupation ratio of the area type of the pixel points belonging to the non-parking space area in the area of the parking space frame exceeds a first threshold value, determining the area of the parking space frame as the non-parking space area; if the occupation ratio of the area type of the pixel points belonging to the non-parking space area does not exceed the first threshold value in the area of the parking space frame, the area of the parking space frame is determined as the parking space area. The first threshold may be determined according to actual conditions, for example, 70%. Therefore, by judging the region type of each pixel point in the region where the parking space frame is located, the misjudgment condition or the missed detection condition in the step S12 and the step S13 can be corrected, and the detection precision is improved.
Further, as can be seen from the description of step S12, the frame detection module may output frame information for each frame detected in the target image. It can be seen from fig. 6 that, in the target image, two vertexes of the parking space frame should exist theoretically at the corner position where the two parking space frames intersect. For example, with an angular point position e in fig. 6, in the parking space frame information generated for the first parking space frame starting from the left side, a parking space frame vertex e1 exists at the angular point position e; and a parking space frame vertex e2 exists at the angular point position e in the parking space frame information generated by the second parking space frame starting from the left side. Parking space frame vertex e1 and parking space frame vertex e2 may have different position information. It will be appreciated that normally, frame vertex e1 and frame vertex e2 should both be located in the target mesh at angular point position e. However, in practical situations, because of the detection errors of the parking space frame detection module and the parking space angular point detection module, only one parking space frame vertex may exist in the target grid at the angular point position e. And aiming at the target grids lacking in the vertexes of the parking stall frames, the condition that the parking stall frames are missed to be detected is likely to exist.
In view of this, in some embodiments, the number of the parking space frame vertexes located in each target mesh may be determined according to the position information of the parking space frame vertexes, and the target mesh of which the number of the parking space frame vertexes is not higher than the number threshold may be determined as the mesh to be determined. Specifically, the number threshold in each target grid may be determined according to the shape type of the parking stall corner points in the target grid. And determining the target grids with the number of the vertexes of the parking stall frame not higher than 0 as undetermined grids for the target grids with the L-shaped parking stall angle points. And for the target grids where the T-shaped parking stall angular points are located, determining the target grids with the number of the vertexes of the parking stall frame not higher than 1 as undetermined grids. The shape type of the corner point of the parking space can be detected in step S12.
In some embodiments, if a plurality of undetermined grids exist, the corner points of the parking spaces in the undetermined grids can be matched in pairs, wherein for any two corner points of the parking spaces for matching, if the distance between the two corner points of the parking spaces accords with the preset side length of the parking spaces, and the included angle of the direction angles of the two corner points of the parking spaces is within the threshold angle range, the two corner points of the parking spaces are taken as the benchmark to determine the region of the undetermined parking spaces, wherein the region of the undetermined parking spaces can be the region where the parking space frame which is not detected by the parking space frame detection module but may actually exist (i.e., the parking space region). The threshold angle range may be set according to practical circumstances, such as an angle range of less than 10 degrees.
In some embodiments, for a single parking space region, the parking space side length may include a first side length between two parking space angle points on a side of the parking space region close to the parking space entrance and exit, and a second side length from the parking space angle point on the side close to the parking space entrance and exit to a side other than the parking space entrance and exit. Wherein, to being close to arbitrary parking stall angle point on one side of parking stall access & exit, this parking stall angle point indicates on the direction angle of this parking stall angle point to the second length of non-parking stall access & exit one side, the distance of this parking stall angle point to parking stall access & exit one side. The side length of the parking space can be preset according to experience.
In some embodiments, for any two parking space angle points for matching, if the distance between the two parking space angle points satisfies the first side length, and the included angle between the direction angles of the two parking space angle points is within the threshold angle range, the two parking space angle points may be used as the parking space angle points at one side of the undetermined parking space region close to the parking space entrance and exit. And then, determining the positions with the second side length away from the two parking space angle points as the other two angle points of the region of the to-be-determined parking space on the respective direction angles of the two parking space angle points.
With reference to fig. 7, a schematic diagram of a position of a pending mesh in a target image is provided for another embodiment of the present application. For fig. 7, assuming that the width (first side length) of one parking space region is approximately a distance of 3 pixels, and the length (second side length) is approximately a distance of 5 pixels, the distance between any two parking space angle points can be calculated according to the position information of the parking space angle points in the to-be-determined grid. For example, in fig. 7, it is determined through calculation that 3 pixels are located between the parking space angular point a and the parking space angular point B, then the parking space angular point a and the parking space angular point B may be used as parking space angular points on one side of the undetermined parking space region close to the parking space entrance, then on the direction angle of the parking space angular point a, a position D5 pixels away from the parking space angular point a is determined as another angular point of the undetermined parking space region, and at the same time, on the direction angle of the parking space angular point B, a position C5 pixels away from the parking space angular point B is determined as the last angular point of the undetermined parking space region, so that an undetermined parking space region may be determined.
In some embodiments, after the area of the to-be-determined parking space is determined, the area category to which each pixel point in the area of the to-be-determined parking space belongs can be determined. If the area type of the pixel points in the to-be-determined parking space area exceeds a second threshold value, determining the to-be-determined parking space area as the parking space area. The second threshold may be determined according to practical conditions, such as 70%. Therefore, the parking space frame missing detection of the parking space frame detection module can be supplemented and detected, and the detection precision is improved.
Based on the above description, in some embodiments of the present application, parking space frame detection and parking space angular point detection are performed on target images around a vehicle, and when parking space angular point detection is performed, grid division is performed on the target images, and parking space angular points are detected based on grids, so that the accuracy of position information of the parking space angular points can be higher, and therefore, based on the position information of the parking space angular points, the position information of the vertexes of the parking space frames is corrected, and by fusing the results of multiple network branches, the purpose of improving the accuracy and robustness of parking space region detection can be achieved.
Please refer to fig. 8, which is a schematic block diagram of a parking space detection apparatus according to an embodiment of the present application. Parking stall detection device includes:
the image acquisition module is used for acquiring a target image around the vehicle;
the parking space frame detection module is used for detecting a parking space frame in the target image to obtain parking space frame information, and the parking space frame information comprises position information of a peak of the parking space frame;
the parking space angular point detection module is used for dividing the target image into a plurality of grids, detecting parking space angular points in the target image based on the grids, and obtaining parking space angular point information, wherein the parking space angular point information comprises the target grid where the parking space angular points are located and position information of the parking space angular points in the target grid; and
and the correction module is used for correcting the position information of the top point of the parking space frame according to the position information of the corner point of the parking space, and determining the region where the corrected parking space frame is located as a parking space region.
Please refer to fig. 9, which is a schematic diagram of a parking space detection system according to an embodiment of the present application. The parking space detection system comprises a processor and a memory, wherein the memory is used for storing a computer program, and the computer program is executed by the processor to realize the parking space detection method.
The processor may be a Central Processing Unit (CPU). The Processor may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the methods of the embodiments of the present invention. The processor executes various functional applications and data processing of the processor by executing non-transitory software programs, instructions and modules stored in the memory, that is, the method in the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
An embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium is used for storing a computer program, and when the computer program is executed by a processor, the method for detecting a parking space is implemented.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (7)

1. A parking space detection method is characterized by comprising the following steps:
acquiring a target image around a vehicle;
generating a segmentation result of the target image, wherein the segmentation result is used for identifying the region type to which each pixel point in the target image belongs, and the region type comprises a parking space region and a non-parking space region;
detecting a parking space frame in the target image to obtain parking space frame information, wherein the parking space frame information comprises position information of a peak of the parking space frame in the target image;
dividing the target image into a plurality of grids, detecting the parking space angular points in the target image based on the parking space angular point features in the target image and the grids, and obtaining parking space angular point information, wherein the parking space angular point information identifies the target grid where the parking space angular points are located and position information of the parking space angular points in the target grid, and the dividing the target image into the plurality of grids comprises the following steps:
dividing the target image into a plurality of grids according to a preset rule, so that when a plurality of parking space angular points exist in the target image, the parking space angular points correspond to the target grids one by one; and
correcting the position information of the top point of the parking space frame according to the position information of the corner point of the parking space, and determining the region of the corrected parking space frame as a parking space region;
wherein, according to the position information of the parking stall angular point, correct the position information on the parking stall frame summit of the parking stall frame, including:
if the position information of the top point of the parking space frame is determined to be located in the target grid according to the position information of the top point of the parking space frame, the position information of the top point of the parking space frame is corrected to be the position information of the parking space angular point in the target grid where the top point of the parking space frame is located;
if at least part of the vertexes of the parking stall frame are determined not to be located in the target grid according to the position information of the vertexes of the parking stall frame, determining the region type of each pixel point in the region where the parking stall frame is located;
if the occupation ratio of the pixel point area type belonging to the non-parking space area exceeds a first threshold value in the area of the parking space frame, determining the area of the parking space frame as the non-parking space area;
determining the number of the vertexes of the parking stall frame in each target grid according to the position information of the vertexes of the parking stall frame, and determining the target grid of which the number of the vertexes of the parking stall frame is not higher than a number threshold as an undetermined grid;
if a plurality of grids to be determined exist, matching the parking place angular points in the grids to be determined two by two, wherein for any two parking place angular points for matching, if the distance between the two parking place angular points accords with the preset parking place side length and the included angle of the direction angles of the two parking place angular points is within the threshold angle range, determining a parking place area to be determined by taking the two parking place angular points as a reference, wherein the direction angles are the directions of the parking place angular points pointing to the opposite sides in the parking place area;
determining the region type of each pixel point in the region of the to-be-determined parking space, wherein the region type comprises a parking space region and a non-parking space region;
and if the area type of the pixel points in the to-be-determined parking space area exceeds a second threshold value, determining the to-be-determined parking space area as a parking space area.
2. The method of claim 1, wherein the angular point of parking space information further comprises a shape type of each angular point of parking space, wherein the shape types of the angular points of parking space comprise a T-shape and an L-shape;
the step of determining the target grids with the number of the vertexes of the parking space frame not higher than the number threshold as the undetermined grids comprises the following steps:
determining the target grids with the number of the vertexes of the parking stall frame not higher than 0 as undetermined grids for the target grids with the L-shaped parking stall angle points;
and for the target grids where the T-shaped parking stall angular points are located, determining the target grids with the number of the vertexes of the parking stall frame not higher than 1 as undetermined grids.
3. The method as claimed in claim 2, wherein the correcting the position information of the top of the parking space frame according to the position information of the corner of the parking space comprises:
and correcting the position information of the top point of the parking space frame on one side of the parking space access opening of the parking space frame according to the position information of the parking space angular point on one side of the parking space access opening.
4. The method of claim 3, wherein after the position information of the top point of the parking space frame located at the parking space entrance side of the parking space frame is corrected, the method further comprises:
and correcting the position information of the vertexes of other uncorrected parking frames in the parking frames by taking the corrected position information of the vertexes of the parking frames as a reference.
5. The utility model provides a parking stall detection device which characterized in that, the device includes:
the image acquisition module is used for acquiring a target image around the vehicle;
the segmentation module is used for generating a segmentation result of the target image, the segmentation result is used for identifying the region type of each pixel point in the target image, and the region type comprises a parking space region and a non-parking space region;
the parking space frame detection module is used for detecting a parking space frame in the target image to obtain parking space frame information, and the parking space frame information comprises position information of the top point of the parking space frame;
the parking space angular point detection module is configured to divide the target image into a plurality of grids, and detect a parking space angular point in the target image based on parking space angular point features in the target image and the grids, so as to obtain parking space angular point information, where the parking space angular point information includes a target grid where the parking space angular point is located and position information of the parking space angular point in the target grid, where the target image is divided into a plurality of grids, including:
dividing the target image into a plurality of grids according to a preset rule, so that when a plurality of parking space angular points exist in the target image, the parking space angular points correspond to the target grids one by one; and
the correction module is used for correcting the position information of the top point of the parking stall frame according to the position information of the angular point of the parking stall, and determining the area where the corrected parking stall frame is located as a parking stall area;
the correction module is specifically used for correcting the position information of the top point of the parking stall frame into the position information of the parking stall angle point in the target grid where the top point of the parking stall frame is located if the top point of the parking stall frame is located in the target grid according to the position information of the top point of the parking stall frame;
the correction module is further used for determining the region type of each pixel point in the region where the parking stall frame is located if at least part of the vertexes of the parking stall frame are not located in the target grid according to the position information of the vertexes of the parking stall frame;
if the occupation ratio of the pixel point region type belonging to the non-parking space region exceeds a first threshold value in the parking space frame region, determining the parking space frame region as a non-parking space region;
determining the number of the vertexes of the parking stall frame in each target grid according to the position information of the vertexes of the parking stall frame, and determining the target grid of which the number of the vertexes of the parking stall frame is not higher than a number threshold as an undetermined grid;
if a plurality of grids to be determined exist, matching the parking space angular points in the grids to be determined two by two, wherein for any two parking space angular points for matching, if the distance between the two parking space angular points accords with the preset parking space side length and the included angle of the direction angles of the two parking space angular points is within the threshold angle range, determining the region of the parking space to be determined by taking the two parking space angular points as the reference, wherein the direction angle is the direction of the parking space angular point pointing to the opposite side in the parking space region;
determining the region type of each pixel point in the region of the to-be-determined parking space, wherein the region type comprises a parking space region and a non-parking space region;
and if the occupation ratio of the area type of the pixel points belonging to the parking space area exceeds a second threshold value in the to-be-determined parking space area, determining the to-be-determined parking space area as a parking space area.
6. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program which, when executed by a processor, implements the method of any one of claims 1 to 4.
7. A space detection system, characterized in that it comprises a processor and a memory for storing a computer program which, when executed by the processor, carries out the method according to any one of claims 1 to 4.
CN202210856157.9A 2022-07-21 2022-07-21 Parking space detection method, device and system Active CN114943954B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210856157.9A CN114943954B (en) 2022-07-21 2022-07-21 Parking space detection method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210856157.9A CN114943954B (en) 2022-07-21 2022-07-21 Parking space detection method, device and system

Publications (2)

Publication Number Publication Date
CN114943954A CN114943954A (en) 2022-08-26
CN114943954B true CN114943954B (en) 2022-12-20

Family

ID=82910795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210856157.9A Active CN114943954B (en) 2022-07-21 2022-07-21 Parking space detection method, device and system

Country Status (1)

Country Link
CN (1) CN114943954B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245673B (en) * 2018-03-09 2021-07-20 浙江宇视科技有限公司 Parking space detection method and device
CN111191485B (en) * 2018-11-14 2023-08-08 广州汽车集团股份有限公司 Parking space detection method and system and automobile
CN114511632A (en) * 2022-01-10 2022-05-17 北京经纬恒润科技股份有限公司 Construction method and device of parking space map
CN114419922B (en) * 2022-01-17 2023-04-07 北京经纬恒润科技股份有限公司 Parking space identification method and device
CN114693001A (en) * 2022-04-24 2022-07-01 中汽创智科技有限公司 Parking space prediction method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114943954A (en) 2022-08-26

Similar Documents

Publication Publication Date Title
EP3806064B1 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
CN110348297B (en) Detection method, system, terminal and storage medium for identifying stereo garage
CN109543493B (en) Lane line detection method and device and electronic equipment
CN111191485A (en) Parking space detection method and system and automobile
CN112597846B (en) Lane line detection method, lane line detection device, computer device, and storage medium
CN112230241B (en) Calibration method based on random scanning type radar
CN112598922A (en) Parking space detection method, device, equipment and storage medium
CN111213154A (en) Lane line detection method, lane line detection equipment, mobile platform and storage medium
CN110673607A (en) Feature point extraction method and device in dynamic scene and terminal equipment
CN113160272B (en) Target tracking method and device, electronic equipment and storage medium
CN113793413A (en) Three-dimensional reconstruction method and device, electronic equipment and storage medium
CN114943954B (en) Parking space detection method, device and system
CN114724119B (en) Lane line extraction method, lane line detection device, and storage medium
CN114648639B (en) Target vehicle detection method, system and device
CN114219806B (en) Automobile radar detection method, device, equipment, medium and product
CN114943805A (en) Parking occlusion determination method, device, equipment, storage medium and program product
CN115761668A (en) Camera stain recognition method and device, vehicle and storage medium
CN115240150A (en) Lane departure warning method, system, device and medium based on monocular camera
CN111753663B (en) Target detection method and device
CN113313968A (en) Parking space detection method and storage medium
CN114581890B (en) Method and device for determining lane line, electronic equipment and storage medium
CN113807293B (en) Deceleration strip detection method, deceleration strip detection system, deceleration strip detection equipment and computer readable storage medium
CN112498338B (en) Stock level determination method and device and electronic equipment
CN117169919A (en) Method, device, computer equipment and storage medium for determining target detection result
US20220351485A1 (en) Device and a method for merging candidate areas

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