Motor vehicle parking space stagnant object identification method and system
By identifying the area images of roadside parking spaces, determining the outline and location of foreign objects, calculating the utilization rate of parking spaces, and providing real-time parking space usage tips, the problem of low utilization rate of parking spaces occupied by foreign objects in the prior art is solved, and the utilization rate of parking spaces and the efficiency of vehicle parking is improved.
Patent Information
- Application Number
- CN202510013286.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-04
- Publication Date
- 2025-05-27
AI Technical Summary
The prior art is difficult to effectively improve the utilization rate of roadside parking spaces occupied by foreign objects, resulting in a decrease in the utilization rate of parking spaces.
By obtaining the area images of multiple parking spaces, identifying stagnant objects, determining whether there are abnormal parking spaces occupied by foreign objects, determining the outline and location of foreign objects, calculating the utilization rate of abnormal parking spaces, and determining whether the vehicle can use abnormal parking spaces when the vehicle needs to park, and outputting prompt information.
The utilization rate of parking spaces occupied by foreign objects is improved, and the occupancy of parking spaces is accurately identified and calculated, and real-time parking space usage tips are provided, which improves the efficiency of vehicle parking.
Smart Images

Figure CN120047917A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a method and system for identifying stagnant objects in a motor vehicle parking space. Background Art
[0002] With the increasing scale of motor vehicles, it has become increasingly difficult to meet the parking demand of motor vehicles. In order to meet the increasing parking demand, roadside parking spaces are usually planned in areas such as the roadside for motor vehicles to park. However, since roadside parking spaces belong to public areas, it is quite common for some non-motor vehicles or other foreign objects to occupy the parking spaces, resulting in a reduced utilization rate of roadside parking spaces. However, some parking spaces can still be parked by motor vehicles even though they are occupied by foreign objects. Therefore, how to improve the utilization rate of parking spaces occupied by foreign objects has become a problem. Summary of the Invention
[0003] In order to improve the utilization rate of parking spaces occupied by foreign objects, the present application provides a method and system for identifying stagnant objects in a motor vehicle parking space.
[0004] In a first aspect, the present application provides a method for identifying stagnant objects in a motor vehicle parking space, adopting the following technical solution:
[0005] A method for identifying stagnant objects in a motor vehicle parking space includes:
[0006] Obtaining area images corresponding to multiple parking spaces respectively;
[0007] Performing stagnant object identification on the area images to determine whether there are abnormal parking spaces with foreign objects;
[0008] If there are abnormal parking spaces, determining the contour and position of the foreign objects in the abnormal parking spaces based on the area images;
[0009] Determining the utilization rate of the abnormal parking spaces based on the contour and position of the foreign objects;
[0010] When a vehicle that needs to park is detected and there is only the abnormal parking space, obtaining the vehicle image of the vehicle;
[0011] Judging whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate;
[0012] If the vehicle can use the abnormal parking space, outputting a prompt message.
[0013] By adopting the above technical solution, regional images corresponding to multiple parking spaces are obtained, and then the stagnant objects in the regional images are identified to determine whether there are foreign objects on each parking space, and further to determine whether there are abnormal parking spaces with foreign objects. If there are abnormal parking spaces, the outline and position of the foreign objects in the abnormal parking spaces are determined. Both the outline and the position are unique attributes of the foreign objects themselves, reflecting the occupancy of the parking spaces. Therefore, the utilization rate of the abnormal parking spaces can be accurately determined according to the outline and position of the foreign objects. When a vehicle that needs to park is detected and there are only abnormal parking spaces and no other empty parking spaces at present, a vehicle image is obtained. The vehicle image records the attributes of the vehicle itself. Therefore, according to the vehicle image and the utilization rate, it can be judged whether the vehicle can use the abnormal parking space. After it is judged that the vehicle can use the abnormal parking space, a prompt message is output to send a prompt to the vehicle so that the vehicle can know that it can use the abnormal parking space, thereby improving the utilization rate of the parking spaces occupied by foreign objects.
[0014] In another possible implementation manner, the identifying the stagnant objects in the regional images and determining whether there are abnormal parking spaces with foreign objects includes:
[0015] Performing gray-scale transformation on the regional images corresponding to the multiple parking spaces to obtain gray-scale images;
[0016] Performing denoising processing on the gray-scale images to obtain denoised gray-scale images;
[0017] Performing enhancement processing on the denoised gray-scale images to obtain enhanced gray-scale images;
[0018] Inputting the enhanced gray-scale images into a trained network model for feature recognition to obtain recognition results, and judging whether there are abnormal parking spaces based on the recognition results.
[0019] In another possible implementation manner, the determining the outline and position of the foreign objects in the abnormal parking spaces based on the regional images includes:
[0020] Performing edge detection on the regional image of the abnormal parking space to obtain the outline of the foreign object;
[0021] Mapping the outline to a preset coordinate system to determine the coordinate points of each position on the outline;
[0022] Determining the outline center point of the outline based on the coordinate points, and the outline center point represents the position of the outline.
[0023] In another possible implementation manner, the determining the utilization rate of the abnormal parking space based on the outline and position of the foreign object includes:
[0024] Determine a first feature point on the contour of the foreign object that is closest to the first preset edge and a second feature point that is closest to the second preset edge. The first preset edge is the boundary line between the foreign object parking space and the adjacent front parking space, and the second preset edge is the boundary line between the foreign object parking space and the adjacent rear parking space;
[0025] Draw parallel lines starting from the first feature point and the second feature point respectively. The parallel lines are parallel to the first preset edge and / or the second preset edge;
[0026] Determine the area of the closed region formed by the contour, the parallel lines, and the third preset edge. The third preset edge is the boundary line on the side away from the road of the abnormal parking space;
[0027] Determine the first area ratio of the area of the closed region to the first area of the abnormal parking space;
[0028] Determine the first distance between the position of the foreign object and the third preset edge of the abnormal parking space;
[0029] Based on the first area ratio and the first distance, determine the first eigenvalue of the abnormal parking space. The first eigenvalue characterizes the occupancy degree of the abnormal parking space;
[0030] Determine the area of the open space within the preset region. The preset region is the designated region on the side away from the parking space of the preset edge;
[0031] Determine the second distance between the center point of the open space area and the center point of the contour;
[0032] Determine the area of the contour of the foreign object, and calculate the first difference between the area of the contour of the foreign object and the open space area;
[0033] Based on the first difference, the area of the contour of the foreign object, and the second distance, determine the second eigenvalue of the foreign object. The second eigenvalue characterizes the convenience degree of carrying the foreign object;
[0034] Based on the first eigenvalue and the second eigenvalue, determine the utilization rate of the abnormal parking space.
[0035] In another possible implementation manner, the vehicle image includes an infrared image and a color image. The determining whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate includes:
[0036] Based on the infrared image, determine the first quantity of the personnel features inside the vehicle;
[0037] Based on the color image, determine the second quantity of the personnel features inside the vehicle;
[0038] Determine the largest of the first quantity and the second quantity as the number of occupants in the vehicle;
[0039] Determine the vehicle profile area of the vehicle based on the color image;
[0040] Determine the characteristic value of the vehicle based on the number of occupants and the vehicle profile area;
[0041] If the characteristic value reaches the utilization rate of the abnormal parking space, determine that the vehicle can use the abnormal parking space.
[0042] In another possible implementation, the determining the characteristic value of the vehicle based on the number of occupants and the vehicle profile area includes:
[0043] Obtain the difference between the area of the abnormal parking space and the area of the contour of the foreign object to get the remaining area of the abnormal parking space;
[0044] Determine the second area ratio of the remaining area to the vehicle profile area;
[0045] Obtain the second characteristic value of the foreign object, and determine the number of handling required persons corresponding to the foreign object based on the second characteristic value;
[0046] Determine the second difference between the number of handling required persons and the number of occupants;
[0047] Determine the characteristic value of the vehicle based on the second difference, the second area ratio, and their respective corresponding coefficients.
[0048] In a second aspect, the present application provides a motor vehicle parking space stagnant object recognition system, adopting the following technical solution:
[0049] A motor vehicle parking space stagnant object recognition system includes:
[0050] A first image acquisition module for acquiring area images corresponding to multiple parking spaces;
[0051] An identification module for performing stagnant object identification on the area images to determine whether there is an abnormal parking space with a foreign object;
[0052] A data determination module for, when there is an abnormal parking space, determining the contour and position of the foreign object in the abnormal parking space based on the area image;
[0053] A utilization rate determination module for determining the utilization rate of the abnormal parking space based on the contour of the foreign object and the position of the foreign object;
[0054] A second image acquisition module for, when detecting a vehicle that needs to park and there is only the abnormal parking space, acquiring the vehicle image of the vehicle;
[0055] A judgment module, configured to judge whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate;
[0056] An output module, configured to output a prompt message when the vehicle can use the abnormal parking space.
[0057] By adopting the above technical solution, the first image acquisition module acquires the regional images corresponding to multiple parking spaces respectively, and then the recognition module performs stagnant object recognition on the regional images, so as to judge whether there are foreign objects on each parking space, and further judge whether there are abnormal parking spaces with foreign objects. If there are abnormal parking spaces, the data determination module determines the contour and position of the foreign objects in the abnormal parking spaces. Both the contour and the position are unique attributes of the foreign objects themselves, reflecting the occupancy situation of the parking spaces. Therefore, the utilization rate determination module can accurately determine the utilization rate of the abnormal parking spaces according to the contour and position of the foreign objects. When a vehicle that needs to park is detected and there are only abnormal parking spaces and no other empty parking spaces at present, the second image acquisition module acquires the vehicle image, and the vehicle image records the attributes of the vehicle itself. Therefore, the judgment module can judge whether the vehicle can use the abnormal parking space according to the vehicle image and the utilization rate. After judging that the vehicle can use the abnormal parking space, the output module outputs a prompt message, so as to send a prompt to the vehicle, so that the vehicle can know that it can use the abnormal parking space, thereby improving the utilization rate of the parking spaces occupied by foreign objects.
[0058] In another possible implementation manner, when the recognition module performs stagnant object recognition on the regional images to judge whether there are abnormal parking spaces with foreign objects, it specifically is used for:
[0059] Performing gray-scale transformation on the regional images corresponding to the multiple parking spaces respectively to obtain gray-scale images;
[0060] Performing denoising processing on the gray-scale images to obtain denoised gray-scale images;
[0061] Performing enhancement processing on the denoised gray-scale images to obtain enhanced gray-scale images;
[0062] Inputting the enhanced gray-scale images into a trained network model for feature recognition to obtain recognition results, and judging whether there are abnormal parking spaces based on the recognition results.
[0063] In another possible implementation manner, when the data determination module determines the contour and position of the foreign objects in the abnormal parking space based on the regional images, it specifically is used for:
[0064] Performing edge detection on the regional image of the abnormal parking space to obtain the contour of the foreign object;
[0065] Mapping the contour to a preset coordinate system to determine the coordinate points of each position on the contour;
[0066] Determine the contour center point of the contour based on the coordinate points, and the contour center point characterizes the position of the contour.
[0067] In another possible implementation, when determining the utilization rate of the abnormal parking space based on the contour of the foreign object and the position of the foreign object, the utilization rate determination module is specifically configured to:
[0068] Determine a first feature point on the contour of the foreign object that is closest to a first preset edge and a second feature point that is closest to a second preset edge. The first preset edge is the boundary line between the foreign object parking space and the adjacent front parking space, and the second preset edge is the boundary line between the foreign object parking space and the adjacent rear parking space;
[0069] Draw parallel lines starting from the first feature point and the second feature point respectively, and the parallel lines are parallel to the first preset edge and / or the second preset edge;
[0070] Determine the area of the closed region formed by the contour, the parallel lines, and a third preset edge. The third preset edge is the boundary line on the side of the abnormal parking space away from the road;
[0071] Determine the ratio of the area of the closed region to the first area of the abnormal parking space;
[0072] Determine the first distance between the position of the foreign object and the third preset edge of the abnormal parking space;
[0073] Based on the first area ratio and the first distance, determine a first eigenvalue of the abnormal parking space, and the first eigenvalue characterizes the occupancy degree of the abnormal parking space;
[0074] Determine the area of the open space within a preset region. The preset region is a specified region on the side of the preset edge away from the parking space;
[0075] Determine the second distance between the center point of the open space area and the contour center point;
[0076] Determine the area of the contour of the foreign object, and calculate the first difference between the area of the contour of the foreign object and the open space area;
[0077] Based on the first difference, the area of the contour of the foreign object, and the second distance, determine a second eigenvalue of the foreign object, and the second eigenvalue characterizes the handling convenience of the foreign object;
[0078] Based on the first eigenvalue and the second eigenvalue, determine the utilization rate of the abnormal parking space.
[0079] In another possible implementation, the vehicle image includes an infrared image and a color image. When the determination module determines whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate, it specifically is used for:
[0080] Determine a first quantity of the personnel features inside the vehicle based on the infrared image;
[0081] Determine a second quantity of the personnel features inside the vehicle based on the color image;
[0082] Determine the larger one of the first quantity and the second quantity as the number of personnel inside the vehicle;
[0083] Determine the vehicle contour area of the vehicle based on the color image;
[0084] Determine the feature value of the vehicle based on the number of personnel and the vehicle contour area;
[0085] If the feature value reaches the utilization rate of the abnormal parking space, determine that the vehicle can use the abnormal parking space.
[0086] In another possible implementation, when the determination module determines the feature value of the vehicle based on the number of personnel and the vehicle contour area, it specifically is used for:
[0087] Obtain the difference between the area of the abnormal parking space and the area of the contour of the foreign object to get the remaining area of the abnormal parking space;
[0088] Determine the second area ratio of the remaining area to the vehicle contour area;
[0089] Obtain the second feature value of the foreign object, and determine the number of handling required personnel corresponding to the foreign object based on the second feature value;
[0090] Determine the second difference between the number of handling required personnel and the number of personnel;
[0091] Determine the feature value of the vehicle based on the second difference, the second area ratio, and their respective corresponding coefficients.
[0092] In a third aspect, the present application provides an electronic device, adopting the following technical solution:
[0093] An electronic device, the electronic device includes:
[0094] At least one processor;
[0095] A memory;
[0096] At least one application program, where at least one application program is stored in a memory and configured to be executed by at least one processor, and at least one is configured to: execute a method for identifying a parked vehicle's obstruction in a motor vehicle parking space according to any possible implementation manner shown in the first aspect.
[0097] In a fourth aspect, the present application provides a computer-readable storage medium, adopting the following technical solution:
[0098] A computer-readable storage medium, when the computer program is executed in a computer, causes the computer to execute a method for identifying a parked vehicle's obstruction in a motor vehicle parking space according to any one of the first aspect.
[0099] In summary, the present application includes at least one of the following beneficial technical effects:
[0100] Obtain area images corresponding to multiple parking spaces respectively, then perform obstruction identification on the area images, thereby determining whether there are foreign objects on each parking space, and further determining whether there are abnormal parking spaces with foreign objects. If there are abnormal parking spaces, determine the contour and position of the foreign objects in the abnormal parking spaces. Both the contour and position are unique attributes of the foreign objects themselves, reflecting the occupancy situation of the parking spaces. Therefore, according to the contour and position of the foreign objects, the utilization rate of the abnormal parking spaces can be accurately determined. When a vehicle that needs to park is detected and there are only abnormal parking spaces and no other empty parking spaces currently, obtain a vehicle image, which records the attributes of the vehicle itself. Therefore, according to the vehicle image and the utilization rate, it can be determined whether the vehicle can use the abnormal parking space. After determining that the vehicle can use the abnormal parking space, output a prompt message, thereby sending a prompt to the vehicle so that the vehicle can know that it can use the abnormal parking space, thus improving the utilization rate of the parking spaces occupied by foreign objects. Description of the Drawings
[0101] Figure 1 It is a schematic flowchart of a method for identifying a parked vehicle's obstruction in a motor vehicle parking space according to an embodiment of the present application.
[0102] Figure 2 It is a schematic structural diagram of a system for identifying a parked vehicle's obstruction in a motor vehicle parking space according to an embodiment of the present application.
[0103] Figure 3 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. Detailed Embodiments
[0104] The following further describes the present application in detail with reference to the drawings.
[0105] Those skilled in the art can make modifications to this embodiment without creative contributions according to needs after reading this specification, but as long as they are within the scope of the claims of the present application, they are protected by the patent law.
[0106] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0107] In addition, the term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after, unless otherwise specified.
[0108] The embodiments of the present application will be further described in detail below with reference to the accompanying drawings of the specification.
[0109] The embodiments of the present application provide a method for identifying stagnant objects in a motor vehicle parking space, which is executed by an electronic device. The electronic device can be a server or a terminal device. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected through wired or wireless communication methods, which are not limited in the embodiments of the present application. As Figure 1 shown, the method includes step S101, step S102, step S103, step S104, step S105, step S106, and step S107, where
[0110] S101, obtain the regional images corresponding to multiple parking spaces respectively.
[0111] For the embodiments of the present application, in the scenario of roadside parking spaces, the roadside parking spaces are arranged in a queue along the road edge stone. Therefore, staff can install multiple camera devices at equal intervals by the roadside in advance, select cameras with appropriate resolutions and perspectives, and each camera device covers a part of the parking spaces, or install multiple camera devices on the roadside trees, street lamps, etc. The camera device is connected to the electronic device through a wire or wirelessly, so that the electronic device can obtain the image information collected by the camera device. The image information includes the regional images of each parking space, which is convenient for subsequent analysis of whether there are foreign objects in the parking space.
[0112] S102, perform stagnant object recognition on the regional images to determine whether there are abnormal parking spaces with foreign objects.
[0113] For the embodiments of the present application, after the electronic device obtains the area image of the parking space, it performs identification of stationary objects on the area image, so as to determine whether a motor vehicle or other foreign objects other than the motor vehicle are parked on each parking space. The parking space with foreign objects is an abnormal parking space.
[0114] S103. If there is an abnormal parking space, based on the area image, determine the contour and position of the foreign object in the abnormal parking space.
[0115] For the embodiments of the present application, after the electronic device determines the abnormal parking space, it determines the contour and position of the foreign object in the abnormal parking space. The area image records the specific situation in the abnormal parking space. Therefore, the contour and position of the foreign object can be determined according to the area image.
[0116] S104. Determine the utilization rate of the abnormal parking space based on the contour of the foreign object and the position of the foreign object.
[0117] For the embodiments of the present application, both the contour and the position characterize the attributes of the foreign object itself. The larger the contour, the larger the space occupied by the foreign object in the parking space, and vice versa, the smaller the space occupied in the parking space. The position of the foreign object in the parking space also affects whether the parking space can be used to park a vehicle. Therefore, the electronic device can accurately determine the utilization rate of the abnormal parking space through comprehensive analysis of the contour and position of the foreign object.
[0118] S105. When a vehicle that needs to park is detected and there is only an abnormal parking space, obtain the vehicle image of the vehicle.
[0119] For the embodiments of the present application, a camera device is installed at a position where the vehicle must pass when parking. According to the image information collected by the camera device here, it can be identified whether a vehicle that needs to park has entered. When a vehicle that needs to park is detected and there is only an abnormal parking space among multiple roadside parking spaces, the electronic device obtains the vehicle image of the vehicle that needs to park. The vehicle image records the specific situation of the vehicle that needs to park, which is convenient for subsequent analysis of whether the vehicle can use the abnormal parking space.
[0120] S106. Determine whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate.
[0121] For the embodiments of the present application, the vehicle image records the characteristics of the vehicle itself, including the number of people in the vehicle, etc. Therefore, the electronic device can comprehensively determine whether the vehicle can use the abnormal parking space according to the vehicle image and the utilization rate of the abnormal parking space.
[0122] S107. If the vehicle can use the abnormal parking space, output a prompt message.
[0123] For the embodiments of the present application, if the electronic device determines that the vehicle can use an abnormal parking space, the electronic device outputs a prompt message, so that the people in the vehicle can know that their vehicle can park in the abnormal parking space, thereby improving the utilization rate of the parking space occupied by foreign objects. If it is determined that the vehicle cannot use the abnormal parking space, the electronic device does not need to output a prompt message. Specifically, the electronic device displays the parking space number of the abnormal parking space that can be used on the gate device at the vehicle entrance, so as to prompt the vehicle that the parking space is available.
[0124] In a possible implementation manner of the embodiments of the present application, in step S102, the area image is recognized for stagnant objects to determine whether there is an abnormal parking space with foreign objects, which specifically includes step S1021 (not shown in the figure), step S1022 (not shown in the figure), step S1023 (not shown in the figure), and step S1024 (not shown in the figure), where
[0125] S1021, perform gray-scale transformation on the area images corresponding to multiple parking spaces respectively to obtain gray-scale images.
[0126] For the embodiments of the present application, the area image is a color image. Converting the area image into a gray-scale image can reduce the computational complexity of subsequent processing. In the RGB color space, the color pixel values are converted into gray-scale values through a specific weighting formula (such as the formula Y = 0.299R + 0.587G + 0.114B). For the area image, this can make the algorithm more focused on the shape and position features of the object without losing key information (such as the object contour).
[0127] S1022, perform denoising processing on the gray-scale image to obtain a denoised gray-scale image.
[0128] For the embodiments of the present application, in order to remove the noise in the gray-scale image, methods such as Gaussian filtering and median filtering are commonly used. Gaussian filtering is a linear filtering method that performs weighted averaging on the pixels in the image according to the Gaussian distribution and can effectively remove Gaussian noise. Median filtering replaces the current pixel value with the median value of the pixel neighborhood and has a good effect on removing salt-and-pepper noise. In the parking lot environment, the noise may come from light changes, the electronic noise of the camera itself, etc. Filtering can make the gray-scale image clearer and facilitate subsequent stagnant object recognition.
[0129] S1023, perform enhancement processing on the denoised gray-scale image to obtain an enhanced gray-scale image.
[0130] For the embodiments of the present application, the contrast of the image is enhanced through methods such as histogram equalization. Histogram equalization can make the gray-scale distribution of the gray-scale image more uniform and highlight the difference between the object and the background. In the parking space scenario, this helps to better distinguish details such as the boundary between non-motor vehicles and parking spaces and ground markings.
[0131] S1024. Input the enhanced grayscale image into the trained network model for feature recognition to obtain a recognition result, and determine whether there is an abnormal parking space based on the recognition result.
[0132] For the embodiments of this application, the trained network model can be a convolutional neural network model. The local features of the image are extracted through the convolutional layer, the data dimension is reduced by the pooling layer, and classification is performed by the fully connected layer. Existing general CNN models (such as AlexNet, VGG, etc.) can be used and fine-tuned on the parking space vehicle image dataset, or a CNN model specifically for distinguishing non-motor vehicles and motor vehicles can be constructed. A large number of parking lot images are used for training, allowing the CNN to automatically learn the complex features of vehicles and achieve high-precision classification recognition.
[0133] The trained convolutional neural network model can not only detect that a parking space is occupied, but also distinguish whether the occupied object is a non-motor vehicle (such as a bicycle, an electric vehicle) or other sundries (such as a traffic cone, a concrete block, etc.). This can be achieved by analyzing features such as the shape, size, and texture of the object. For example, a bicycle has a unique frame shape and two wheels, and a concrete block is generally in a regular geometric shape (such as a cylindrical or square shape), and can be accurately identified through these features. The support vector machine (SVM) uses the extracted features such as the shape, texture, and color of non-motor vehicles, motor vehicles, and other foreign objects as input vectors. The SVM separates the two types of data by finding a hyperplane. In the training stage, a large number of image samples of non-motor vehicles, motor vehicles, and foreign objects are required for training, allowing the SVM to learn the feature differences between different vehicles and foreign objects, so as to accurately classify in practical applications. If the recognition result of a certain parking space is a non-motor vehicle or other foreign objects, it means that the parking space is occupied, and this parking space is an abnormal parking space.
[0134] In a possible implementation manner of the embodiments of this application, in step S103, based on the regional image, the contour and position of the foreign object in the abnormal parking space are determined, which specifically includes step S1031 (not shown in the figure), step S1032 (not shown in the figure), and step S1033 (not shown in the figure), where
[0135] S1031. Perform edge detection on the regional image of the abnormal parking space to obtain the contour of the foreign object.
[0136] For the embodiments of the present application, the shapes of non-motor vehicles, sundries, and foreign objects are significantly different from those of motor vehicles. The electronic device can use an edge detection algorithm (such as Canny edge detection) to extract the edge contours of objects. Canny edge detection determines the edges by finding points with drastic changes in gray intensity in the image. For non-motor vehicles, the slender frames and the contours of two wheels of a bicycle, the unique body shape of an electric vehicle, etc. can all be extracted through edge detection. Geometric shape parameters of the object, such as aspect ratio, area, perimeter, etc., can also be calculated.
[0137] S1032, Map the contour to a preset coordinate system to determine the coordinate points of each position on the contour.
[0138] For the embodiments of the present application, after the electronic device determines the contour of the foreign object, it maps the contour to a preset coordinate system, and the preset coordinate system is a rectangular coordinate system in a plane. After the contour is mapped to the preset coordinate system, the coordinates of each position on the contour can be determined.
[0139] S1033, Determine the contour center point of the contour based on the coordinate points.
[0140] Among them, the contour center point represents the position of the contour.
[0141] For the embodiments of the present application, after the electronic device determines the coordinate points on the contour, the centroid of the contour, that is, the center point, can be calculated according to the following formula:
[0142]
[0143] Among them, M is the number of pixel points of the contour, (x i , y i ) is the coordinate of each pixel point on the contour, C x is the x coordinate of the center point, and C y is the y coordinate of the center point.
[0144] After the electronic device determines the coordinates of the contour center point, using these coordinates to represent the position of the contour is more accurate.
[0145] A possible implementation manner of the embodiments of the present application. In step S104, determining the utilization rate of the abnormal parking space based on the contour of the foreign object and the position of the foreign object specifically includes step S1 (not shown in the figure), step S2 (not shown in the figure), step S3 (not shown in the figure), step S4 (not shown in the figure), step S5 (not shown in the figure), step S6 (not shown in the figure), step S7 (not shown in the figure), step S8 (not shown in the figure), step S9 (not shown in the figure), step S10 (not shown in the figure), and step S11 (not shown in the figure), where
[0146] S1. Determine the first feature point on the contour of the foreign object that is closest to the first preset edge and the second feature point that is closest to the second preset edge.
[0147] Among them, the first preset edge is the boundary line between the foreign object parking space and the adjacent front parking space, and the second preset edge is the boundary line between the foreign object parking space and the adjacent rear parking space.
[0148] For the embodiments of the present application, the electronic device also maps the foreign object parking space into the preset coordinate system, draws perpendicular lines from each pixel point on the contour to the first preset edge and the second preset edge, and the electronic device compares the lengths of the perpendicular lines to determine the first feature point that is closest to the first preset edge and the second feature point that is closest to the second preset edge.
[0149] S2. Draw parallel lines starting from the first feature point and the second feature point respectively.
[0150] Among them, the parallel lines are parallel to the first preset edge and / or the second preset edge.
[0151] For the embodiments of the present application, after the electronic device determines the first feature point and the second feature point, it draws parallel lines along the first feature point and the second feature point respectively.
[0152] S3. Determine the area of the closed region formed by the contour, the parallel lines, and the third preset edge.
[0153] Among them, the third preset edge is the boundary line on the side away from the road of the abnormal parking space.
[0154] For the embodiments of the present application, after the electronic device draws the parallel lines, the parallel lines intersect with the third preset edge. Therefore, the contour of the foreign object, the parallel lines, and the third preset edge combine to form a closed region, and the area of this closed region is the area of the parking space occupied by the foreign object and the area of the region that cannot be utilized after occupying the parking space. The electronic device determines the number of pixels in the closed region, and the number of pixels can represent the area of the closed region.
[0155] S4. Determine the first area ratio of the area of the closed region to the abnormal parking space.
[0156] For the embodiments of the present application, the electronic device counts the number of pixels in the abnormal parking space, uses the number of pixels in the abnormal parking space to represent the area of the abnormal parking space, and then the electronic device calculates the ratio of the area of the closed region to the area of the abnormal parking space to determine the first area ratio. The larger the first area ratio, the smaller the remaining available area of the abnormal parking space, and the lower the utilization rate of the abnormal parking space.
[0157] S5. Determine the first distance between the position of the foreign object and the third preset edge of the abnormal parking space.
[0158] For the embodiments of the present application, the electronic device draws a perpendicular line from the center point of the contour of the foreign object to the third preset edge, and the length of the perpendicular line is the first distance. The smaller the first distance is, the closer the foreign object is to the roadside, and the higher the convenience of moving the foreign object is.
[0159] S6. Determine the first eigenvalue of the abnormal parking space based on the first area ratio and the first distance.
[0160] Among them, the first eigenvalue characterizes the occupancy degree of the abnormal parking space.
[0161] For the embodiments of the present application, both the first area ratio and the first distance are key factors characterizing the characteristics of the abnormal parking space itself. Therefore, the electronic device comprehensively determines a first eigenvalue regarding the abnormal parking space itself based on the first area ratio and the first distance. Specifically, since both the first area ratio and the first distance are key factors affecting the situation of the abnormal parking space itself, the staff sets corresponding coefficients for the first area ratio and the first distance respectively. After the electronic device determines the first area ratio and the first distance, it calls the corresponding coefficients for weighted calculation to determine the first eigenvalue.
[0162] S7. Determine the open space area within the preset area.
[0163] Among them, the preset area is a designated area on the side of the preset edge away from the parking space.
[0164] For the embodiments of the present application, there is a roadside area corresponding to each parking space. The preset area can be an area with a designated area delimited by extending the first preset edge and the second preset edge of the parking space. The electronic device obtains the image of the preset area collected by the camera device, and then performs feature recognition on the image to identify whether there are non-motor vehicles or foreign objects and sundries in the preset area. If there are no non-motor vehicles or foreign objects and sundries, the open space area of the preset area is the entire area of the preset area. If there are non-motor vehicles or foreign objects and sundries, the electronic device subtracts the area occupied by the contours of the non-motor vehicles or foreign objects and sundries from the area of the preset area to obtain the open space area.
[0165] S8. Determine the second distance between the center point of the open space area and the center point of the contour.
[0166] For the embodiments of the present application, the electronic device performs edge detection on the image of the preset area to determine the contour of the open space area, and then determines the center point of the open space area in the manner described in step S1033. The electronic device calculates the second distance between the center point of the open space area and the center point of the contour of the foreign object through the distance formula between two points. The larger the second distance is, the greater the handling distance of the foreign object is, and the worse the handling convenience is. On the contrary, the foreign object is easier to handle and the handling convenience is better.
[0167] S9. Determine the area of the outline of the foreign object, and calculate the first difference between the area of the outline of the foreign object and the area of the open space.
[0168] For the embodiments of the present application, the electronic device counts the number of pixels within the outline of the foreign object, uses the number of pixels to represent the area of the outline of the foreign object, and then the electronic device subtracts the area of the outline of the foreign object from the area of the open space to obtain the first difference. The larger the first difference, the easier it is to place the foreign object in the open space, the easier it is to vacate a complete parking space, and the higher the corresponding handling convenience.
[0169] S10. Determine the second characteristic value of the foreign object based on the first difference, the area of the outline of the foreign object, and the second distance.
[0170] Among them, the second characteristic value represents the handling convenience of the foreign object.
[0171] For the embodiments of the present application, in summary, the first difference between the area of the outline of the foreign object and the area of the open space, the area of the outline of the foreign object, and the second distance are all key factors affecting whether the foreign object is easy to handle, and the degrees of importance affecting whether it is easy to handle are different. Therefore, the staff sets different coefficients for the above three factors such as the first difference and stores them in the electronic device. After the electronic device determines the above three factors such as the first difference, it calls their corresponding coefficients for weighted calculation to determine the second characteristic value, and the second characteristic value represents the handling convenience of the foreign object. Determining the second characteristic value through comprehensive analysis of the above three factors is more accurate.
[0172] S11. Determine the utilization rate of the abnormal parking space based on the first characteristic value and the second characteristic value.
[0173] For the embodiments of the present application, the first characteristic value represents the attribute characteristic situation of the abnormal parking space itself, and the second characteristic value represents the handling convenience of the foreign object. Therefore, the electronic device can accurately determine the utilization rate of the abnormal parking space by comprehensively considering the first characteristic value and the second characteristic value. Specifically, the electronic device can sum the first characteristic value and the second characteristic value to obtain the utilization rate.
[0174] In a possible implementation manner of the embodiments of the present application, the vehicle image includes an infrared image and a color image. In step S106, determining whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate specifically includes step S1061 (not shown in the figure), step S1062 (not shown in the figure), step S1063 (not shown in the figure), step S1064 (not shown in the figure), step S1065 (not shown in the figure), and step S1066 (not shown in the figure), where
[0175] S1061. Determine the first quantity of the personnel characteristics inside the vehicle based on the infrared image.
[0176] For the embodiments of the present application, since the materials of the vehicle are different from those of the human body, the first number of the passengers in the vehicle can be determined through the infrared image, and the electronic device inputs the infrared image into the trained network model for passenger feature recognition to obtain the first number of the passengers in the vehicle. However, when the vehicle windows are closed, the infrared image cannot show the situation inside the vehicle.
[0177] S1062. Determine the second number of the passenger features in the vehicle based on the color image.
[0178] For the embodiments of the present application, the camera device for collecting the color image can be arranged above the due front of the vehicle driving direction, and the electronic device inputs the color image into the trained network model for passenger feature recognition to obtain the second number of the passenger features in the vehicle.
[0179] S1063. Determine the larger one of the first number and the second number as the number of the passengers in the vehicle.
[0180] For the embodiments of the present application, after the electronic device determines the first number and the second number, if there is a difference between the first number and the second number, the electronic device can determine the number of the passengers in the vehicle by taking the larger one of the first number and the second number.
[0181] S1064. Determine the vehicle contour area of the vehicle based on the color image.
[0182] For the embodiments of the present application, the electronic device can identify the brand and model of the vehicle according to the color image, so the contour of the vehicle can be determined, and then the vehicle contour area can be determined. Or the electronic device performs edge detection on the color image to obtain the contour of the vehicle, and then counts the number of pixels inside the contour to obtain the vehicle contour area. The larger the vehicle contour area, the larger the area required for parking. For example, SUVs and off-road vehicles are larger in size, corresponding to a larger vehicle contour area and greater parking difficulty. Sedans are smaller in size, corresponding to a smaller vehicle contour area and lower parking difficulty.
[0183] S1065. Determine the feature value of the vehicle based on the number of passengers and the vehicle contour area.
[0184] For the embodiments of the present application, both the number of passengers in the vehicle and the vehicle contour area are key factors affecting the attributes of the vehicle itself. Therefore, the electronic device can determine the feature value of the vehicle according to the number of passengers and the vehicle contour area.
[0185] S1066. If the feature value reaches the utilization rate of the abnormal parking space, determine that the vehicle can use the abnormal parking space.
[0186] For the embodiments of the present application, after the electronic device determines the characteristic value of the vehicle, it compares the characteristic value with the utilization rate of the determined abnormal parking space. If the characteristic value of the vehicle is not less than the utilization rate of the abnormal parking space, it indicates that the area required for the vehicle to park is smaller and the number of people in the vehicle is larger and can carry foreign objects. Therefore, the vehicle can use the abnormal parking space. If the characteristic value of the vehicle is less than the utilization rate of the abnormal parking space, it indicates that the vehicle cannot use the abnormal parking space.
[0187] In a possible implementation manner of the embodiments of the present application, in step S1065, the characteristic value of the vehicle is determined based on the number of people and the vehicle contour area, specifically including step Sa (not shown in the figure), step Sb (not shown in the figure), step Sc (not shown in the figure), step Sd (not shown in the figure), and step Se (not shown in the figure), where
[0188] Sa, obtain the remaining area of the abnormal parking space by taking the difference between the area of the abnormal parking space and the area of the contour of the foreign object.
[0189] For the embodiments of the present application, the electronic device subtracts the area of the contour of the foreign object from the area of the abnormal parking space to obtain the remaining area available for the vehicle to park. The larger the remaining area, the larger the space left for the vehicle to park without moving the foreign object, and the easier it is for the vehicle to park.
[0190] Sb, determine the second area ratio of the remaining area to the vehicle contour area.
[0191] For the embodiments of the present application, the electronic device calculates the ratio of the remaining area of the abnormal parking space to the vehicle contour area, that is, the second area ratio. The larger the second area ratio, the easier it is for the vehicle to park. On the contrary, the more difficult it is to park. The larger the second area ratio, the smaller the handling distance and the smaller the handling amplitude required for handling the foreign object.
[0192] Sc, obtain the second characteristic value of the foreign object, and determine the number of people required for handling the foreign object based on the second characteristic value.
[0193] For the embodiments of the present application, the electronic device obtains the second characteristic value of the foreign object. Different second characteristic values correspond to different numbers of people required for handling. Multiple preset characteristic value intervals are stored in the electronic device, and each preset characteristic value interval corresponds to a different preset number of people. The electronic device determines the preset characteristic value interval where the second characteristic value is located, and takes the preset number of people in the preset characteristic value interval as the number of people required for handling.
[0194] Sd, determine the second difference between the number of people required for handling and the number of people.
[0195] For the embodiments of the present application, the electronic device subtracts the number of people in the vehicle from the number of people required for handling to obtain the second difference. The smaller the second difference, the closer the number of people required for handling is to the actual number of people in the vehicle, and the easier it is to handle the foreign object.
[0196] Based on the second difference value, the second area ratio, and their respective corresponding coefficients, the characteristic value of the vehicle is determined.
[0197] For the embodiments of the present application, in summary, both the second difference value and the second area ratio are key factors affecting the characteristic value of the vehicle. Therefore, the staff sets their respective corresponding coefficients for the second difference value and the second area ratio. After the electronic device determines the second difference value and the second area ratio, it can call their respective corresponding coefficients for weighted calculation to determine the accurate characteristic value of the vehicle.
[0198] The above embodiments introduce a method for identifying stagnant objects in a motor vehicle parking space from the perspective of the method flow. The following embodiments introduce a system for identifying stagnant objects in a motor vehicle parking space from the perspective of virtual modules or virtual units. For details, see the following embodiments.
[0199] The embodiments of the present application provide a system 20 for identifying stagnant objects in a motor vehicle parking space, as Figure 2 shown. The system 20 for identifying stagnant objects in a motor vehicle parking space may specifically include:
[0200] A first image acquisition module 201, configured to acquire area images corresponding to multiple parking spaces;
[0201] An identification module 202, configured to identify stagnant objects in the area images and determine whether there are abnormal parking spaces with foreign objects;
[0202] A data determination module 203, configured to, when there is an abnormal parking space, determine the contour and position of the foreign object in the abnormal parking space based on the area image;
[0203] A utilization rate determination module 204, configured to determine the utilization rate of the abnormal parking space based on the contour of the foreign object and the position of the foreign object;
[0204] A second image acquisition module 205, configured to acquire a vehicle image of the vehicle when a vehicle to be parked is detected and there is only an abnormal parking space;
[0205] A judgment module 206, configured to judge whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate;
[0206] An output module 207, configured to output a prompt message when the vehicle can use the abnormal parking space.
[0207] An embodiment of the present application discloses a recognition system 20 for motor vehicle parking space obstructions. Among them, the first image acquisition module 201 acquires area images corresponding to multiple parking spaces respectively, and then the recognition module 202 performs obstruction recognition on the area images to determine whether there are foreign objects on each parking space, and further determines whether there are abnormal parking spaces with foreign objects. If there are abnormal parking spaces, the data determination module 203 determines the outline and position of the foreign objects in the abnormal parking spaces. Both the outline and the position are unique attributes of the foreign objects themselves, reflecting the occupancy of the parking spaces. Therefore, the utilization rate determination module 204 can accurately determine the utilization rate of the abnormal parking spaces according to the outline and position of the foreign objects. When a vehicle that needs to park is detected and there are only abnormal parking spaces and no other empty parking spaces at present, the second image acquisition module 205 acquires the vehicle image, and the vehicle image records the attributes of the vehicle itself. Therefore, the judgment module 206 can judge whether the vehicle can use the abnormal parking space according to the vehicle image and the utilization rate. After judging that the vehicle can use the abnormal parking space, the output module 207 outputs a prompt message to send a prompt to the vehicle so that the vehicle can know that it can use the abnormal parking space, thereby improving the utilization rate of the parking spaces occupied by foreign objects.
[0208] A possible implementation manner of an embodiment of the present application. When the recognition module 202 performs obstruction recognition on the area image to determine whether there are abnormal parking spaces with foreign objects, it is specifically used for:
[0209] Perform gray-scale transformation on the area images corresponding to multiple parking spaces respectively to obtain gray-scale images;
[0210] Perform denoising processing on the gray-scale images to obtain denoised gray-scale images;
[0211] Perform enhancement processing on the denoised gray-scale images to obtain enhanced gray-scale images;
[0212] Input the enhanced gray-scale images into a trained network model for feature recognition to obtain recognition results, and judge whether there are abnormal parking spaces based on the recognition results.
[0213] A possible implementation manner of an embodiment of the present application. When the data determination module 203 determines the outline and position of the foreign objects in the abnormal parking spaces based on the area images, it is specifically used for:
[0214] Perform edge detection on the area image of the abnormal parking space to obtain the outline of the foreign object;
[0215] Map the outline to a preset coordinate system to determine the coordinate points of each position on the outline;
[0216] Determine the outline center point of the outline based on the coordinate points, and the outline center point represents the position of the outline.
[0217] In a possible implementation manner of the embodiment of the present application, when the utilization rate determination module 204 determines the utilization rate of the abnormal parking space based on the contour of the foreign object and the position of the foreign object, it specifically is used for:
[0218] Determine a first feature point on the contour of the foreign object that is closest to a first preset edge and a second feature point on the contour of the foreign object that is closest to a second preset edge, where the first preset edge is the boundary line between the foreign object parking space and the adjacent front parking space, and the second preset edge is the boundary line between the foreign object parking space and the adjacent rear parking space;
[0219] Draw parallel lines starting from the first feature point and the second feature point respectively, and the parallel lines are parallel to the first preset edge and / or the second preset edge;
[0220] Determine the area of the closed region formed by the contour, the parallel lines, and a third preset edge, where the third preset edge is the boundary line on the side of the abnormal parking space far from the road;
[0221] Determine the ratio of the area of the closed region to the first area of the abnormal parking space;
[0222] Determine the first distance between the position of the foreign object and the third preset edge of the abnormal parking space;
[0223] Based on the first area ratio and the first distance, determine a first eigenvalue of the abnormal parking space, where the first eigenvalue represents the occupancy degree of the abnormal parking space;
[0224] Determine the area of the open space within a preset region, where the preset region is a specified region on the side of the preset edge far from the parking space;
[0225] Determine the second distance between the center point of the open space area and the center point of the contour;
[0226] Determine the area of the contour of the foreign object, and calculate the first difference between the area of the contour of the foreign object and the area of the open space;
[0227] Based on the first difference, the area of the contour of the foreign object, and the second distance, determine a second eigenvalue of the foreign object, where the second eigenvalue represents the convenience degree of moving the foreign object;
[0228] Based on the first eigenvalue and the second eigenvalue, determine the utilization rate of the abnormal parking space.
[0229] In a possible implementation manner of the embodiment of the present application, the vehicle image includes an infrared image and a color image. When the judgment module 206 determines whether a vehicle can use an abnormal parking space based on the vehicle image and the utilization rate, it specifically is used for:
[0230] Based on the infrared image, determine the first quantity of the personnel features inside the vehicle;
[0231] Based on the color image, determine the second quantity of the personnel features inside the vehicle;
[0232] Determine the larger of the first quantity and the second quantity as the number of occupants in the vehicle;
[0233] Determine the vehicle contour area of the vehicle based on the color image;
[0234] Determine the characteristic value of the vehicle based on the number of occupants and the vehicle contour area;
[0235] If the characteristic value reaches the utilization rate of the abnormal parking space, determine that the vehicle can use the abnormal parking space.
[0236] In a possible implementation manner of the embodiment of the present application, when the determination module 206 determines the characteristic value of the vehicle based on the number of occupants and the vehicle contour area, it is specifically used for:
[0237] Calculate the difference between the area of the abnormal parking space and the area of the contour of the foreign object to obtain the remaining area of the abnormal parking space;
[0238] Determine the second area ratio of the remaining area to the vehicle contour area;
[0239] Obtain the second characteristic value of the foreign object, and determine the number of handling required persons corresponding to the foreign object based on the second characteristic value;
[0240] Determine the second difference between the number of handling required persons and the number of occupants;
[0241] Determine the characteristic value of the vehicle based on the second difference, the second area ratio, and their respective corresponding coefficients.
[0242] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described motor vehicle parking space stagnant object recognition system 20 can refer to the corresponding process in the foregoing method embodiment, and will not be elaborated herein.
[0243] An electronic device is provided in the embodiment of the present application, as Figure 3 shown, Figure 3 The electronic device 30 shown includes: a processor 301 and a memory 303. Among them, the processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 30 may further include a transceiver 304. It should be noted that in practical applications, the transceiver 304 is not limited to one, and the structure of the electronic device 30 does not constitute a limitation to the embodiment of the present application.
[0244] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0245] The bus 302 may include a path for transmitting information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0246] The memory 303 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, or it may also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0247] The memory 303 is used to store the application program code for executing the solution of this application, and is controlled by the processor 301 to execute. The processor 301 is used to execute the application program code stored in the memory 303 to implement the content shown in the foregoing method embodiments.
[0248] Among them, the electronic device includes but is not limited to: mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. Figure 3 The electronic device shown is only an example and should not bring any restrictions to the functions and usage scope of the embodiments of this application.
[0249] The embodiments of this application provide a computer-readable storage medium, on which a computer program is stored. When it runs on a computer, it enables the computer to execute the corresponding content in the foregoing method embodiments. Compared with the related art, in the embodiments of this application, area images corresponding to multiple parking spaces are obtained, and then stagnant objects are identified in the area images, so as to determine whether there are foreign objects on each parking space, and further determine whether there are abnormal parking spaces with foreign objects. If there are abnormal parking spaces, the contour and position of the foreign objects in the abnormal parking spaces are determined. The contour and position are unique attributes of the foreign objects themselves, reflecting the occupancy of the parking spaces. Therefore, the utilization rate of the abnormal parking spaces can be accurately determined according to the contour and position of the foreign objects. When a vehicle that needs to park is detected and there are only abnormal parking spaces and no other empty parking spaces at present, a vehicle image is obtained. The vehicle image records the attributes of the vehicle itself. Therefore, according to the vehicle image and the utilization rate, it can be determined whether the vehicle can use the abnormal parking space. After determining that the vehicle can use the abnormal parking space, a prompt message is output, so as to send a prompt to the vehicle, so that the vehicle can know that it can use the abnormal parking space, thereby improving the utilization rate of the parking spaces occupied by foreign objects.
[0250] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0251] The above are only some embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for identifying a stagnant object in a motor vehicle parking space, characterized in that: include: Obtaining area images corresponding to each of the multiple parking spaces; Performing stagnant object recognition on the area image to determine whether there is an abnormal parking space with foreign objects; If there is an abnormal parking space, determining the outline and position of the foreign object in the abnormal parking space based on the regional image; determining the utilization rate of the abnormal parking space based on the profile of the foreign object and the position of the foreign object; When a vehicle that needs to park is detected and only the abnormal parking space exists, acquiring a vehicle image of the vehicle; determining whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate; If the vehicle can use the abnormal parking space, a prompt message is output.
2. A method for identifying a stagnant object in a motor vehicle parking space according to claim 1, characterized in that: The step of identifying a stagnant object on the regional image and determining whether there is an abnormal parking space with a foreign object includes: Performing grayscale transformation on the area images corresponding to each of the plurality of parking spaces to obtain a grayscale image; Performing denoising on the grayscale image to obtain a denoised grayscale image; Performing enhancement processing on the denoised grayscale image to obtain an enhanced grayscale image; The enhanced grayscale image is input into a trained network model for feature recognition to obtain a recognition result, and whether there is an abnormal parking space is determined based on the recognition result.
3. The method for identifying a stagnant object in a motor vehicle parking space according to claim 1, characterized in that: The determining the contour and position of the foreign object in the abnormal parking space based on the regional image includes: Performing edge detection on the regional image of the abnormal parking space to obtain the outline of the foreign object; Mapping the contour to a preset coordinate system to determine coordinate points of each position on the contour; A contour center point of the contour is determined based on the coordinate points, where the contour center point represents the position of the contour.
4. The method for identifying a stagnant object in a motor vehicle parking space according to claim 1, characterized in that: The determining the utilization rate of the abnormal parking space based on the contour and position of the foreign object comprises: Determine a first feature point on the contour of the foreign object that is closest to a first preset edge and a second feature point that is closest to a second preset edge, wherein the first preset edge is a boundary line between the foreign object parking space and an adjacent front parking space, and the second preset edge is a boundary line between the foreign object parking space and an adjacent rear parking space; Draw parallel lines respectively with the first characteristic point and the second characteristic point as starting points, wherein the parallel lines are parallel to the first preset edge and / or the second preset edge; Determine the area of a closed region formed by the contour, the parallel lines and a third preset edge, wherein the third preset edge is a boundary line of the abnormal parking space away from the road; Determine a ratio of the area of the closed area to the first area of the abnormal parking space; Determine a first distance between the position of the foreign object and the third preset edge of the abnormal parking space; determining a first characteristic value of the abnormal parking space based on the first area ratio and the first distance, wherein the first characteristic value represents an occupation degree of the abnormal parking space; Determine the open space area within a preset area, wherein the preset area is a designated area on a side of a preset edge away from the parking space; Determine a second distance between the center point of the open space area and the center point of the contour; Determine the area of the outline of the foreign object, and calculate a first difference between the area of the outline of the foreign object and the area of the open space; Determine a second characteristic value of the foreign object based on the first difference, the area of the contour of the foreign object, and the second distance, wherein the second characteristic value represents the convenience of carrying the foreign object; The utilization rate of the abnormal parking space is determined based on the first characteristic value and the second characteristic value.
5. The method for identifying a stagnant object in a motor vehicle parking space according to claim 1, characterized in that: The vehicle image includes an infrared image and a color image, and judging whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate includes: determining a first number of characteristics of a person in the vehicle based on the infrared image; determining a second number of characteristics of a person in the vehicle based on the color image; Determining the largest of the first number and the second number as the number of persons in the vehicle; determining a vehicle contour area of the vehicle based on the color image; Determining a characteristic value of the vehicle based on the number of people and the vehicle contour area; If the characteristic value reaches the utilization rate of the abnormal parking space, it is determined that the vehicle can use the abnormal parking space.
6. A method for identifying a stagnant object in a motor vehicle parking space according to claim 5, characterized in that: The determining the characteristic value of the vehicle based on the number of people and the vehicle contour area includes: Calculating the difference between the area of the abnormal parking space and the area of the contour of the foreign object to obtain the remaining area of the abnormal parking space; Determining a second area ratio of the remaining area to the vehicle outline area; Obtaining a second characteristic value of the foreign object, and determining the number of people required to carry the foreign object based on the second characteristic value; Determine a second difference between the required number of people to be transported and the number of personnel; The characteristic value of the vehicle is determined based on the second difference, the second area ratio and the respective corresponding coefficients.
7. A motor vehicle parking space stagnant object recognition system, characterized in that: include: A first image acquisition module is used to acquire area images corresponding to each of the plurality of parking spaces; A recognition module, used to identify stagnant objects in the area image and determine whether there is an abnormal parking space with foreign objects; A data determination module, for determining, when there is an abnormal parking space, the outline and position of a foreign object in the abnormal parking space based on the regional image; A utilization rate determination module, used to determine the utilization rate of the abnormal parking space based on the profile of the foreign object and the position of the foreign object; A second image acquisition module is used to acquire a vehicle image of the vehicle when a vehicle that needs to park is detected and only the abnormal parking space exists; A judgment module, configured to judge whether the vehicle can use the abnormal parking space based on the vehicle image and the utilization rate; The output module is used to output prompt information when the vehicle can use the abnormal parking space.
8. An electronic device, characterized in that: It includes: at least one processor; Memory; At least one application, wherein the at least one application is stored in the memory and configured to be executed by the at least one processor, and the at least one application is used to execute a method for identifying a stagnant object in a motor vehicle parking space according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method for identifying a stalled object in a motor vehicle parking space as claimed in any one of claims 1 to 6.