Parking space inner and outer frame recognition method, system storage medium and device
By making distance matching judgments on the parking space lines, the problem of low recognition accuracy of parking space frames in automatic parking is solved, and higher parking space recognition accuracy and parking accuracy are achieved.
Patent Information
- Application Number
- CN202211741190.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-31
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-12-31
AI Technical Summary
In the existing automatic parking technology, it is difficult for the parking space line recognition algorithm to accurately determine whether the parking space is an inner or outer frame, resulting in horizontal or vertical line width errors in the parking posture, reducing the accuracy of automatic parking.
By obtaining multiple parking space frames and parking space lines for parking spaces, divide the horizontal line and vertical line into two groups according to the line width distance, and then match the parking space lines with the divided horizontal line and vertical line to determine that the parking space frame is an inner frame parking space or an outer frame parking space.
It effectively reduces the error caused by parking space screening, improves the accuracy of automatic parking space recognition, and simplifies the parking space screening logic.
Smart Images

Figure CN115953915B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic parking, and in particular to a method for identifying an inner frame and an outer frame of a parking space, a system storage medium and a device. Background Art
[0002] Automatic parking is a process where the vehicle to be parked uses onboard sensors to collect information about the vehicle's surroundings, transmits the collected information to the perception module for analysis to obtain the target point, and the planning module calculates the parking trajectory based on the target point analyzed by the perception module, and finally controls the vehicle to park in the parking space through the control module. Since the cost of cameras is low and the information collected about the vehicle's surroundings is relatively rich, most of the current perception recognition algorithm methods rely on vision. The parking space line recognition algorithm based on deep learning in the existing visual algorithm has high hardware requirements and a long recognition time, while the traditional algorithm is easy to implement and has low hardware requirements, which is conducive to reducing costs.
[0003] For traditional algorithms, parking space lines are composed of straight lines. Therefore, most existing traditional vision algorithms mainly detect parking spaces based on straight line detection. After straight line detection, most of them splice parking spaces based on their geometric characteristics. However, when confirming parking spaces, it is impossible to determine which parking space is an inner frame or outer frame parking space (e.g. Figure 1 As shown in the figure, the parking space lines are cross-connected into multiple parking spaces. The output parking space may be a parking space frame consisting of an outer edge and an inner edge (in this case, it is neither an outer frame parking space nor an inner frame parking space). As a result, the final parking posture has a line width error in the horizontal or vertical direction, and the automatic parking accuracy is poor. Summary of the invention
[0004] The present invention provides a method for identifying inner and outer frames of parking spaces, a system storage medium and a device, which can confirm inner frame parking spaces or outer frame parking spaces from multiple parking space frames, thereby reducing a line width error caused by parking space screening; at the same time, the parking space screening logic is simple, and the screened inner frame parking spaces or outer frame parking spaces improve the automatic parking space recognition accuracy.
[0005] In a first aspect, a method for identifying an inner frame and an outer frame of a parking space is provided, comprising the following steps:
[0006] Acquire multiple parking space frames and multiple parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines;
[0007] Dividing the four horizontal lines into two groups of horizontal lines according to the line width distance, and dividing the four vertical lines into two groups of vertical lines according to the line width;
[0008] A parking space frame is randomly selected, and parking space lines in the parking space frame are respectively distance matched with the two groups of horizontal lines and the two groups of vertical lines, and the parking space frame is determined to be an inner frame parking space or an outer frame parking space according to the distance matching result.
[0009] According to the first aspect, in a first possible implementation manner of the first aspect, the step of “dividing the four horizontal lines into two groups of horizontal lines according to line width distance, and dividing the four vertical lines into two groups of vertical lines according to line width” specifically includes the following steps:
[0010] The two horizontal lines with the closest line widths are divided into the first group of horizontal lines, and the other two horizontal lines are divided into the second group of horizontal lines;
[0011] The first group of horizontal lines includes a first front horizontal line and a first rear horizontal line, and the second group of horizontal lines includes a second front horizontal line and a second rear horizontal line;
[0012] The two vertical lines with the closest line width distance are divided into the first group of vertical lines, and the other two vertical lines are divided into the second group of vertical lines;
[0013] The first group of vertical lines includes a first left vertical line and a first right vertical line, and the second group of vertical lines includes a second left vertical line and a second right vertical line.
[0014] According to the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, the step of “arbitrarily selecting one of the parking space frames, performing distance matching on the parking space lines in the parking space frame with the two groups of horizontal lines and the two groups of vertical lines, respectively, and judging whether the parking space frame is an inner frame parking space or an outer frame parking space according to the distance matching result” specifically includes the following steps:
[0015] Randomly select one of the parking space frames, perform distance matching on the left parking space line in the parking space frame with the first right vertical line and the second right vertical line, perform distance matching on the right parking space line in the parking space frame with the first left vertical line and the second left vertical line, perform distance matching on the front parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line, perform distance matching on the rear parking space line in the parking space frame with the first front horizontal line and the second front horizontal line, and when the distance matching succeeds, determine that the selected parking space frame is an inner frame parking space;
[0016] Randomly select one of the parking space frames, perform distance matching on the left parking space line in the parking space frame with the first left vertical line and the second left vertical line respectively, perform distance matching on the right parking space line in the parking space frame with the first right vertical line and the second right vertical line respectively, perform distance matching on the front parking space line in the parking space frame with the first front horizontal line and the second front horizontal line respectively, perform distance matching on the rear parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line respectively, and when the distance matching is successful, it is determined that the selected parking space frame is an outer frame parking space.
[0017] According to the second possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect, the step of "arbitrarily selecting one of the parking space frames, performing distance matching on the left side parking space line in the parking space frame with the first right side vertical line and the second right side vertical line, performing distance matching on the right side parking space line in the parking space frame with the first left side vertical line and the second left side vertical line, performing distance matching on the front side parking space line in the parking space frame with the first rear side horizontal line and the second rear side horizontal line, performing distance matching on the rear side parking space line in the parking space frame with the first front side horizontal line and the second front side horizontal line, and when the distance matching is successful, determining that the selected parking space frame is an inner frame parking space" specifically includes the following steps:
[0018] Randomly select one of the parking space frames;
[0019] Obtaining the distances between the left parking space line in the parking space frame and the first right vertical line and the second right vertical line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level;
[0020] Obtaining the distances between the right parking space line in the parking space frame and the first left vertical line and the second left vertical line, respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level;
[0021] Obtaining the distances between the front parking space line in the parking space frame and the first rear horizontal line and the second rear horizontal line, respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level;
[0022] Obtaining the distances between the rear parking space line in the parking space frame and the first front horizontal line and the second front horizontal line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level;
[0023] When the probability that the parking space frame is an inner-frame parking space reaches four confidence levels, the selected parking space frame is determined to be an inner-frame parking space.
[0024] According to the third possible implementation manner of the first aspect, in the fourth possible implementation manner of the first aspect, the step of "arbitrarily selecting one of the parking space frames, performing distance matching on the left parking space line in the parking space frame with the first left vertical line and the second left vertical line, performing distance matching on the right parking space line in the parking space frame with the first right vertical line and the second right vertical line, performing distance matching on the front parking space line in the parking space frame with the first front horizontal line and the second front horizontal line, performing distance matching on the rear parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line, and when the distance matching is successful, determining that the selected parking space frame is an outer frame parking space" specifically includes the following steps:
[0025] Randomly select one of the parking space frames;
[0026] Obtaining the distances between the left parking space line in the parking space frame and the first left vertical line and the second left vertical line, respectively, and when any distance is zero, the probability of determining that the parking space frame is an outer frame parking space is increased by one confidence level;
[0027] Obtaining the distances between the right parking space line in the parking space frame and the first right vertical line and the second right vertical line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level;
[0028] Obtaining the distances between the front parking space line in the parking space frame and the first front horizontal line and the second front horizontal line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level;
[0029] Obtaining the distances between the rear parking space line in the parking space frame and the first rear horizontal line and the second rear horizontal line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level;
[0030] When the probability that the parking space frame is an outer frame parking space reaches four confidence levels, it is determined that the selected parking space frame is an outer frame parking space.
[0031] In a second aspect, a parking space inner frame and outer frame recognition system is provided, comprising:
[0032] A parking space acquisition module, which acquires a plurality of parking space frames and a plurality of parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines;
[0033] A grouping module, which is in communication with the parking space acquisition module and is used to divide the four horizontal lines into two groups of horizontal lines according to the line width distance, and divide the four vertical lines into two groups of vertical lines according to the line width;
[0034] The judgment module is communicatively connected with the parking space acquisition module and the grouping module, and is used for arbitrarily selecting one of the parking space frames, performing distance matching on the parking space lines in the parking space frame with the two groups of horizontal lines and the two groups of vertical lines respectively, and judging whether the parking space frame is an inner frame parking space or an outer frame parking space according to the distance matching result.
[0035] In a third aspect, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for identifying the inner and outer borders of a parking space as described above is implemented.
[0036] In a fourth aspect, an electronic device is provided, comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein the processor implements the method for identifying the inner and outer borders of a parking space as described above when executing the computer program.
[0037] Compared with the prior art, the advantages of the present invention are as follows: the present invention first obtains multiple parking space frames and multiple parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines; then the four horizontal lines are divided into two groups of horizontal lines according to the line width distance, and the four vertical lines are divided into two groups of vertical lines according to the line width; finally, any one of the parking space frames is selected, and the parking space lines in the parking space frame are respectively matched with the two groups of horizontal lines and the two groups of vertical lines for distance, and the parking space frame is judged as an inner frame parking space or an outer frame parking space according to the distance matching result. Therefore, the inner frame parking space or the outer frame parking space is confirmed from multiple parking space frames, reducing the error of one line width caused by parking space screening; at the same time, the parking space screening logic is simple, and the selected inner frame parking space or outer frame parking space improves the automatic parking space recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a schematic diagram of a parking space frame in the prior art;
[0039] Figure 2 It is a flow chart of an embodiment of a method for identifying inner and outer frames of a parking space according to the present invention;
[0040] Figure 3 It is a schematic diagram of parking space line grouping of the present invention;
[0041] Figure 4 is a parking space frame schematic diagram arbitrarily selected in the present invention;
[0042] Figure 5 It is a schematic diagram of the inner frame parking space determined by the present invention;
[0043] Figure 6 The present invention is a schematic structural diagram of a parking space inner frame and outer frame recognition system.
[0044] 100. Parking space inner frame and outer frame recognition system; 110. Parking space acquisition module; 120. Grouping module; 130. Judgment module. DETAILED DESCRIPTION
[0045] Reference will now be made in detail to specific embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Although the present invention will be described in conjunction with specific embodiments, it will be understood that it is not intended to limit the present invention to the embodiments described. On the contrary, it is intended to cover changes, modifications and equivalents included in the spirit and scope of the present invention as defined by the appended claims. It should be noted that the method steps described herein can all be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of the two.
[0046] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0047] Note: The example to be introduced below is only a specific example, and is not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequences, etc. Those skilled in the art can apply the concept of the present invention to construct more embodiments not mentioned in this specification by reading this specification.
[0048] See also Figure 1 As shown, an embodiment of the present invention provides a method for identifying an inner frame and an outer frame of a parking space, comprising the following steps:
[0049] S100, obtaining a plurality of parking space frames and a plurality of parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines;
[0050] S200, dividing the four horizontal lines into two groups of horizontal lines according to the line width distance, and dividing the four vertical lines into two groups of vertical lines according to the line width;
[0051] S300: randomly select one of the parking space frames, perform distance matching on the parking space lines in the parking space frame with the two groups of horizontal lines and the two groups of vertical lines respectively, and determine whether the parking space frame is an inner frame parking space or an outer frame parking space according to the distance matching result.
[0052] Specifically, in this embodiment, for traditional algorithms, parking space lines are composed of straight lines, so most of the existing traditional visual algorithms are mainly based on straight line detection for parking space detection; after straight line detection, most of them are spliced according to the geometric characteristics of parking spaces, but when confirming parking spaces, it is impossible to determine which parking space is an inner frame or outer frame parking space (such as Figure 1 As shown in the figure, the parking space lines are cross-connected into multiple parking spaces. The output parking space may be a parking space frame consisting of an outer edge and an inner edge (in this case, it is neither an outer frame parking space nor an inner frame parking space). As a result, the final parking posture has a line width error in the horizontal or vertical direction, and the automatic parking accuracy is poor.
[0053] See also Figure 2 As shown, in view of the problems in the prior art, the present invention first obtains multiple parking space frames and multiple parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines; then the four horizontal lines are divided into two groups of horizontal lines according to the line width distance, and the four vertical lines are divided into two groups of vertical lines according to the line width; finally, any one of the parking space frames is selected, and the parking space lines in the parking space frame are respectively matched with the two groups of horizontal lines and the two groups of vertical lines for distance, and the parking space frame is judged to be an inner frame parking space or an outer frame parking space according to the distance matching result. Therefore, the present invention confirms the inner frame parking space or the outer frame parking space from multiple parking space frames, reducing the error of a line width caused by parking space screening; at the same time, the parking space screening logic is simple, and the screened inner frame parking space or outer frame parking space improves the automatic parking space recognition accuracy.
[0054] It should be noted that in S100, a camera is used to take a picture of the parking space, the image is dedistorted, the original perspective is converted into a bird's-eye view, the parking lines are enhanced, the parking lines are segmented, and then the parking lines are detected through straight line detection. The parking lines are grouped into vertical lines and horizontal lines, and then the vertical lines and horizontal lines are spliced together to obtain multiple parking space frames.
[0055] See also Figure 3 As shown, preferably, in another embodiment of the present application, the step of "S200, dividing the four horizontal lines into two groups of horizontal lines according to the line width distance, and dividing the four vertical lines into two groups of vertical lines according to the line width" specifically includes the following steps:
[0056] The two horizontal lines with the closest line widths are divided into the first group of horizontal lines, and the other two horizontal lines are divided into the second group of horizontal lines;
[0057] The first group of horizontal lines includes a first front horizontal line group1_front and a first rear horizontal line group1_rear, and the second group of horizontal lines includes a second front horizontal line group2_front and a second rear horizontal line group2_rear;
[0058] The two vertical lines with the closest line width distance are divided into the first group of vertical lines, and the other two vertical lines are divided into the second group of vertical lines;
[0059] The first group of vertical lines includes a first left vertical line group1_left and a first right vertical line group1_right, and the second group of vertical lines includes a second left vertical line group2_left and a second right vertical line group2_right.
[0060] Preferably, in another embodiment of the present application, the step of "S300, arbitrarily selecting one of the parking space frames, performing distance matching on the parking space lines in the parking space frame with the two groups of horizontal lines and the two groups of vertical lines respectively, and judging whether the parking space frame is an inner frame parking space or an outer frame parking space according to the distance matching result" specifically includes the following steps:
[0061] S310, arbitrarily select one of the parking space frames, perform distance matching on the left side parking space line in the parking space frame with the first right side vertical line and the second right side vertical line, perform distance matching on the right side parking space line in the parking space frame with the first left side vertical line and the second left side vertical line, perform distance matching on the front side parking space line in the parking space frame with the first rear side horizontal line and the second rear side horizontal line, perform distance matching on the rear side parking space line in the parking space frame with the first front side horizontal line and the second front side horizontal line, and when the distance matching succeeds, determine that the selected parking space frame is an inner frame parking space;
[0062] S320, arbitrarily select one of the parking space frames, perform distance matching on the left parking space line in the parking space frame with the first left vertical line and the second left vertical line, perform distance matching on the right parking space line in the parking space frame with the first right vertical line and the second right vertical line, perform distance matching on the front parking space line in the parking space frame with the first front horizontal line and the second front horizontal line, perform distance matching on the rear parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line, and when the distance matching succeeds, it is determined that the selected parking space frame is an outer frame parking space.
[0063] Preferably, in another embodiment of the present application, the step of "S310, arbitrarily selecting one of the parking space frames, respectively performing distance matching on the left parking space line in the parking space frame with the first right vertical line and the second right vertical line, respectively performing distance matching on the right parking space line in the parking space frame with the first left vertical line and the second left vertical line, respectively performing distance matching on the front parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line, respectively performing distance matching on the rear parking space line in the parking space frame with the first front horizontal line and the second front horizontal line, and when the distance matching is successful, determining that the selected parking space frame is an inner frame parking space" specifically includes the following steps:
[0064] S311, randomly select one of the parking space frames (for example Figure 4 the innermost box in );
[0065] S312, obtaining the distances between the left parking space line left_line in the parking space frame and the first right vertical line and the second right vertical line (group1_right, group2_right), respectively. When any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level.
[0066] S313, obtaining the distances between the right parking space line right_line in the parking space frame and the first left vertical line and the second left vertical line (group1_left, group2_left), respectively. When any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level.
[0067] S314, obtaining the distances between the front parking space line front_line in the parking space frame and the first rear horizontal line and the second rear horizontal line (group1_rear, group2_rear), respectively. When any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level.
[0068] S315, obtaining the distances between the rear parking space line rear_line in the parking space frame and the first front horizontal line and the second front horizontal line (group1_front, group2_front), respectively. When any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level.
[0069] S316: When the probability that the parking space frame is an inner-frame parking space reaches four confidence levels, it is determined that the selected parking space frame is an inner-frame parking space (e.g. Figure 5 the innermost box in the ).
[0070] Preferably, in another embodiment of the present application, the step of "S320, arbitrarily selecting one of the parking space frames, respectively performing distance matching on the left parking space line in the parking space frame with the first left vertical line and the second left vertical line, respectively performing distance matching on the right parking space line in the parking space frame with the first right vertical line and the second right vertical line, respectively performing distance matching on the front parking space line in the parking space frame with the first front horizontal line and the second front horizontal line, respectively performing distance matching on the rear parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line, and when the distance matching is successful, determining that the selected parking space frame is an outer frame parking space" specifically includes the following steps:
[0071] S321, randomly selecting one of the parking space frames;
[0072] S322, obtaining the distances between the left parking space line in the parking space frame and the first left vertical line and the second left vertical line (group1_left, group2_left), respectively. When any distance is zero, the probability of determining that the parking space frame is an outer frame parking space is increased by one confidence level.
[0073] S323, obtaining the distances between the right parking space line in the parking space frame and the first right vertical line and the second right vertical line (group1_right, group2_right), respectively. When any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level.
[0074] S324, obtaining the distances between the front parking space line in the parking space frame and the first front horizontal line and the second front horizontal line (group1_front, group2_front), respectively. When any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level.
[0075] S325, obtaining the distances between the rear parking space line in the parking space frame and the first rear horizontal line and the second rear horizontal line (group1_rear, group2_rear), respectively. When any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level.
[0076] S326: When the probability that the parking space frame is an outer frame parking space reaches four confidence levels, it is determined that the selected parking space frame is an outer frame parking space.
[0077] See also Figure 6 As shown, an embodiment of the present invention provides a parking space inner frame and outer frame recognition system 100, including a parking space acquisition module 110, a grouping module 120 and a judgment module 130;
[0078] The parking space acquisition module 110 acquires a plurality of parking space frames and a plurality of parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines;
[0079] The grouping module 120 is connected to the parking space acquisition module 110 for dividing the four horizontal lines into two groups of horizontal lines according to the line width, and dividing the four vertical lines into two groups of vertical lines according to the line width;
[0080] The judgment module 130 is communicatively connected with the parking space acquisition module 110 and the grouping module 120, and is used to arbitrarily select one of the parking space frames, perform distance matching on the parking space lines in the parking space frame with the two groups of horizontal lines and the two groups of vertical lines respectively, and judge whether the parking space frame is an inner frame parking space or an outer frame parking space according to the distance matching result.
[0081] The present invention first obtains multiple parking space frames and multiple parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines; then the four horizontal lines are divided into two groups of horizontal lines according to the line width distance, and the four vertical lines are divided into two groups of vertical lines according to the line width; finally, a parking space frame is randomly selected, and the parking space lines in the parking space frame are respectively matched with the two groups of horizontal lines and the two groups of vertical lines, and the parking space frame is judged to be an inner frame parking space or an outer frame parking space according to the distance matching result. Therefore, the present invention confirms the inner frame parking space or the outer frame parking space from multiple parking space frames, reducing the error of a line width caused by parking space screening; at the same time, the parking space screening logic is simple, and the screened inner frame parking space or outer frame parking space improves the automatic parking space recognition accuracy.
[0082] Specifically, this embodiment corresponds one-to-one to the above method embodiment, and the functions of each module have been described in detail in the corresponding method embodiment, so they will not be repeated here.
[0083] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, all or part of the method steps of the above method are implemented.
[0084] The present invention implements all or part of the process in the above method, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0085] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program running on the processor, and when the processor executes the computer program, all or part of the method steps in the above method are implemented.
[0086] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of a computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0087] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0088] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, servers or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.
[0089] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), servers, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0090] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0092] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for identifying inner and outer frames of a parking space, characterized in that: The following steps are involved: Acquire multiple parking space frames and multiple parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines; Dividing the four horizontal lines into two groups of horizontal lines according to the line width distance, and dividing the four vertical lines into two groups of vertical lines according to the line width; Randomly select one of the parking space frames, perform distance matching on the parking space lines in the parking space frame with the two groups of horizontal lines and the two groups of vertical lines respectively, and determine whether the parking space frame is an inner frame parking space or an outer frame parking space according to the distance matching result; The step of "dividing the four horizontal lines into two groups of horizontal lines according to the line width distance, and dividing the four vertical lines into two groups of vertical lines according to the line width" specifically includes the following steps: The two horizontal lines with the closest line width distance are divided into the first group of horizontal lines, and the other two horizontal lines are divided into the second group of horizontal lines; The first group of horizontal lines includes a first front horizontal line and a first rear horizontal line, and the second group of horizontal lines includes a second front horizontal line and a second rear horizontal line; The two vertical lines with the closest line width distance are divided into the first group of vertical lines, and the other two vertical lines are divided into the second group of vertical lines; The first group of vertical lines includes a first left vertical line and a first right vertical line, and the second group of vertical lines includes a second left vertical line and a second right vertical line.
2. The method for identifying the inner and outer frames of a parking space according to claim 1, characterized in that: The step of "arbitrarily selecting one of the parking space frames, performing distance matching on the parking space lines in the parking space frame with the two groups of horizontal lines and the two groups of vertical lines, and judging whether the parking space frame is an inner frame parking space or an outer frame parking space according to the distance matching result" specifically includes the following steps: Randomly select one of the parking space frames, perform distance matching on the left parking space line in the parking space frame with the first right vertical line and the second right vertical line, perform distance matching on the right parking space line in the parking space frame with the first left vertical line and the second left vertical line, perform distance matching on the front parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line, perform distance matching on the rear parking space line in the parking space frame with the first front horizontal line and the second front horizontal line, and when the distance matching succeeds, determine that the selected parking space frame is an inner frame parking space; Randomly select one of the parking space frames, perform distance matching on the left parking space line in the parking space frame with the first left vertical line and the second left vertical line respectively, perform distance matching on the right parking space line in the parking space frame with the first right vertical line and the second right vertical line respectively, perform distance matching on the front parking space line in the parking space frame with the first front horizontal line and the second front horizontal line respectively, perform distance matching on the rear parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line respectively, and when the distance matching is successful, it is determined that the selected parking space frame is an outer frame parking space.
3. The method for identifying the inner and outer frames of a parking space according to claim 2, characterized in that: The step of "arbitrarily selecting one of the parking space frames, performing distance matching on the left parking space line in the parking space frame with the first right vertical line and the second right vertical line, performing distance matching on the right parking space line in the parking space frame with the first left vertical line and the second left vertical line, performing distance matching on the front parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line, performing distance matching on the rear parking space line in the parking space frame with the first front horizontal line and the second front horizontal line, and when the distance matching is successful, determining that the selected parking space frame is an inner frame parking space" specifically includes the following steps: Randomly select one of the parking space frames; Obtaining the distances between the left parking space line in the parking space frame and the first right vertical line and the second right vertical line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level; Obtaining the distances between the right parking space line in the parking space frame and the first left vertical line and the second left vertical line, respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level; Obtaining the distances between the front parking space line in the parking space frame and the first rear horizontal line and the second rear horizontal line, respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level; Obtaining the distances between the rear parking space line in the parking space frame and the first front horizontal line and the second front horizontal line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level; When the probability that the parking space frame is an inner-frame parking space reaches four confidence levels, the selected parking space frame is determined to be an inner-frame parking space.
4. The method for identifying the inner and outer frames of a parking space according to claim 2, characterized in that: The step of "arbitrarily selecting one of the parking space frames, performing distance matching on the left parking space line in the parking space frame with the first left vertical line and the second left vertical line, performing distance matching on the right parking space line in the parking space frame with the first right vertical line and the second right vertical line, performing distance matching on the front parking space line in the parking space frame with the first front horizontal line and the second front horizontal line, performing distance matching on the rear parking space line in the parking space frame with the first rear horizontal line and the second rear horizontal line, and when the distance matching is successful, determining that the selected parking space frame is an outer frame parking space" specifically includes the following steps: Randomly select one of the parking space frames; Obtaining the distances between the left parking space line in the parking space frame and the first left vertical line and the second left vertical line, respectively, and when any distance is zero, the probability of determining that the parking space frame is an outer frame parking space is increased by one confidence level; Obtaining the distances between the right parking space line in the parking space frame and the first right vertical line and the second right vertical line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level; Obtaining the distances between the front parking space line in the parking space frame and the first front horizontal line and the second front horizontal line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level; Obtaining the distances between the rear parking space line in the parking space frame and the first rear horizontal line and the second rear horizontal line respectively, and when any distance is zero, the probability of determining that the parking space frame is an inner frame parking space is increased by one confidence level; When the probability that the parking space frame is an outer frame parking space reaches four confidence levels, it is determined that the selected parking space frame is an outer frame parking space.
5. A parking space inner frame and outer frame recognition system, characterized in that: include: A parking space acquisition module, which acquires a plurality of parking space frames and a plurality of parking space lines of a parking space, wherein the parking space lines include four horizontal lines and four vertical lines; A grouping module, which is in communication with the parking space acquisition module and is used to divide the four horizontal lines into two groups of horizontal lines according to the line width distance, and divide the four vertical lines into two groups of vertical lines according to the line width; a judgment module, which is in communication with the parking space acquisition module and the grouping module, and is used for arbitrarily selecting one of the parking space frames, performing distance matching on the parking space lines in the parking space frame with the two groups of horizontal lines and the two groups of vertical lines, respectively, and judging whether the parking space frame is an inner frame parking space or an outer frame parking space according to the distance matching result; The step of dividing the four horizontal lines into two groups of horizontal lines according to the line width distance, and dividing the four vertical lines into two groups of vertical lines according to the line width, comprises: The two horizontal lines with the closest line width distance are divided into the first group of horizontal lines, and the other two horizontal lines are divided into the second group of horizontal lines; The first group of horizontal lines includes a first front horizontal line and a first rear horizontal line, and the second group of horizontal lines includes a second front horizontal line and a second rear horizontal line; The two vertical lines with the closest line width distance are divided into the first group of vertical lines, and the other two vertical lines are divided into the second group of vertical lines; The first group of vertical lines includes a first left vertical line and a first right vertical line, and the second group of vertical lines includes a second left vertical line and a second right vertical line.
6. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying the inner and outer frames of a parking space as claimed in any one of claims 1 to 4 is implemented.
7. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor runs the computer program, the method for identifying the inner and outer borders of a parking space as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Parking space detection method and system and automobile
CN111191485A
Parking frame identification method and device, electronic equipment and storage medium
CN114332814A