Parking space positioning method, device and equipment and computer medium
Through the dual reference point positioning method and image-world coordinate system conversion, combined with the least squares calculation, the problems of large parking space positioning error and low efficiency in automatic parking are solved, and high-precision and efficient parking space positioning is achieved.
Patent Information
- Application Number
- CN202510625881.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-10-10
AI Technical Summary
Existing automatic parking methods suffer from large parking space positioning errors, low positioning efficiency, and poor robustness in dynamic environments or when reference points are occluded.
A dual-reference point positioning method is adopted. By obtaining the coordinates of multiple reference points in the world coordinate system, combining the conversion relationship between the image coordinate system captured by the camera and the world coordinate system, the coordinates of the parking space center are calculated using inverse perspective transformation and least squares method to simplify the coordinate system alignment process.
The parking space positioning accuracy is improved, the error is reduced to the centimeter level, the robustness is enhanced, the computational complexity is simplified, and it is suitable for real-time applications.
Smart Images

Figure CN120765722A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of positioning, and particularly relates to a parking space positioning method, device, equipment and computer medium. BACKGROUND
[0002] In the field of automatic parking, the accuracy of parking space positioning directly affects the accuracy of parking path planning and control. The traditional parking space positioning method usually relies on a single reference point, and has the following problems:
[0003] 1. Strong dependence: failure of single reference point detection will lead to overall positioning failure;
[0004] 2. Large error: sensor noise and calibration error will directly affect the positioning accuracy;
[0005] 3. Poor robustness: in a dynamic environment or when the reference point is blocked, the positioning performance is poor, and even the positioning result cannot be used.
[0006] Currently, some multi-reference point positioning methods have been proposed in the industry, but due to high computational complexity, and insufficient consideration of sensor error suppression and rapid alignment of coordinate systems, the error of parking space positioning is large, and the positioning efficiency is low. SUMMARY
[0007] The embodiments of the application provide an implementation scheme different from the prior art to solve the technical problems of the current automatic parking method, i.e., large error of parking space positioning and low positioning efficiency when positioning the parking space position.
[0008] In a first aspect, the application provides a parking space positioning method, comprising:
[0009] obtaining a plurality of world reference point coordinates of a plurality of reference points in a world coordinate system;
[0010] determining a plurality of image coordinates in an image coordinate system based on a to-be-analyzed image captured by a camera arranged on a vehicle, the plurality of image coordinates comprising a plurality of first reference point coordinates of the plurality of reference points in the to-be-analyzed image, and a first parking space center coordinate of a parking space center in the to-be-analyzed image;
[0011] determining a plurality of world coordinates of the plurality of image coordinates in the world coordinate system according to an image-world coordinate system conversion relationship;
[0012] determining a second parking space center coordinate of the parking space center in the world coordinate system according to the plurality of world reference point coordinates and the plurality of world coordinates;
[0013] determining a target parking space coordinate of the second parking space center coordinate in the vehicle coordinate system according to a world-vehicle coordinate conversion relationship, and completing positioning of the parking space center.
[0014] In a second aspect, the present application provides a parking space positioning device, comprising:
[0015] An acquisition unit, configured to acquire coordinates of multiple world reference points of the multiple reference points in a world coordinate system;
[0016] a determining unit, configured to determine, based on an image to be analyzed captured by a camera disposed on the vehicle, a plurality of image coordinates in an image coordinate system, the plurality of image coordinates comprising: a plurality of first reference point coordinates of the plurality of reference points in the image to be analyzed, and a first parking space center coordinate of a parking space center in the image to be analyzed;
[0017] The determining unit is further configured to determine a plurality of world coordinates of the plurality of image coordinates in the world coordinate system according to an image-world coordinate system conversion relationship;
[0018] The determining unit is further configured to determine a second parking space center coordinate of the parking space center in the world coordinate system based on the multiple world reference point coordinates and the multiple world coordinates;
[0019] The determining unit is further configured to determine the target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system according to a world-vehicle coordinate conversion relationship, thereby completing the positioning of the parking space center.
[0020] In a third aspect, the present application provides an electronic device, comprising:
[0021] processor; and
[0022] a memory for storing executable instructions of the processor;
[0023] The processor is configured to execute any method in the first aspect or any possible implementation of the first aspect by executing the executable instructions.
[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any method in the first aspect or any possible implementation manner of the first aspect.
[0025] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect or any possible implementation manner of the first aspect.
[0026] The present application provides a method for obtaining multiple world reference point coordinates of multiple reference points in a world coordinate system; determining multiple image coordinates in an image coordinate system based on an image to be analyzed taken by a camera set on a vehicle, the multiple image coordinates including: multiple first reference point coordinates of the multiple reference points in the image to be analyzed, and the first parking space center coordinates of the parking space center in the image to be analyzed; determining multiple world coordinates of the multiple image coordinates in the world coordinate system according to the image-world coordinate system conversion relationship; determining the second parking space center coordinates of the parking space center in the world coordinate system according to the multiple world reference point coordinates and the multiple world coordinates; determining the target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system according to the world-vehicle coordinate conversion relationship, and completing the positioning of the parking space center. The method can determine the position of the parking space center based on multiple reference points, and the calculation process is simple. The positioning of the parking space center can be achieved by relying on coordinate transformation, thereby improving the positioning efficiency of parking space positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0028] Figure 1a A flowchart of a parking space positioning method provided in one embodiment of the present application;
[0029] Figure 1b A schematic diagram of a heading angle is provided for an embodiment of the present application;
[0030] Figure 2 A schematic diagram of the structure of a parking space positioning device provided in one embodiment of the present application;
[0031] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present application, but should not be understood as limiting the present application.
[0033] The terms "first" and "second" in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] First, some of the terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0035] Inverse perspective mapping (IPM) is an image processing technique widely used in computer vision. It uses mathematical algorithms to simulate the perspective transformation of a scene observed from a high vantage point, thereby generating a bird's-eye view (BEV). This image is a parallel projection representation of a real-world scene. Its core purpose is to convert the image captured by a camera into a vertical perspective viewed from above. During the inverse perspective transformation process, the camera's imaging plane is mapped onto a plane parallel to the ground, eliminating perspective distortion in the image and maintaining parallel lines within the image.
[0036] The rear axle, a key component of a vehicle, carries significant weight and plays a crucial role in its driving stability, handling, and ride comfort. Typically located at the rear of the vehicle, it supports the weight of the rear portion of the vehicle and, through contact with the ground through the tires, transmits the vehicle's driving force (on the drive shaft) and braking force. The center point of the vehicle's rear axle serves as the origin of the vehicle coordinate system.
[0037] Surround-view cameras, also known as panoramic image monitoring systems, are an advanced form of in-vehicle camera technology. They use multiple wide-angle cameras to capture images of the vehicle's surroundings and use an image processor to stitch these images together into a complete 360-degree panoramic view. Each camera operates based on the principle of optical imaging, projecting an optical image of the scene through a lens onto the image sensor surface, which is then converted into a digital image signal for processing. Using image stitching technology, these digital image signals are seamlessly connected into a single panoramic view, which is displayed on the LCD screen inside the vehicle.
[0038] In the field of automatic parking, the accuracy of parking space positioning directly affects the accuracy of parking path planning and control. Traditional parking space positioning methods usually rely on a single reference point, which has the following problems:
[0039] 1. Strong dependence: failure of a single reference point detection will lead to overall positioning failure;
[0040] 2. Large error: sensor noise and calibration error will directly affect the positioning accuracy;
[0041] 3. Poor robustness: in dynamic environment or reference point occlusion, the positioning performance is poor, and even the positioning result cannot be used.
[0042] Currently, some multi-reference point positioning methods have been proposed in the industry, but due to high computational complexity, and insufficient consideration of sensor error suppression and coordinate system alignment, the positioning error is poor and the positioning efficiency is low. Therefore, an efficient and accurate parking space positioning optimization scheme is needed to solve the technical problem of low efficiency of automatic parking in the current automatic parking field.
[0043] The present application provides a parking space positioning optimization method and system based on double fixed reference points, which establishes geometric constraints through double reference points, suppresses the shooting error of sensors such as cameras, improves the accuracy of parking space positioning, and simplifies the coordinate system alignment process, thereby achieving the purpose of improving the overall performance of the automatic parking system.
[0044] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0045] Figure 1a A flowchart of a parking space positioning method provided by an exemplary embodiment of the present application is shown. The execution subject of the method can be the central control center of the vehicle, the electronic device provided in the vehicle, the electronic device with data processing capability in the vehicle, the electronic device independent of the vehicle, etc. The present application does not limit this, and the method at least includes the following steps S101-S105:
[0046] S101, obtaining a plurality of world reference point coordinates of a plurality of reference points in a world coordinate system;
[0047] The plurality of world reference point coordinates are coordinates in the world coordinate system.
[0048] The plurality of world reference point coordinates can be coordinates in a two-dimensional coordinate system or coordinates in a three-dimensional coordinate system.
[0049] In some optional embodiments of the present application, the multiple world reference point coordinates include two world reference point coordinates, corresponding to two reference points respectively, wherein one world reference point coordinate is (0, 0) and the other world reference point coordinate is (L, 0), and L is greater than 0.
[0050] Specifically, in the world coordinate system, a world reference point has coordinates P1 W =(0,0), the coordinates of another world reference point are Where L is the distance between the two reference points.
[0051] S102: determining, based on an image to be analyzed captured by a camera disposed on the vehicle, a plurality of image coordinates in an image coordinate system, the plurality of image coordinates comprising: a plurality of first reference point coordinates of the plurality of reference points in the image to be analyzed, and a first parking space center coordinate of a parking space center in the image to be analyzed;
[0052] The multiple first reference point coordinates correspond one-to-one to the multiple world reference point coordinates.
[0053] Optionally, the multiple first reference point coordinates include: first reference point coordinates (u1, v1), and first reference point coordinates (u2, v2).
[0054] Among them, the first reference point coordinates (u1, v1) and the world reference point coordinates P1 W =(0,0), the first reference point coordinates (u2,v2) and the world reference point coordinates correspond.
[0055] In some optional embodiments of the present application, the aforementioned multiple reference points may correspond to real physical locations in the physical world. For example, one reference point may be a point on the ground at a corner of a parking lot entrance, and another reference point may be a point on the ground on one of the two walls forming the corner. In the world coordinate system, one reference point is the origin (0,0), and the other reference point (L,0) is located on the horizontal axis and is a distance L from one of the reference points.
[0056] Optionally, when determining multiple image coordinates in an image coordinate system based on an image to be analyzed taken by a camera installed on a vehicle, the image to be analyzed can be identified, and the multiple image coordinates can be identified through image recognition technology or a deep learning model.
[0057] In some optional embodiments of the present application, multiple image coordinates of an image coordinate system may be identified from the image to be analyzed based on a reference image marked with multiple reference points. Optionally, the reference image is an image captured in advance.
[0058] Optionally, the parking space center can be calculated after identifying the four vertices of the parking space border.
[0059] Optionally, multiple reference points may be fixed after selection.
[0060] S103, determining a plurality of world coordinates of the plurality of image coordinates in the world coordinate system according to an image-world coordinate system conversion relationship;
[0061] Optionally, determining the multiple world coordinates of the multiple image coordinates in the world coordinate system based on the image-world coordinate system conversion relationship may include: for each image coordinate in the multiple image coordinates, finding the product of the image coordinate and the image-world coordinate system conversion relationship to obtain the world coordinate corresponding to the image coordinate, and then obtaining the multiple world coordinates of the multiple image coordinates in the world coordinate system.
[0062] Optionally, an inverse perspective transformation may be used to map the coordinates in the image coordinate system to the world coordinate system.
[0063] In some optional embodiments of the present application, the method further includes the following steps S01-S02:
[0064] S01. Obtain an intrinsic parameter matrix and an extrinsic parameter matrix of the camera, where the intrinsic parameter matrix is a coordinate conversion matrix between the camera coordinate system and the image coordinate system, and the extrinsic parameter matrix is a coordinate conversion matrix between the camera coordinate system and the world coordinate system;
[0065] Optionally, the intrinsic parameter matrix is used to describe the internal parameters of the camera, including the focal length f x 、f y and principal point offset c x , c y Focal length is a measure of the convergence or divergence of light in an optical system. It refers to the distance from the center of the lens (optical center) to the point where light can be clearly focused (focal point). In a camera, the focal length is the distance from the optical center of the lens to the imaging plane of the film, CCD or CMOS. The principal point is the intersection of the optical axis of the camera lens and the imaging plane. The principal point offset refers to the deviation between the actual principal point and the center of the image. x With f y are the focal lengths of the camera in the x and y directions respectively. x Refers to the horizontal position deviation of the principal point relative to the center of the image, c y Refers to the vertical position deviation of the principal point relative to the center of the image.
[0066] Specifically, the internal parameter matrix K is as follows:
[0067]
[0068] The extrinsic parameter matrix can be used to describe the position and posture of the camera (camera coordinate system) in the world coordinate system, including the rotation matrix R and the translation vector t. The extrinsic parameter matrix is as follows T:
[0069] T=[R t]
[0070] S02. Determine the image-world coordinate system conversion relationship according to the intrinsic parameter matrix and the extrinsic parameter matrix.
[0071] Optionally, the inverse matrix of the product of the intrinsic parameter matrix and the extrinsic parameter matrix is the image-world coordinate system transformation relationship.
[0072] The world-image coordinate system conversion relationship is K*T.
[0073] The image-world coordinate system conversion relationship can be (K*T) -1 .
[0074] The world-image coordinate system conversion relationship is used to indicate the coordinate conversion matrix from the world coordinate system to the image coordinate system, and the image-world coordinate system conversion relationship is used to indicate the coordinate conversion matrix from the image coordinate system to the world coordinate system.
[0075] S104, determining a second parking space center coordinate of the parking space center in the world coordinate system according to the multiple world reference point coordinates and the multiple world coordinates;
[0076] In some optional embodiments of the present application, the multiple world coordinates include: multiple second reference point coordinates of the multiple first reference point coordinates in the world coordinate system, and a third parking space center coordinate of the first parking space center coordinate in the world coordinate system. In S104, determining the second parking space center coordinate of the parking space center in the world coordinate system based on the multiple world reference point coordinates and the multiple world coordinates includes the following steps S1041-S1043:
[0077] S1041. Determine, for each of the plurality of second reference point coordinates, an offset from the third parking space center coordinate to the second reference point coordinate, to obtain a plurality of offsets corresponding to the plurality of second reference point coordinates.
[0078] Optionally, the second reference point coordinates correspond one-to-one to the world reference point coordinates.
[0079] Optionally, with the world reference point coordinate P1 W =(0,0) The offset corresponding to the second reference point coordinates can be ΔS1 = (d x1 ,d y1 ), where d x1 is the horizontal axis offset, d y1is the vertical coordinate offset, which is different from the world reference point coordinate The offset corresponding to the coordinates of the second reference point can be ΔS2=(d x2 ,d y2 ), where d x2 is the horizontal axis offset, d y2 is the vertical axis offset.
[0080] Optionally, determining the offset between the third parking space center coordinates and the second reference point coordinates includes using a difference between the third parking space center coordinates and the second reference point coordinates as the offset between the third parking space center coordinates and the second reference point coordinates. The offset between the third parking space center coordinates and the second reference point coordinates may be considered as an offset corresponding to the second reference point coordinates.
[0081] S1042: determining a plurality of parking space coordinates to be processed according to the plurality of world reference point coordinates and the plurality of offsets;
[0082] Optionally, a plurality of parking space coordinates to be processed are determined based on the plurality of world reference point coordinates and the plurality of offsets, including: for each world reference point coordinate in the plurality of world reference point coordinates, taking the sum of the world reference point coordinate and the offset corresponding to the world reference point coordinate as the parking space coordinate to be processed corresponding to the world reference point coordinate, thereby obtaining a plurality of parking space coordinates to be processed.
[0083] Optionally, the parking space coordinates in this application may refer to the parking space center coordinates.
[0084] Optionally, the world reference point coordinate P1 W =(0,0) The offset corresponding to the world reference point coordinates ΔS1 = (d x1 ,d y1 ) and, as the world reference point coordinate P1 W =(0,0) corresponding to the parking space coordinates to be processed; world reference point coordinates The offset ΔS2 corresponding to the world reference point coordinates = (d x2 ,d y2 ) and, as the world reference point coordinates The corresponding parking space coordinates to be processed.
[0085] S1043: Determine the second parking space center coordinates of the parking space center in the world coordinate system according to the multiple parking space coordinates to be processed.
[0086] In some optional embodiments of the present application, in S1043, determining the second parking space center coordinates of the parking space center in the world coordinate system according to the multiple parking space coordinates to be processed includes:
[0087] A least squares method is performed on the plurality of parking space coordinates to be processed to obtain a second parking space center coordinate of the parking space center in the world coordinate system.
[0088] Optionally, performing least squares calculation on the multiple parking space coordinates to be processed includes: performing least squares calculation on the multiple parking space coordinates to be processed and the third parking space center coordinate of the first parking space center coordinate in the world coordinate system.
[0089] Optionally, the second parking space center coordinates of the parking space center in the world coordinate system may be determined by the following formula:
[0090]
[0091] The calculation results are: in, is the second parking space center coordinate of the parking space center in the world coordinate system, and S is the third parking space center coordinate of the first parking space center coordinate in the world coordinate system. is the coordinate obtained by the least squares method, is the optimal coordinate estimate, and S is the coordinate of the parking space center calculated based on the coordinates of the four corners of the parking space after being photographed by the camera, and then converted through the image-world coordinate conversion relationship.
[0092] Optionally, the plurality of parking space coordinates to be processed may be processed by Kalman filtering to obtain the second parking space center coordinates of the parking space center in the world coordinate system.
[0093] S105 : Determine the target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system according to the world-vehicle coordinate conversion relationship, and complete the positioning of the parking space center.
[0094] The world-vehicle coordinate system transformation relationship is used to indicate the coordinate transformation matrix from the world coordinate system to the vehicle coordinate system.
[0095] Optionally, determining the target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system based on the world-vehicle coordinate conversion relationship to complete the positioning of the parking space center may include: taking the product of the second parking space center coordinates and the world-vehicle coordinate conversion relationship as the target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system.
[0096] In some optional embodiments of the present application, the method further includes the following steps S1-S4:
[0097] S1. Determine a plurality of third reference point coordinates of the plurality of first reference point coordinates in a vehicle coordinate system based on an image-vehicle coordinate conversion relationship;
[0098] Optionally, the image-vehicle coordinate system conversion relationship is used to indicate a coordinate conversion matrix from the image coordinate system to the vehicle coordinate system.
[0099] Optionally, a product of each of the plurality of first reference point coordinates and the image-vehicle coordinate conversion relationship may be calculated to obtain a plurality of third reference point coordinates of the plurality of first reference point coordinates in the vehicle coordinate system.
[0100] S2. determining a heading angle of the vehicle relative to the world coordinate system based on the coordinates of the multiple third reference points;
[0101] The plurality of third reference point coordinates correspond one-to-one to the plurality of first reference point coordinates.
[0102] Optionally, determining the heading angle of the vehicle relative to the world coordinate system based on the coordinates of the multiple third reference points can be achieved by using the following formula:
[0103]
[0104] Among them, θ is the heading angle of the vehicle relative to the world coordinate system, and the coordinates of the third reference point are Corresponding to the coordinates of the first reference point (u1, v1), the coordinates of the third reference point Corresponding to the coordinates of the first reference point (u2, v2).
[0105] Figure 1b This is a schematic diagram of the heading angle of a vehicle relative to the world coordinate system provided by the present application, wherein θ is the heading angle, V X Angle and Vy angle are the horizontal and vertical axes of the vehicle coordinate system, respectively, and X and Y are the horizontal and vertical axes of the world coordinate system. "1" and "2" are the coordinates of the third reference point. Coordinates of the third reference point
[0106] Optionally, the third reference point coordinates With the world reference point coordinate P1 W =(0,0) coincides, the coordinates of the third reference point With world reference point coordinates coincide.
[0107] S3, determining a vehicle-world coordinate conversion relationship according to the plurality of third reference point coordinates and the heading angle;
[0108] In some optional embodiments of the present application, in S3, determining the vehicle-world coordinate conversion relationship according to the plurality of third reference point coordinates and the heading angle includes the following steps S31-S32:
[0109] S31, extracting a third reference point coordinate from the plurality of third reference point coordinates;
[0110] Optionally, the retrieved third reference point coordinates are third reference point coordinates corresponding to the origin in the world coordinate system among the plurality of third reference point coordinates.
[0111] S32: Determine a vehicle-world coordinate conversion relationship based on the third reference point coordinates and the heading angle.
[0112] Optionally, the vehicle-world coordinate transformation relationship The expression can be as follows:
[0113]
[0114] S4. Determine the world-vehicle coordinate conversion relationship according to the vehicle-world coordinate conversion relationship.
[0115] The vehicle-world coordinate conversion relationship can be The inverse matrix of As a world-vehicle coordinate conversion relationship, specifically, the world-vehicle coordinate conversion relationship The expression can be as follows:
[0116]
[0117] The solution of this application can improve positioning accuracy: by establishing geometric constraints through dual reference points, the parking space positioning error can be reduced to the centimeter level (typical error <0.1m). Enhanced robustness: in the case of failure in detection of a single reference point or large sensor noise, high positioning accuracy can still be maintained. Simplified calculation: by aligning the coordinate system and fusing the least squares method, the computational complexity is reduced, making it suitable for real-time applications. In addition, by processing the coordinates of multiple parking spaces to be processed using the least squares method, the error caused by the camera, that is, the sensor, in positioning the parking space can be offset, thereby improving the accuracy of parking space positioning.
[0118] The present application provides a method for obtaining multiple world reference point coordinates of multiple reference points in a world coordinate system; determining multiple image coordinates in an image coordinate system based on an image to be analyzed taken by a camera set on a vehicle, the multiple image coordinates including: multiple first reference point coordinates of the multiple reference points in the image to be analyzed, and the first parking space center coordinates of the parking space center in the image to be analyzed; determining multiple world coordinates of the multiple image coordinates in the world coordinate system according to the image-world coordinate system conversion relationship; determining the second parking space center coordinates of the parking space center in the world coordinate system according to the multiple world reference point coordinates and the multiple world coordinates; determining the target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system according to the world-vehicle coordinate conversion relationship, and completing the positioning of the parking space center. The method can determine the position of the parking space center based on multiple reference points, and the calculation process is simple. The positioning of the parking space center can be achieved by relying on coordinate transformation, thereby improving the positioning efficiency of parking space positioning.
[0119] Figure 2 A schematic structural diagram of a parking space positioning device provided in an exemplary embodiment of the present application; wherein the device includes:
[0120] An acquiring unit 21 is configured to acquire coordinates of multiple world reference points of the multiple reference points in a world coordinate system;
[0121] a determining unit 22 configured to determine, based on an image to be analyzed captured by a camera disposed on the vehicle, a plurality of image coordinates in an image coordinate system, the plurality of image coordinates comprising: a plurality of first reference point coordinates of the plurality of reference points in the image to be analyzed, and a first parking space center coordinate of a parking space center in the image to be analyzed;
[0122] The determining unit 22 is further configured to determine a plurality of world coordinates of the plurality of image coordinates in the world coordinate system according to an image-world coordinate system conversion relationship;
[0123] The determining unit 22 is further configured to determine the second parking space center coordinates of the parking space center in the world coordinate system based on the multiple world reference point coordinates and the multiple world coordinates;
[0124] The determining unit 22 is further configured to determine the target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system according to a world-vehicle coordinate conversion relationship, thereby completing the positioning of the parking space center.
[0125] In some optional embodiments of the present application, the multiple world coordinates include: multiple second reference point coordinates of the multiple first reference point coordinates in the world coordinate system, and a third parking space center coordinate of the first parking space center coordinate in the world coordinate system. When the device is used to determine the second parking space center coordinate of the parking space center in the world coordinate system based on the multiple world reference point coordinates and the multiple world coordinates, it is specifically used to:
[0126] For each second reference point coordinate in the plurality of second reference point coordinates, determining an offset from the third parking space center coordinate to the second reference point coordinate, to obtain a plurality of offsets corresponding to the plurality of second reference point coordinates;
[0127] Determine a plurality of parking space coordinates to be processed according to the plurality of world reference point coordinates and the plurality of offsets;
[0128] Determine a second parking space center coordinate of the parking space center in the world coordinate system according to the multiple parking space coordinates to be processed.
[0129] In some optional embodiments of the present application, when the aforementioned apparatus is used to determine the second parking space center coordinates of the parking space center in the world coordinate system according to the multiple parking space coordinates to be processed, it is specifically used to:
[0130] A least squares method is performed on the plurality of parking space coordinates to be processed to obtain a second parking space center coordinate of the parking space center in the world coordinate system.
[0131] In some optional embodiments of the present application, the device is further used for:
[0132] Obtaining an intrinsic parameter matrix and an extrinsic parameter matrix of the camera, wherein the intrinsic parameter matrix is a coordinate conversion matrix between the camera coordinate system and the image coordinate system, and the extrinsic parameter matrix is a coordinate conversion matrix between the camera coordinate system and the world coordinate system;
[0133] The image-world coordinate system conversion relationship is determined according to the intrinsic parameter matrix and the extrinsic parameter matrix.
[0134] In some optional embodiments of the present application, the device is further used for:
[0135] determining a plurality of third reference point coordinates of the plurality of first reference point coordinates in the vehicle coordinate system based on an image-vehicle coordinate conversion relationship;
[0136] determining a heading angle of the vehicle relative to the world coordinate system based on the plurality of third reference point coordinates;
[0137] Determining a vehicle-world coordinate conversion relationship based on the plurality of third reference point coordinates and the heading angle;
[0138] The world-vehicle coordinate transformation relationship is determined according to the vehicle-world coordinate transformation relationship.
[0139] In some optional embodiments of the present application, when the apparatus is used to determine the vehicle-world coordinate conversion relationship based on the multiple third reference point coordinates and the heading angle, it is specifically used to:
[0140] Taking out a third reference point coordinate from the plurality of third reference point coordinates;
[0141] A vehicle-to-world coordinate conversion relationship is determined based on the third reference point coordinates and the heading angle.
[0142] In some optional embodiments of the present application, the multiple world reference point coordinates include two world reference point coordinates, wherein one world reference point coordinate is (0, 0) and the other world reference point coordinate is (L, 0), and L is greater than 0.
[0143] It should be understood that the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described in detail here. Specifically, the device can perform the above-mentioned method embodiments, and the aforementioned and other operations and / or functions of each module in the device are the corresponding processes in each method in the above-mentioned method embodiments, which will not be described in detail here for the sake of brevity.
[0144] The apparatus of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.
[0145] Figure 3 : is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include:
[0146] a memory 301 for storing a computer program and transmitting the program code to the processor 302. In other words, the processor 302 can call and run the computer program from the memory 301 to implement the method in the embodiments of the present application.
[0147] For example, the processor 302 can be configured to execute the method embodiments described above according to the instructions in the computer program.
[0148] In some embodiments of the present application, the processor 302 can include but is not limited to:
[0149] a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic component, a discrete hardware component, and the like.
[0150] In some embodiments of the present application, the memory 301 includes but is not limited to:
[0151] a volatile memory and / or a non-volatile memory. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synch link DRAM (SLDRAM) and direct Rambus RAM (DR RAM).
[0152] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 301 and executed by the processor 302 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0153] like Figure 3 As shown, the electronic device may further include:
[0154] The transceiver 303 may be connected to the processor 302 or the memory 301 .
[0155] The processor 302 may control the transceiver 303 to communicate with other devices. Specifically, the processor 302 may send information or data to other devices or receive information or data sent by other devices. The transceiver 303 may include a transmitter and a receiver. The transceiver 303 may further include one or more antennas.
[0156] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0157] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.
[0158] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).
[0159] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0160] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0161] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.
[0162] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A parking space positioning method, characterized in that: include: Get the coordinates of multiple world reference points in the world coordinate system; Determining, based on an image to be analyzed captured by a camera disposed on the vehicle, a plurality of image coordinates in an image coordinate system, the plurality of image coordinates comprising: a plurality of first reference point coordinates of the plurality of reference points in the image to be analyzed, and a first parking space center coordinate of a parking space center in the image to be analyzed; Determining a plurality of world coordinates of the plurality of image coordinates in the world coordinate system according to an image-world coordinate system conversion relationship; Determine a second parking space center coordinate of the parking space center in the world coordinate system according to the multiple world reference point coordinates and the multiple world coordinates; The target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system are determined according to the world-vehicle coordinate conversion relationship, thereby completing the positioning of the parking space center.
2. The method according to claim 1, characterized in that The multiple world coordinates include: multiple second reference point coordinates of the multiple first reference point coordinates in the world coordinate system, and a third parking space center coordinate of the first parking space center coordinate in the world coordinate system, and determining the second parking space center coordinate of the parking space center in the world coordinate system based on the multiple world reference point coordinates and the multiple world coordinates includes: For each second reference point coordinate in the plurality of second reference point coordinates, determining an offset from the third parking space center coordinate to the second reference point coordinate, to obtain a plurality of offsets corresponding to the plurality of second reference point coordinates; Determine a plurality of parking space coordinates to be processed according to the plurality of world reference point coordinates and the plurality of offsets; Determine a second parking space center coordinate of the parking space center in the world coordinate system according to the multiple parking space coordinates to be processed.
3. The method according to claim 2, characterized in that The determining, based on the plurality of parking space coordinates to be processed, the second parking space center coordinates of the parking space center in the world coordinate system includes: A least squares method is performed on the plurality of parking space coordinates to be processed to obtain a second parking space center coordinate of the parking space center in the world coordinate system.
4. The method according to claim 1, wherein The method further comprises: Obtaining an intrinsic parameter matrix and an extrinsic parameter matrix of the camera, wherein the intrinsic parameter matrix is a coordinate conversion matrix between the camera coordinate system and the image coordinate system, and the extrinsic parameter matrix is a coordinate conversion matrix between the camera coordinate system and the world coordinate system; The image-world coordinate system conversion relationship is determined according to the intrinsic parameter matrix and the extrinsic parameter matrix.
5. The method according to claim 3, characterized in that The method further comprises: determining a plurality of third reference point coordinates of the plurality of first reference point coordinates in the vehicle coordinate system based on an image-vehicle coordinate conversion relationship; determining a heading angle of the vehicle relative to the world coordinate system based on the plurality of third reference point coordinates; Determining a vehicle-world coordinate conversion relationship based on the plurality of third reference point coordinates and the heading angle; The world-vehicle coordinate transformation relationship is determined according to the vehicle-world coordinate transformation relationship.
6. The method according to claim 5, characterized in that The determining of the vehicle-world coordinate conversion relationship according to the plurality of third reference point coordinates and the heading angle includes: Taking out a third reference point coordinate from the plurality of third reference point coordinates; A vehicle-to-world coordinate conversion relationship is determined based on the third reference point coordinates and the heading angle.
7. The method according to claim 1, characterized in that The multiple world reference point coordinates include two world reference point coordinates, wherein one world reference point coordinate is (0, 0) and the other world reference point coordinate is (L, 0), and L is greater than 0.
8. A parking space positioning device, characterized in that: include: An acquisition unit, configured to acquire coordinates of multiple world reference points of the multiple reference points in a world coordinate system; a determining unit, configured to determine, based on an image to be analyzed captured by a camera disposed on the vehicle, a plurality of image coordinates in an image coordinate system, the plurality of image coordinates comprising: a plurality of first reference point coordinates of the plurality of reference points in the image to be analyzed, and a first parking space center coordinate of a parking space center in the image to be analyzed; The determining unit is further configured to determine a plurality of world coordinates of the plurality of image coordinates in the world coordinate system according to an image-world coordinate system conversion relationship; The determining unit is further configured to determine a second parking space center coordinate of the parking space center in the world coordinate system based on the multiple world reference point coordinates and the multiple world coordinates; The determining unit is further configured to determine the target parking space coordinates of the second parking space center coordinates in the vehicle coordinate system according to a world-vehicle coordinate conversion relationship, thereby completing the positioning of the parking space center.
9. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.