Inclined parking space detection method and device, medium and equipment

By using panoramic images and automated corner point and line detection in parking space detection, the problems of poor adaptability and relying on artificial feature extraction in the prior art are solved, and higher detection accuracy and flexibility are achieved.

CN119851246APending Publication Date: 2025-04-18UISEE SHANGHAI AUTOMOTIVE TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411918430.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-18

Smart Images

  • Figure CN119851246A_ABST
    Figure CN119851246A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computer models, and discloses an inclined parking space detection method and device, a medium and equipment. The method comprises the following steps: acquiring a panoramic image for a parking space; determining the position of a parking space entrance corner point of an inclined parking space and a parking space line of the inclined parking space according to the panoramic image; extracting a region of interest from the panoramic image; wherein the region of interest comprises a parking space entrance corner point of the inclined parking space and the parking space line; determining a parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line; and determining a parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle. The embodiment of the invention has the advantages of better adaptability, higher flexibility and lower development difficulty.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of parking space detection, and in particular to a method, device, medium and equipment for detecting an inclined parking space. Background Art

[0002] The existing detection scheme for tilted parking spaces is mainly based on the traditional image processing scheme for detecting tilted parking spaces. This scheme uses artificially designed feature extraction such as edge detection and color segmentation to detect parking spaces. Specifically, a large amount of manual parameter adjustment is required for specific scenarios. Once the environment changes, such as light, weather and other factors, the parameters may need to be readjusted. Therefore, the adaptability of this method is poor. Moreover, this scheme is highly dependent on artificially designed feature extraction, which not only limits the flexibility of the algorithm, but also increases the difficulty of development. Summary of the invention

[0003] In order to solve at least one of the above technical problems, the present invention provides a method and device, medium, and equipment for detecting an inclined parking space.

[0004] According to the first aspect, the inclined parking space detection method provided by the embodiment of the present invention includes:

[0005] Acquire a panoramic image of the parking space;

[0006] Determining, according to the panoramic image, the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space;

[0007] Extracting an area of ​​interest from the panoramic image; wherein the area of ​​interest includes the parking space entrance corner point of the inclined parking space and the parking space line;

[0008] Determining a parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line;

[0009] A parking space frame of the inclined parking space is determined according to the position of the parking space entrance corner point and the parking space inclination angle.

[0010] In one embodiment, determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line includes:

[0011] Determine the slope of the line connecting the two parking entrance corner points of the inclined parking space according to the position of the parking entrance corner point;

[0012] determining a slope of the parking space line;

[0013] The parking space inclination angle is determined according to the slope of the connecting line and the slope of the parking space line, and the parking space inclination angle is the angle between the connecting line and the parking space line.

[0014] In one embodiment, determining the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle includes:

[0015] According to the parking space inclination angle and the preset step length, two virtual parking space lines in opposite directions are extended from each parking space entrance corner point; wherein the length of the virtual parking space line is the preset step length, and the angle between the line connecting the two parking space entrance corner points and the virtual parking space line is the parking space inclination angle;

[0016] According to the virtual parking space line, two virtual parking space frames are generated;

[0017] Counting the number of pixel points of the parking space line covered by each virtual parking space frame in the region of interest respectively;

[0018] A virtual parking space frame that covers a larger number of pixels of the parking space line is used as the parking space frame of the inclined parking space.

[0019] In one embodiment, after determining the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image and before determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line, the method further includes:

[0020] If the number of the inclined parking spaces in the panoramic image is greater than 1, determining the number of pixel points of the parking space line of each inclined parking space;

[0021] Determine the parking space line with the largest number of pixels and its corresponding parking space entrance corner point;

[0022] Correspondingly, determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line includes:

[0023] Determine the parking space inclination angle of each of the inclined parking spaces in the region of interest according to the parking space line with the largest number of pixel points and the position of the corresponding parking space entrance corner point;

[0024] Correspondingly, determining the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle includes:

[0025] A parking space frame of each of the inclined parking spaces in the panoramic image is determined according to the position of the parking space entrance corner point of each of the inclined parking spaces and the parking space inclination angle.

[0026] In one embodiment, extracting the region of interest from the panoramic image includes:

[0027] According to the position of the corner point of the parking space entrance, determine the coordinate axes corresponding to the long side and the short side of the region of interest respectively;

[0028] Determine a first extraction range on the coordinate axis corresponding to the long side according to the positions of the two parking space entrance corner points and a preset long side step length;

[0029] Determine a second extraction range on the coordinate axis corresponding to the short side according to the positions of the two parking space entrance corner points and a preset short side step length;

[0030] A region of interest is extracted from the panoramic image according to the first extraction range and the second extraction range.

[0031] In one embodiment, determining the coordinate axes corresponding to the long side and the short side of the region of interest respectively according to the position of the corner point of the parking space entrance includes:

[0032] Calculating the absolute value of the difference between the horizontal coordinates and the absolute value of the difference between the vertical coordinates of the two parking space entrance corner points;

[0033] If the absolute value of the difference between the horizontal coordinates is greater than the absolute value of the difference between the vertical coordinates, the coordinate axis corresponding to the long side of the region of interest is the vertical coordinate axis, and the coordinate axis corresponding to the short side of the region of interest is the horizontal coordinate axis;

[0034] If the absolute value of the difference between the horizontal coordinates is less than or equal to the absolute value of the difference between the vertical coordinates, the coordinate axis corresponding to the long side of the region of interest is the horizontal coordinate axis, and the coordinate axis corresponding to the short side of the region of interest is the vertical coordinate axis.

[0035] According to a second aspect, an inclined parking space detection device provided by an embodiment of the present invention includes:

[0036] An image acquisition module, used to acquire a panoramic image of a parking space;

[0037] A multi-task processing module, used for determining the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image;

[0038] A region extraction module, used to extract a region of interest from the panoramic image; wherein the region of interest includes a parking space entrance corner point of the inclined parking space and the parking space line;

[0039] An angle calculation module, used to determine the parking space inclination angle of the inclined parking space in the area of ​​interest according to the position of the parking space entrance corner point and the parking space line;

[0040] The parking space frame determination module is used to determine the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle.

[0041] In one embodiment, the angle calculation module is specifically used to: determine the slope of the line connecting the two parking entrance corner points of the inclined parking space according to the position of the parking space entrance corner point; determine the slope of the parking space line; determine the parking space inclination angle according to the slope of the connecting line and the slope of the parking space line, and the parking space inclination angle is the angle between the connecting line and the parking space line.

[0042] In one embodiment, the parking space frame determination module is specifically used to: extend two virtual parking space lines in opposite directions from each of the parking space entrance corner points according to the parking space inclination angle and a preset step length; wherein the length of the virtual parking space line is the preset step length, and the angle between the line connecting the two parking space entrance corner points and the virtual parking space line is the parking space inclination angle; generate two virtual parking space frames according to the virtual parking space lines; count the number of pixel points of the parking space line covered by each virtual parking space frame in the area of ​​interest respectively; and use the virtual parking space frame with a larger number of pixel points of the parking space line covered as the parking space frame of the inclined parking space.

[0043] In one embodiment, the apparatus further comprises:

[0044] A first determination module is configured to determine the number of pixels of the parking space line of each inclined parking space if the number of the inclined parking spaces in the panoramic image is greater than 1, after the multi-task processing module determines the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image and before the angle calculation module determines the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line; and determine the parking space line with the largest number of pixels and its corresponding parking space entrance corner point;

[0045] Correspondingly, the angle calculation module is specifically used to: determine the parking space inclination angle of each of the inclined parking spaces in the region of interest according to the parking space line with the largest number of pixel points and the position of the corresponding parking space entrance corner point;

[0046] Correspondingly, the parking space frame determining module is specifically configured to determine a parking space frame of each of the inclined parking spaces in the panoramic image according to the position of the parking space entrance corner point of each of the inclined parking spaces and the parking space inclination angle.

[0047] In one embodiment, the region extraction module includes:

[0048] A first determining unit is used to determine the coordinate axes corresponding to the long side and the short side of the region of interest according to the position of the corner point of the parking space entrance;

[0049] A second determining unit, configured to determine a first extraction range on a coordinate axis corresponding to the long side according to positions of the two parking space entrance corner points and a preset long side step length;

[0050] A third determining unit, configured to determine a second extraction range on a coordinate axis corresponding to the short side according to the positions of the two parking space entrance corner points and a preset short side step length;

[0051] A region extraction determination unit is used to extract a region of interest from the panoramic image according to the first extraction range and the second extraction range.

[0052] Furthermore, the first determination unit is specifically used to: calculate the absolute value of the difference between the horizontal coordinates and the absolute value of the difference between the vertical coordinates of the two parking space entrance corner points; if the absolute value of the difference between the horizontal coordinates is greater than the absolute value of the difference between the vertical coordinates, then the coordinate axis corresponding to the long side of the area of ​​interest is the vertical coordinate axis, and the coordinate axis corresponding to the short side of the area of ​​interest is the horizontal coordinate axis; if the absolute value of the difference between the horizontal coordinates is less than or equal to the absolute value of the difference between the vertical coordinates, then the coordinate axis corresponding to the long side of the area of ​​interest is the horizontal coordinate axis, and the coordinate axis corresponding to the short side of the area of ​​interest is the vertical coordinate axis.

[0053] According to the third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method provided in the first aspect.

[0054] According to a fourth aspect, a computing device provided by an embodiment of the present invention includes a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided by the first aspect is implemented.

[0055] The embodiment of the present invention has the following technical effects: firstly, the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space are determined according to the panoramic image, and then the region of interest is extracted from the panoramic image, and then the parking space inclination angle of the inclined parking space in the region of interest is determined according to the position of the parking space entrance corner point and the parking space line, and finally the parking space frame of the inclined parking space is determined according to the position of the parking space entrance corner point and the parking space inclination angle. It can be seen that the parking space inclination angle is first determined according to the position of the parking space entrance corner point and the parking space line, and then the parking space frame is determined according to the position of the parking space entrance corner point and the parking space inclination angle. Before determining the parking space inclination angle, the region of interest is first extracted from the panoramic image, so that the influence of interference factors on the subsequent process can be avoided, thereby improving the accuracy of the parking space frame. Moreover, since the embodiment of the present invention does not require a large amount of manual parameter adjustment and does not rely on artificially designed feature extraction, the embodiment of the present invention has better adaptability, more flexibility, and lower development difficulty. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 is a flow chart of a method for detecting an inclined parking space in one embodiment of the present invention;

[0058] Figure 2 is a schematic diagram of a region of interest extracted when the long side corresponds to the ordinate axis and the short side corresponds to the abscissa axis in one embodiment of the present invention;

[0059] Figure 3 is a schematic diagram of a region of interest extracted when the long side corresponds to the abscissa axis and the short side corresponds to the ordinate axis in one embodiment of the present invention;

[0060] Figure 4 is a schematic diagram of a panoramic image including three inclined parking spaces in one embodiment of the present invention;

[0061] Figure 5 is a schematic diagram of two virtual parking space frames extending from parking space entrance corner points A and B as reference points in one embodiment of the present invention;

[0062] Figure 6 1 is a structural block diagram of a tilted parking space detection device in one embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0064] In a first aspect, an embodiment of the present invention provides a method for detecting an inclined parking space. Figure 1 The method comprises the following steps S110 to S150:

[0065] S110, acquiring a panoramic image of the parking space;

[0066] Among them, the panoramic image can be an AVM stitched image. AVM is the full spelling of Around View Monitor in English, which means panoramic monitoring in Chinese. AVM stitched images are taken by the panoramic monitoring imaging system through multiple ultra-wide-angle fisheye lenses, and then the images are corrected for distortion and stitched through a special algorithm to form a panoramic image around the object. It is mostly used in vehicles to achieve functions such as blind spot driving and panoramic parking, which is helpful for safe driving.

[0067] S120, determining the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image;

[0068] Among them, the entrance to the parking space is the head of the parking space.

[0069] In actual scenarios, S120 can be implemented using a multi-task deep learning reasoning framework that can perform target detection and semantic segmentation. That is, the target detection model in the deep learning reasoning framework can be used to detect whether the parking space in the panoramic image is a vertical parking space or an inclined parking space, the position of the corner point of the parking space entrance, etc., and the semantic segmentation technology in the deep learning reasoning framework can also be used to mark the parking space lines in the panoramic image.

[0070] The angle between the line connecting the two parking space entrance corner points of the vertical parking space and the parking space line is 90°. The angle between the line connecting the two parking space entrance corner points of the inclined parking space and the parking space line is not 90°. The object detection model can not only identify whether the parking space in the panoramic image is a vertical parking space or an inclined parking space, but also detect the positions of the two parking space entrance corner points.

[0071] It is understandable that in a panoramic image, if there are multiple parking spaces, these parking spaces are arranged side by side and are of the same type, that is, they are all vertical parking spaces or they are all inclined parking spaces. The detection of vertical parking spaces is relatively simple, while the detection process is relatively complicated because the inclination angle of inclined parking spaces is not fixed. The purpose of the embodiment of the present invention is to detect inclined parking spaces, so the subsequent steps are performed when the target detection model recognizes an inclined parking space.

[0072] S130, extracting an area of ​​interest from the panoramic image; wherein the area of ​​interest includes a parking space entrance corner point of the inclined parking space and the parking space line;

[0073] It is understandable that, in addition to the parking space, the panoramic image may also include the surrounding environment, such as curbs, walls, road signs, etc. In order to reduce the interference of environmental factors on the detection of the inclined parking space, in S130, an area of ​​interest is extracted from the panoramic image, and the area of ​​interest includes the parking space entrance corner point of the inclined parking space, that is, the area of ​​interest includes the parking space head, and the area of ​​interest also includes all or part of the parking space line.

[0074] In one embodiment, extracting the region of interest from the panoramic image in S130 may include S131 to S134:

[0075] S131, determining the coordinate axes corresponding to the long side and the short side of the region of interest respectively according to the position of the corner point of the parking space entrance;

[0076] S132, determining a first extraction range on the coordinate axis corresponding to the long side according to the positions of the two parking space entrance corner points and a preset long side step length;

[0077] S133, determining a second extraction range on the coordinate axis corresponding to the short side according to the positions of the two parking space entrance corner points and a preset short side step length;

[0078] S134: Extract a region of interest from the panoramic image according to the first extraction range and the second extraction range.

[0079] Among them, the long side step length and the short side step length are both empirical values.

[0080] It is understandable that the region of interest is a rectangular region, which has a long side and a short side. In S131, the coordinate axes corresponding to the long side and the short side of the region of interest are determined, namely, the horizontal axis and the vertical axis. For example, the long side corresponds to the horizontal axis, and the short side corresponds to the vertical axis. Then, the first extraction range is determined on the coordinate axis corresponding to the long side based on the two corner points of the parking space entrance as reference points, for example, if the long side step is 10, then the positions of the two entrance corner points are respectively used as reference points on the coordinate axis corresponding to the long side, and 5 is taken forward and 5 is taken backward along the coordinate axis corresponding to the long side, and the first extraction range with a length of 10 is obtained. The second extraction range is determined on the coordinate axis corresponding to the short side according to the short side step, and then according to the first extraction range and the second extraction range, for example, if the short side step is 6, then the two entrance corner points are respectively used as reference points on the coordinate axis corresponding to the short side, and 3 is taken forward and 3 is taken backward along the coordinate axis corresponding to the short side, and the second value range with a length of 6 is obtained. Furthermore, according to the first extraction range with a length of 10 and the second value range with a length of 6 obtained by taking the two entrance corner points as reference points, a rectangular area to be extracted can be determined, thereby extracting the region of interest from the panoramic image.

[0081] It can be seen that through the above steps, the appropriate region of interest can be flexibly extracted and the interference elements contained in the region of interest can be reduced.

[0082] Furthermore, the determination of the coordinate axes corresponding to the long side and the short side of the region of interest according to the position of the corner point of the parking space entrance in S131 may include a1 to a3:

[0083] a1. Calculate the absolute value of the difference between the horizontal coordinates and the absolute value of the difference between the vertical coordinates of the two parking space entrance corner points;

[0084] a2. If the absolute value of the difference between the horizontal coordinates is greater than the absolute value of the difference between the vertical coordinates, the coordinate axis corresponding to the long side of the region of interest is the vertical coordinate axis, and the coordinate axis corresponding to the short side of the region of interest is the horizontal coordinate axis;

[0085] a3. If the absolute value of the difference between the horizontal coordinates is less than or equal to the absolute value of the difference between the vertical coordinates, the coordinate axis corresponding to the long side of the region of interest is the horizontal coordinate axis, and the coordinate axis corresponding to the short side of the region of interest is the vertical coordinate axis.

[0086] For example, if the absolute value of the difference between the horizontal coordinates of the two parking space entrance corner points A and B is greater than the absolute value of the difference between the vertical coordinates, that is, fabs(PointA.x-PointB.x)>fabs(PointA.y-PointB.y), then the coordinate axis corresponding to the long side is the vertical axis, and the coordinate axis corresponding to the short side is the horizontal axis. Otherwise, the coordinate axis corresponding to the long side is the horizontal axis, and the coordinate axis corresponding to the short side is the vertical axis.

[0087] For example, when the long side corresponds to the ordinate axis and the short side corresponds to the abscissa axis, the extracted region of interest ROI can be found in Figure 2 , A and B are the corner points of the two parking space entrances. When the long side corresponds to the horizontal axis and the short side corresponds to the vertical axis, the region of interest ROI extracted can be seen in Figure 3 .

[0088] As the name implies, the long side step is greater than the short side step. Therefore, the coordinate axes corresponding to the long side and the short side can be determined by the above a1 to a3, so that a larger range can be extracted on the coordinate axis corresponding to the long side, and a smaller range can be extracted on the coordinate axis corresponding to the short side, thereby obtaining a region of interest with a suitable extraction range.

[0089] S140, determining a parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line;

[0090] The parking space inclination angle refers to the angle between the line connecting the two parking space entrance corner points and the parking space line.

[0091] In one embodiment, determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line in S140 may include S141 to S143:

[0092] S141, determining the slope of the line connecting two parking entrance corner points of the inclined parking space according to the position of the parking space entrance corner point;

[0093] For example, calculate the slope of the line between two parking space entrance corner points A and B.

[0094] S142, determining the slope of the parking space line;

[0095] Among them, the slope of the parking space line can be determined by Hough transform.

[0096] S143: Determine the parking space inclination angle according to the slope of the connecting line and the slope of the parking space line, where the parking space inclination angle is the angle between the connecting line and the parking space line.

[0097] It can be seen that after calculating the slope of the line connecting the two vehicle entrance corner points and the slope of the parking space line, the angle between the line connecting the two vehicle entrance corner points and the parking space line can be determined, thereby obtaining the parking space inclination angle.

[0098] S150: Determine a parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle.

[0099] It can be seen that after the parking space inclination angle is obtained, the parking space frame of the inclined parking space can be constructed based on the parking space inclination angle and the positions of the two parking space entrance corner points.

[0100] In one embodiment, determining the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle in S150 may include the following steps S151 to S154:

[0101] S151, according to the parking space inclination angle and the preset step length, extending two virtual parking space lines in opposite directions from each parking space entrance corner point; wherein the length of the virtual parking space line is the preset step length, and the angle between the line connecting the two parking space entrance corner points and the virtual parking space line is the parking space inclination angle;

[0102] S152, generating two virtual parking space frames according to the virtual parking space line;

[0103] S153, counting the number of pixel points of the parking space line covered by each virtual parking space frame in the region of interest;

[0104] S154: Using a virtual parking space frame having a larger number of pixel points of the covered parking space line as a parking space frame of the inclined parking space.

[0105] For example, see Figure 5 , the two parking space entrance corner points are A and B, according to the parking space inclination angle I and the preset step length L, two virtual parking space lines in opposite directions are extended from each parking space entrance corner point, and the length of each virtual parking space line is the preset step length L, and then the end points of the two virtual parking space lines extended in the same direction are connected to obtain the virtual parking space frame in this direction. In this way, two virtual parking space frames can be obtained: ACDB and AEFB. Then, the number of pixel points N1 of the parking space line covered by the virtual parking space frame ACDB in the area of ​​interest and the number of pixel points N2 of the parking space line covered by the virtual parking space frame AEFB in the area of ​​interest are counted, and the sizes of N1 and N2 are compared, and the virtual parking space frame corresponding to the larger value is used as the parking space frame of the inclined parking space.

[0106] In one embodiment, after determining the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image in S120 and before determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line in S140, the method may further include:

[0107] If the number of the inclined parking spaces in the panoramic image is greater than 1, determining the number of pixel points of the parking space line of each inclined parking space; determining the parking space line with the largest number of pixel points and its corresponding parking space entrance corner point;

[0108] Correspondingly, determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line in S140 includes: determining the parking space inclination angle of each inclined parking space in the region of interest according to the parking space line with the largest number of pixels and the position of the parking space entrance corner point corresponding to it;

[0109] Correspondingly, determining the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle in S150 includes: determining the parking space frame of each inclined parking space in the panoramic image according to the position of the parking space entrance corner point and the parking space inclination angle of each inclined parking space.

[0110] That is to say, if there are multiple inclined parking spaces in the panoramic image, then each parking space frame needs to be constructed. However, due to the influence of factors such as shooting angle, shooting light, and obstructions, the number of pixels of the parking space lines of each parking space in the panoramic image is different. In order to reduce the influence of various factors, the inclined parking space with the largest number of pixels of the parking space line is taken as the standard. In S140, it is only necessary to calculate the parking space inclination angle of the inclined parking space with the largest number of pixels of the parking space line, and use the parking space inclination angle as the planning inclination angle of all inclined parking spaces in the panoramic image. In S150, the parking space frame of the inclined parking space can be determined based on the position of the parking space entrance corner point of each inclined parking space and the parking space inclination angle. The parking space inclination angle is the parking space inclination angle of the parking space corresponding to the parking space line with the largest number of pixels. It can be seen that it is not necessary to calculate the parking space inclination angle of each inclined parking space, which can simplify the calculation and improve the accuracy of the parking space inclination angle by reducing the influence of various factors.

[0111] For example, see Figure 4 There are three tilted parking spaces in a panoramic image, and the tilt angles of these three tilted parking spaces are represented by I1, I2, and I3 respectively. The number of pixels of the two parking lines of the second tilted parking space is the largest, so I2 is used as the tilt angle of these three tilted parking spaces.

[0112] The embodiment of the present invention determines the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image, and then extracts the region of interest from the panoramic image, and then determines the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line, and finally determines the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle. It can be seen that the parking space inclination angle is first determined according to the position of the parking space entrance corner point and the parking space line, and then the parking space frame is determined according to the position of the parking space entrance corner point and the parking space inclination angle. Before determining the parking space inclination angle, the region of interest is first extracted from the panoramic image, so that the influence of interference factors on the subsequent process can be avoided, thereby improving the accuracy of the parking space frame. Moreover, the embodiment of the present invention does not require a large amount of manual parameter adjustment, has better adaptability, more flexibility, and lower development difficulty.

[0113] In a second aspect, an embodiment of the present invention provides a tilted parking space detection device, see Figure 6 , the device 100 comprises:

[0114] An image acquisition module 110 is used to acquire a panoramic image of a parking space;

[0115] The multi-task processing module 120 is used to determine the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image;

[0116] The region extraction module 130 is used to extract a region of interest from the panoramic image; wherein the region of interest includes the parking space entrance corner point of the inclined parking space and the parking space line;

[0117] An angle calculation module 140, configured to determine a parking space tilt angle of the tilted parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line;

[0118] The parking space frame determining module 150 is used to determine the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle.

[0119] In one embodiment, the angle calculation module is specifically used to: determine the slope of the line connecting the two parking entrance corner points of the inclined parking space according to the position of the parking space entrance corner point; determine the slope of the parking space line; determine the parking space inclination angle according to the slope of the connecting line and the slope of the parking space line, and the parking space inclination angle is the angle between the connecting line and the parking space line.

[0120] In one embodiment, the parking space frame determination module is specifically used to: extend two virtual parking space lines in opposite directions from each of the parking space entrance corner points according to the parking space inclination angle and a preset step length; wherein the length of the virtual parking space line is the preset step length, and the angle between the line connecting the two parking space entrance corner points and the virtual parking space line is the parking space inclination angle; generate two virtual parking space frames according to the virtual parking space lines; count the number of pixel points of the parking space line covered by each virtual parking space frame in the area of ​​interest respectively; and use the virtual parking space frame with a larger number of pixel points of the parking space line covered as the parking space frame of the inclined parking space.

[0121] In one embodiment, the apparatus further comprises:

[0122] A first determination module is configured to determine the number of pixels of the parking space line of each inclined parking space if the number of the inclined parking spaces in the panoramic image is greater than 1, after the multi-task processing module determines the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image and before the angle calculation module determines the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line; and determine the parking space line with the largest number of pixels and its corresponding parking space entrance corner point;

[0123] Correspondingly, the angle calculation module is specifically used to: determine the parking space inclination angle of each of the inclined parking spaces in the region of interest according to the parking space line with the largest number of pixel points and the position of the corresponding parking space entrance corner point;

[0124] Correspondingly, the parking space frame determining module is specifically configured to determine a parking space frame of each of the inclined parking spaces in the panoramic image according to the position of the parking space entrance corner point of each of the inclined parking spaces and the parking space inclination angle.

[0125] In one embodiment, the region extraction module includes:

[0126] A first determining unit is used to determine the coordinate axes corresponding to the long side and the short side of the region of interest according to the position of the corner point of the parking space entrance;

[0127] A second determining unit, configured to determine a first extraction range on a coordinate axis corresponding to the long side according to positions of the two parking space entrance corner points and a preset long side step length;

[0128] A third determining unit, configured to determine a second extraction range on a coordinate axis corresponding to the short side according to the positions of the two parking space entrance corner points and a preset short side step length;

[0129] A region extraction determination unit is used to extract a region of interest from the panoramic image according to the first extraction range and the second extraction range.

[0130] Furthermore, the first determination unit is specifically used to: calculate the absolute value of the difference between the horizontal coordinates and the absolute value of the difference between the vertical coordinates of the two parking space entrance corner points; if the absolute value of the difference between the horizontal coordinates is greater than the absolute value of the difference between the vertical coordinates, then the coordinate axis corresponding to the long side of the area of ​​interest is the vertical coordinate axis, and the coordinate axis corresponding to the short side of the area of ​​interest is the horizontal coordinate axis; if the absolute value of the difference between the horizontal coordinates is less than or equal to the absolute value of the difference between the vertical coordinates, then the coordinate axis corresponding to the long side of the area of ​​interest is the horizontal coordinate axis, and the coordinate axis corresponding to the short side of the area of ​​interest is the vertical coordinate axis.

[0131] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0132] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.

[0133] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0134] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0135] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0136] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0137] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0138] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0139] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.

[0140] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0141] It should be noted that the terms used in the present invention are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present specification and claims, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a process, method or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the presence of other identical elements in the process, method or device including the elements.

[0142] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting an inclined parking space, characterized in that: include: Acquire a panoramic image of the parking space; Determining, according to the panoramic image, the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space; Extracting an area of ​​interest from the panoramic image; wherein the area of ​​interest includes the parking space entrance corner point of the inclined parking space and the parking space line; Determining a parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line; A parking space frame of the inclined parking space is determined according to the position of the parking space entrance corner point and the parking space inclination angle.

2. The method according to claim 1, characterized in that: The determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line includes: Determine the slope of the line connecting the two parking entrance corner points of the inclined parking space according to the position of the parking entrance corner point; determining a slope of the parking space line; The parking space inclination angle is determined according to the slope of the connecting line and the slope of the parking space line, and the parking space inclination angle is the angle between the connecting line and the parking space line.

3. The method according to claim 1, characterized in that The step of determining the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle comprises: According to the parking space inclination angle and the preset step length, two virtual parking space lines in opposite directions are extended from each parking space entrance corner point; wherein the length of the virtual parking space line is the preset step length, and the angle between the line connecting the two parking space entrance corner points and the virtual parking space line is the parking space inclination angle; According to the virtual parking space line, two virtual parking space frames are generated; Counting the number of pixel points of the parking space line covered by each virtual parking space frame in the region of interest respectively; A virtual parking space frame that covers a larger number of pixels of the parking space line is used as the parking space frame of the inclined parking space.

4. The method according to claim 1, characterized in that After determining the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image and before determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line, the method further includes: If the number of the inclined parking spaces in the panoramic image is greater than 1, determining the number of pixel points of the parking space line of each inclined parking space; Determine the parking space line with the largest number of pixels and its corresponding parking space entrance corner point; Correspondingly, determining the parking space inclination angle of the inclined parking space in the region of interest according to the position of the parking space entrance corner point and the parking space line includes: Determine the parking space inclination angle of each of the inclined parking spaces in the region of interest according to the parking space line with the largest number of pixel points and the position of the corresponding parking space entrance corner point; Correspondingly, determining the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle includes: A parking space frame of each of the inclined parking spaces in the panoramic image is determined according to the position of the parking space entrance corner point of each of the inclined parking spaces and the parking space inclination angle.

5. The method according to claim 1, characterized in that The step of extracting a region of interest from the panoramic image comprises: According to the position of the corner point of the parking space entrance, determine the coordinate axes corresponding to the long side and the short side of the region of interest respectively; Determine a first extraction range on the coordinate axis corresponding to the long side according to the positions of the two parking space entrance corner points and a preset long side step length; Determine a second extraction range on the coordinate axis corresponding to the short side according to the positions of the two parking space entrance corner points and a preset short side step length; A region of interest is extracted from the panoramic image according to the first extraction range and the second extraction range.

6. The method according to claim 5, characterized in that The step of determining the coordinate axes corresponding to the long side and the short side of the region of interest according to the position of the corner point of the parking space entrance comprises: Calculating the absolute value of the difference between the horizontal coordinates and the absolute value of the difference between the vertical coordinates of the two parking space entrance corner points; If the absolute value of the difference between the horizontal coordinates is greater than the absolute value of the difference between the vertical coordinates, the coordinate axis corresponding to the long side of the region of interest is the vertical coordinate axis, and the coordinate axis corresponding to the short side of the region of interest is the horizontal coordinate axis; If the absolute value of the difference between the horizontal coordinates is less than or equal to the absolute value of the difference between the vertical coordinates, the coordinate axis corresponding to the long side of the region of interest is the horizontal coordinate axis, and the coordinate axis corresponding to the short side of the region of interest is the vertical coordinate axis.

7. A tilted parking space detection device, characterized in that: include: An image acquisition module, used to acquire a panoramic image of a parking space; A multi-task processing module, used for determining the position of the parking space entrance corner point of the inclined parking space and the parking space line of the inclined parking space according to the panoramic image; A region extraction module, used to extract a region of interest from the panoramic image; wherein the region of interest includes a parking space entrance corner point of the inclined parking space and the parking space line; An angle calculation module, used to determine the parking space inclination angle of the inclined parking space in the area of ​​interest according to the position of the parking space entrance corner point and the parking space line; The parking space frame determination module is used to determine the parking space frame of the inclined parking space according to the position of the parking space entrance corner point and the parking space inclination angle.

8. The device according to claim 7, characterized in that The angle calculation module is specifically used to: determine the slope of the line connecting the two parking entrance corner points of the inclined parking space according to the position of the parking space entrance corner point; determine the slope of the parking space line; and determine the parking space inclination angle according to the slope of the connecting line and the slope of the parking space line, wherein the parking space inclination angle is the angle between the connecting line and the parking space line.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 6.

10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 6 is implemented.