Parking space detection method and device, electronic equipment, storage medium and vehicle
By performing feature image fusion processing on the bird's-eye view captured by the surround-view camera in the parking space detection method, the problem of large parking space detection errors caused by severe distortion is solved and the accuracy of parking space detection is improved.
Patent Information
- Application Number
- CN202310226277.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2024-09-03
AI Technical Summary
Due to the severe distortion of the environmental image collected by the surround-view camera in the existing parking space detection method, there is less effective feature information in the bird's-eye view, resulting in large feature extraction errors during the parking space detection process, which leads to problems of missed detection and false detection.
By obtaining the bird's-eye view feature image of the current moment and the historical moment for fusion processing, the target feature image is obtained, so that parking space detection can be performed based on the image. Specific steps include obtaining initial images collected by multiple surround-view cameras, splicing them into a bird's-eye view, calculating the vehicle's orientation angle difference and pixel distance, performing rotation and translation processing on the characteristic images at historical moments, and merging them into target characteristic images, and then analyzing the parking space. detection.
By fusing the feature images of the current moment and the historical moment, the obtained target feature image contains more comprehensive and realistic feature information, which improves the accuracy of parking space detection and reduces the occurrence of missed detections and false detections.
Smart Images

Figure CN118587666A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of smart cars, and in particular to a parking space detection method, device, electronic equipment, storage medium and vehicle. Background Art
[0002] In the field of smart cars, the development of parking space detection technology has promoted the widespread application of automatic parking technology in the field of assisted driving. The existing parking space detection method first collects environmental images around the vehicle body through the surround view camera installed on the vehicle, and then uses these environmental images to generate a bird's eye view (Bird's Eye View, BEV) of the vehicle's surrounding environment, and then performs parking space detection based on the bird's eye view. However, the environmental images collected by the surround view camera are severely distorted, which results in less effective feature information in the bird's eye view, resulting in large errors in the feature information extracted during the parking space detection process, poor feature extraction effect, and thus missed detection and false detection of parking spaces; therefore, how to more accurately detect parking spaces from the bird's eye view has become an urgent problem to be solved. Summary of the invention
[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a parking space detection method, device, electronic device, storage medium and vehicle, which can improve the accuracy of parking space detection.
[0004] In order to achieve the above objectives, the technical solutions provided by the embodiments of the present disclosure are as follows:
[0005] In a first aspect, the present disclosure provides a parking space detection method, the method comprising:
[0006] Obtaining a bird's-eye view of the surroundings of the vehicle body at the current moment, and performing feature extraction on the bird's-eye view to obtain a first feature image;
[0007] Obtaining a second feature image corresponding to the periphery of the vehicle body at a historical moment;
[0008] The first feature image and the second feature image are fused to obtain a target feature image, so as to perform parking space detection based on the target feature image.
[0009] As an optional implementation of the embodiment of the present disclosure,
[0010] As an optional implementation of the embodiment of the present disclosure, obtaining a bird's-eye view of the surroundings of the vehicle body at the current moment includes:
[0011] Obtain the initial images collected by multiple surround view cameras at the current moment;
[0012] Get the camera intrinsic parameters and camera extrinsic parameters of multiple surround view cameras;
[0013] According to the camera intrinsic parameters and camera extrinsic parameters, the initial images are stitched together to obtain a bird's-eye view.
[0014] As an optional implementation of the embodiment of the present disclosure, a fusion process is performed on the first feature image and the second feature image to obtain a target feature image, including:
[0015] Get the vehicle's orientation angle difference and pixel distance from the historical moment to the current moment in the global coordinate system;
[0016] Rotate and translate the second feature image according to the orientation angle difference and the pixel distance;
[0017] The second feature image after rotation and translation is fused with the first feature image to obtain the target feature image.
[0018] As an optional implementation of the embodiment of the present disclosure, obtaining the orientation angle difference and pixel distance of the vehicle from the historical moment to the current moment in the global coordinate system includes:
[0019] In the world coordinate system, obtain the first orientation angle and the first position of the vehicle at the current moment, and the second orientation angle and the second position at the historical moment;
[0020] Calculating the heading angle difference between the first heading angle and the second heading angle in the global coordinate system, and calculating the actual moving distance from the second position to the first position;
[0021] Obtain the camera intrinsic parameters and camera extrinsic parameters, and convert the actual moving distance into pixel distance based on the camera intrinsic parameters and camera extrinsic parameters.
[0022] As an optional implementation of the embodiment of the present disclosure, the second feature image is rotated and translated according to the orientation angle difference and the pixel distance, including:
[0023] Rotate the second feature image according to the orientation angle difference;
[0024] Get the scale parameter, and calculate the translation distance based on the pixel distance and the scale parameter;
[0025] The rotated second feature image is translated according to the translation distance.
[0026] As an optional implementation of the embodiment of the present disclosure, the second feature image after rotation and translation is fused with the first feature image to obtain a target feature image, including:
[0027] Splicing the rotated and translated second feature image with the first feature image to obtain a feature splicing image;
[0028] Traverse each pixel of the feature stitching image and calculate the pixel mean of the feature stitching image to obtain the target feature image.
[0029] As an optional implementation of the embodiment of the present disclosure, performing parking space detection based on the target feature image includes:
[0030] Input the target feature image into the parking space detection model to obtain a parking space feature map output by the parking space detection model;
[0031] The parking space feature map includes at least one of a parking space category feature map, a parking space center point feature map and a parking space corner point regression feature map.
[0032] In a second aspect, the present disclosure provides a parking space detection device, the device comprising:
[0033] An acquisition module is used to acquire a bird's-eye view of the surroundings of the vehicle body at the current moment, and extract features from the bird's-eye view to obtain a first feature image; and acquire a second feature image corresponding to the surroundings of the vehicle body at a historical moment;
[0034] The processing module is used to perform fusion processing on the first feature image and the second feature image to obtain a target feature image, so as to perform parking space detection based on the target feature image.
[0035] As an optional implementation of the embodiment of the present disclosure, the acquisition module acquires a bird's-eye view of the surroundings of the vehicle body at the current moment, specifically for:
[0036] Obtain the initial images collected by multiple surround view cameras at the current moment;
[0037] Get the camera intrinsic parameters and camera extrinsic parameters of multiple surround view cameras;
[0038] According to the camera intrinsic parameters and camera extrinsic parameters, the initial images are stitched together to obtain a bird's-eye view.
[0039] As an optional implementation of the embodiment of the present disclosure, the processing module is specifically used to obtain the orientation angle difference and pixel distance of the vehicle moving from the historical moment to the current moment in the global coordinate system;
[0040] Rotate and translate the second feature image according to the orientation angle difference and the pixel distance;
[0041] The second feature image after rotation and translation is fused with the first feature image to obtain the target feature image.
[0042] As an optional implementation of the embodiment of the present disclosure, the processing module obtains the orientation angle difference and pixel distance of the vehicle from the historical moment to the current moment in the global coordinate system, specifically for:
[0043] In the world coordinate system, obtain the first orientation angle and the first position of the vehicle at the current moment, and the second orientation angle and the second position at the historical moment;
[0044] Calculating the heading angle difference between the first heading angle and the second heading angle in the global coordinate system, and calculating the actual moving distance from the second position to the first position;
[0045] Obtain the camera intrinsic parameters and camera extrinsic parameters, and convert the actual moving distance into pixel distance based on the camera intrinsic parameters and camera extrinsic parameters.
[0046] As an optional implementation of the embodiment of the present disclosure, the processing module rotates and translates the second feature image according to the orientation angle difference and the pixel distance, specifically for:
[0047] Rotate the second feature image according to the orientation angle difference;
[0048] Get the scale parameter, and calculate the translation distance based on the pixel distance and the scale parameter;
[0049] The rotated second feature image is translated according to the translation distance.
[0050] As an optional implementation of the embodiment of the present disclosure, the processing module fuses the rotated and translated second feature image with the first feature image to obtain a target feature image, which is specifically used to:
[0051] Splicing the rotated and translated second feature image with the first feature image to obtain a feature splicing image;
[0052] Traverse each pixel of the feature stitching image and calculate the pixel mean of the feature stitching image to obtain the target feature image.
[0053] As an optional implementation of the embodiment of the present disclosure, the processing module performs parking space detection based on the target feature image, specifically for:
[0054] Input the target feature image into the parking space detection model to obtain a parking space feature map output by the parking space detection model;
[0055] The parking space feature map includes at least one of a parking space category feature map, a parking space center point feature map and a parking space corner point regression feature map.
[0056] In a third aspect, the present disclosure provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the parking space detection method as described in the first aspect or any optional embodiment thereof.
[0057] In a fourth aspect, a computer-readable storage medium is provided, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the parking space detection method as described in the first aspect or any optional embodiment thereof is implemented.
[0058] In a fifth aspect, a vehicle is provided, the vehicle comprising a parking space detection device as described in the second aspect, or an electronic device as described in the third aspect. The vehicle is used to execute the parking space detection method provided in any embodiment of the present disclosure.
[0059] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0060] The disclosed embodiments provide a parking space detection method, device, electronic device, storage medium and vehicle, wherein the parking space detection method first obtains a bird's-eye view of the surroundings of the vehicle body at the current moment, then performs feature extraction on the bird's-eye view to obtain a first feature image, then obtains a second feature image corresponding to the surroundings of the vehicle body at a historical moment, fuses the first feature image and the second feature image to obtain a target feature image, thereby combining the first feature image at the current moment with the second feature image at the historical moment, so that the features contained in the target feature image are more comprehensive and real, and then accurate parking space detection can be performed based on the target feature image, thereby improving the accuracy of parking space detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0063] Figure 1 This is a flow chart of a parking space detection method according to an embodiment of the present disclosure;
[0064] Figure 2 A schematic diagram of the positional relationship between a vehicle and a surround-view camera provided in an embodiment of the present disclosure;
[0065] Figure 3 A structural diagram of a parking space detection device according to an embodiment of the present disclosure;
[0066] Figure 4 This is a structural diagram of an electronic device described in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0067] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0068] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0069] At present, when detecting parking spaces, the surround view camera installed on the vehicle first collects environmental images around the vehicle body, and then uses these environmental images to generate a bird's-eye view of the vehicle's surrounding environment, and then performs parking space detection based on a single-frame bird's-eye view. However, the images collected by the surround view camera are severely distorted. The image information in the central area of the bird's-eye view obtained after splicing is true, while the image information in the surrounding areas has a large error compared to the actual situation, which makes the feature information obtained during feature extraction for parking space detection have a large error, and the feature extraction effect is poor, which leads to missed detection and false detection of parking spaces. Therefore, how to perform more accurate parking space detection from the bird's-eye view has become an urgent problem to be solved.
[0070] To solve the above technical problems, the embodiments of the present disclosure provide a parking space detection method, device, electronic device, storage medium and vehicle, wherein the parking space detection method first obtains a bird's-eye view of the surroundings of the vehicle body at the current moment, and performs feature extraction on the bird's-eye view to obtain a first feature image, and then obtains a second feature image corresponding to the surroundings of the vehicle body at a historical moment, and then performs fusion processing on the first feature image and the second feature image to obtain a target feature image, so as to perform parking space detection based on the target feature image, thereby combining the feature images corresponding to the current moment and the historical moment, and the feature information contained in the obtained target feature image is more comprehensive and true, which is conducive to further extracting the effective feature information required for parking space detection, thereby improving the accuracy of parking space detection.
[0071] A parking space detection method provided in an embodiment of the present disclosure can be applied to a vehicle terminal. The operating system of the vehicle terminal may include Android, a mobile operating system (iOS) developed by Apple, an operating system (Windows) developed by Microsoft Corporation, etc., and the embodiment of the present disclosure is not limited to this.
[0072] It should be noted that the protection scope of the parking space detection method described in the embodiment of the present disclosure is not limited to the execution order of the steps listed in this embodiment, and all solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present disclosure are included in the protection scope of the present disclosure.
[0073] like Figure 1 As shown, Figure 1 This is a flow chart of a parking space detection method according to an embodiment of the present disclosure, the method comprising the following S101 to S103:
[0074] S101, obtaining a bird's-eye view of the surroundings of the vehicle body at the current moment, and performing feature extraction on the bird's-eye view to obtain a first feature image.
[0075] Among them, the bird's-eye view around the vehicle body at the current moment reflects the surrounding environment of the vehicle.
[0076] like Figure 2 As shown, Figure 2 The present invention provides a schematic diagram of the positional relationship between a vehicle and a surround-view camera according to an embodiment of the present invention, wherein a vehicle 200 and a plurality of surround-view cameras are respectively installed at the front, rear, left and right of the vehicle, wherein the plurality of surround-view cameras include a first surround-view camera 201, a second surround-view camera 202, a third surround-view camera 203 and a fourth surround-view camera 204, wherein the first surround-view camera 201 is the front surround-view camera of the vehicle 200, the second surround-view camera 202 is the right surround-view camera of the vehicle 200, the third surround-view camera 203 is the rear surround-view camera of the vehicle 200, and the fourth surround-view camera 204 is the left surround-view camera of the vehicle 200; it should be noted that the number and positions of the surround-view cameras are only exemplified herein, and the number and positions of the surround-view cameras are not limited thereto, for example, the number of surround-view cameras may also be 6, which are respectively arranged at the left front, right front, left middle, right middle, left rear, right rear, etc. of the vehicle; as long as a bird's-eye view of the vehicle body can be formed.
[0077] In some embodiments, the present disclosure obtains a bird's-eye view of the surroundings of the vehicle body at the current moment through the following steps: first, the initial images captured by multiple surround-view cameras at the current moment are obtained, and the camera intrinsic parameters and camera extrinsic parameters of the multiple surround-view cameras are obtained, and then the initial images captured by the multiple surround-view cameras are spliced according to the camera intrinsic parameters and camera extrinsic parameters to obtain a bird's-eye view. Among them, the camera intrinsic parameters are parameters related to the camera's own characteristics, such as the camera's focal length, pixel size, etc.; the camera extrinsic parameters are parameters in the world coordinate system, such as the camera's position, rotation direction, etc.
[0078] Specifically, refer to Figure 2 As shown, at the current moment, the first surround-view camera 201, the second surround-view camera 202, the third surround-view camera 203 and the fourth surround-view camera 204 on the vehicle 200 simultaneously acquire images to obtain initial images in the four directions of front, back, left and right of the vehicle 200, and then based on the camera intrinsic parameters and camera extrinsic parameters of the above-mentioned multiple surround-view cameras, the initial images in the four directions of front, back, left and right are spliced to obtain a bird's-eye view of the surroundings of the vehicle body at the current moment, wherein the splicing process can be completed using existing methods, such as using the LSS (Lift, Splat, Shoot) algorithm for splicing.
[0079] After obtaining a bird's-eye view of the vehicle body at the current moment, feature extraction is performed on the bird's-eye view to obtain a first feature image. The first feature image is an image with image feature information, including but not limited to parking space feature information, and the data format of the image feature information can be an array format or a matrix format. In the disclosed embodiment, the feature extraction method is not specifically limited, and feature extraction can be performed using a convolutional neural network (CNN).
[0080] S102: Obtain a second feature image corresponding to the periphery of the vehicle body at a historical moment.
[0081] The historical moment is a moment in a preset time period before the current moment. If the current moment is moment t, the historical moment is the previous moment t-1, t-2, etc. The preset time period is a pre-set time period based on the actual demand for vehicle entry.
[0082] The second feature image is obtained at the historical moment after alignment, splicing and fusion based on the feature images at the historical moment and before the historical moment.
[0083] The second characteristic image corresponding to the surroundings of the vehicle body at a historical moment is obtained, which can be the second characteristic image of a certain historical moment, or the second characteristic images of multiple historical moments, that is, the present disclosure does not specifically limit the number of second characteristic images. Optionally, the embodiment of the present disclosure obtains the second characteristic image corresponding to the surroundings of the vehicle body at the previous moment. Image processing is performed on two consecutive frames of images, so that the characteristic information is effectively supplemented.
[0084] S103: performing fusion processing on the first feature image and the second feature image to obtain a target feature image, so as to perform parking space detection based on the target feature image.
[0085] The process of fusing the first feature image and the second feature image to obtain the target feature image includes the following steps S1031 to S1033:
[0086] S1031. Obtain the orientation angle difference and pixel distance of the vehicle from the historical moment to the current moment in the global coordinate system.
[0087] Among them, the global coordinate system is the ego-vehicle odom coordinate system, the origin of this coordinate system is the starting position of the vehicle, the global coordinate system, or the origin of the global coordinate system will not move with the movement of the vehicle.
[0088] In the scene of vehicle storage, the vehicle is in a moving state, starting from a historical moment and moving to a position corresponding to the current moment. In some embodiments, first, in the world coordinate system, the first orientation and first position of the vehicle at the current moment, as well as the second orientation and second position of the vehicle at the historical moment are obtained, and then the orientation angle difference α between the first orientation angle and the second orientation angle is calculated in the global coordinate system, and the actual moving distance from the second position to the first position is calculated, and then the camera intrinsic parameters and camera extrinsic parameters are obtained, and the actual moving distance of the vehicle in the world coordinate system is converted into the pixel distance (pix) in the global coordinate system according to the camera intrinsic parameters and camera extrinsic parameters. Thus, the characteristic information change of the surrounding environment of the vehicle body in the characteristic image is obtained based on the actual position change of the vehicle.
[0089] S1032: Rotate and translate the second feature image according to the orientation angle difference and the pixel distance.
[0090] In some embodiments, the second feature image at the historical moment is rotated according to the orientation angle difference α, and then the scale parameter (scale) is obtained, and the translation distance is calculated according to the pixel distance and the scale parameter. The translation distance (trans) is calculated according to the following formula (1):
[0091]
[0092] Furthermore, the second feature image rotated by α degrees is translated according to the translation distance trans.
[0093] The second feature image at the historical moment is rotated and translated based on the actual position change of the vehicle, so as to be aligned with the first feature image and the second feature image at the current moment, so as to facilitate subsequent feature fusion.
[0094] S1033: Fusing the rotated and translated second feature image with the first feature image to obtain a target feature image.
[0095] In some embodiments, the second feature image and the first feature image after rotation and translation are first spliced to obtain a feature spliced image, and then each pixel of the feature spliced image is traversed to calculate the pixel mean of the feature spliced image. The pixel mean reflects the image features, and then a target feature image is obtained. The second feature image and the first feature image after image alignment are feature fused. The obtained target feature image contains real and comprehensive image feature information, so that more and more effective image feature information is extracted during parking space detection, thereby improving the accuracy of parking space detection.
[0096] In some embodiments, the target feature image is stored corresponding to the current moment, and is used as the feature image of the historical moment in the subsequent process for feature alignment, feature splicing and feature fusion, which can achieve feature extraction based on multi-frame feature images and improve the effect of feature extraction.
[0097] In the disclosed embodiment, considering the movement of the vehicle, the bird's-eye view captured by the surround-view camera at a certain moment is distorted, so that the feature information contained in other areas of the feature image at that moment except the central area, especially the four corners of the feature image, has a large error. The feature information contained in the feature images obtained at multiple moments changes with the movement of the vehicle. Therefore, based on the change of the vehicle position, the feature images at multiple moments are fused. The obtained target feature image combines the feature information corresponding to multiple moments, and the feature information is more real and comprehensive. Therefore, when further feature extraction is performed during parking space detection, the effect of feature extraction is improved, and the accuracy of parking space detection is further improved.
[0098] In some embodiments, after obtaining the target feature image, the disclosed embodiments perform parking space detection based on the target feature image: first, the target feature image is input into the parking space detection model to obtain a parking space feature map output by the parking space detection model, wherein the parking space detection model is a pre-trained model based on a convolutional neural network. The parking space feature map includes at least one of the following: a parking space category feature map, a parking space center point feature map, and a parking space corner point regression feature map. The parking space category feature map marks the detected parking space category, the parking space centerline feature map marks the parking space center, and the parking space corner point regression feature map marks the parking space corner points. The target feature image contains comprehensive, true and effective parking space feature information, so that accurate parking space detection can be performed using the target feature image.
[0099] In the disclosed embodiment, multiple target feature images can be obtained through the above steps S101 to S103, and the target feature images can be used as training samples to train a parking space detection model. The process of training the parking space detection model is as follows:
[0100] Step 1: Based on the above steps S101 to S103, multiple target feature images are acquired and the multiple target feature images are labeled.
[0101] The annotated content includes: at least one of the parking space category, the parking space center point, and the parking space corner point. The annotated multiple target feature images are used as the true value in the model training process.
[0102] Step 2: Build a pre-trained model based on convolutional neural network.
[0103] Step 3: Use multiple target feature images as input of the pre-trained model to obtain the predicted value output by the pre-trained model.
[0104] The predicted value includes at least one of a predicted parking space category feature map, a predicted parking space center point feature map, and a predicted parking space corner point regression feature map.
[0105] Step 4: Based on the preset loss function, calculate the loss function value between the predicted value and the true value.
[0106] When the loss function value is greater than the preset loss function value, the model parameters of the pre-trained model are adjusted through feedback, and steps 3 to 4 are re-executed until the loss function value is less than or equal to the preset loss function value.
[0107] Step 5: When the loss function value is less than or equal to the preset loss function value, the pre-trained model converges, and the converged pre-trained model is used as the parking space detection model.
[0108] The above steps use the target feature image to train the parking space detection model, so that when detecting the parking space, the trained parking space detection model can be used to accurately obtain the parking space feature map, thereby realizing accurate recognition of at least one of the parking space category, parking space center point and parking space corner point, thereby improving the accuracy of parking space detection.
[0109] In some embodiments, after the parking space is detected to obtain a parking space characteristic map, a parking strategy is planned according to the parking space characteristic map and the first position of the vehicle at the current moment to control the vehicle to park in accordance with the parking strategy, thereby achieving automatic parking.
[0110] In summary, the disclosed embodiment provides a parking space detection method, firstly, a bird's-eye view of the surroundings of the vehicle body at the current moment is obtained, and features are extracted from the bird's-eye view to obtain a first feature image, and then a second feature image corresponding to the surroundings of the vehicle body at the historical moment is obtained. The second feature image corresponding to the surroundings of the vehicle body at the historical moment is a feature image obtained by the method provided by the present solution, and the second feature image has reduced the influence of image distortion on image feature information, and then the first feature image and the second feature image are fused to obtain a target feature image, so as to perform parking space detection based on the target feature image, thereby combining the feature images corresponding to the current moment and the historical moment. Different from the existing solution of performing parking space detection using a single-frame bird's-eye view with large image feature information errors, the target feature image obtained by the disclosed embodiment contains more comprehensive and true feature information, which is conducive to further extracting effective feature information required for parking space detection, thereby improving the accuracy of parking space detection.
[0111] like Figure 3 As shown, Figure 3 This is a structural diagram of a parking space detection device according to an embodiment of the present disclosure, the device comprising:
[0112] The acquisition module 301 is used to acquire a bird's-eye view of the surroundings of the vehicle body at the current moment, and extract features from the bird's-eye view to obtain a first feature image; and acquire a second feature image corresponding to the surroundings of the vehicle body at a historical moment;
[0113] The processing module 302 is used to perform fusion processing on the first feature image and the second feature image to obtain a target feature image, so as to perform parking space detection based on the target feature image.
[0114] In some embodiments, the acquisition module 301 obtains a bird's-eye view of the surroundings of the vehicle body at the current moment, and is specifically used to: obtain initial images captured by multiple surround-view cameras at the current moment; obtain camera intrinsic parameters and camera extrinsic parameters of multiple surround-view cameras; and splice the initial images to obtain a bird's-eye view based on the camera intrinsic parameters and camera extrinsic parameters.
[0115] In some embodiments, the processing module 302 is specifically used to obtain the orientation angle difference and pixel distance of the vehicle from a historical moment to a current moment in the global coordinate system; rotate and translate the second feature image according to the orientation angle difference and the pixel distance; and fuse the rotated and translated second feature image with the first feature image to obtain a target feature image.
[0116] In some embodiments, the processing module 302 obtains the orientation angle difference and pixel distance of the vehicle from a historical moment to a current moment in a global coordinate system, and is specifically used to: obtain the first orientation angle and first position of the vehicle at the current moment, and the second orientation angle and second position at the historical moment in a world coordinate system; calculate the orientation angle difference between the first orientation angle and the second orientation angle in the global coordinate system, and calculate the actual moving distance from the second position to the first position; obtain camera intrinsic parameters and camera extrinsic parameters, and convert the actual moving distance into pixel distance based on the camera intrinsic parameters and camera extrinsic parameters.
[0117] In some embodiments, the processing module 302 rotates and translates the second feature image according to the orientation angle difference and the pixel distance, and is specifically used to: rotate the second feature image according to the orientation angle difference; obtain a scale parameter, and calculate a translation distance according to the pixel distance and the scale parameter; and translate the rotated second feature image according to the translation distance.
[0118] In some embodiments, the processing module 302 fuses the rotated and translated second feature image with the first feature image to obtain a target feature image, and is specifically used to: splice the rotated and translated second feature image with the first feature image to obtain a feature splicing image; traverse each pixel of the feature splicing image, and calculate the pixel mean of the feature splicing image to obtain the target feature image.
[0119] In some embodiments, the processing module 302 performs parking space detection based on the target feature image, specifically for: inputting the target feature image into a parking space detection model to obtain a parking space feature map output by the parking space detection model;
[0120] The parking space feature map includes at least one of a parking space category feature map, a parking space center point feature map and a parking space corner point regression feature map.
[0121] In summary, the disclosed embodiments provide a parking space detection device, which first obtains a bird's-eye view of the surroundings of a vehicle body at the current moment by an acquisition module, and performs feature extraction on the bird's-eye view to obtain a first feature image, and then obtains a second feature image corresponding to the surroundings of the vehicle body at a historical moment, and then the processing module performs fusion processing on the first feature image and the second feature image to obtain a target feature image, so as to perform parking space detection based on the target feature image, thereby combining the feature images corresponding to the current moment and the historical moment, and the feature information contained in the obtained target feature image is more comprehensive and true, which is conducive to further extracting the effective feature information required for parking space detection, thereby improving the accuracy of parking space detection.
[0122] like Figure 4 As shown, Figure 4 This is a structural diagram of an electronic device according to an embodiment of the present disclosure. The embodiment of the present disclosure provides an electronic device, which includes: a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the computer program is executed by the processor 401, each process of the parking space detection method in the above method embodiment is implemented. And the same technical effect can be achieved, so it will not be repeated here to avoid repetition.
[0123] The embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the parking space detection method in the above method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0124] The computer readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0125] The embodiment of the present disclosure provides a vehicle, which includes the above-mentioned parking space detection device or the above-mentioned electronic device. The vehicle is used to execute the parking space detection method provided by any embodiment of the present disclosure.
[0126] An embodiment of the present disclosure provides a computer program product, which stores a computer program. When the computer program is executed by a processor, the various processes of the vehicle-based multimedia data synchronization method in the above method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0127] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0128] In several embodiments provided by the present disclosure, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0129] In the present disclosure, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0130] In the present disclosure, memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0131] In the present disclosure, computer-readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0132] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0133] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A parking space detection method, characterized in that: include: Acquire a bird's-eye view of the surroundings of the vehicle body at the current moment, and perform feature extraction on the bird's-eye view to obtain a first feature image; Obtaining a second feature image corresponding to the periphery of the vehicle body at a historical moment; The first feature image and the second feature image are fused to obtain a target feature image, so as to perform parking space detection based on the target feature image.
2. The method according to claim 1, characterized in that The step of obtaining a bird's-eye view of the surrounding area of the vehicle body at the current moment includes: Acquire initial images collected by multiple surround view cameras at the current moment; Obtaining camera intrinsic parameters and camera extrinsic parameters of the multiple surround view cameras; The initial images are stitched together according to the camera intrinsic parameters and the camera extrinsic parameters to obtain the bird's-eye view.
3. The method according to claim 1, characterized in that The performing fusion processing on the first feature image and the second feature image to obtain a target feature image includes: Obtaining the orientation angle difference and pixel distance of the vehicle from the historical moment to the current moment in the global coordinate system; Rotate and translate the second feature image according to the orientation angle difference and the pixel distance; The second feature image after rotation and translation is fused with the first feature image to obtain a target feature image.
4. The method according to claim 3, characterized in that The step of obtaining the orientation angle difference and pixel distance of the vehicle from the historical moment to the current moment in the global coordinate system includes: In the world coordinate system, obtaining a first orientation angle and a first position of the vehicle at the current moment, and a second orientation angle and a second position of the vehicle at the historical moment; Calculating the orientation angle difference between the first orientation angle and the second orientation angle in the global coordinate system, and calculating an actual moving distance from the second position to the first position; A camera intrinsic parameter and a camera extrinsic parameter are obtained, and the actual moving distance is converted into the pixel distance according to the camera intrinsic parameter and the camera extrinsic parameter.
5. The method according to claim 3, characterized in that: The rotating and translating processing of the second feature image according to the orientation angle difference and the pixel distance includes: Rotate the second feature image according to the orientation angle difference; Acquire a scale parameter, and calculate a translation distance according to the pixel distance and the scale parameter; The rotated second feature image is translated according to the translation distance.
6. The method according to claim 3, characterized in that The step of fusing the rotated and translated second feature image with the first feature image to obtain a target feature image includes: Splicing the rotated and translated second feature image with the first feature image to obtain a feature splicing image; Each pixel of the feature stitching image is traversed, and a pixel mean of the feature stitching image is calculated to obtain the target feature image.
7. The method according to claim 1, characterized in that The parking space detection based on the target feature image includes: Inputting the target feature image into a parking space detection model to obtain a parking space feature map output by the parking space detection model; The parking space feature map includes at least one of a parking space category feature map, a parking space center point feature map and a parking space corner point regression feature map.
8. A parking space detection device, characterized in that: include: An acquisition module is used to acquire a bird's-eye view of the surroundings of the vehicle body at the current moment, and extract features from the bird's-eye view to obtain a first feature image; and acquire a second feature image corresponding to the surroundings of the vehicle body at a historical moment; The processing module is used to perform fusion processing on the first feature image and the second feature image to obtain a target feature image, so as to perform parking space detection based on the target feature image.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the parking space detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the parking space detection method according to any one of claims 1 to 7 is implemented.
11. A vehicle, characterized in that: include: A parking space detection device as claimed in claim 8, or an electronic device as claimed in claim 10.
