Vehicle parking space association determination method and device, electronic equipment and computer storage medium

CN122337028BActive Publication Date: 2026-09-15SANLI VIDEO FREQUENCY SCI & TECH SHENZHEN
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610788879.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-03
Publication Date
2026-09-15
Estimated Expiration
2046-06-03

AI Technical Summary

Technical Problem

[0003]但是,在多数实际应用场景中,仅能获得由通用目标检测模型输出的2D轴向对齐矩形框(Axis-Aligned Bounding Box)

Benefits of technology

本发明通过获取待检测图像并进行车辆识别,得到车辆检测框。然后,通过检测车辆检测框与预设车位区域在预设方向上的重叠情况,计算预设车位区域的车位面积;确定车辆检测框和预设车位区域的重叠区域的第一重叠面积;确定参考区域和预设车位区域的重叠区域的第二重叠面积;根据第一重叠面积及车位面积计算入位完成度,根据第一重叠面积和第二重叠面积计算车辆车位关联度,最后再根据入位完成度和车辆车位关联度,检测车辆和目标车位是否关联,由于不需要高精度的三维轮廓数据和姿态信息,基于车辆检测框和预设车位区域即可得到用于确定车辆和目标车位是否关联的入位完成度和车辆车位关联度,从而提高了车辆与车位关联检测的针对不同实际应用场景的适应性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122337028B_ABST
    Figure CN122337028B_ABST
Patent Text Reader

Abstract

The application relates to intelligent parking technology and provides a vehicle parking space association determination method and device, electronic equipment and a computer storage medium. The method comprises the following steps: acquiring a to-be-detected image photographed for a target parking space; performing vehicle detection on the to-be-detected image to obtain a vehicle detection frame; if the vehicle detection frame and a preset parking space region in the to-be-detected image overlap in a preset direction, calculating a parking space area of the preset parking space region, determining a first overlap area of an overlap region of the vehicle detection frame and the preset parking space region; determining a second overlap area of an overlap region of a reference region and the preset parking space region; calculating a parking completion degree according to the first overlap area and the parking space area, and calculating a vehicle parking space association degree according to the first overlap area and the second overlap area; and determining an association relationship between the vehicle and the target parking space according to the parking completion degree and the vehicle parking space association degree. The application can improve the adaptability of vehicle and parking space association detection for different actual application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent parking technology, and more specifically, to a method, apparatus, electronic device, and computer storage medium for determining vehicle parking space association. Background Technology

[0002] With the rapid development of intelligent transportation systems and autonomous driving technologies, the precise correlation between vehicles and parking spaces has become a key technological aspect in applications such as smart parking management and automated parking. Current technologies typically employ vehicle 3D contour data acquired by high-precision sensors (such as LiDAR or multi-view cameras) to establish the spatial correspondence between vehicles and parking spaces through point cloud matching or attitude estimation algorithms. The accuracy of current vehicle-parking space correlation detection heavily relies on detection data that accurately reflects the vehicle's true contour and attitude. For example, precise measurements of vehicle geometric features (such as length, width, and axle positions) and parking angles (such as yaw angle) must meet millimeter-level contour accuracy and angular resolution requirements within ±1°.

[0003] However, in most practical applications, only 2D axis-aligned bounding boxes output by general object detection models can be obtained. This technical solution, which relies on fine contour or pose analysis, cannot effectively adapt to existing data conditions. Summary of the Invention

[0004] The purpose of this invention is to provide a method, device, electronic device, and computer storage medium for determining vehicle parking space association.

[0005] The embodiments of the present invention can be implemented as follows: In a first aspect, the present invention provides a method for determining the association between a vehicle and a parking space, the method comprising: Acquire the image to be detected captured for the target parking space; Vehicle detection is performed on the image to be detected to obtain a vehicle detection bounding box. The image to be detected includes a reference region in a normalized coordinate system whose Y-axis coordinate is less than a reference value. The reference value is the maximum value of the Y-axis coordinate of each vertex of the vehicle detection bounding box in the normalized coordinate system. The normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on its width and height. If the vehicle detection frame and the preset parking space area in the image to be detected overlap in a preset direction, then the parking space area of ​​the preset parking space area is calculated. Determine the first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space area; Determine the second overlap area of ​​the overlapping area between the reference area and the preset parking space area; The parking completion degree is calculated based on the first overlapping area and the parking space area. The parking completion degree represents the degree to which the vehicle in the vehicle detection frame occupies space in the target parking space. The vehicle-parking space correlation degree is calculated based on the first overlapping area and the second overlapping area, wherein the vehicle-parking space correlation degree characterizes the spatial orientation correlation strength between the vehicle and the target parking space. The relationship between the vehicle and the target parking space is determined based on the parking completion rate and the vehicle-parking space correlation.

[0006] In an optional implementation, the step of determining the first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space area includes: Obtain the first vertex sequence formed by arranging the vertices of the vehicle detection frame in a preset order; Obtain a second vertex sequence formed by arranging the vertices of the preset parking space area in the preset order; The vertex sequence of the overlapping area between the vehicle detection box and the preset parking space area is determined based on the first vertex sequence and the second vertex sequence. The overlapping area is determined based on the vertex sequence of the overlapping area between the vehicle detection frame and the preset parking space area; The step of determining the second overlap area of ​​the overlapping area between the reference area and the preset parking space area includes: Obtain the third vertex sequence formed by arranging the vertices of the reference region in a preset order; Obtain a second vertex sequence formed by arranging the vertices of the preset parking space area in the preset order; The vertex sequence of the overlapping region of the reference region and the preset parking space region is determined based on the third vertex sequence and the second vertex sequence; The second overlapping area is determined based on the vertex sequence of the overlapping area of ​​the reference area and the preset parking space area.

[0007] In an optional implementation, the step of calculating the parking space area of ​​the preset parking space area includes: Each vertex of the preset parking space area is obtained sequentially in a preset direction to obtain the vertex sequence of the parking space area; The parking area of ​​the preset parking area is calculated based on the vertex sequence of the parking area.

[0008] In an optional implementation, before the step of calculating the parking space area of ​​the preset parking space region if the vehicle detection frame and the preset parking space region in the image to be detected overlap in a preset direction, the method further includes: Obtain the first coordinate range of the vertices of the vehicle detection box on the Y-axis of the normalized coordinate system, wherein the normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on the width and height of the image to be detected. Obtain the second coordinate range of the vertices of the preset parking space area on the Y-axis of the normalized coordinate system; If the maximum value among the minimum values ​​of the first coordinate range and the second coordinate range is less than the minimum value among the maximum values ​​of the first coordinate range and the second coordinate range, then it is determined that the vehicle detection box and the preset parking space area in the image to be detected overlap in a preset direction.

[0009] In optional implementations, the association relationship includes strong binding, strong association, weak association, and no association; The step of determining the association between the vehicle and the target parking space based on the parking completion rate and the vehicle-parking space association degree includes: If the correlation between the vehicle and the target parking space is greater than a preset correlation threshold, then the correlation between the vehicle and the target parking space is determined to be a strong binding. If the vehicle-parking space correlation degree is less than or equal to the preset correlation degree threshold, then the vehicle and the target parking space are determined to be uncorrelated. If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, then the correlation between the vehicle and the target parking space is determined based on the vehicle-parking space correlation degree, the parking completion degree and the parking status of the vehicle.

[0010] In an optional implementation, the step of determining the association between the vehicle and the target parking space based on the vehicle-parking-space association degree, the parking completion degree, and the vehicle's parking status includes: If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, and the parking state is the preset turning parking state, then the correlation between the vehicle and the target parking space is determined to be weak. If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, and the parking state is a preset parking state or a preset turning parking state, then the correlation between the vehicle and the target parking space is determined to be no correlation.

[0011] In a second aspect, the present invention provides a vehicle parking space association determination device, the device comprising: The acquisition module is used to acquire the image to be detected captured for the target parking space; The detection module is used to perform vehicle recognition on the image to be detected to obtain a vehicle detection box. The image to be detected includes a reference region in a normalized coordinate system whose Y-axis coordinate is less than a reference value. The reference value is the maximum value of the Y-axis coordinate of each vertex of the vehicle detection box in the normalized coordinate system. The normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on its width and height. The determination module is configured to: calculate the parking space area of ​​the preset parking space region if the vehicle detection frame and the preset parking space region in the image to be detected overlap in a preset direction; determine a first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space region; determine a second overlap area of ​​the overlapping area between the reference region and the preset parking space region; calculate the parking completion degree based on the first overlap area and the parking space area, wherein the parking completion degree characterizes the degree to which the vehicle in the vehicle detection frame occupies space in the target parking space; and calculate the vehicle parking space correlation degree based on the first overlap area and the second overlap area, wherein the vehicle parking space correlation degree characterizes the spatial orientation correlation strength between the vehicle and the target parking space. The determining module is further configured to detect the association between the vehicle and the target parking space based on the parking completion degree and the vehicle-parking space association degree.

[0012] In an optional implementation, the determining module is further configured to: Obtain the first coordinate range of the vertices of the vehicle detection box on the Y-axis of the normalized coordinate system, wherein the normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on the width and height of the image to be detected. Obtain the second coordinate range of the vertices of the preset parking space area on the Y-axis of the normalized coordinate system; If the maximum value among the minimum values ​​of the first coordinate range and the second coordinate range is less than the minimum value among the maximum values ​​of the first coordinate range and the second coordinate range, then it is determined that the vehicle detection box and the preset parking space area in the image to be detected overlap in a preset direction.

[0013] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory being used to store a program, and the processor being used to implement the vehicle parking space association determination method as described in the first aspect when executing the program.

[0014] Fourthly, the present invention provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the vehicle parking space association determination method as described in the first aspect.

[0015] Compared with the prior art, the present invention has the following beneficial effects: This invention acquires an image to be detected and performs vehicle recognition to obtain a vehicle detection bounding box. Then, by detecting the overlap between the vehicle detection bounding box and a preset parking space area in a preset direction, the parking space area of ​​the preset parking space area is calculated. A first overlap area is determined between the vehicle detection bounding box and the preset parking space area; a second overlap area is determined between a reference area and the preset parking space area; the parking completion degree is calculated based on the first overlap area and the parking space area; and the vehicle-parking space correlation degree is calculated based on the first and second overlap areas. Finally, the vehicle-parking space correlation degree is used to detect whether the vehicle and the target parking space are associated. Since high-precision 3D contour data and pose information are not required, the parking completion degree and vehicle-parking space correlation degree used to determine whether the vehicle and the target parking space are associated can be obtained based on the vehicle detection bounding box and the preset parking space area, thereby improving the adaptability of vehicle-parking space association detection to different practical application scenarios. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is an example diagram illustrating an application scenario provided in this embodiment.

[0018] Figure 2 This is a block diagram of the electronic device provided in this embodiment.

[0019] Figure 3 This is a flowchart illustrating the vehicle parking space association determination method provided in this embodiment.

[0020] Figure 4 This is an example diagram showing the overlapping area between the vehicle detection frame and the parking space area provided in this embodiment.

[0021] Figure 5 An example diagram of the reference area provided in this embodiment.

[0022] Figure 6 This is an example graph showing the curves of the completion rate of parking and the correlation between the vehicle and the parking space during the process of a vehicle entering a parking space, as provided in this embodiment.

[0023] Figure 7 This is a block diagram illustrating the vehicle parking space association determination device provided in this embodiment.

[0024] Icons: 10-Electronic device; 11-Processor; 12-Memory; 13-Bus; 100-Vehicle parking space association determination device; 110-Acquisition module; 120-Detection module; 130-Determination module. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0026] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0027] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0028] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0029] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0030] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.

[0031] The usual method for assessing the degree of vehicle parking is to quantify the progress of the vehicle parking process. Commonly used assessment dimensions include: (1) Spatial intrusion: directly calculate the proportion of the parking space area occupied by the part of the vehicle detection box that intrudes into the parking space area, which is used to characterize the size of the space occupied by the vehicle in the parking space. (2) Longitudinal depth completion: assess the parking progress of the vehicle in the length direction of the parking space, which is usually calculated by the distance or relative position relationship between the rear edge of the vehicle and the bottom edge of the parking space. (3) Lateral centering completion: assess the centering of the vehicle in the width direction of the parking space, which is determined by measuring the lateral offset between the center line of the vehicle and the center line of the parking space. (4) Heading angle alignment completion: quantify the angle between the longitudinal axis of the vehicle and the direction of the center line of the parking space. The smaller the angle, the higher the heading alignment completion.

[0032] Based on the assessment of the degree of parking, it is determined whether the vehicle has completed the parking action. The determination methods usually include: (1) Geometric inclusion judgment: a preliminary judgment is made by calculating the geometric inclusion relationship between the vehicle detection box and the polygonal area of ​​the parking space. If the vehicle box falls completely within the boundary of the parking space, it is considered that the parking may have been completed. (2) Threshold judgment: based on the quantified degree of parking, a higher threshold (such as more than 85%) is set. When the overlap reaches this threshold, the parking is considered to be completed. The spatial intrusion, longitudinal depth completion and lateral centering completion mentioned above can all be used to increase the threshold judgment to determine the completion of parking. (3) Boundary distance and angle analysis: the average distance between each side of the vehicle detection box and the corresponding boundary of the parking space is measured, and the angle between the vehicle heading angle and the center line of the parking space is estimated. The smaller the distance and the closer the angle is to zero, the better the alignment. (4) Contour matching and feature point alignment: a more refined method attempts to extract the actual contour or key feature points of the vehicle (such as wheels and corners) and match them with the parking space template. The accuracy of parking is judged by the contour overlap or feature point position deviation.

[0033] The above method of judging whether a vehicle has completed its parking action by assessing its position has at least the following defects: (1) The basic data conditions and algorithm assumptions are seriously mismatched. The effective operation of high-precision contour matching and angle analysis methods depends heavily on detection data that can accurately reflect the vehicle's true contour and posture. In most practical application scenarios, only 2D axially aligned bounding boxes output by general object detection models can be obtained. Technical paths that rely on fine contour or posture analysis cannot be effectively adapted under existing data conditions. (2) Two key error sources are ignored: (2.1) Detection box expansion error: The area of ​​the general vehicle detection box is significantly larger than the actual land projection of the vehicle. Calculating area overlap and spatial intrusion using this expanded rectangle will result in systematically inflated results. (2.2) Wide-angle lens distortion effect: Image distortion introduced by the wide-angle cameras widely used in parking lots will cause nonlinear distortion of the geometric shapes, distances, and area relationships at different locations in the image. The superposition of the above errors reduces the reliability of all geometric calculation results based on the rectangular box. For example, the expanded detection box of a vehicle parked in an adjacent parking space may significantly overlap with the expanded area of ​​the parking space, thus calculating a "spatial intrusion" of more than 50%. (3) The above method focuses on the calculation of whether the vehicle is in a parking space and the degree of parking. In the application scenario, another important purpose is to lock the target parking space in the early stage of parking in a multi-parking space scenario, and to remove non-target vehicles from the monitoring list in a timely manner in subsequent applications for parking space management. Therefore, the above calculation method cannot meet the core business needs of parking management.

[0034] In view of this, this embodiment provides a method, device, electronic device and computer storage medium for determining the association between a vehicle and a parking space. It can realize early intention recognition and prediction of parking behavior without high-precision three-dimensional contour data and posture information. At the same time, it can effectively resist common interferences such as inaccurate vehicle detection frames and wide-angle lens distortion. It has a two-dimensional quantitative index system to correct the problem of inflated values ​​that are easy to produce by a single index, and ensure that the evaluation results truly reflect the association between the vehicle and the parking space. It will be described in detail below.

[0035] Please refer to Figure 1 , Figure 1 This is an example diagram illustrating an application scenario provided in this embodiment. Figure 1 In this system, a camera is installed above the parking space on the side furthest from the vehicle entrance / exit. The camera captures images of vehicles near the parking space, including those passing by, attempting to park, currently parking, and exiting. By acquiring images from the camera and performing vehicle detection to obtain vehicle bounding boxes, the relationship between vehicles and parking spaces is determined based on these bounding boxes and the parking space area within the images.

[0036] based on Figure 1 In addition to its applications, the camera can also communicate with electronic devices. The camera can send captured images to the connected electronic device, or the electronic device can actively acquire images from the camera. Based on these images, the electronic device can determine the relationship between vehicles and parking spaces. Please refer to [link / reference]. Figure 2 , Figure 2 This is a block diagram illustrating the electronic device provided in this embodiment. The electronic device 10 implements the vehicle parking space association determination method of this embodiment. The electronic device 10 includes a processor 11, a memory 12, and a bus 13, with the processor 11 and the memory 12 connected via the bus 13.

[0037] The processor 11 can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the vehicle parking space association determination method in the above embodiments can be completed by the integrated logic circuits in the hardware of the processor 11 or by software instructions. The processor 11 can be a general-purpose processor, including a CPU (Central Processing Unit), NP (Network Processor), GPU (Graphics Processing Unit), etc.; it can also be a DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Logic Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0038] The memory 12 is used to store the program for implementing the vehicle parking space association determination method. The program can be a software function module stored in the memory 12 in the form of software or firmware or embedded in the OS (Operating System) of the electronic device 10.

[0039] After receiving the execution instruction, the processor 11 executes the program to implement the vehicle parking space association determination method of this embodiment.

[0040] Electronic device 10 can be a standalone physical or virtual computer device, such as a back-end server in an intelligent parking management system, a server cluster composed of multiple computer devices, or a cloud server, etc.

[0041] based on Figure 1This embodiment provides an application scenario for... Figure 2 For the method of determining the vehicle parking space association in the electronic device 10, please refer to [reference needed]. Figure 3 , Figure 3 This is a flowchart illustrating the vehicle parking space association determination method provided in this embodiment. The method includes the following steps: Step S101: Obtain the image to be detected captured for the target parking space.

[0042] In this embodiment, the image to be detected can be a single frame or multiple frames of an image captured by a fixed-view camera installed above or to the side of the parking lot, containing the target parking space and its surrounding area. Its imaging range covers at least one complete parking space and the adjacent path area that the vehicle may enter. The camera can also be as follows: Figure 1 As shown, it is installed above the target parking space on the side away from the vehicle entrance / exit.

[0043] Step S102: Perform vehicle detection on the image to be detected to obtain a vehicle detection box. The image to be detected includes a reference region in the normalized coordinate system whose Y-axis coordinate is less than the reference value. The reference value is the maximum value of the Y-axis coordinate of each vertex of the vehicle detection box in the normalized coordinate system. The normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on the width and height of the image to be detected.

[0044] In this embodiment, the vehicle detection box can be a two-dimensional AABB (Axis-Aligned Bounding Box) output by a preset object detection model. The vehicle detection box is used to roughly indicate the location and approximate size of each vehicle in the image, and its four sides are parallel to the horizontal and vertical axes of the image coordinate system, respectively. The preset object detection model includes, but is not limited to, models built and trained based on convolutional neural network (CNN) models, YOLO models, and Transformer-based detectors.

[0045] Step S103: If the vehicle detection box and the preset parking space area in the image to be detected overlap in a preset direction, then calculate the parking space area of ​​the preset parking space area.

[0046] In this embodiment, the preset parking space area is a region in the image to be detected. As one implementation, the area of ​​this region can be obtained by contour fitting to obtain the geometry of the preset parking space area. The geometry can be a rectangle, and then the corresponding area can be calculated based on the dimensions of the fitted geometry. Alternatively, the area can be calculated using the vertices of the region, following a preset vertex sequence, and employing a directed area calculation formula.

[0047] Step S104: Determine the first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space area.

[0048] In this embodiment, both the vehicle detection box and the preset parking space area are regions in the image to be detected. One approach is to compare the pixels in the two regions to determine the pixels that belong to both regions simultaneously, and then calculate the area of ​​the overlapping region based on the determined pixels. Another approach is to compare the coordinates of the two bounding boxes to find the bounding boxes of the possible intersections, and then calculate the overlapping area based on the dimensions of the intersecting bounding boxes.

[0049] In this embodiment, the first overlapping area is used to reflect the proportion of space occupied by the vehicle detection frame within the target parking space. To more intuitively display the overlapping area between the vehicle detection frame and the preset parking space area, please refer to... Figure 4 , Figure 4 This is an example diagram showing the overlapping area between the vehicle detection frame and the parking space area provided in this embodiment. Figure 4 In the diagram, the rectangular frame represents the vehicle detection frame, the trapezoidal frame represents the preset parking space area, and the shaded area is the overlapping area of ​​the two. The area of ​​this overlapping area is the first overlapping area.

[0050] Step S105: Determine the second overlap area of ​​the overlapping area between the reference area and the preset parking space area.

[0051] In this embodiment, the reference region is used to simulate the longitudinal projection range most likely to be covered when the vehicle continues to move along the current driving direction. To more easily determine the reference region, the maximum value of the Y-axis coordinate of each vertex of the vehicle detection box in the normalized coordinate system is used as the reference value, and the region in the normalized coordinate system whose Y-axis coordinate is less than the reference value is used as the reference region.

[0052] In this embodiment, for a more intuitive explanation of the reference area, please refer to... Figure 5 , Figure 5 This is an example diagram of the reference area provided in this embodiment. Figure 5 In the diagram, the rectangular frame represents the vehicle detection frame, the Y-axis coordinate corresponding to the dashed line is the reference value, the light gray area in the normalized coordinate system is the reference area, the dark gray area is the overlapping area of ​​the reference area and the preset parking space area, and the area of ​​this overlapping area is the second overlapping area.

[0053] Step S106: Calculate the parking completion degree based on the first overlapping area and the parking space area. The parking completion degree characterizes the degree to which the vehicle in the vehicle detection frame occupies space in the target parking space.

[0054] In this embodiment, as one implementation method, the formula for calculating the fill completion degree can be expressed as: ,in, To determine the completion rate of the placement, The first overlapping area, This represents the parking space area. The closer the parking completion rate is to 1, the more complete the physical coverage of the target parking space.

[0055] Step S107: Calculate the vehicle-parking-space correlation degree based on the first overlap area and the second overlap area. The vehicle-parking-space correlation degree characterizes the spatial orientation correlation strength between the vehicle and the target parking space.

[0056] In this embodiment, the preset parking space area can be a polygonal region in the image, characterized by the actual geographical extent of the target parking space, which is pre-defined through manual annotation or automatic fitting. Its vertex coordinates can be known and can be corrected for distortion as lens parameters change. The preset direction can be the Y-axis direction in the image's normalized coordinate system, used to assist in quickly screening whether a vehicle is on a reasonable spatial path towards the target parking space.

[0057] In this embodiment, if the vehicle detection frame and the preset parking space area in the image to be detected do not overlap in the preset direction, it means that the vehicle has not yet entered the effective influence area in front of the target parking space. To avoid unnecessary computational overhead, no calculation is required for this purpose. If the two overlap in the preset direction, it means that the vehicle has entered the effective influence area in front of the target parking space. In order to further accurately determine the relationship between the vehicle and the target parking space, it is also necessary to determine the parking completion degree and the vehicle correlation degree. The parking completion degree reflects the proportion of the actual overlap area between the vehicle detection frame and the preset parking space area to the total area of ​​the parking space, and is used to measure the physical coverage progress of the vehicle parking in the parking space. The vehicle parking space correlation degree is based on the overlap between the projection area corresponding to the bottom edge of the vehicle detection frame and the preset parking space area. It can reflect whether the current movement trend of the vehicle is pointing to the parking space, so that its parking intention can be predicted before the vehicle has fully entered the parking space.

[0058] In this embodiment, as one implementation method, the formula for calculating the vehicle-parking-space correlation degree can be expressed as: ,in, For vehicle parking space correlation, The first overlapping area, This represents the second overlapping area.

[0059] Step S108: Determine the relationship between the vehicle and the target parking space based on the parking completion rate and the vehicle-parking space correlation.

[0060] In this embodiment, the association relationships include, but are not limited to, different levels such as no association, weak association, strong association, and strong binding. No association means there is no association between the vehicle and the target parking space, and changes in the state of the target parking space are irrelevant to the vehicle. Weak association means the association between the vehicle and the target parking space is relatively weak; the vehicle has a certain probability of interacting with the target parking space. Strong association means the state of the target parking space will change with the vehicle's subsequent movement trajectory. Strong binding means the vehicle is already parked in the target parking space, and the strong binding relationship between the target parking space and the vehicle will continue until the vehicle's parking completion rate reaches 0 or the video feed can no longer track it.

[0061] The method provided in this embodiment only requires acquiring the vehicle detection box and the preset parking space area. Based on the vehicle detection box and the preset parking space area, the parking completion degree and the vehicle-parking space association degree used to determine whether the vehicle and the target parking space are associated can be obtained. It does not require high-precision three-dimensional contour data and posture information, thereby improving the adaptability of vehicle-parking space association detection to different practical application scenarios.

[0062] In an optional implementation, in order to achieve a lightweight determination of whether the vehicle detection frame and the preset parking space area in the image to be detected overlap in a preset direction, this embodiment provides a determination method: First, obtain the first coordinate range of the vertices of the vehicle detection box on the Y-axis of the normalized coordinate system. The normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on the width and height of the image to be detected. In this embodiment, the normalized coordinate system can set the upper left corner of the image as the origin and the lower right corner as (1,1). The horizontal and vertical coordinates of any pixel in the image are mapped to values ​​in the range [0,1]. This can eliminate the scale difference caused by images with different resolutions and make geometric calculations comparable and generalizable.

[0063] In this embodiment, the vehicle detection box can be a rectangle, and the vertices of the vehicle detection box can be the four vertices of the rectangle. The coordinates of these four vertices can be uniquely determined in the normalized coordinate system. The first coordinate range is the closed interval formed by the minimum and maximum values ​​of the Y-axis coordinates of these four vertices, denoted as [y1min, y1max].

[0064] Secondly, obtain the second coordinate range of the vertices of the preset parking space area on the Y-axis of the normalized coordinate system; In this embodiment, the preset parking space area is a polygonal region representing the actual spatial location of the target parking space. It is usually surrounded by three to four vertices, and the coordinates of each vertex can be pre-adapted to a normalized coordinate system. The second coordinate range is the closed interval formed by the minimum and maximum values ​​of the Y-axis coordinates of all vertices of the polygonal region, denoted as [y2min, y2max].

[0065] Finally, if the maximum value among the minimum values ​​of the first coordinate range and the minimum values ​​of the second coordinate range is less than the minimum value among the maximum values ​​of the first coordinate range and the maximum values ​​of the second coordinate range, then it is determined that the vehicle detection box and the preset parking space area in the image to be detected overlap in the preset direction.

[0066] In this embodiment, if the first coordinate range is [y1min, y1max] and the second coordinate range is [y2min, y2max], then when max(y1min, y2min) ≤ min(y1max, y2max) holds, it is considered that the two have spatial overlap in the Y-axis direction.

[0067] In an optional implementation, to avoid the problem of high computational complexity caused by calculating the area of ​​the overlapping region between two regions using pixels, this embodiment also provides a method for determining the overlapping area of ​​the overlapping region between two regions: The method for determining the first overlap area between the vehicle detection frame and the preset parking space area is as follows: First, obtain the first vertex sequence formed by arranging the vertices of the vehicle detection frame in a preset order; then obtain the second vertex sequence formed by arranging the vertices of the preset parking space area in a preset order. In this embodiment, the preset order can be counterclockwise. A counterclockwise order ensures that the directed area of ​​the polygon is positive, thus better meeting the consistency requirement of the Sutherland-Hodgman polygon clipping algorithm for the direction of the input polygon. If the original input vertex sequence does not conform to the preset order, the vertex order is automatically corrected to a counterclockwise sequence by calculating the directed area and flipping the vertex order according to its sign.

[0068] Secondly, the vertex sequence of the overlapping area between the vehicle detection box and the preset parking space area is determined based on the first vertex sequence and the second vertex sequence; In this embodiment, based on the first vertex sequence and the second vertex sequence, a preset polygon clipping algorithm is invoked to clip edge by edge, generating a new set of vertices describing the boundary of the overlapping region, i.e., the vertex sequence of the overlapping region.

[0069] Finally, the first overlapping area is determined based on the vertex sequence of the overlapping area between the vehicle detection frame and the preset parking space area.

[0070] In this embodiment, the first overlapping area can be calculated using the directed area formula. The directed area formula is expressed as: ,in, The first overlapping area, ( , Let be the coordinates of the i-th vertex in the vertex sequence of the overlapping region between the vehicle detection bounding box and the preset parking space area, and let n be the number of vertices in the vertex sequence of the overlapping region between the vehicle detection bounding box and the preset parking space area. , )=(x n+1 ,y n+1 ).

[0071] In an optional implementation, the parking space area of ​​the preset parking space zone can also be calculated using the same calculation method as the overlapping area. Specifically, the implementation method is as follows: Each vertex of the preset parking space area is obtained sequentially according to the preset direction to obtain the vertex sequence of the parking space area; Calculate the parking area of ​​the preset parking area based on the vertex sequence of the parking area.

[0072] In this embodiment, similar to the overlapping area, the preset direction can also be counterclockwise, and the parking space area can also be calculated using the above-mentioned directed area formula. The difference is that the coordinates of the vertices in the input directed area formula are the coordinates of the vertices of the parking space area, and n is the number of vertices in the parking space area.

[0073] The second overlapping area of ​​the overlapping area between the reference area and the preset parking space area is determined as follows: First, obtain the third vertex sequence formed by arranging the vertices of the reference region in a preset order; Secondly, obtain the second vertex sequence formed by arranging the vertices of the preset parking space area in a preset order; Third, determine the vertex sequence of the overlapping area between the reference area and the preset parking space area based on the third vertex sequence and the second vertex sequence; Finally, the second overlapping area is determined based on the vertex sequence of the overlapping area between the reference area and the preset parking space area.

[0074] In this embodiment, the method of determining the vertex sequence of the overlapping area between the reference area and the preset parking space area based on the third vertex sequence and the second vertex sequence is similar to the aforementioned method of determining the vertex sequence of the overlapping area between the vehicle detection box and the preset parking space area based on the first vertex sequence and the second vertex sequence, and will not be repeated here. The method of determining the second overlapping area is similar to the aforementioned method of determining the first overlapping area, and will not be repeated here.

[0075] In optional implementations, relying on a single dimension cannot reasonably cover the entire process of a vehicle approaching, turning, entering the parking space, and parking. For example, even if a vehicle has significantly encroached on the parking space (high parking completion rate), but its course is severely skewed or it is stopped at the edge of an adjacent parking space, relying solely on the completion rate might misjudge that the vehicle and parking space are bound together. Similarly, a vehicle may be driving perpendicularly towards the target parking space but has not yet entered the parking area (zero parking completion rate), but its direction of travel is clearly pointing towards that parking space (high vehicle-parking-space correlation). Relying solely on the correlation might prematurely classify it as a strong vehicle-parking-space association. To determine different association scenarios, the applicant analyzed the relationship between parking completion rate and vehicle-parking-space correlation during the parking process. Please refer to [reference needed]. Figure 6 , Figure 6 This is an example graph showing the curves of the completion rate of parking and the correlation between the vehicle and the parking space during the process of a vehicle entering a parking space, as provided in this embodiment. Figure 6 In the diagram, the blue line represents the completion rate of parking spaces, and the yellow line represents the correlation between vehicles and parking spaces.

[0076] Therefore, this embodiment provides a method for determining different association scenarios: If the correlation between the vehicle and the target parking space is greater than the preset correlation threshold, then the relationship between the vehicle and the target parking space is determined to be a strong binding. If the correlation between the vehicle and the target parking space is less than or equal to the preset correlation threshold, then the correlation between the vehicle and the target parking space is determined to be no correlation. In this embodiment, both the preset correlation threshold and the preset completion threshold can be set to facilitate more flexible and accurate determination of correlation relationships. As one implementation, multiple different vehicle models parked in the target parking space can be tested. The maximum value among the multiple vehicle-parking-space correlations obtained is taken as the preset maximum correlation value, and the maximum value among the multiple parking completions obtained is taken as the preset maximum completion value. Similarly, multiple different vehicle models parked in adjacent parking spaces of the target parking space can be tested. The minimum value among the multiple vehicle-parking-space correlations obtained is taken as the preset minimum correlation value, and the minimum value among the multiple parking completions obtained is taken as the preset minimum completion value. The preset correlation threshold is selected within the range determined by the preset minimum correlation threshold and the preset maximum correlation threshold, and the preset completion threshold is selected within the range determined by the preset minimum completion threshold and the preset maximum completion value.

[0077] If the vehicle-parking-space correlation is greater than the preset correlation threshold, it means that the vehicle has substantially entered the parking space, its posture is basically aligned, and its behavioral intent is highly focused on the parking space—a typical parking state. If the vehicle-parking-space correlation is less than or equal to the preset correlation threshold, it means that the vehicle has not shown any interest in the parking space in terms of spatial orientation and movement trend, and is most likely a passing vehicle, a vehicle that has mistakenly entered a neighboring space, or a distant interfering target.

[0078] If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, then the correlation between the vehicle and the target parking space is determined based on the vehicle-parking space correlation degree, the parking completion degree and the vehicle's parking status.

[0079] In this embodiment, apart from the two strongly bound and unassociated cases mentioned above, the remaining cases need to be further determined based on the vehicle-parking space association degree, parking completion degree, and parking status to determine the type of association.

[0080] In this embodiment, the initial values ​​of the preset correlation degree and the preset completion degree are both basic reference values ​​set by the system. For example, both are set to 0 to indicate that the vehicle is still in a critical state of approaching from a distance or being longitudinally adjacent but not yet laterally entering. The parking state can be the current action type of the vehicle, including preset turning parking state, preset turning parking exit state, preset parking stationary state, etc. One way to determine the parking state is to predict it using a preset video analysis module based on feature information such as vehicle movement trajectory, turn signal, vehicle speed change, and displacement trend of previous and subsequent frames. This method increases the implementation cost because it requires training the video analysis module.

[0081] Another way to determine the parking status is to determine the vehicle's pose value based on the aspect ratio and maximum ordinate of the vehicle detection box in the video frame, and then determine the parking status based on the trend of the vehicle pose value and the trend of the maximum ordinate. The specific implementation steps could be: Step S10: Obtain the aspect ratio and maximum ordinate of the parked vehicle in multiple video frames of the current period; The video captured in the current period is processed by frame extraction to obtain multiple video frames. Vehicle target detection is performed on each video frame, outputting the 2D bounding box (i.e., vehicle detection box) corresponding to the parked vehicle. The ratio of the x-coordinate of the vehicle detection box to the width of the video frame is calculated to obtain the normalized x-coordinate of the vehicle detection box. The ratio of the y-coordinate of the vehicle detection box to the height of the video frame is calculated to obtain the normalized y-coordinate of the vehicle detection box. Based on the normalized x-coordinate and normalized y-coordinate of each vehicle detection box, the aspect ratio and maximum y-coordinate of the parked vehicle in the corresponding video frame are determined.

[0082] The maximum ordinate refers to the ratio of the ordinate value corresponding to the bottom edge of the vehicle detection box to the height of the video frame in an image coordinate system established with the top left corner of the image as the origin, the horizontal axis pointing to the right as the positive direction, and the vertical axis pointing downwards as the positive direction. The larger the maximum ordinate, the closer the bottom edge of the detection box is to the bottom of the image. In typical monitoring scenarios, this corresponds to the vehicle being closer to the camera, i.e., closer to the bottom line of the parking space.

[0083] For example, if the width of a video frame is w and the height of a video frame is h, the vehicle detection box is a rectangular area defined by the coordinates of the upper left corner (x1, y1) and the lower right corner (x2, y2). The aspect ratio is calculated by ((y2-y1) / h) / ((x2-x1) / w), and y2 / h is determined as the maximum ordinate.

[0084] Step S11: Determine the vehicle body posture value in each video frame based on the aspect ratio and maximum ordinate of the parked vehicle in each video frame; the vehicle body posture value is a normalized index characterizing the relative relationship between the parked vehicle and the parking space. Step S12: Take the attitude sequence composed of all vehicle body attitude values ​​in the current cycle and the ordinate sequence composed of all maximum ordinates in the current cycle as the target parameter sequence for the current cycle, respectively. Step S13: Determine the trend state of the target parameter sequence in the current period based on the target parameter sequence of the current period, the smoothed growth rate of the target parameter sequence of the previous period, and the trend state of the target parameter sequence of the previous period. Step S14: Determine the parking behavior pattern of the parked vehicle in the current period based on the trend state corresponding to the attitude sequence of the current period and the trend state corresponding to the vertical axis sequence of the current period.

[0085] As one implementation method, the target parameter sequence includes multiple parameter values. One specific implementation of step S13 can be: Calculate the current instantaneous growth rate based on the parameter values ​​in the target parameter sequence of the current period; The smoothed growth rate of the target parameter sequence in the current period is determined based on the current instantaneous growth rate and the smoothed growth rate of the target parameter sequence in the previous period. The basic state corresponding to the target parameter sequence of the current period is determined based on the basic state corresponding to the target parameter sequence of the previous period and the smooth growth rate of the target parameter sequence of the current period. The trend state corresponding to the target parameter sequence of the current period is determined based on the basic state corresponding to the target parameter sequence of the previous period and the trend state corresponding to the target parameter sequence of the previous period; the consecutive N periods include the current period and the N-1 periods before the current period.

[0086] As one implementation method, step S14 can be implemented as follows: Pre-set parking behavior table; Based on the trend state corresponding to the attitude sequence of the current period and the trend state corresponding to the vertical axis sequence of the current period, the parking behavior pattern of the vehicle in the current period is determined from the parking behavior table, and the parking state is obtained.

[0087] The parking behavior table is an ideal state mapping relationship summarized from a large amount of real-vehicle test data for vehicle exit (vehicle leaving the parking space) and vehicle entry (vehicle entering the parking space). As shown in Table 1, the first row of Table 1 records the first trend state, that is, the trend state corresponding to the posture sequence, and the first column records the second trend state, that is, the trend state corresponding to the vertical axis sequence. The second to fourth columns of the second row, the second to fourth columns of the third row, and the second to fourth columns of the fourth row in the parking behavior table are all parking behavior modes.

[0088] Table 1 Parking Behavior Table

[0089] In optional implementations, for situations in real parking lot video surveillance scenarios where a large number of vehicles are at critical positions: for example, a vehicle is driving from a distance toward the target parking space, and its vehicle detection frame has not yet substantially overlapped with the parking space area (the parking completion degree equals the preset initial value, for example, 0), but its driving direction is clearly toward the bottom of the parking space, and the front of the car has begun to turn (the parking state is the preset turning parking state). If it is simply judged as not related in this case, the early parking space occupancy prediction will be missed. Another example is a vehicle that is in the same frame, and its detection frame is close to the parking space in the vertical coordinate (vehicle-parking space correlation degree equals the preset initial value, for example, 0), but it is actually reversing out of a nearby parking space (the parking state is the preset turning parking out state). If it is included in the monitoring simply because of spatial proximity, it will lead to mistracking and wasted resources. To reasonably determine the correlation relationship even when the vehicle's movement is not yet complete and the geometric overlap is insufficient, this embodiment also provides an implementation method: If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, and the parking status is the preset turning parking status, then the correlation between the vehicle and the target parking space is determined to be weak. In this embodiment, the initial values ​​for preset correlation and preset completion can be set as needed; for example, both can be set to 0. This situation means that the vehicle intends to park, but it cannot be determined whether the parking space the vehicle wants to park in is the target parking space.

[0090] If the vehicle's parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, and the parking status is either the preset parking status or the preset turning parking status, then the vehicle and the target parking space are determined to be uncorrelated. In this embodiment, this situation means that the vehicle is either already parked in a non-target parking space or has been parked out of a non-target parking space, and is not associated with the target parking space.

[0091] If the vehicle's correlation with the parking space is greater than the preset correlation threshold, and the parking completion rate is less than or equal to the preset completion threshold, and the parking status is either the preset turning parking status or the preset stationary parking status, then the correlation between the vehicle and the target parking space is determined to be strong.

[0092] In this embodiment, this situation means that the vehicle is not parked properly during the parking process or in the target parking space, and the subsequent state of the target parking space changes according to the vehicle's movement trajectory. Specifically, if the vehicle is in a preset parking state, but the vehicle's parking completion rate does not reach the set preset completion rate threshold, it means that the vehicle is not parked properly and is not fully parked. At this time, the vehicle and the target parking space should still be considered strongly associated, and the state of the target parking space still mainly depends on this vehicle object; although it is not fully parked, other vehicles can no longer interact with the target parking space.

[0093] In this embodiment, the preset turning-in parking state means that the vehicle is performing typical pre-parking maneuvers such as turning the wheel towards the target parking space, decelerating, and curving its trajectory. The preset turning-out parking state means that the vehicle is performing typical leaving maneuvers such as reversing, turning around, and accelerating away from a certain position. The preset parking station state means that the vehicle has essentially finished parking.

[0094] To perform the corresponding steps in the above embodiments and various possible implementations, an implementation method of the vehicle parking space association determination device 100 is given below. Please refer to... Figure 7 , Figure 7 This is a block diagram of the vehicle parking space association determination device provided in this embodiment. It should be noted that the basic principle and technical effects of the vehicle parking space association determination device 100 provided by the present invention are the same as those of the corresponding embodiments described above. For the sake of brevity, some parts of this embodiment are not mentioned.

[0095] The vehicle parking space association determination device 100 includes an acquisition module 110, a detection module 120, and a determination module 130.

[0096] The acquisition module 110 is used to acquire the image to be detected captured for the target parking space.

[0097] The detection module 120 is used to perform vehicle recognition on the image to be detected and obtain vehicle detection boxes. The image to be detected includes a reference region in the normalized coordinate system whose Y-axis coordinate is less than the reference value. The reference value is the maximum value of the Y-axis coordinate of each vertex of the vehicle detection box in the normalized coordinate system. The normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on the width and height of the image to be detected.

[0098] The determination module 130 is used to calculate the parking space area of ​​the preset parking space area if the vehicle detection box and the preset parking space area in the image to be detected overlap in a preset direction. Determine the first overlap area between the vehicle detection frame and the preset parking space area; Determine the second overlap area of ​​the overlapping area between the reference area and the preset parking space area; The parking completion rate is calculated based on the first overlapping area and the parking space area. The parking completion rate characterizes the degree to which the vehicle in the vehicle detection frame occupies space in the target parking space. The vehicle-parking space correlation degree is calculated based on the first and second overlap areas. The vehicle-parking space correlation degree characterizes the spatial orientation correlation strength between the vehicle and the target parking space.

[0099] The determination module 130 is also used to detect the relationship between the vehicle and the target parking space based on the completion degree of parking and the correlation degree between the vehicle and the parking space.

[0100] In an optional implementation, when determining the first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space area, the determining module 130 is further configured to: Obtain the first vertex sequence formed by arranging the vertices of the vehicle detection box in a preset order; Obtain the second vertex sequence formed by arranging the vertices of the preset parking space area in a preset order; The vertex sequence of the overlapping area between the vehicle detection box and the preset parking space area is determined based on the first vertex sequence and the second vertex sequence. The first overlapping area is determined based on the vertex sequence of the overlapping area between the vehicle detection frame and the preset parking space area; When determining the second overlap area of ​​the overlapping area between the test area and the preset parking space area, module 130 is specifically used for: Obtain the third vertex sequence formed by arranging the vertices of the reference region in a preset order; Obtain the second vertex sequence formed by arranging the vertices of the preset parking space area in a preset order; Determine the vertex sequence of the overlapping area between the reference area and the preset parking space area based on the third vertex sequence and the second vertex sequence; The second overlapping area is determined based on the vertex sequence of the overlapping area between the reference area and the preset parking space area.

[0101] In an optional implementation, when determining the parking space area of ​​the preset parking space area, the determining module 130 is further used for: Each vertex of the preset parking space area is obtained sequentially according to the preset direction to obtain the vertex sequence of the parking space area; Calculate the parking area of ​​the preset parking area based on the vertex sequence of the parking area.

[0102] In an optional implementation, the determining module 130 is further configured to: Obtain the first coordinate range of the vertices of the vehicle detection box on the Y-axis of the normalized coordinate system. The normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on the width and height of the image to be detected. Obtain the second coordinate range of the vertices of the preset parking space area on the Y-axis of the normalized coordinate system; If the maximum value among the minimum values ​​of the first coordinate range and the minimum values ​​of the second coordinate range is less than the minimum value among the maximum values ​​of the first coordinate range and the maximum values ​​of the second coordinate range, then it is determined that the vehicle detection box and the preset parking space area in the image to be detected overlap in the preset direction.

[0103] In optional implementations, the association relationship includes strong binding, strong association, weak association, and no association; Module 130 is also specifically used for: If the correlation between the vehicle and the target parking space is greater than the preset correlation threshold, then the relationship between the vehicle and the target parking space is determined to be a strong binding. If the correlation between the vehicle and the target parking space is less than or equal to the preset correlation threshold, then the correlation between the vehicle and the target parking space is determined to be no correlation. If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, then the correlation between the vehicle and the target parking space is determined based on the vehicle-parking space correlation degree, the parking completion degree and the vehicle's parking status.

[0104] In an optional implementation, when determining the relationship between a vehicle and a target parking space based on the vehicle-parking-space correlation, parking completion rate, and vehicle parking status, the determining module 130 is further configured to: If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, and the parking status is the preset turning parking status, then the correlation between the vehicle and the target parking space is determined to be weak. If the vehicle's parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, and the parking status is either the preset parking status or the preset turning parking status, then the vehicle and the target parking space are determined to be uncorrelated.

[0105] This embodiment also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the vehicle parking space association determination method described in this embodiment.

[0106] In summary, embodiments of the present invention provide a method, apparatus, electronic device, and computer storage medium for determining vehicle parking space association. The method includes: acquiring a target parking space image to be detected; performing vehicle detection on the target parking space image to obtain a vehicle detection box, wherein the target parking space image includes a reference region in a normalized coordinate system whose Y-axis coordinate is less than a reference value, the reference value being the maximum value of the Y-axis coordinate of each vertex of the vehicle detection box in the normalized coordinate system; the normalized coordinate system is determined by performing a linear dimensionless transformation on the target parking space image based on its width and height; if the vehicle detection box and a preset parking space region in the target parking space image are within the target parking space area... If the preset directions overlap, calculate the parking space area of ​​the preset parking space region; determine the first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space region; determine the second overlap area of ​​the overlapping area between the reference area and the preset parking space region; calculate the parking completion degree based on the first overlap area and the parking space area, which characterizes the degree to which the vehicle in the vehicle detection frame occupies space in the target parking space; calculate the vehicle-parking space correlation degree based on the first and second overlap areas, which characterizes the spatial directional correlation strength between the vehicle and the target parking space; determine the correlation relationship between the vehicle and the target parking space based on the parking completion degree and the vehicle-parking space correlation degree. Compared with the prior art, this embodiment has at least the following advantages: (1) Since high-precision three-dimensional contour data and pose information are not required, the vehicle detection box and the preset parking space area can be used to determine whether the vehicle and the target parking space are associated, thereby improving the adaptability of vehicle and parking space association detection to different practical application scenarios; (2) It breaks through the single evaluation of static geometric relationship. Through the parking completion degree, vehicle and parking space association degree and parking status, the parking behavior can be determined from "whether there is a position association" to "the strength of the association", realizing the transformation from "whether there is a position association" to "the strength of the association". (3) The vehicle-parking space correlation index can respond quickly during the vehicle parking process. Even in the early stage when the parking completion is low, it can effectively reflect the correlation between the vehicle and the target parking space. (4) The introduction of the auxiliary index "vehicle-parking space correlation" can directly identify and eliminate the influence of misplaced vehicles caused by the above interference, thus complementing and verifying the parking degree index. This significantly enhances the reliability of the system's judgment under non-ideal detection conditions and avoids the problem of high numerical values ​​under non-ideal conditions such as detection frame expansion or lens distortion.

[0107] The above descriptions are merely various embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for determining the association between a vehicle and a parking space, characterized in that, The method includes: Acquire the image to be detected captured for the target parking space; Vehicle detection is performed on the image to be detected to obtain a vehicle detection bounding box. The image to be detected includes a reference region in a normalized coordinate system whose Y-axis coordinate is less than a reference value. The reference value is the maximum value of the Y-axis coordinate of each vertex of the vehicle detection bounding box in the normalized coordinate system. The normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on its width and height. If the vehicle detection frame and the preset parking space area in the image to be detected overlap in a preset direction, then the parking space area of ​​the preset parking space area is calculated. Determine the first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space area; Determine the second overlap area of ​​the overlapping area between the reference area and the preset parking space area; The parking completion degree is calculated based on the first overlapping area and the parking space area. The parking completion degree represents the degree to which the vehicle in the vehicle detection frame occupies space in the target parking space. The vehicle-parking space correlation degree is calculated based on the first overlapping area and the second overlapping area, wherein the vehicle-parking space correlation degree characterizes the spatial orientation correlation strength between the vehicle and the target parking space. Based on the parking completion rate and the vehicle-parking space correlation, the association between the vehicle and the target parking space is determined, and the association includes strong binding, strong association, weak association, and no association. The step of determining the association between the vehicle and the target parking space based on the parking completion rate and the vehicle-parking space association degree includes: If the vehicle-parking space correlation is greater than a preset correlation threshold, then the vehicle and the target parking space are determined to be strongly bound. If the vehicle-parking space correlation degree is less than or equal to the preset correlation degree threshold, then the vehicle and the target parking space are determined to be uncorrelated. If the vehicle-parking-space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, then the correlation between the vehicle and the target parking space is determined based on the vehicle-parking-space correlation degree, the parking completion degree and the parking status of the vehicle.

2. The method according to claim 1, characterized in that, The step of determining the first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space area includes: Obtain the first vertex sequence formed by arranging the vertices of the vehicle detection frame in a preset order; Obtain a second vertex sequence formed by arranging the vertices of the preset parking space area in the preset order; The vertex sequence of the overlapping area between the vehicle detection box and the preset parking space area is determined based on the first vertex sequence and the second vertex sequence. The first overlapping area is determined based on the vertex sequence of the overlapping area between the vehicle detection frame and the preset parking space area; The step of determining the second overlap area of ​​the overlapping area between the reference area and the preset parking space area includes: Obtain the third vertex sequence formed by arranging the vertices of the reference region in a preset order; Obtain a second vertex sequence formed by arranging the vertices of the preset parking space area in the preset order; The vertex sequence of the overlapping region of the reference region and the preset parking space region is determined based on the third vertex sequence and the second vertex sequence; The second overlapping area is determined based on the vertex sequence of the overlapping area of ​​the reference area and the preset parking space area.

3. The method according to claim 1, characterized in that, The step of calculating the parking space area of ​​the preset parking space area includes: Each vertex of the preset parking space area is obtained sequentially in a preset direction to obtain the vertex sequence of the parking space area; The parking area of ​​the preset parking area is calculated based on the vertex sequence of the parking area.

4. The method according to claim 1, characterized in that, Before the step of calculating the parking space area of ​​the preset parking space region if the vehicle detection frame and the preset parking space region in the image to be detected overlap in a preset direction, the method further includes: Obtain the first coordinate range of the vertices of the vehicle detection box on the Y-axis of the normalized coordinate system, wherein the normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on the width and height of the image to be detected. Obtain the second coordinate range of the vertices of the preset parking space area on the Y-axis of the normalized coordinate system; If the maximum value among the minimum values ​​of the first coordinate range and the second coordinate range is less than the minimum value among the maximum values ​​of the first coordinate range and the second coordinate range, then it is determined that the vehicle detection box and the preset parking space area in the image to be detected overlap in a preset direction.

5. The method according to claim 1, characterized in that, The step of determining the association between the vehicle and the target parking space based on the vehicle-parking space association degree, the parking completion degree, and the vehicle's parking status includes: If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, and the parking state is the preset turning parking state, then the correlation between the vehicle and the target parking space is determined to be weak. If the vehicle-parking space correlation degree is equal to the preset initial correlation degree and the parking completion degree is equal to the preset initial completion degree, and the parking state is a preset parking state or a preset turning parking state, then the correlation between the vehicle and the target parking space is determined to be no correlation.

6. A vehicle parking space association determination device, characterized in that, The device includes: The acquisition module is used to acquire the image to be detected captured for the target parking space; The detection module is used to perform vehicle recognition on the image to be detected to obtain a vehicle detection box. The image to be detected includes a reference region in a normalized coordinate system whose Y-axis coordinate is less than a reference value. The reference value is the maximum value of the Y-axis coordinate of each vertex of the vehicle detection box in the normalized coordinate system. The normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on its width and height. The determination module is configured to: if the vehicle detection frame and the preset parking space area in the image to be detected overlap in a preset direction, calculate the parking space area of ​​the preset parking space area; determine a first overlap area of ​​the overlapping area between the vehicle detection frame and the preset parking space area; determine a second overlap area of ​​the overlapping area between the reference area and the preset parking space area; calculate the parking completion degree based on the first overlap area and the parking space area, wherein the parking completion degree characterizes the degree to which the vehicle in the vehicle detection frame occupies space in the target parking space; and calculate the vehicle parking space correlation degree based on the first overlap area and the second overlap area, wherein the vehicle parking space correlation degree characterizes the spatial orientation correlation strength between the vehicle and the target parking space. The determining module is further configured to detect the association between the vehicle and the target parking space based on the parking completion degree and the vehicle-parking space association degree, wherein the association includes strong binding, strong association, weak association and no association; The determining module is specifically used for: if the vehicle-parking space correlation degree is greater than a preset correlation degree threshold, then determining that the vehicle and the target parking space are strongly associated; if the vehicle-parking space correlation degree is less than or equal to the preset correlation degree threshold, then determining that the vehicle and the target parking space are not associated; if the vehicle-parking space correlation degree is equal to a preset initial correlation degree value and the parking completion degree is equal to a preset initial completion degree value, then determining the association between the vehicle and the target parking space based on the vehicle-parking space correlation degree, the parking completion degree, and the parking status of the vehicle.

7. The apparatus according to claim 6, characterized in that, The determining module is also used for: Obtain the first coordinate range of the vertices of the vehicle detection box on the Y-axis of the normalized coordinate system, wherein the normalized coordinate system is determined by performing a linear dimensionless transformation on the image to be detected based on the width and height of the image to be detected. Obtain the second coordinate range of the vertices of the preset parking space area on the Y-axis of the normalized coordinate system; If the maximum value among the minimum values ​​of the first coordinate range and the second coordinate range is less than the minimum value among the maximum values ​​of the first coordinate range and the second coordinate range, then it is determined that the vehicle detection box and the preset parking space area in the image to be detected overlap in a preset direction.

8. An electronic device, characterized in that, It includes a processor and a memory, the memory being used to store a program, and the processor being used to implement the vehicle parking space association determination method as described in any one of claims 1-5 when executing the program.

9. A computer storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the vehicle parking space association determination method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Parking-in and out-of-position variable threshold calculation method and parking-in and out-of-position judgment method

    CN114170578A

  • Parked vehicle positioning method and system, storage medium and electronic equipment

    CN114255584A