Parking space screening method, vehicle, storage medium and product
By using the target reference grayscale value of the driving environment image in the automatic parking system to mark the parking space in the dim scene as non-optional, the safety risk problem of traditional parking solutions in the dim scene is solved and the safety of automatic parking is improved.
Patent Information
- Application Number
- CN202411705757.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-07
AI Technical Summary
Traditional parking solutions have high safety risks in dim scenarios, which may lead to problems such as collisions and abnormal brake stops.
By acquiring the vehicle's driving environment image, the target reference gray value is generated based on the gray value of the pixel points in the travelable area. If the target reference gray value is less than the preset dim brightness threshold, the parking space is marked as a non-selectable parking space.
It effectively reduces the risk of a vehicle choosing a parking space in a dim scene when parking automatically, avoids sudden brakes caused by collisions and misdetecting obstacles, and improves the safety of automatic parking.
Smart Images

Figure CN119580223A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a parking space screening method, vehicle, storage medium and product. Background Art
[0002] At present, safety is the top priority in the implementation of autonomous driving. Autonomous driving mainly uses cameras or lidar as terminal hardware, and the corresponding visual perception and laser perception results are used as downstream inputs to perform prediction, planning, and control. APA (Automatic Parking Assist) and HPA (HillStart Assist) are the current mainstream application directions of autonomous driving, and visual perception plays an important role. The accuracy of visual perception depends on light intensity. In particular, for dim scenes such as no lights at night, visual perception may have serious misdetections. For parking scenes, missed detections and misdetections may lead to collisions and abnormal braking, which may cause safety risks.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of this application is to provide a parking space screening method, vehicle, storage medium and product, aiming to solve the technical problem that traditional parking solutions have high safety risks.
[0005] To achieve the above purpose, the present application proposes a method for selecting a parking space, which comprises the following steps:
[0006] Acquire a driving environment image of the vehicle, and generate a target reference grayscale value of the driving environment image based on the grayscale values of pixels in a drivable area of the driving environment image;
[0007] When the target reference grayscale value is less than a preset dim brightness threshold, the parking space in the driving environment image is marked as a non-selectable parking space.
[0008] Optionally, the step of generating a target reference grayscale value of the driving environment image based on the grayscale values of pixels in the drivable area of the driving environment image comprises:
[0009] Counting the grayscale values of the pixels in the drivable area of the driving environment image, and calculating the actual reference grayscale value of the driving environment image;
[0010] A smoothing process is performed based on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image, wherein the historical reference grayscale value is determined by a previous driving environment image.
[0011] Optionally, the step of counting the grayscale values of pixels in the drivable area of the driving environment image to calculate an actual reference grayscale value of the driving environment image comprises:
[0012] Counting the grayscale values of the pixels in the drivable area of the driving environment image by means of interlaced sampling;
[0013] The average value of the grayscale values obtained is used as the actual reference grayscale value of the driving environment image.
[0014] Optionally, the step of performing smoothing processing based on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image includes:
[0015] Based on a first weight of the actual reference grayscale value and a second weight of the historical reference grayscale value, weighted summing and smoothing processing are performed on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image, wherein the first weight is less than the second weight.
[0016] Optionally, after the step of generating a target reference grayscale value of the driving environment image based on the grayscale values of the pixels of the drivable area in the driving environment image, the method includes:
[0017] When the target reference grayscale value is greater than or equal to the preset dim brightness threshold, the illumination normal number is cumulatively updated once, wherein the illumination normal number will be reset when the target reference grayscale value of the next driving environment image is less than the preset dim brightness threshold;
[0018] When the illumination normal factor is greater than or equal to a preset quantity threshold, the parking spaces in the driving environment image that are not marked as non-optional parking spaces are marked as optional parking spaces.
[0019] Optionally, after the step of accumulating and updating the illumination constant once, the method further includes:
[0020] When the illumination normal factor is less than the preset quantity threshold, the step of marking the parking space in the driving environment image as a non-selectable parking space is performed.
[0021] Optionally, the parking space screening method further includes:
[0022] Inputting the driving environment image into a preset drivable area detection model to determine the drivable area in the driving environment image;
[0023] The driving environment image is input into a preset parking space detection model to determine the parking space in the driving environment image.
[0024] In addition, to achieve the above-mentioned purpose, the present application also proposes a parking space screening device, the parking space screening device comprising:
[0025] A generating module, used for acquiring a driving environment image of a vehicle, and generating a target reference grayscale value of the driving environment image based on the grayscale values of pixels of a drivable area in the driving environment image;
[0026] The marking module is used to mark the parking space in the driving environment image as a non-selectable parking space when the target reference grayscale value is less than a preset dim brightness threshold.
[0027] In addition, to achieve the above-mentioned purpose, the present application also proposes a vehicle, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the parking space screening method as described above.
[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the parking space screening method described above are implemented.
[0029] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the parking space screening method described above are implemented.
[0030] One or more technical solutions proposed in this application have at least the following technical effects:
[0031] In the embodiment of the present application, the vehicle's driving environment image is acquired, and based on the grayscale values of the pixels in the drivable area in the driving environment image, a target reference grayscale value of the driving environment image is generated; when the target reference grayscale value is less than the preset dim brightness threshold, the parking space in the driving environment image is marked as a non-optional parking space. That is, the vehicle will acquire the surrounding driving environment image, and only count the grayscale values of the pixels in the drivable area in the driving environment image to generate the target reference grayscale value of the driving environment image. It can be understood that since only the grayscale values of the pixels in the drivable area are counted when generating the target reference grayscale value, the interference of the color of the object itself in the non-drivable area on the determination of the target reference grayscale value can be reduced, thereby ensuring the accuracy and stability of the target reference grayscale value. The target reference grayscale value is then compared with the preset dim brightness threshold. If the target reference grayscale value is less than the preset dim brightness threshold, it can be determined that the vehicle is in a dim scene at this time, and the parking space determined by the driving environment image is marked as a non-selectable parking space, so that the vehicle will not choose a parking space in a dim scene for parking during automatic parking, thereby avoiding collision risks and vehicle emergency braking caused by false detection of obstacles, thereby reducing the safety risks of automatic parking of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0033] In order to more clearly illustrate the embodiments of the present application 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.
[0034] Figure 1 This is a schematic diagram of the process of the first embodiment of the method for applying for a parking space;
[0035] Figure 2 This is a statistical diagram of grayscale values in the screening method for applying for parking spaces;
[0036] Figure 3 This is a flow chart of a second embodiment of the method for applying for a parking space;
[0037] Figure 4 This is a statistical diagram of the target reference grayscale value obtained through smoothing in the screening method for parking spaces in this application;
[0038] Figure 5 This is a schematic diagram of the flow chart of the third embodiment of the method for applying for a parking space;
[0039] Figure 6 This is an overall schematic diagram of identifying dim scenes in the present method for screening parking spaces;
[0040] Figure 7 This is an overall schematic diagram of parking space screening in the present parking space screening method;
[0041] Figure 8 This is a schematic diagram of the structure corresponding to the screening device for the parking space in this application;
[0042] Fig. 9 Schematic diagram of the device structure of the hardware operating environment involved in the parking space screening method in the embodiment of the present application.
[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0046] At present, L2-L3 autonomous driving technologies such as automatic parking and high-speed NOA (Navigation on Autopilot) are rapidly becoming popular and applied, and safety is the top priority in the implementation of autonomous driving. Autonomous driving mainly uses cameras or lidar as terminal hardware, and the corresponding visual perception and laser perception results are used as downstream inputs to perform prediction, planning, and control actions. APA (Automatic Parking Assist) and HPA (Hill Start Assist) are the current mainstream application directions of autonomous driving, and visual perception plays an important role. The accuracy of visual perception depends on light intensity. In particular, for dim scenes such as no lights at night, visual perception may have serious misdetections. For parking scenes, missed detections and misdetections may lead to collisions and abnormal braking, which may cause safety risks.
[0047] The main solution of the embodiment of the present application is: obtaining a driving environment image of the vehicle, and generating a target reference grayscale value of the driving environment image based on the grayscale values of the pixels in the drivable area of the driving environment image; when the target reference grayscale value is less than a preset dim brightness threshold, marking the parking space in the driving environment image as a non-optional parking space.
[0048] That is, the vehicle will obtain the surrounding driving environment image, and only count the grayscale values of the pixels in the drivable area in the driving environment image to generate the target reference grayscale value of the driving environment image. It can be understood that since only the grayscale values of the pixels in the drivable area are counted when generating the target reference grayscale value, the interference of the color of the object itself in the non-drivable area on the determination of the target reference grayscale value can be reduced, thereby ensuring the accuracy and stability of the target reference grayscale value. Then compare the target reference grayscale value with the preset dim brightness threshold. If the target reference grayscale value is less than the preset dim brightness threshold, it can be determined that the vehicle is in a dim scene at this time, and the parking space determined by the driving environment image is marked as a non-optional parking space, so that the vehicle will not choose a parking space in a dim scene for parking when automatically parking, thereby avoiding the risk of collision and the occurrence of vehicle emergency braking caused by false detection of obstacles, thereby reducing the safety risk of automatic parking of the vehicle.
[0049] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a cloud platform, vehicle, computer, mobile phone, etc., or a vehicle that can realize the above functions.
[0050] Based on this, the present application embodiment provides a method for screening parking spaces, referring to Figure 1 , which is a flow chart of the first embodiment of the method for screening parking spaces of the present application.
[0051] In this embodiment, the parking space screening method includes steps S10 to S20:
[0052] Step S10, acquiring a driving environment image of the vehicle, and generating a target reference grayscale value of the driving environment image based on the grayscale values of the pixels in the drivable area of the driving environment image;
[0053] It should be noted that in this embodiment, the above-mentioned parking space screening method can be applied to vehicles. During the automatic parking process, the vehicle can obtain an environmental image and identify whether it is currently in a dim environment based on the environmental image, and avoid safety risks by not selecting a parking space in a dim environment.
[0054] Exemplarily, the vehicle can obtain the driving environment image, that is, the image of its surroundings, such as the BEV (Bird's Eye View) image of the vehicle, through the camera installed on its body. After obtaining the driving environment image, the drivable area in the driving environment image can be determined through the pre-set drivable area detection model, or the drivable area detection result of the APA part can be directly reused, and the drivable area refers to the area in the driving environment image that the vehicle can pass through. At the same time, the driving environment image is converted into a grayscale image to obtain the grayscale value of each pixel in the drivable area in the driving environment image, and the grayscale value of each pixel in the drivable area is counted to generate the target reference grayscale value of the driving environment image. For example, the average value of the grayscale value of each pixel in the drivable area can be directly used as the target reference grayscale value of the driving environment image. It is worth noting that the target reference grayscale value can reflect the overall grayscale value of each pixel in the drivable area, and the specific method of generating the target reference grayscale value can be set by the technician according to the above example.
[0055] It is understandable that in the embodiment of the present application, by only counting the grayscale values of the pixels in the drivable area, the interference of the objects in the environment on the determination of the target reference grayscale value can be reduced. That is, the color of the objects themselves in the non-drivable area will affect the judgment of the ambient brightness based on the grayscale value. Figure 2 , is a statistical diagram of the grayscale values of this application. As shown in the figure, after only counting the drivable area, the distribution of the grayscale values is obviously more concentrated, which can significantly reduce the mean and variance of the grayscale values, thereby ensuring the stability of the target reference grayscale value, and at the same time ensuring the stability of determining the dim scene by comparing the target reference grayscale value with the brightness threshold.
[0056] Step S20: When the target reference grayscale value is less than a preset dim brightness threshold, the parking space in the driving environment image is marked as a non-selectable parking space.
[0057] Exemplarily, after obtaining the target reference grayscale value, the target reference grayscale value is compared with a preset dim brightness threshold, wherein the preset dim brightness threshold can be set by a technician according to actual needs, that is, the preset dim brightness threshold is related to the sensitivity of dim scene judgment. When the target reference grayscale value is less than the preset dim brightness threshold, it can be determined that the vehicle is currently in a dim scene. In order to avoid the risk of collision caused by selecting a parking space in a dim scene for parking and the occurrence of sudden braking of the vehicle due to misdetection of obstacles, the parking spaces in the driving environment image that are determined to be in a dim scene will be marked as non-optional parking spaces in this application, thereby screening out high-risk parking spaces. For parking spaces marked as non-optional parking spaces, the vehicle automatic parking system will not select them for parking, reducing the risk of safety issues. In addition, the parking spaces in the above-mentioned driving environment image can also be obtained through a pre-set storage space detection model.
[0058] In this implementation, the vehicle's driving environment image will be acquired, and based on the grayscale values of the pixels in the drivable area in the driving environment image, the target reference grayscale value of the driving environment image will be generated; when the target reference grayscale value is less than the preset dim brightness threshold, the parking space in the driving environment image will be marked as a non-optional parking space. That is, the vehicle will acquire the surrounding driving environment image, and only count the grayscale values of the pixels in the drivable area in the driving environment image to generate the target reference grayscale value of the driving environment image. It can be understood that since only the grayscale values of the pixels in the drivable area are counted when generating the target reference grayscale value, the interference of the color of the object itself in the non-drivable area on the determination of the target reference grayscale value can be reduced, thereby ensuring the accuracy and stability of the target reference grayscale value. The target reference grayscale value is then compared with the preset dim brightness threshold. If the target reference grayscale value is less than the preset dim brightness threshold, it can be determined that the vehicle is in a dim scene at this time, and the parking space determined by the driving environment image is marked as a non-selectable parking space, so that the vehicle will not choose a parking space in a dim scene for parking during automatic parking, thereby avoiding collision risks and vehicle emergency braking caused by false detection of obstacles, thereby reducing the safety risks of automatic parking of the vehicle.
[0059] In a feasible implementation manner, the parking space screening method further includes steps S01 and S02:
[0060] Step S01, inputting the driving environment image into a preset drivable area detection model to determine the drivable area in the driving environment image;
[0061] Step S02: input the driving environment image into a preset parking space detection model to determine the parking space in the driving environment image.
[0062] It should be noted that the present application also includes a preset drivable area detection model and a preset storage location detection model.
[0063] Exemplarily, before generating the target reference grayscale value of the driving environment image, the driving environment image can be input into a preset drivable area detection model to identify the drivable area, thereby obtaining a mask of the driving environment image corresponding to the drivable area. The mask can be a two-dimensional matrix corresponding to the driving environment image, which marks the attributes of each pixel in the driving environment image. For example, 0 and 1 are used for marking, 0 being a non-drivable area and 1 being a drivable area. The preset drivable area detection model can be built into the APA function part of the vehicle. The preset drivable area detection model can be YOLOPv2, BiFPN, TwinLiteNet, etc. There is no specific limitation on the type of model here.
[0064] Reference Figure 3 , is a flow chart of a second embodiment proposed based on the first embodiment of the parking space screening method of the present application. The same or similar contents in this embodiment as those in the above embodiment can be referred to the above description and will not be described in detail later. The step of generating the target reference grayscale value of the driving environment image based on the grayscale value of the pixel point in the drivable area of the driving environment image includes steps S11 to S12:
[0065] Step S11, counting the grayscale values of the pixels in the drivable area of the driving environment image, and calculating the actual reference grayscale value of the driving environment image;
[0066] Step S12, performing smoothing processing based on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image, wherein the historical reference grayscale value is determined by a previous driving environment image.
[0067] Exemplarily, by counting the grayscale values of the pixels in the drivable area of the driving environment image, the average value of the grayscale values counted can be directly calculated to obtain the actual reference grayscale value of the driving environment image. Alternatively, the distribution of the grayscale values can be counted, and then the grayscale values in the middle distribution area of the grayscale value distribution can be counted to calculate the average value to obtain the actual reference grayscale value of the driving environment image.
[0068] It should be noted that in order to avoid the influence of temporary light sources on dim scene judgment in the actual environment, the calculated actual reference grayscale value will not be directly used as the target reference grayscale value to compare with the preset dim brightness threshold. Instead, the target reference grayscale value is obtained after smoothing the actual reference grayscale value and the historical reference grayscale value. The historical reference grayscale value is determined by the previous driving environment image, that is, the target reference grayscale value determined by the previous frame of driving environment image is the historical reference grayscale value corresponding to the current frame of driving environment image. It can be understood that in actual applications, temporary light sources are usually lights that are in the starting state when other vehicles pass by. At this time, the light emitted by the lights of other vehicles may illuminate the parking space in the dim scene, so that the system of the above-mentioned vehicle mistakenly believes that it is not in the dim scene at this time. In the present application, the influence of temporary light sources in the actual environment can be reduced by combining the actual reference grayscale value and the historical reference grayscale value for smoothing, thereby further ensuring the stability of the determined target reference grayscale value. Avoid the situation of flickering when the vehicle is making a dim scene judgment.
[0069] In a feasible implementation manner, the step of counting the grayscale values of the pixels in the drivable area of the driving environment image to calculate the actual reference grayscale value of the driving environment image includes steps S111 to S112:
[0070] Step S111, counting the grayscale values of the pixels in the drivable area of the driving environment image by means of interlaced sampling;
[0071] Step S112: taking the average value of the grayscale values counted as the actual reference grayscale value of the driving environment image.
[0072] Exemplarily, in the process of calculating the actual reference grayscale value of the driving environment image, the grayscale values of the pixels in the drivable area of the driving environment image can be counted by interlaced sampling. For example, if the drivable area includes ten rows of pixels, only the pixels in the first row, the third row, the fifth row, the seventh row and the ninth row can be counted, while the pixels in the second row, the fourth row, the sixth row, the eighth row and the tenth row can be discarded. Then the average value of each grayscale value is calculated and counted to obtain the actual reference grayscale value of the driving environment image. It can be understood that the interlaced sampling method can reduce the amount of calculation to obtain the actual reference grayscale value without causing too much impact on the actual reference grayscale value.
[0073] Exemplarily, in this embodiment, the calculation formula of the actual reference gray value is as follows:
[0074]
[0075] Where, N represents the number of valid pixels in the drivable area; Iw and I h Respectively represent the width and height of the drivable area, (i, j)∈m freespace (i.e., a mask of the drivable area).
[0076] In a feasible implementation manner, the step of performing smoothing based on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image includes step S121:
[0077] Step S121, based on the first weight of the actual reference grayscale value and the second weight of the historical reference grayscale value, perform weighted summing and smoothing processing on the actual reference grayscale value and the historical reference grayscale value to obtain the target reference grayscale value of the driving environment image, wherein the first weight is less than the second weight.
[0078] Exemplarily, in this embodiment, the actual reference grayscale value and the historical reference grayscale value can be set with weights respectively, that is, the weight of the actual reference grayscale value is the first weight, and the weight of the historical reference grayscale value is the second weight. Then, the actual reference grayscale value and the historical reference grayscale value are weighted and smoothed by the two determined weights to obtain the target reference grayscale value of the driving environment image. It should be noted that in actual applications, dim scenes should be stable, so the set first weight should also be smaller than the second weight. As in this embodiment, the calculation formula for weighted sum smoothing is as follows:
[0079] v=αv t-1 +(1-α)v ct
[0080] In the formula, α represents the smoothing coefficient, (1-α) is the first weight, α is the second weight, and v t-1 Respectively represent the historical reference grayscale value determined by the previous frame, v ct Indicates that the actual reference grayscale value is determined for the current frame. For example, if α is larger, it means that the weight of the historical reference grayscale value is larger and the smoothness is greater; conversely, if α is smaller, the smoothness is smaller. In this embodiment, the above α value can be set to 0.95.
[0081] As reference Figure 4 , which is a statistical diagram of the target reference grayscale value obtained through smoothing in this application. As shown in the figure, the target reference grayscale value determined by combining the historical reference grayscale value and the actual reference grayscale value of the current frame is gradually approaching and stabilizing. Therefore, in this embodiment, the smoothness of dim scene detection is optimized by introducing the historical reference grayscale value.
[0082] Reference Figure 5, is a flow chart of a third embodiment proposed based on the first embodiment and the second embodiment of the parking space screening method of the present application. In this embodiment, the same or similar contents as the above embodiments can be referred to the above introduction, and will not be repeated later. After the step of generating the target reference grayscale value of the driving environment image based on the grayscale value of the pixel point in the drivable area of the driving environment image, the method includes steps S31 to S32:
[0083] Step S31, when the target reference gray value is greater than or equal to the preset dim brightness threshold, the illumination normal number is cumulatively updated once, wherein the illumination normal number will be reset when the target reference gray value of the next driving environment image is less than the preset dim brightness threshold;
[0084] Step S32: when the illumination normal factor is greater than or equal to a preset number threshold, marking the parking spaces in the driving environment image that are not marked as non-optional parking spaces as optional parking spaces.
[0085] It should be noted that, in actual applications, if the determined target reference grayscale value is greater than or equal to the preset dim brightness threshold, it can be directly determined that the current scene the vehicle is in is not a dim scene. In this embodiment, in order to ensure the accuracy of the scene judgment result and avoid the occurrence of flickering, the judgment conditions of the normal lighting scene will be further restricted.
[0086] Exemplarily, when the target reference gray value is greater than or equal to the preset dim brightness threshold, the illumination normal number will be cumulatively updated once, that is, the illumination normal number will be increased by 1. Among them, it is worth noting that the illumination normal number will be reset to zero when the target reference gray value of the next driving environment image is less than the preset dim brightness threshold. After the illumination normal number is cumulatively updated, the illumination normal number is compared with the preset quantity threshold. If the illumination normal number is greater than the preset quantity threshold, the parking spaces in the driving environment image that are not marked as non-optional parking spaces are marked as optional parking spaces. It can be understood that if the illumination normal number is greater than the preset quantity threshold, it indicates that the vehicle has been in a bright environment for a certain period of time. Therefore, it can be determined at this time that the vehicle is in a stable bright environment. In addition, after a parking space is determined to be in a dim scene (i.e., marked as a non-optional parking space), its brightness environment is difficult to change stably in a short period of time (i.e., change from a dim environment to a stable bright environment). Therefore, in this embodiment, only the parking spaces that are not marked as non-optional parking spaces in the driving environment image are marked as optional parking spaces, thereby ensuring the stability of the parking spaces after being marked as non-optional parking spaces, avoiding the optionality of the parking spaces from changing back and forth, and affecting the parking decision of the vehicle.
[0087] In a feasible implementation manner, after the step of accumulating and updating the illumination constant once, the method further includes step S33:
[0088] Step S33, when the illumination normal factor is less than the preset quantity threshold, executing the step of marking the parking space in the driving environment image as a non-selectable parking space.
[0089] Exemplarily, after the cumulative update of the illumination normal number, if the illumination normal number is less than the above-mentioned preset number threshold, the step of marking the parking space in the driving environment image as a non-selectable parking space can be returned to. That is, when the illumination normal number is less than the above-mentioned preset number threshold, even if the target reference grayscale value is greater than or equal to the preset dim brightness threshold, the scene where the vehicle is located is still regarded as a dim scene, thereby ensuring the stability of identifying dim scenes, and at the same time, the parking space in the driving environment image at this time is marked as a non-selectable parking space.
[0090] Reference Figure 6 , which is an overall schematic diagram of identifying dim scenes in this application. As shown in the figure, the BEV image is the driving environment image of the vehicle. The BEV image will be input into the drivable area detection model to obtain the drivable area mask, that is, the mask of the drivable area; the BEV image is gray-converted to obtain a gray-scale image, and the average gray-scale value of the pixel points in the drivable area in the corresponding statistical gray-scale image (that is, the actual reference gray-scale value) is calculated, and then the average gray-scale value and the historical gray-scale value (that is, the historical reference gray-scale value) are combined to perform weighted summing and smoothing processing (as shown in the figure, the first weight is 1-0.95, and the second weight is 0.95) to obtain the target reference gray-scale value (that is, v in the figure). Then compare v with light_thres (i.e. the preset dim brightness threshold). If v is greater than light_thres, it can be determined that the vehicle is in a dim scene; if v is less than or equal to light_thres, the normal lighting number f_{t} can be accumulated. When f_{t} is greater than or equal to min_frame (i.e. the preset number threshold), it is determined that the vehicle is in a normal scene. Conversely, if f_{t} is less than min_frame, it is still determined that the vehicle is in a dim scene.
[0091] Reference Figure 7 , which is an overall schematic diagram of parking space screening in this application. As shown in the figure, the BEV image will be input into the storage space detection model and the drivable area detection model respectively to obtain the parking space involved in the BEV image and the drivable area in the BEV image. Combined with the storage space release strategy and the drivable area, the available parking spaces are determined, and on the basis of the available parking spaces, it is further determined whether the parking space is optional. To determine whether the parking space is optional, a dim scene recognition algorithm (the recognition algorithm can refer to the above Figure 6, no longer repeated here) determines whether the vehicle is in a dim scene, thereby marking the dim flag for the parking space (i.e. updating the dim flag of the parking space); accordingly, if the dim flag of a parking space is true (i.e. marking the dim flag), it indicates that the parking space is not selectable, conversely, if the dim flag of a parking space is not true, it indicates that the parking space is selectable.
[0092] The present application also provides a parking space screening device, referring to Figure 8 , the parking space screening device comprises:
[0093] A generating module 10 is used to obtain a driving environment image of a vehicle, and generate a target reference grayscale value of the driving environment image based on the grayscale values of pixels in a drivable area of the driving environment image;
[0094] The marking module 20 marks the parking space in the driving environment image as a non-selectable parking space when the target reference grayscale value is less than a preset dim brightness threshold.
[0095] Optionally, the generating module 10 is further used for:
[0096] Counting the grayscale values of the pixels in the drivable area of the driving environment image, and calculating the actual reference grayscale value of the driving environment image;
[0097] A smoothing process is performed based on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image, wherein the historical reference grayscale value is determined by a previous driving environment image.
[0098] Optionally, the generating module 10 is further used for:
[0099] Counting the grayscale values of the pixels in the drivable area of the driving environment image by means of interlaced sampling;
[0100] The average value of the grayscale values obtained is used as the actual reference grayscale value of the driving environment image.
[0101] Optionally, the generating module 10 is further used for:
[0102] Based on a first weight of the actual reference grayscale value and a second weight of the historical reference grayscale value, weighted summing and smoothing processing are performed on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image, wherein the first weight is less than the second weight.
[0103] Optionally, the marking module 20 is further used for:
[0104] When the target reference grayscale value is greater than or equal to the preset dim brightness threshold, the illumination normal number is cumulatively updated once, wherein the illumination normal number will be reset when the target reference grayscale value of the next driving environment image is less than the preset dim brightness threshold;
[0105] When the illumination normal factor is greater than or equal to a preset quantity threshold, the parking spaces in the driving environment image that are not marked as non-optional parking spaces are marked as optional parking spaces.
[0106] Optionally, the marking module 20 is further used for:
[0107] When the illumination normal factor is less than the preset quantity threshold, the step of marking the parking space in the driving environment image as a non-selectable parking space is performed.
[0108] Optionally, the parking space screening device further includes a determination module 30, and the determination module 30 is used to:
[0109] Inputting the driving environment image into a preset drivable area detection model to determine the drivable area in the driving environment image;
[0110] The driving environment image is input into a preset parking space detection model to determine the parking space in the driving environment image.
[0111] The parking space screening device provided by the present application adopts the parking space screening method in the above embodiment, which can solve the technical problem that the traditional parking solution has a high safety risk. Compared with the prior art, the beneficial effects of the parking space screening device provided by the present application are the same as the beneficial effects of the parking space screening method provided by the above embodiment, and the other technical features of the parking space screening device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0112] The present application provides a vehicle, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the parking space screening method in the above-mentioned embodiment 1.
[0113] Reference below Fig. 9, which shows a schematic diagram of the structure of a vehicle suitable for implementing the embodiment of the present application. The vehicle in the embodiment of the present application may include but is not limited to mobile terminals such as computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as computers. Fig. 9 The vehicle shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0114] like Fig. 9 As shown, the vehicle may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for vehicle operation are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the vehicle to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a vehicle with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0115] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0116] The vehicle provided by the present application adopts the parking space screening method in the above embodiment, which can solve the technical problem that the traditional parking solution has a high safety risk. Compared with the prior art, the beneficial effects of the vehicle provided by the present application are the same as the beneficial effects of the parking space screening method provided by the above embodiment, and the other technical features of the vehicle are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0117] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0118] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0119] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the parking space screening method in the above-mentioned embodiment.
[0120] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0121] The computer-readable storage medium may be included in the vehicle, or may exist independently without being installed in the vehicle.
[0122] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a vehicle, the vehicle:
[0123] Acquire a driving environment image of the vehicle, and generate a target reference grayscale value of the driving environment image based on the grayscale values of pixels in a drivable area of the driving environment image;
[0124] When the target reference grayscale value is less than a preset dim brightness threshold, the parking space in the driving environment image is marked as a non-selectable parking space.
[0125] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0127] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0128] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned parking space screening method, and can solve the technical problem that the traditional parking solution has a high safety risk. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the parking space screening method provided in the above-mentioned embodiment, and will not be described in detail here.
[0129] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned parking space screening method when executed by a processor.
[0130] The computer program product provided in this application can solve the technical problem of parking space screening. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the parking space screening method provided in the above embodiment, which will not be repeated here.
[0131] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for selecting a parking space, characterized in that: The parking space screening method comprises the following steps: Acquire a driving environment image of the vehicle, and generate a target reference grayscale value of the driving environment image based on the grayscale values of pixels in a drivable area of the driving environment image; When the target reference grayscale value is less than a preset dim brightness threshold, the parking space in the driving environment image is marked as a non-selectable parking space.
2. The method for selecting a parking space according to claim 1, wherein: The step of generating a target reference grayscale value of the driving environment image based on the grayscale values of the pixels of the drivable area in the driving environment image comprises: Counting the grayscale values of the pixels in the drivable area of the driving environment image, and calculating the actual reference grayscale value of the driving environment image; A smoothing process is performed based on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image, wherein the historical reference grayscale value is determined by a previous driving environment image.
3. The method for selecting a parking space according to claim 2, characterized in that: The step of counting the grayscale values of the pixels in the drivable area of the driving environment image to calculate the actual reference grayscale value of the driving environment image comprises: Counting the grayscale values of the pixels in the drivable area of the driving environment image by means of interlaced sampling; The average value of the grayscale values obtained is used as the actual reference grayscale value of the driving environment image.
4. The method for selecting a parking space according to claim 2, wherein: The step of performing smoothing processing based on the actual reference grayscale value and the historical reference grayscale value to obtain the target reference grayscale value of the driving environment image comprises: Based on a first weight of the actual reference grayscale value and a second weight of the historical reference grayscale value, weighted summing and smoothing processing are performed on the actual reference grayscale value and the historical reference grayscale value to obtain a target reference grayscale value of the driving environment image, wherein the first weight is less than the second weight.
5. The method for selecting a parking space according to claim 1, wherein: After the step of generating a target reference grayscale value of the driving environment image based on the grayscale values of the pixels of the drivable area in the driving environment image, the method includes: When the target reference grayscale value is greater than or equal to the preset dim brightness threshold, the illumination normal number is cumulatively updated once, wherein the illumination normal number will be reset when the target reference grayscale value of the next driving environment image is less than the preset dim brightness threshold; When the illumination normal factor is greater than or equal to a preset quantity threshold, the parking spaces in the driving environment image that are not marked as non-optional parking spaces are marked as optional parking spaces.
6. The method for selecting a parking space according to claim 5, characterized in that: After the step of accumulating and updating the illumination constant once, the method further includes: When the illumination normal factor is less than the preset quantity threshold, the step of marking the parking space in the driving environment image as a non-selectable parking space is performed.
7. The method for selecting a parking space according to claim 1, wherein: The parking space screening method further includes: Inputting the driving environment image into a preset drivable area detection model to determine the drivable area in the driving environment image; The driving environment image is input into a preset parking space detection model to determine the parking space in the driving environment image.
8. A vehicle, characterized in that: The vehicle comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for screening a parking space according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the parking space screening method according to any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method for screening parking spaces according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Dark light scene detection method and device, terminal and storage medium
CN121190380A