A parking method, system and device based on parking space calibration
By combining image recognition and ultrasonic radar, the problem of inaccurate parking space boundary recognition in automatic parking systems has been solved, achieving accurate and safe automatic parking.
Patent Information
- Application Number
- CN202410426155.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-04-10
AI Technical Summary
Existing automatic parking systems cannot accurately identify parking space boundaries, resulting in parking position deviations and failure to complete parking.
By using image recognition technology to determine parking lines and external objects, combining vehicle coordinates to plan the movement path, and using ultrasonic radar to detect obstructions and correct the distance measurement results, precise parking can be achieved.
To ensure the accuracy and safety of vehicle parking positions, avoid inaccurate parking situations, and improve the success rate of automatic parking.
Smart Images

Figure CN118182453B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of automatic driving and the technical field of image processing, in particular to a parking method, system and device based on parking space calibration. BACKGROUND
[0002] Automatic parking refers to automatic parking of a vehicle without manual control. Vehicle manufacturers develop vehicles capable of automatic parking because they realize the needs of consumers. Automatic parking can help drivers to automatically park. Current automatic parking is generally based on image recognition. After recognizing the boundary of a parking space, the vehicle is reversed into the recognized parking space. Because the boundary line of the parking space cannot be detected at all times, parking in this way may cause deviation in the parking position, and sometimes parking cannot be completed. SUMMARY
[0003] The present disclosure aims to at least partly solve one of the above technical problems. To this end, a parking method based on parking space calibration is provided, comprising:
[0004] determining a parking line and external objects based on image recognition;
[0005] determining coordinates of the parking line according to coordinates of the vehicle;
[0006] planning a moving path based on the coordinates of the vehicle and the coordinates of the parking line;
[0007] parking according to the planned moving path.
[0008] Preferably, the parking line is determined based on image recognition, comprising:
[0009] collecting panoramic images of the vehicle and the external environment;
[0010] performing grayscale processing and image edge detection on the panoramic images;
[0011] performing straight line detection on the images after image edge detection to determine the parking line.
[0012] Preferably, the image edge detection on the panoramic images comprises:
[0013] smoothing the grayscale panoramic images by Gaussian filtering;
[0014] calculating the amplitude and direction of the image gradient according to the first-order finite difference, and performing non-maximum suppression on the gradient amplitude of the image gradient;
[0015] detecting the image connection edge based on the image gradient information.
[0016] Preferably, the straight line detection on the images after image edge detection to determine the parking line comprises:
[0017] binarizing the image after edge detection;
[0018] obtaining line segments in the binarized image through Hough line detection;
[0019] obtaining several groups of line segments corresponding to the line segments in the binarized image through affine transformation, and performing fusion processing on each group of line segments;
[0020] determining the parking line in the image according to the obtained fused line segments.
[0021] Preferably, the external object is determined based on image recognition, comprising:
[0022] dividing the panoramic image into several pixel rectangular blocks;
[0023] calculating the gradient direction and gradient intensity of each pixel in each pixel rectangular block;
[0024] dividing the panoramic image into several channels based on the same angle, and performing weighted statistics on the gradient direction of each pixel to obtain the Hog feature of the panoramic image;
[0025] detecting the external object through the SVM support vector machine based on the Hog feature.
[0026] Preferably, when parking according to the obtained moving path, the system further comprises: determining whether there is an obstruction in the parking direction based on the ultrasonic radar arranged on the vehicle.
[0027] Preferably, when determining whether there is an obstruction in the parking direction through the ultrasonic radar, the system further comprises: obtaining the external temperature through the temperature acquisition module of the vehicle, and correcting the ultrasonic ranging result.
[0028] The present disclosure further provides a parking system based on parking space calibration, comprising:
[0029] an image recognition module for determining the parking line and the external object based on image recognition;
[0030] a coordinate determination module for determining the coordinates of the parking line according to the coordinates of the vehicle;
[0031] a path planning module for planning a moving path based on the coordinates of the vehicle and the coordinates of the parking line;
[0032] a parking control module for parking according to the obtained moving path.
[0033] The present disclosure further provides a computer readable storage medium, wherein the computer readable storage medium stores computer programs or instructions, and the computer programs or instructions are executed by a processor to at least implement the above method.
[0034] The present disclosure also provides a vehicle, which is installed with the parking system based on parking space calibration.
[0035] Compared with the prior art, the present disclosure has the following beneficial effects:
[0036] 1. The parking method provided by the present disclosure can ensure the accurate positioning of the vehicle during parking by assigning coordinates to the four corners of the parking space through panoramic image acquisition and assigning corresponding coordinates to the four corners of the vehicle according to the position of the vehicle, thereby avoiding inaccurate parking.
[0037] 2. The parking method provided by the present disclosure can ensure the safety and accuracy of the vehicle during parking by identifying the position of the parking space through panoramic image acquisition and detecting the external environment through multiple ultrasonic sensors of the vehicle.
[0038] Other features and advantages of the present disclosure will be described in the following description, and some will become apparent from the description, or will be understood by those skilled in the art. The purpose and other advantages of the present disclosure can be achieved and obtained by the structure specifically pointed out in the written description and the accompanying drawings. The technical solutions of the present disclosure will be further described below with the help of the accompanying drawings and examples. BRIEF DESCRIPTION OF DRAWINGS
[0039] The accompanying drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification, which is used together with the embodiments of the present disclosure to explain the present disclosure, and do not constitute a limitation on the present disclosure. In the drawings:
[0040] Figure 1 The parking method based on parking space calibration is shown in the schematic diagram of the embodiment;
[0041] Figure 2 The parking process based on parking space calibration is shown in the schematic diagram of the embodiment;
[0042] Figure 3 The parking system based on parking space calibration is shown in the schematic diagram of the embodiment;
[0043] Figure 4 The schematic diagram of the electronic device is shown in the schematic diagram of the embodiment;
[0044] Figure 5 The schematic diagram of the computer readable storage medium is shown in the schematic diagram of the embodiment. DETAILED DESCRIPTION
[0045] The present disclosure will be described below in conjunction with the accompanying drawings, and the preferred embodiments described herein are only used to illustrate and explain the present disclosure, and do not limit the present disclosure.
[0046] Figure 1 The parking method based on parking space calibration given by the present disclosure comprises:
[0047] Determining the parking line and the external object based on image recognition;
[0048] Determining the coordinates of the parking line according to the coordinates of the vehicle;
[0049] Planning the moving path based on the coordinates of the vehicle and the coordinates of the parking line;
[0050] Parking according to the moving path planned.
[0051] According to some embodiments of the present disclosure, determining the parking line based on image recognition comprises: collecting panoramic images of the vehicle and the external environment; performing gray-scale processing and image edge detection on the panoramic images; and performing straight line detection on the images after image edge detection to determine the parking line.
[0052] According to some embodiments of the present disclosure, performing image edge detection on the panoramic images comprises: smoothing the gray-scale panoramic images through Gaussian filtering; calculating the amplitude and direction of the image gradient according to the first-order finite difference, and performing non-maximum suppression on the gradient amplitude of the image gradient; and detecting the image connection edge based on the image gradient information.
[0053] According to some embodiments of the present disclosure, performing straight line detection on the images after image edge detection to determine the parking line comprises: binarizing the images after edge detection; obtaining line segments in the binarized images through Hough straight line detection; obtaining a plurality of groups of line segments corresponding to the line segments in the binarized images through affine transformation, and performing fusion processing on each group of line segments; and determining the parking line in the images according to the obtained fused line segments.
[0054] According to some embodiments of the present disclosure, determining the external object based on image recognition comprises: dividing the panoramic images into a plurality of pixel rectangular blocks; calculating the gradient direction and gradient intensity of each pixel in each pixel rectangular block; dividing the panoramic images into a plurality of channels based on the same angle, weighting and counting the gradient directions of each pixel to obtain the Hog feature of the panoramic images; and detecting the external object through the SVM support vector machine based on the Hog feature.
[0055] According to some embodiments of the present disclosure, when parking according to the moving path planned, it is determined whether there is an obstruction in the parking direction based on the ultrasonic radar arranged on the vehicle, and when it is determined whether there is an obstruction in the parking direction through the ultrasonic radar, the external temperature is obtained through the temperature acquisition module of the vehicle to correct the ultrasonic ranging result.
[0056] Figure 2 The parking process based on parking space calibration given by the embodiments comprises:
[0057] Step S1, determining vehicle coordinates: through panoramic image acquisition image, through the image processing, the parking line, pedestrians and other objects in the external environment are identified and located;
[0058] Step S2, calibrating vehicle coordinates, by assigning coordinates to the four corners of the parking line in step S1, and assigning corresponding coordinates to the four corners of the vehicle according to the position of the vehicle;
[0059] Step S3, parking environment detection, through the ultrasonic sensor outside the vehicle to detect the environment outside, to detect whether there is an obstacle in the parking direction of the vehicle;
[0060] Step S4, path planning, when the ultrasonic sensor in step S3 does not detect any obstacles in the parking space, the processor calculates the coordinates of the four corners of the vehicle to advance to the inside of the four corners of the parking line;
[0061] Step S5, alarm prompt, when the ultrasonic sensor in step S3 detects an obstacle in the rear parking space, stop the parking operation and give a collision warning;
[0062] Step S6, external environment detection, after the path planning in step S4 is completed, the parking operation is started, at this time the ultrasonic radar on both sides of the vehicle and in front of the vehicle detects the external environment, when no collision object is detected on the side of the vehicle during parking, the reverse process continues until the parking is completed, and when a collision object is detected on the side of the vehicle, an alarm is given and the parking process is terminated;
[0063] In step S1 of the embodiment, after panoramic image acquisition image, the image processing step includes the following steps: (1) image graying: since the collected image is color, before edge detection, the color image should be converted into a gray image, when the image is graying, the parameter CV_BGR2GRAY is used to gray the image; (2) image edge detection: edge detection extracts the area with sharp gray change of the image, the Canny operator is used, the process of Canny edge detection is as follows: smooth the image through Gaussian filtering; then use first-order finite difference to calculate the amplitude and direction of gradient; perform non-maximum suppression on the gradient amplitude; detect connected edges, and binarize the image; the implementation method is that the input variables of the cvCanny function include input gray image, output black and white image, edge connection threshold, initial segmentation threshold and operator kernel size; (3) straight line detection: obtain line segments through Hough straight line detection, obtain a plurality of groups of similar line segments according to the line segments, perform fusion processing on each group of similar line segments in the plurality of groups of similar line segments to obtain a fusion line segment of each group of similar line segments; obtain the target parking line according to the fusion line segment; the implementation method is that the input variables of the cvHoughLines2 function include variable type of transformation, pixel-related distance precision, unit of Hough transformation theta radian, accumulation number threshold, minimum line segment length of detection, and maximum interval value for connecting broken line segments on the same straight line;
[0064] In step S1 of the embodiment, the detection process of dynamic and static pedestrians, vehicles and animals is as follows: the Hog features of the image are extracted, and the principle is as follows: the image is divided into cells and blocks, the cell is an 8*8 pixel rectangular block, the block is composed of a plurality of cells, the gradient value of each pixel in each cell is calculated, including gradient direction and gradient strength, in the range of 0-180 degrees, each 20 degrees is divided into a channel, and 9 channels are formed, the gradient direction of each pixel is weighted and counted, each cell in a block is combined, the cells can be overlapped when being divided, and the overall Hog feature is obtained. After the Hog features are extracted, the SVM support vector machine is used to train the pedestrian detector to detect pedestrians;
[0065] In step S3 of the embodiment, a temperature acquisition module is further arranged, the temperature acquisition module is used to acquire the temperature outside, and the controller calculates the propagation speed of the ultrasonic wave according to the external temperature, so that the distance measurement is more accurate.
[0066] As Figure 3As shown, this disclosure provides a parking system based on parking space calibration, including: an image recognition module for determining parking lines and external objects based on image recognition; a coordinate determination module for determining the coordinates of the parking lines based on the vehicle's coordinates; a path planning module for planning a movement path based on the vehicle's coordinates and the parking line's coordinates; and a parking control module for parking according to the planned movement path.
[0067] like Figure 4 As shown, this disclosure provides an electronic device 1000, which includes a memory 1002 and a processor 1001. The memory 1002 stores computer programs or instructions, which, when executed by the processor 1001, are used to implement at least the methods described above. Figure 5 As shown, this disclosure provides a computer-readable storage medium 1100, which stores a computer program or instructions that, when executed by a processor, are at least used to implement the above-described method.
[0068] This disclosure also provides a car equipped with the aforementioned parking space calibration-based parking system, which enables users to achieve automatic parking.
[0069] It is obvious that those skilled in the art can make various modifications and variations to this disclosure without departing from its spirit and scope. Therefore, if such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, this disclosure is also intended to include such modifications and variations.
Claims
1. A parking method based on parking space calibration, characterized by, The method comprises the following steps: determining a parking line and an external object based on image recognition; determining the coordinates of the parking line according to the coordinates of the vehicle; planning a moving path based on the coordinates of the vehicle and the coordinates of the parking line; parking according to the planned moving path; determining the parking line based on image recognition, which comprises the following steps: collecting panoramic images of the vehicle and the external environment; performing grayscale processing and image edge detection on the panoramic images; detecting straight lines of the image after the image edge detection to determine the parking line; performing image edge detection on the panoramic images, which comprises the following steps: smoothing the grayscale panoramic images through Gaussian filtering; calculating the amplitude and direction of the image gradient according to the first-order finite difference, and performing non-maximum suppression on the gradient amplitude of the image gradient; detecting the connected edges of the image based on the image gradient information; detecting straight lines of the image after the image edge detection to determine the parking line, which comprises the following steps: performing binarization on the image after the edge detection; obtaining line segments in the binarized image through Hough straight line detection; obtaining a plurality of groups of line segments corresponding to the line segments in the binarized image through affine transformation, and performing fusion processing on each group of line segments; determining the parking line in the image according to the obtained fused line segments.
2. The parking method based on a parking space calibration according to claim 1, characterized in that, determining the external object based on image recognition, which comprises the following steps: dividing the panoramic images into a plurality of pixel rectangular blocks; calculating the gradient direction and gradient intensity of each pixel in each pixel rectangular block; dividing the panoramic images into a plurality of channels based on the same angle, and performing weighted statistics on the gradient direction of each pixel to obtain the Hog feature of the panoramic images; detecting the external object through the SVM support vector machine based on the Hog feature.
3. The parking method based on a parking space calibration according to claim 1, wherein, When parking according to the planned moving path, it further comprises the following step: determining whether there is an obstruction in the parking direction based on the ultrasonic radar arranged on the vehicle.
4. The parking method based on a parking space calibration according to claim 3, characterized in that, When determining whether there is an obstruction in the parking direction through the ultrasonic radar, it further comprises the following step: obtaining the external temperature through the temperature acquisition module of the vehicle, and correcting the ultrasonic ranging result.
5. A parking system based on parking space calibration, characterized in that, The method comprises the following steps: an image recognition module for determining a parking line and an external object based on image recognition; a coordinate determination module for determining the coordinates of the parking line according to the coordinates of the vehicle; a path planning module for planning a moving path based on the coordinates of the vehicle and the coordinates of the parking line; a parking control module for parking according to the planned moving path; the method executed by the image recognition module for determining a parking line based on image recognition, which comprises the following steps: collecting panoramic images of the vehicle and the external environment; performing grayscale processing and image edge detection on the panoramic images; detecting straight lines of the image after the image edge detection to determine the parking line; the method executed by the image recognition module for performing image edge detection on the panoramic images, which comprises the following steps: smoothing the grayscale panoramic images through Gaussian filtering; calculating the amplitude and direction of the image gradient according to the first-order finite difference, and performing non-maximum suppression on the gradient amplitude of the image gradient; detecting the connected edges of the image based on the image gradient information; the method executed by the image recognition module for detecting straight lines of the image after the image edge detection to determine the parking line, which comprises the following steps: performing binarization on the image after the edge detection; obtaining line segments in the binarized image through Hough straight line detection; Obtaining several groups of line segments corresponding to the line segments in the binarized image through affine transformation, and performing fusion processing on each group of line segments; Determining the parking line in the image according to the obtained fused line segments.
6. A computer readable storage medium characterized by, The computer readable storage medium stores a computer program or instructions, and the computer program or instructions are executed by the processor to at least implement the method in any one of claims 1-4.
7. A vehicle characterized by comprising: The vehicle is provided with the parking system based on parking space calibration as claimed in claim 5. The vehicle is provided with the parking system based on parking space calibration as claimed in claim 5.
Citation Information
Patent Citations
Parking system and parking method
CN114454872A
KR20240027911A