Vehicle parking space matching method and system based on monocular vision image

The vehicle parking space matching method based on monocular vision pictures uses the vehicle detection and recognition results and the circumscribed rectangular frame of the parking stereoscopic projection area, combined with vehicle type information and camera parameters, to iteratively calculate the world coordinates of the center point of the vehicle bottom surface, solving the problem of vehicle and parking space matching. Accuracy issues in relationship evaluation, improving matching accuracy and reducing manual annotation costs.

CN113191329BActive Publication Date: 2024-08-23AI SUPER EYE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110579802.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-26
Publication Date
2024-08-23
Estimated Expiration
2041-05-26

AI Technical Summary

Technical Problem

In static traffic scenes, due to the complexity of the environment and the loss of depth information in two-dimensional images when matching vehicle parking spaces, the accuracy of evaluating the matching relationship between vehicles and parking spaces is low and the error is large.

Method used

The vehicle parking space matching method based on monocular vision images is used to obtain the vehicle detection and recognition results and the circumscribed rectangular frame of the parking stereoscopic projection area, combined with vehicle type information and camera parameters, iteratively calculates the world coordinates of the center point of the vehicle bottom surface, and reconstructs the vehicle and parking space. The relative position relationship eliminates the projective deformation of the two-dimensional image and improves the matching accuracy.

Benefits of technology

It improves the accuracy of vehicle parking space matching, reduces manual labeling costs, and enhances the ability to match vehicles and parking spaces in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113191329B
    Figure CN113191329B
Patent Text Reader

Abstract

The present invention discloses a vehicle parking space matching method and system based on monocular vision images, which relates to the field of intelligent parking management, including: for vehicle images acquired by a camera, using estimated camera parameters, combined with vehicle detection and type recognition results, matching the measured and estimated vehicle target detection frame key points screened under different conditions through an iterative calculation method, obtaining the coordinate information of eight key points of the vehicle target in the relative world coordinate system, the camera coordinate system, and the image coordinate system, realizing the estimation of the parking space and vehicle key points in the same three-dimensional coordinate system, and obtaining a more accurate relative position relationship of the vehicle parking space. In addition, when the vehicle target is basically parallel to the direction of the parking space extension line, an approximate vehicle target 3D detection result can be obtained, thereby realizing the fast and stable vehicle parking space matching calculation under the condition of not requiring a large amount of complex annotations, combined with the existing vehicle detection and recognition algorithm based on deep learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent parking management, and in particular to a vehicle parking space matching method and system based on monocular vision images. Background Art

[0002] In static traffic scenarios, vehicles are important monitoring objects, and the correlation between vehicles and ground parking spaces is usually an important detection target, such as real-time monitoring of whether vehicles are parked outside parking spaces or in restricted areas, whether they are parked across parking spaces, etc. Under the condition that only ordinary fixed high-position cameras are used to monitor parking lots, if only a single RGB image from the camera can be used to obtain vehicle parking correlation information, it is a low-cost and effective technical strategy.

[0003] However, at present, when matching vehicles to parking spaces, the wheel position of the vehicle is usually obtained through the collected vehicle image recognition, and then the membership relationship between the vehicle and the parking space is judged based on the positional relationship between the wheel position of the vehicle and the parking space line. However, due to the complex environment around the parking spaces in the parking lot, there are many vehicles and pedestrians around the parking spaces, and the bottom edge of the vehicle is often blocked by neighboring vehicles and pedestrians. In addition, since the two-dimensional image loses the target depth information, the error of the wheel information obtained through the collected image recognition is large, which leads to low accuracy and large error in evaluating the matching relationship between the vehicle and the parking space through the positional relationship between the ground parking space line and the wheel. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a vehicle parking space matching method and system based on monocular vision images, which can solve the problem that the existing vehicle parking space matching is greatly affected by environmental factors and thus the vehicle parking space matching has low accuracy.

[0005] To achieve the above object, on the one hand, the present invention provides a vehicle parking space matching method based on a monocular vision image, the method comprising:

[0006] Acquire detection and recognition result information of the vehicle to be located in the picture, the detection and recognition result information including the vehicle target detection frame and average size information of the vehicle type, and acquire matching reference point type information of the vehicle target according to the position of the vehicle target detection frame in the picture;

[0007] According to the extended berth vertex projection coordinates park_c2d and park_c2d_top of the camera corresponding to the picture, the circumscribed rectangular frames of the 3D projection areas of each berth corresponding to the camera are obtained, and the vehicle target detection frame is matched with the circumscribed rectangular frames of the 3D projection areas of each berth to obtain the berth number pa_id_car with the greatest correlation;

[0008] Obtain an initial estimated value cbm_est0 of the center point of the vehicle target bottom surface according to the center point coordinates of the pa_id_car;

[0009] According to the cbm_est0, the matching reference point type information, the average size information of the vehicle type, the center point coordinates of the pa_id_car, the camera parameters of the camera, and the relative coordinate information park_w of the extended berth corresponding to the camera in the world coordinate system, the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in each corresponding coordinate system are obtained;

[0010] The berth number corresponding to the area with the maximum correlation value is obtained according to the feature point coordinates of the vehicle target in each coordinate system, the park_c2d, the park_c2d_top, and the park_w, and is the berth matching the vehicle target.

[0011] Furthermore, before the step of obtaining the coordinates cbm_est of the center point of the vehicle target bottom surface in the world coordinate system and the feature points in each corresponding coordinate system according to the cbm_est0, the matching reference point type information, the average size information of the vehicle type, the center point coordinates of the pa_id_car, the camera parameters of the camera, and the relative coordinate information park_w of the extended berth corresponding to the camera in the world coordinate system, the method further includes:

[0012] Acquire a height h of a corresponding reference point type according to the matching reference point type information and the average size information of the vehicle type;

[0013] In the neighborhood of the berth number pa_id_car of the reference point type at a height h, the relative coordinate information park_w in the world coordinate system is meshed to obtain the grid coordinates in the world coordinate system;

[0014] Projecting the grid coordinates in the world coordinate system to the camera coordinate system using the camera parameters to obtain three-dimensional coordinates p3d and two-dimensional projection coordinates p2d of the image, wherein the camera coordinate system is obtained based on the camera parameters;

[0015] The z-axis direction value of the three-dimensional coordinate p3d and the two-dimensional projection coordinate p2d are interpolated piece by piece to obtain the two-dimensional projection coordinate in the height h plane to the depth estimation function f_depth(p2d)=p3d in the corresponding camera coordinate system.

[0016] Furthermore, the step of obtaining the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in each corresponding coordinate system includes:

[0017] Iterative calculation is performed based on the vehicle target detection frame, the matching reference point type information, the average size information of the vehicle type, the camera parameters of the camera, the initial estimated value cbm_est0 of the center point of the bottom surface of the vehicle target, and the function f_depth(p2d)=p3d_z to obtain the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in each corresponding coordinate system.

[0018] Furthermore, before the step of obtaining the detection and recognition result information of the vehicle to be located in the image, the method further includes:

[0019] Get the best image to be labeled for each camera's corresponding berth;

[0020] Obtaining the berth vertex coordinates of the berth in the optimal picture of the berth to be annotated, and obtaining the camera parameters of the camera according to the berth vertex coordinates and the length and width dimension information of the berth;

[0021] According to the camera parameters and the berth coordinate matrix, obtain the two-dimensional projections park_c2d and park_c2d_top of the entire extended berth on the corresponding picture.

[0022] Furthermore, the method further comprises:

[0023] If the matching berth number pa_id_car is not obtained, the berth number is obtained according to the formula pa_id_car=npa / / 2, where npa is the number of berths to be estimated.

[0024] Furthermore, after the step of obtaining the berth number corresponding to the correlation maximum value area as the berth matching the vehicle target, the method further includes:

[0025] Generate and display a top-down projection image of the berth and the vehicle target detection frame in the world coordinate system.

[0026] On the other hand, the present invention provides a vehicle parking space matching system based on monocular vision images, the system comprising: an acquisition module, a determination module;

[0027] An acquisition module is used to acquire detection and recognition result information of the vehicle to be located in the picture, wherein the detection and recognition result information includes a vehicle target detection frame and average size information of the vehicle type, and acquire matching reference point type information of the vehicle target according to the position of the vehicle target detection frame in the picture;

[0028] The acquisition module is further used to acquire the circumscribed rectangular frames of the stereoscopic projection areas of each berth corresponding to the camera according to the extended berth vertex projection coordinates park_c2d and park_c2d_top of the camera corresponding to the picture, and to perform correlation matching between the vehicle target detection frame and the circumscribed rectangular frames of the stereoscopic projection areas of each berth to acquire the berth number pa_id_car with the greatest correlation;

[0029] The acquisition module is further used to acquire an initial estimated value cbm_est0 of the center point of the vehicle target bottom surface according to the center point coordinates of the pa_id_car;

[0030] The acquisition module is further used to acquire the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in each corresponding coordinate system according to the cbm_est0, the matching reference point type information, the average size information of the vehicle type, the center point coordinates of the pa_id_car, the camera parameters of the camera, and the relative coordinate information park_w of the extended berth corresponding to the camera in the world coordinate system;

[0031] A determination module is used to determine that the parking space number corresponding to the maximum correlation value area is the parking space matched by the vehicle target according to the feature point coordinates of the vehicle target in each coordinate system, the park_c2d, the park_c2d_top, and the park_w.

[0032] Furthermore, the acquisition module is also used to obtain the height h of the corresponding reference point type based on the matching reference point type information and the average size information of the vehicle type; gridding the relative coordinate information park_w in the world coordinate system in the neighborhood of the berth number pa_id_car of the height h of the reference point type to obtain grid coordinates in the world coordinate system; projecting the grid coordinates in the world coordinate system to the camera coordinate system through the camera parameters to obtain three-dimensional coordinates p3d and two-dimensional projection coordinates p2d of the image, and the camera coordinate system is obtained based on the camera parameters; performing piecewise interpolation on the z-axis direction value of the three-dimensional coordinate p3d and the two-dimensional projection coordinate p2d to obtain the two-dimensional projection coordinate in the height h plane to the corresponding camera coordinate system, a depth estimation function f_depth(p2d)=p3d.

[0033] Furthermore, the acquisition module is also used to perform iterative calculations based on the vehicle target detection frame, the matching reference point type information, the average size information of the vehicle type, the camera parameters of the camera, the initial estimated value cbm_est0 of the vehicle target bottom surface center point, and the function f_depth(p2d)=p3d_z to obtain the coordinates cbm_est of the vehicle target bottom surface center point in the world coordinate system and the feature points in each corresponding coordinate system.

[0034] Furthermore, the acquisition module is also used to obtain the optimal picture of the berth to be labeled corresponding to each camera; obtain the berth vertex coordinates of the berth in the optimal picture of the berth to be labeled, and obtain the camera parameters of the camera according to the berth vertex coordinates and the berth length and width size information; according to the camera parameters and the berth coordinate matrix, obtain the two-dimensional projections park_c2d and park_c2d_top of the entire extended berth on the corresponding picture.

[0035] Furthermore, the acquisition module is further configured to acquire the berth number pa_id_car according to the formula pa_id_car=npa / / 2 if no matching berth number pa_id_car is acquired, wherein npa is the number of berths to be estimated.

[0036] Furthermore, the system further comprises: generating a display module;

[0037] The generating and displaying module is used to generate and display a top-down projection image of the berth and the vehicle target detection frame in the world coordinate system.

[0038] The present invention provides a vehicle parking space matching method and system based on monocular vision images. It only requires pre-acquisition of the parking space size and the vertex coordinates of the parking space in the image. Then, by acquiring the vertex coordinate information of multiple adjacent parking spaces and the relative camera parameter information, and then combining the vehicle target detection and vehicle type classification information, the vehicle target detection frame key point matching iterative algorithm is used to reconstruct the eight circumscribed rectangular key point coordinates of the vehicle in the world coordinate system consistent with the parking space. The relative position relationship between the vehicle and the parking space can be more accurately evaluated under the condition of eliminating the projective deformation of the two-dimensional image, thereby improving the accuracy of vehicle parking space matching and reducing the cost of manual labeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 The present invention provides a vehicle parking space matching method based on monocular vision images. Figure 1 ;

[0040] Figure 2 It is a structural schematic diagram of a vehicle parking space matching system based on monocular vision images provided by the present invention. DETAILED DESCRIPTION

[0041] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments.

[0042] like Figure 1 As shown, a vehicle parking space matching method based on a monocular vision image provided by an embodiment of the present invention includes the following steps:

[0043] 101. Obtain detection and recognition result information of a vehicle to be located in a picture, and obtain matching reference point type information of the vehicle target according to the position of the vehicle target detection frame in the picture.

[0044] The detection and recognition result information includes the vehicle target detection frame and the average size information of the vehicle type. The vehicle type can be a car, SUV, truck, express truck, bicycle, person, etc.; the average size information carsize of different types of vehicles is obtained according to the vehicle type, that is, the length, width and height.

[0045] For the embodiment of the present invention, step 101 may specifically include: according to the position of the vehicle detection frame in the picture, setting the matching reference point type information base_id=[bt_id,lr_id], and matching the reference point coordinates according to the detection frame corresponding to the matching reference point type information, as shown in Table 1 and Table 2 below:

[0046] Table 1

[0047]

[0048] Table 2

[0049]

[0050] For the embodiment of the present invention, before step 101, it also includes: obtaining the optimal picture of the berth to be labeled corresponding to each camera; obtaining the berth vertex coordinates of the berth in the optimal picture of the berth to be labeled, and obtaining the camera parameters of the camera according to the berth vertex coordinates and the berth length and width size information; according to the camera parameters and the berth coordinate matrix, obtaining the two-dimensional projections park_c2d and park_c2d_top of the entire extended berth on the corresponding picture.

[0051] For the embodiment of the present invention, the specific steps of obtaining the camera parameters of the camera and obtaining park_c2d and park_c2d_top can be described as follows: (1) According to the vehicle detection results, obtain a suitable parking space to be labeled image for each camera: According to the vehicle detection results of the camera image in the uploaded database, if the lower 50% area of ​​the image does not return the vehicle detection frame result or the detection result is less than 2, it is returned to the data labeler for review. If the four vertices of the parking space near the camera end are clearly visible to the naked eye, it is saved for parking space labeling; similarly, if the upper 50% area of ​​the image does not return the vehicle detection frame result or the detection result is less than 2, it is also returned to the data labeler for review to determine whether it can be used for parking space vertex labeling. If the main parking point of the entire image is visible to the naked eye, the two images can be merged into one image to be labeled. (2) For the above-mentioned screened images, the labeler selects the parking space area closest to the camera and with the four vertices of the parking space line clearly visible for labeling, and obtains the image coordinate information of the four vertices of the parking space. (3) Input the marked berth vertex coordinates and the pre-measured berth length and width dimension information into the custom camera parameter estimation algorithm to obtain the two-dimensional visual equivalent camera pose parameters and scale parameters, and use the parameters to obtain the vertex coordinate information of multiple adjacent continuous berths. (4) The above-obtained two-dimensional projections of the berth park_c2d and park_c2d_top are visualized on the annotated image. If if_success = 0, the annotator needs to modify the annotation points and return to step (3) to recalculate. If if_success = 1, the annotator needs to review whether the extended berth annotation has obvious deviations from the berth vertex on the image. If there is no obvious deviation, save the calculation result. If there is an obvious deviation, it is necessary to judge according to the actual situation and update the calculation result: Among them, case 1: the annotated berths are continuous and the size is consistent: after correcting the vertex annotation, return to step (3) and recalculate; case 2: the annotated berths are not continuous and the size is consistent: for the estimated accurate berth vertex, select the corresponding berth number and save it; for Re-annotate a group of berth vertices for the annotation box that is misplaced due to discontinuity, and then use the estimated camera parameters to estimate the length of the discontinuous area, recalculate the corresponding berth 2D projection, and update park_c2d and park_c2d_top, as well as the corresponding park_w; Case 3: Inconsistent annotated berth sizes: For the estimated accurate berth vertices, select the corresponding berth number and save it; Re-annotate a group of berth vertices for the annotation box that is misplaced due to length change, and then use the estimated camera parameters and another recorded berth size information to recalculate the corresponding berth 2D projection, and update park_c2d and park_c2d_top, as well as the corresponding park_w.

[0052] For the embodiment of the present invention, the above step (3) may specifically include: step (3-1): according to the berth information in the picture to be annotated, define the following parameters: the number of berths to be estimated npa, the berth number pa_id_ann of the annotated berth in the area to be annotated, and the starting point pa_id=1 closest to the camera end; step (3-2): according to the input berth length and width size information and the number of berths to be estimated npa, generate the relative coordinate information of the vertices of the ground berth rectangular frame in the world coordinate system: take the berth number pa_id=1 The lower left corner vertex is defined as the origin coordinate O = (0,0,0), and the coordinates of other vertices are inferred according to the size information to obtain the berth coordinate matrix park_w; similarly, the relative coordinate information of the vertices of the berth rectangular box with a height extension of h in the world coordinate system is generated, among which the lower left corner vertex of the upper extended berth number pa_id = 1 is defined as P = (0,0,h), and the other upper extended vertices are also z = h, and the berth upper extended coordinate matrix park_w_top is obtained; Step (3-3): According to the number pa_id_ann of the marked berth, in the berth coordinate matrix park _w, select the corresponding three-dimensional coordinate park_w_ann in the world coordinate system, set the scale value vector scale_list of finite length, iou_max=0, and perform the following iterative loop calculation to obtain the optimal camera parameters: Step (3-4): Use the estimated camera parameters and the berth coordinate matrices park_w and park_w_top to obtain the two-dimensional projections park_c2d and park_c2d_top of the entire extended berth on the corresponding image. If the y-axis coordinate value of park_c2d_top is less than the y-axis coordinate value of park_c2d, then record the estimation success indicator as if_success=1, otherwise it is if_success=0; return the camera parameters, the two-dimensional projections park_c2d and park_c2d_top of the berth, and the estimation success indicator if_success.

[0053] For the embodiment of the present invention, the above step (3-3) may specifically include: step (3-3-1): select a scale value scale, set the camera intrinsic focal length f=scale, the translation vector is (0,0), and use the two-dimensional coordinates of the four vertices marked by the berth and their corresponding three-dimensional coordinates of the world coordinate system park_w_ann to estimate the rotation vector rvec and the translation vector tvec of the camera through a PnP algorithm such as an SQPnP algorithm; step (3-3-2): use the estimated rotation vector rvec and the translation vector tvec, and the selected scale parameter scale to calculate the 2D projection of park_w_ann on the photo to obtain the vertices of the berth estimation quadrilateral, and calculate the iou of the quadrilateral formed by the marked vertices and the berth estimation quadrilateral; step step (3-3-3): if iou>iou_max, update and save the optimal camera parameters: rotation vector rvec, translation vector tvec, scale parameter scale, update iou_max=iou; finally when iou When the value is greater than the preset maximum threshold or the entire cycle is completed, the optimal camera parameters recorded are obtained.

[0054] It should be noted that before matching vehicles to parking spaces, neck circumference size information needs to be recorded. Specifically, during the initial on-site configuration phase of the parking lot, the length and width information of the parking space lines need to be recorded. If there are different parking space size information with large size deviations, they need to be recorded separately and saved along with the parking lot number information.

[0055] 102. According to the extended berth vertex projection coordinates park_c2d and park_c2d_top of the camera corresponding to the image, obtain the circumscribed rectangular frames of the 3D projection areas of each berth corresponding to the camera, and perform correlation matching between the vehicle target detection frame and the circumscribed rectangular frames of the 3D projection areas of each berth to obtain the berth number pa_id_car with the greatest correlation.

[0056] For the embodiment of the present invention, step 102 may specifically include: according to the extended berth vertex projection coordinates park_c2d and park_c2d_top of the camera corresponding to the image, obtaining the circumscribed rectangular frame of each berth stereo projection area corresponding to the camera, and performing ioa correlation matching between the vehicle target detection frame and the circumscribed rectangular frame of each berth stereo projection area, to obtain the berth number pa_id_car with the largest ioa value.

[0057] Further, if the matching berth number pa_id_car is not obtained, the berth number is obtained according to the formula pa_id_car=npa / / 2, where npa is the number of berths to be estimated.

[0058] 103. Obtain an initial estimated value cbm_est0 of the center point of the vehicle target bottom surface according to the center point coordinates of the pa_id_car.

[0059] 104. Obtain the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in each corresponding coordinate system according to the cbm_est0, the matching reference point type information, the average size information of the vehicle type, the center point coordinates of the pa_id_car, the camera parameters of the camera, and the relative coordinate information park_w of the extended berth corresponding to the camera in the world coordinate system.

[0060] For the embodiment of the present invention, before step 104, it may also include: obtaining the height h of the corresponding reference point type according to the matching reference point type information and the average size information of the vehicle type; meshing the relative coordinate information park_w in the world coordinate system in the neighborhood of the berth number pa_id_car of the height h of the reference point type to obtain grid coordinates in the world coordinate system; projecting the grid coordinates in the world coordinate system to the camera coordinate system through the camera parameters to obtain three-dimensional coordinates p3d and two-dimensional projection coordinates p2d of the image, wherein the camera coordinate system is obtained according to the camera parameters; performing piecewise interpolation on the z-axis direction value of the three-dimensional coordinate p3d and the two-dimensional projection coordinate p2d to obtain the two-dimensional projection coordinates in the height h plane to the depth estimation function f_depth(p2d)=p3d in the corresponding camera coordinate system.

[0061] At this time, the step 104 may specifically include: performing iterative calculations based on the vehicle target detection frame, the matching reference point type information, the average size information of the vehicle type, the camera parameters of the camera, the initial estimated value cbm_est0 of the vehicle target bottom surface center point, and the function f_depth(p2d)=p3d_z to obtain the coordinates cbm_est of the vehicle target bottom surface center point in the world coordinate system and the feature points in each corresponding coordinate system.

[0062] Among them, the specific process of the iterative calculation includes: calculating the coordinate value p of the matching reference point according to the matching reference point type base_id and the real detection frame coordinates; then using the fitted depth estimation function to obtain the depth value f_depth(p)=p_z of the matching reference point, and further obtaining its three-dimensional coordinates p_c=(p_x*p_z,p_y*p_z,p_z) in the camera coordinate system, and back-projecting it to the world coordinate system p_w according to the camera pose parameters; then setting the maximum number of iteration steps, starting the iterative calculation, and obtaining the optimal target bottom surface midpoint coordinate value: judging whether the calculation is successful based on the relationship between the relative error value of the reference point and the set minimum threshold, setting the calculation success indicator ifsuccess, and returning the feature point coordinate information obj_w and obj_i of the target in each coordinate system.

[0063] The process of obtaining the optimal target bottom midpoint coordinate value includes: according to the estimated target bottom center point coordinate cbm_est0, using the target size information and camera parameters, estimating the coordinate values ​​obj_w of the 8 vertices of its circumscribed cuboid in the world coordinate system, obj_c in the camera coordinate system, and the projection value obj_i in the imaging coordinate system, and calculating its circumscribed rectangular detection box obj_det according to the projection value; according to the matching reference point type base_id and the estimated detection box coordinate obj_det, calculating the corresponding matching reference point coordinate q, and f_depth(q)=q_z; and then calculating the actual and estimated matching reference point coordinate relative deviation err=norm (pq) / norm(p), if this value is less than the minimum value in the previous steps, then update the target bottom center coordinate estimate cbm_est=cbm_est0 and the corresponding target feature point data; if this value is less than the threshold, jump out of the iteration step to complete the calculation, otherwise go to the next step; finally, by estimating the reference point coordinate q, obtain its three-dimensional coordinates q_c=(q_x*q_z,p_y*q_z,q_z) in the camera coordinate system, and back-project it to the world coordinate system q_w according to the camera pose parameters, calculate the bottom center offset vector v1=p_w-q_w, and update the bottom center coordinates cbm_est0=cbm_est0+v1(x,y).

[0064] 105. According to the feature point coordinates of the vehicle target in each coordinate system, the park_c2d, the park_c2d_top, and the park_w, the berth number corresponding to the correlation maximum value area is obtained as the berth matching the vehicle target.

[0065] For the embodiment of the present invention, step 105 may specifically include: calculating the ioa correlation according to the returned feature point coordinates obj_w, obj_i of the target in each coordinate system and the estimated berth coordinates park_c2d and park_c2d_top, park_w, and returning the berth number corresponding to the maximum value area as its affiliated berth area.

[0066] Furthermore, a top view projection of the parking space and the vehicle target detection frame in the world coordinate system is generated and displayed. For the embodiment of the present invention, by intuitively displaying the membership details, subsequent parking management can be further assisted.

[0067] The present invention provides a vehicle parking space matching method based on monocular vision images. It only requires the pre-acquisition of the parking space size and the vertex coordinates of the parking space in the image. It can obtain the vertex coordinate information of multiple adjacent parking spaces and the relative camera parameter information, and then combine the vehicle target detection and vehicle type classification information. Through the vehicle target detection box key point matching iterative algorithm, the eight circumscribed rectangular key point coordinates of the vehicle in the world coordinate system consistent with the parking space are reconstructed. The relative position relationship between the vehicle and the parking space can be more accurately evaluated under the condition of eliminating the projective deformation of the 2D image, thereby improving the accuracy of vehicle parking space matching.

[0068] To implement the method provided in the embodiment of the present invention, the embodiment of the present invention provides a vehicle parking space matching system based on monocular vision images, such as Figure 2 As shown, the system includes: an acquisition module 21, a determination module 22, and a generation and display module 23.

[0069] The acquisition module 21 is used to acquire detection and recognition result information of the vehicle to be located in the picture, wherein the detection and recognition result information includes the vehicle target detection frame and the average size information of the vehicle type, and acquire the matching reference point type information of the vehicle target according to the position of the vehicle target detection frame in the picture;

[0070] The acquisition module 21 is further used to acquire the circumscribed rectangular frames of the stereoscopic projection areas of each berth corresponding to the camera according to the extended berth vertex projection coordinates park_c2d and park_c2d_top of the camera corresponding to the picture, and to perform correlation matching between the vehicle target detection frame and the circumscribed rectangular frames of the stereoscopic projection areas of each berth to acquire the berth number pa_id_car with the greatest correlation;

[0071] The acquisition module 21 is further used to acquire an initial estimated value cbm_est0 of the center point of the vehicle target bottom surface according to the center point coordinates of the pa_id_car;

[0072] The acquisition module 21 is further used to obtain the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in each corresponding coordinate system according to the cbm_est0, the matching reference point type information, the average size information of the vehicle type, the center point coordinates of the pa_id_car, the camera parameters of the camera, and the relative coordinate information park_w of the extended berth corresponding to the camera in the world coordinate system;

[0073] The determination module 22 is used to determine that the parking space number corresponding to the maximum correlation value area is the parking space matched by the vehicle target according to the feature point coordinates of the vehicle target in each coordinate system, the park_c2d, the park_c2d_top, and the park_w.

[0074] Furthermore, the acquisition module 21 is also used to obtain the height h of the corresponding reference point type according to the matching reference point type information and the average size information of the vehicle type; gridding the relative coordinate information park_w in the world coordinate system in the neighborhood of the berth number pa_id_car of the height h of the reference point type to obtain grid coordinates in the world coordinate system; projecting the grid coordinates in the world coordinate system to the camera coordinate system through the camera parameters to obtain three-dimensional coordinates p3d and two-dimensional projection coordinates p2d of the image, and the camera coordinate system is obtained according to the camera parameters; performing piecewise interpolation on the z-axis direction value of the three-dimensional coordinate p3d and the two-dimensional projection coordinate p2d to obtain the two-dimensional projection coordinate in the height h plane to the corresponding camera coordinate system, a depth estimation function f_depth(p2d)=p3d.

[0075] Furthermore, the acquisition module 21 is also used to perform iterative calculations based on the vehicle target detection frame, the matching reference point type information, the average size information of the vehicle type, the camera parameters of the camera, the initial estimated value cbm_est0 of the vehicle target bottom surface center point, and the function f_depth(p2d)=p3d_z to obtain the coordinates cbm_est of the vehicle target bottom surface center point in the world coordinate system and the feature points in each corresponding coordinate system.

[0076] Furthermore, the acquisition module 21 is also used to obtain the optimal picture of the berth to be labeled corresponding to each camera; obtain the berth vertex coordinates of the berth in the optimal picture of the berth to be labeled, and obtain the camera parameters of the camera according to the berth vertex coordinates and the berth length and width size information; according to the camera parameters and the berth coordinate matrix, obtain the two-dimensional projections park_c2d and park_c2d_top of the entire extended berth on the corresponding picture.

[0077] Furthermore, the acquisition module 21 is further configured to acquire the berth number pa_id_car according to the formula pa_id_car=npa / / 2 if no matching berth number pa_id_car is acquired, where npa is the number of berths to be estimated.

[0078] Furthermore, the system further comprises: a generating and displaying module 23;

[0079] The generating and displaying module 23 is used to generate and display a top-view projection of the berth and the vehicle target detection frame in the world coordinate system.

[0080] The present invention provides a vehicle parking space matching system based on monocular vision images. It only needs to obtain the parking space size and the vertex coordinates of the parking space in the image in advance. It can obtain the vertex coordinate information of multiple adjacent parking spaces and the relative camera parameter information, and then combine the vehicle target detection and vehicle type classification information. Through the vehicle target detection box key point matching iterative algorithm, the eight circumscribed rectangular key point coordinates of the vehicle in the world coordinate system consistent with the parking space can be reconstructed. The relative position relationship between the vehicle and the parking space can be more accurately evaluated under the condition of eliminating the projective deformation of the 2D image, thereby improving the accuracy of vehicle parking space matching.

[0081] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.

[0082] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.

[0083] The disclosed embodiments are described above to enable any person skilled in the art to implement or use the present invention. Various modifications of these embodiments are obvious to those skilled in the art, and the general principles defined herein may also be applied to other embodiments without departing from the spirit and scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments given herein, but is consistent with the broadest scope of the principles and novel features disclosed in this application.

[0084] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".

[0085] Those skilled in the art may also understand that the various illustrative logical blocks, units, and steps listed in the embodiments of the present invention may be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly demonstrate the interchangeability of hardware and software, the various illustrative components, units, and steps described above have generally described their functions. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present invention.

[0086] The various illustrative logic blocks or units described in the embodiments of the present invention can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of the above. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any conventional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.

[0087] The steps of the method or algorithm described in the embodiments of the present invention can be directly embedded in hardware, a software module executed by a processor, or a combination of the two. The software module can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or other storage media of any form in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a user terminal. Optionally, the processor and the storage medium can also be arranged in different components in the user terminal.

[0088] In one or more exemplary designs, the above functions described in the embodiments of the present invention can be implemented in hardware, software, firmware or any combination of the three. If implemented in software, these functions can be stored on a computer-readable medium, or transmitted in the form of one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media that facilitate the transfer of computer programs from one place to another. The storage medium can be any available medium that can be accessed by any general or special computer. For example, such computer-readable media can include but are not limited to RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that can be used to carry or store program codes in the form of instructions or data structures and other forms that can be read by general or special computers, or general or special processors. In addition, any connection can be appropriately defined as a computer-readable medium, for example, if the software is transmitted from a website site, server or other remote resource through a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wirelessly, such as infrared, wireless and microwave, it is also included in the defined computer-readable medium. The disk and disc include compact disk, laser disk, optical disk, DVD, floppy disk and Blu-ray disk. Disks usually reproduce data magnetically, while discs usually reproduce data optically with lasers. Combinations of the above may also be included in computer readable media.

[0089] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A vehicle parking space matching method based on monocular vision images, characterized in that: The method comprises: Acquire detection and recognition result information of the vehicle to be located in the picture, wherein the detection and recognition result information includes average size information of a vehicle target detection frame and a vehicle type, and acquire matching reference point type information of the vehicle target according to the position of the vehicle target detection frame in the picture; According to the extended berth vertex projection coordinates park_c2d and park_c2d_top of the camera corresponding to the picture, the circumscribed rectangular frames of the stereoscopic projection areas of each berth corresponding to the camera are obtained, and the vehicle target detection frame is matched with the circumscribed rectangular frames of the stereoscopic projection areas of each berth to obtain the berth number pa_id_car with the maximum correlation between the vehicle target detection frame and the circumscribed rectangular frames of the stereoscopic projection areas of each berth; Obtain an initial estimated value cbm_est0 of the center point of the vehicle target bottom surface according to the center point coordinates of the pa_id_car; According to the cbm_est0, the matching reference point type information, the average size information of the vehicle type, the center point coordinates of the pa_id_car, the camera parameters of the camera, and the relative coordinate information park_w of the extended berth corresponding to the camera in the world coordinate system, the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in the corresponding coordinate systems are obtained, wherein the corresponding coordinate systems include the camera coordinate system and the imaging coordinate system; The berth number corresponding to the berth correlation maximum value area is obtained according to the feature point coordinates of the vehicle target in each coordinate system, the park_c2d, park_c2d_top, and the park_w, and is the berth matching the vehicle target.

2. The vehicle parking space matching method based on monocular vision images according to claim 1 is characterized in that: Before the step of obtaining the coordinates cbm_est of the center point of the vehicle target bottom surface in the world coordinate system and the feature points in each corresponding coordinate system according to the cbm_est0, the matching reference point type information, the average size information of the vehicle type, the center point coordinates of the pa_id_car, the camera parameters of the camera, and the relative coordinate information park_w of the extended berth corresponding to the camera in the world coordinate system, the method further includes: Acquire a height h of a corresponding reference point type according to the matching reference point type information and the average size information of the vehicle type; In the neighborhood of the berth number pa_id_car of the reference point type at a height h, the relative coordinate information park_w in the world coordinate system is meshed to obtain the grid coordinates in the world coordinate system; Projecting the grid coordinates in the world coordinate system to the camera coordinate system using the camera parameters to obtain three-dimensional coordinates p3d and two-dimensional projection coordinates p2d of the image, wherein the camera coordinate system is obtained based on the camera parameters; The z-axis direction value of the three-dimensional coordinate p3d and the two-dimensional projection coordinate p2d are interpolated piece by piece to obtain the two-dimensional projection coordinate in the height h plane to the depth estimation function f_depth(p2d)=p3d in the corresponding camera coordinate system.

3. The vehicle parking space matching method based on monocular vision images according to claim 2 is characterized in that: The step of obtaining the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in each corresponding coordinate system comprises: Iterative calculation is performed based on the vehicle target detection frame, the matching reference point type information, the average size information of the vehicle type, the camera parameters of the camera, the initial estimated value cbm_est0 of the center point of the bottom surface of the vehicle target, and the function f_depth(p2d)=p3d_z to obtain the coordinates cbm_est of the center point of the bottom surface of the vehicle target in the world coordinate system and the feature points in each corresponding coordinate system.

4. The vehicle parking space matching method based on monocular vision images according to claim 1 is characterized in that: Before the step of obtaining the detection and recognition result information of the vehicle to be located in the image, the method further includes: Get the best image to be labeled for each camera's corresponding berth; Obtaining the berth vertex coordinates of the berth in the optimal picture of the berth to be annotated, and obtaining the camera parameters of the camera according to the berth vertex coordinates and the length and width dimension information of the berth; According to the camera parameters and the berth coordinate matrix, obtain the two-dimensional projections park_c2d and park_c2d_top of the entire extended berth on the corresponding picture.

5. The vehicle parking space matching method based on monocular vision images according to claim 1 is characterized in that: The method further comprises: If the matching berth number pa_id_car is not obtained, the berth number is obtained according to the formula pa_id_car=npa / / 2, where npa is the number of berths to be estimated.

6. The vehicle parking space matching method based on monocular vision images according to claim 1 is characterized in that: After the step of obtaining the berth number corresponding to the correlation maximum value area as the berth matching the vehicle target, the method further includes: Generate and display a top-down projection image of the berth and the vehicle target detection frame in the world coordinate system.

7. A vehicle parking space matching system based on monocular vision images, characterized in that: The system comprises: An acquisition module is used to acquire detection and recognition result information of a vehicle to be located in a picture, wherein the detection and recognition result information includes average size information of a vehicle target detection frame and a vehicle type, and acquire matching reference point type information of the vehicle target according to the position of the vehicle target detection frame in the picture; The acquisition module is further used to acquire the circumscribed rectangular frames of the stereoscopic projection areas of each berth corresponding to the camera according to the extended berth vertex projection coordinates park_c2d and park_c2d_top of the camera corresponding to the picture, and to perform correlation matching between the vehicle target detection frame and the circumscribed rectangular frames of the stereoscopic projection areas of each berth, and to acquire the berth number pa_id_car with the maximum correlation between the vehicle target detection frame and the circumscribed rectangular frames of the stereoscopic projection areas of each berth; The acquisition module is further used to acquire an initial estimated value cbm_est0 of the center point of the vehicle target bottom surface according to the center point coordinates of the pa_id_car; The acquisition module is further used to acquire the coordinates cbm_est of the center point of the vehicle target bottom surface in the world coordinate system and the feature points in each corresponding coordinate system according to the cbm_est0, the matching reference point type information, the average size information of the vehicle type, the center point coordinates of the pa_id_car, the camera parameters of the camera, and the relative coordinate information park_w of the extended berth corresponding to the camera in the world coordinate system; the corresponding coordinate systems include the camera coordinate system and the imaging coordinate system; A determination module is used to determine that the parking space number corresponding to the parking space correlation maximum value area is the parking space matching the vehicle target according to the feature point coordinates of the vehicle target in each coordinate system, the park_c2d, the park_c2d_top, and the park_w.

8. The vehicle parking space matching system based on monocular vision images according to claim 7 is characterized in that: The acquisition module is also used to obtain the height h of the corresponding reference point type according to the matching reference point type information and the average size information of the vehicle type; gridding the relative coordinate information park_w in the world coordinate system in the neighborhood of the berth number pa_id_car of the height h of the reference point type to obtain the grid coordinates in the world coordinate system; projecting the grid coordinates in the world coordinate system to the camera coordinate system through the camera parameters to obtain the three-dimensional coordinates p3d and the two-dimensional projection coordinates p2d of the image, and the camera coordinate system is obtained according to the camera parameters; performing piecewise interpolation on the z-axis direction value of the three-dimensional coordinate p3d and the two-dimensional projection coordinate p2d to obtain the two-dimensional projection coordinates in the height h plane to the corresponding camera coordinate system. Depth estimation function f_depth(p2d)=p3d.

9. The vehicle parking space matching system based on monocular vision images according to claim 8, characterized in that: The acquisition module is also used to perform iterative calculations based on the vehicle target detection frame, the matching reference point type information, the average size information of the vehicle type, the camera parameters of the camera, the initial estimated value cbm_est0 of the vehicle target bottom surface center point, and the function f_depth(p2d)=p3d_z to obtain the coordinates cbm_est of the vehicle target bottom surface center point in the world coordinate system and the feature points in each corresponding coordinate system.

10. The vehicle parking space matching system based on monocular vision images according to claim 7, characterized in that: The acquisition module is also used to obtain the optimal picture of the berth to be labeled corresponding to each camera; obtain the berth vertex coordinates of the berth in the optimal picture of the berth to be labeled, and obtain the camera parameters of the camera according to the berth vertex coordinates and the berth length and width size information; according to the camera parameters and the berth coordinate matrix, obtain the two-dimensional projections park_c2d and park_c2d_top of the entire extended berth on the corresponding picture.

11. The vehicle parking space matching system based on monocular vision images according to claim 7, characterized in that: The acquisition module is further used for acquiring the berth number pa_id_car according to the formula pa_id_car=npa / / 2 if the matching berth number pa_id_car is not acquired, where npa is the number of berths to be estimated.

12. The vehicle parking space matching system based on monocular vision images according to claim 7, characterized in that: The system further comprises: generating a display module; The generating and displaying module is used to generate and display a top-down projection image of the berth and the vehicle target detection frame in the world coordinate system.