A method, apparatus, device, and medium for detecting vacant parking spaces.

By acquiring N consecutive frames of depth and grayscale images, generating a detection plane, and calculating the centroid distance and the angle between the normal vectors, the problem of inaccurate parking space status judgment is solved, achieving accurate and timely parking space status detection, improving user experience, and saving labor costs.

CN117456435BActive Publication Date: 2026-11-10SHANGHAI INTEGRATED CIRCUIT MFG INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210848219.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-19
Publication Date
2026-11-10
Estimated Expiration
2042-07-19

AI Technical Summary

Technical Problem

Existing parking space detection solutions are susceptible to abnormal fluctuations in the environment, leading to incorrect judgments of parking space status and wasting time waiting for available parking spaces and parking space.

Method used

By acquiring N consecutive frames of depth and grayscale images of the parking space, a detection plane is generated, the centroid distance and the angle between the normal vectors are calculated, and the status of the parking space is confirmed as vacant or occupied by a vehicle using a threshold range, thus reducing the impact of environmental fluctuations.

Benefits of technology

It improves the accuracy of parking space status judgment, avoids erroneous judgments caused by environmental fluctuations, allows users to know the parking space status in a timely manner, and reduces the steps and labor costs of human judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117456435B_ABST
    Figure CN117456435B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and medium for detecting vacant parking spaces. The method, applied to an intelligent parking system, includes: acquiring N consecutive frames of images of parking spaces from an image acquisition unit, each frame including a depth image and a grayscale image; for the k-th frame image contained in the N depth images, where the k-th frame is any one of the N depth images, performing the following processing: acquiring image data of the depth image within the region of interest, generating a detection plane; calculating the detection centroid and detection normal vector based on the detection plane; calculating the centroid distance based on the reference centroid and the detection centroid; calculating the angle between the normal vectors based on the reference normal vector and the detection normal vector; when the centroid distance does not exceed a threshold distance range and the angle between the normal vectors does not exceed a threshold angle range, confirming the parking space status of the depth image as vacant; otherwise, confirming the parking space status of the depth image as occupied. This method is used to detect the status of vacant parking spaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent parking, and more particularly to a method, apparatus, device, and medium for detecting vacant parking spaces. Background Technology

[0002] Currently, existing parking space detection solutions are generally based on deep learning and sensor physical feature detection technologies. These are easily affected by abnormal fluctuations in the environment; dust or pedestrian movement can lead to incorrect judgments of parking space status, making it difficult to accurately determine parking space availability. This results in wasted time waiting for vacant parking spaces. Furthermore, delayed detection of parking space status can lead to wasted space when spaces are already vacant while users are still waiting. Therefore, there is an urgent need for a method, device, equipment, and medium for detecting vacant parking spaces to improve these problems. Summary of the Invention

[0003] The purpose of this invention is to provide a method, apparatus, device, and medium for detecting vacant parking spaces, wherein the method is used to detect the status of vacant parking spaces.

[0004] In a first aspect, the present invention provides a method for detecting vacant parking spaces, applied to an intelligent parking system, comprising: acquiring a group of N consecutive images of parking spaces from an image acquisition unit, each image group including a depth image and a grayscale image; for the k-th image contained in the N-frame depth images, wherein the k-th frame depth image is any one of the N-frame depth images, performing the following processing: acquiring image data of the depth image within a region of interest (ROI) and generating a detection plane; calculating the detection centroid and detection normal vector based on the detection plane; calculating the centroid distance based on the reference centroid and the detection centroid; calculating the angle between the normal vectors based on the reference normal vector and the detection normal vector; when the centroid distance does not exceed a threshold distance range and the angle between the normal vectors does not exceed a threshold angle range, confirming that the parking space status of the depth image is vacant; otherwise, confirming that the parking space status of the depth image is occupied.

[0005] The beneficial effects of the method of the present invention are as follows: It acquires a group of N consecutive images of parking spaces from an image acquisition unit, each image group including a depth image and a grayscale image; for the k-th image contained in the N-frame depth images, where the k-th frame depth image is any one of the N-frame depth images, the following processing is performed: acquiring image data of the depth image within the region of interest, generating a detection plane; calculating the detection centroid and detection normal vector based on the detection plane; calculating the centroid distance based on the reference centroid and the detection centroid; calculating the angle between the normal vectors based on the reference normal vector and the detection normal vector; when the centroid distance does not exceed a threshold distance range and the angle between the normal vectors does not exceed a threshold angle range, the parking space status of the depth image is confirmed as vacant; otherwise, the parking space status of the depth image is confirmed as occupied. It is not easily affected by abnormal fluctuations in the environment; dust or pedestrian movement will not cause errors in judging the parking space status, making it easier for users to accurately know the parking space status. At the same time, it enables users to know the parking space status in a timely manner, preventing the waste of parking space space when the space is already vacant while the user is still waiting, thus improving the user experience. The method for detecting vacant parking spaces in this invention is simple to use and low in cost, reducing the steps of manually judging the status of parking spaces and helping to save labor costs.

[0006] Optionally, before acquiring a group of N consecutive frames of images of the parking space from the image acquisition unit, the method further includes: acquiring a grayscale image of the parking space when it is vacant; identifying the pixel coordinates of the parking space lines based on the grayscale image to generate the region of interest; generating a reference plane based on the image data of the depth image within the region of interest; calculating a reference centroid and a reference normal vector based on the reference plane; and generating a distance threshold range for the reference centroid and an angle threshold range for the reference normal vector based on the temporal fluctuation of the depth.

[0007] Optionally, a reference plane is generated based on the image data within the region of interest from the depth image, including: continuously acquiring several frames of depth images of parking spaces in a preset vacant state, and obtaining a reference image by averaging the data; performing mean filtering on the depth values ​​within the region of interest in the reference image to generate depth parameters; converting the depth parameters into point cloud coordinates based on an intrinsic parameter matrix; and fitting the point cloud coordinates to a point cloud plane using the least squares method to obtain the reference plane.

[0008] Optionally, it also includes updating the parking space status to "occupied" when the parking space status of the n consecutive depth images is confirmed to be "occupied"; and updating the parking space status to "idle" when the parking space status of the n consecutive depth images is confirmed to be "idle", where n is any positive integer.

[0009] Optionally, acquiring image data of the depth image within the region of interest and generating a detection plane includes: continuously acquiring several frames of depth images of arbitrary parking space states, and obtaining a detection image by averaging the data; performing mean filtering on the depth values ​​within the region of interest in the detection image to generate depth parameters; converting the depth parameters into point cloud coordinates according to an intrinsic parameter matrix; and fitting the point cloud coordinates to a point cloud plane using the least squares method to obtain the detection plane.

[0010] Optionally, generating the region of interest by recognizing the pixel coordinates of the parking lines in the grayscale image includes: detecting the edges of the parking lines in the grayscale image using an edge detection algorithm; and generating the region of interest based on the pixel coordinates of the edges of the parking lines.

[0011] Optionally, acquiring a group of N consecutive frames of images about the parking space from the image acquisition unit includes: the image acquisition unit acquiring a group of several consecutive frames of images with a horizontal distance d from the parking space line, a height h from the ground, and a pitch angle θ; the height h of the image acquisition unit from the ground satisfies:

[0012]

[0013] Where H is the preset vehicle height; d is the distance between the image acquisition unit and the back of the parking space line; and L is the length of the parking space line.

[0014] Optionally, the field of view of the depth image in the vertical direction is α; the field of view of the depth image in the horizontal direction is β; the field of view α in the vertical direction and the field of view β in the horizontal direction respectively satisfy:

[0015]

[0016]

[0017] Where d is the horizontal distance between the image acquisition unit and the parking space line; L is the length of the parking space line; w is the width of the parking space line; and h is the height of the image acquisition unit from the ground.

[0018] Optionally, the pitch angle θ of the image acquisition unit satisfies:

[0019]

[0020] Where d is the distance between the image acquisition unit and the back of the parking space line; h is the height of the image acquisition unit above the ground; and α is the field of view angle in the vertical direction.

[0021] In a second aspect, the present invention provides a parking space detection device for use with the method described in any one of the first aspects, comprising: a processing unit, an image acquisition unit, and a storage unit; the image acquisition unit is used to acquire N consecutive frames of images of a parking space, each frame of the image group including a depth image and a grayscale image; the processing unit is used to perform the following processing on a k-th frame of the N-frame image group, wherein the k-th frame depth image is any frame of the N-frame image group: acquiring image data of the depth image within a region of interest, generating a detection plane; calculating the detection centroid and detection normal vector based on the detection plane; calculating the centroid distance based on the reference centroid and the detection centroid; calculating the angle between the normal vectors based on the reference normal vector and the detection normal vector; when the centroid distance does not exceed a threshold distance range and the angle between the normal vectors does not exceed a threshold angle range, confirming that the parking space status of the depth image is vacant; otherwise, confirming that the parking space status of the depth image is occupied; the storage unit is used to store the parking space status.

[0022] Optionally, the image acquisition unit is further configured to: acquire a depth image when the parking space is vacant; generate a reference plane based on the image data of the depth image within the region of interest; calculate a reference centroid and a reference normal vector based on the reference plane; and generate a distance threshold range for the reference centroid and an angle threshold range for the reference normal vector based on the temporal fluctuations of the depth.

[0023] It is worth noting that the detection plane is generated based on several frames of depth images of arbitrary parking space states; the detection plane generated from the depth images of parking spaces in an vacant state is also used to calibrate the reference plane.

[0024] Thirdly, the present invention provides an electronic device including a memory, a processor, and a depth camera; the memory stores a program executable on the processor, which, when executed by the processor, causes the electronic device to perform the method described in any one of the first aspects.

[0025] Fourthly, the present invention provides a readable storage medium storing a program; when the program is executed, it implements the method described in any one of the first aspects. Attached Figure Description

[0026] Figure 1 This is a flowchart illustrating the method for detecting vacant parking spaces provided by the present invention.

[0027] Figure 2 This is a schematic diagram of the acquisition unit provided by the present invention installed on a charging pile;

[0028] Figure 3 Provided by the present invention Figure 2 The corresponding top view;

[0029] Figure 4 This invention provides a structural schematic diagram of the reference plane and detection plane relative to the parking space.

[0030] Figure 5 This is a schematic diagram of the device for detecting vacant parking spaces provided by the present invention;

[0031] Figure 6 This is a schematic diagram of the electronic device for detecting vacant parking spaces provided by the present invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. Unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by those skilled in the art. The terms "comprising" and similar expressions used herein mean that the element or object preceding the word covers the element or object listed following the word and its equivalents, but do not exclude other elements or objects.

[0033] Figure 1 This is a flowchart illustrating the method for detecting vacant parking spaces provided by the present invention.

[0034] In response to the problems existing in the current technology, such as Figure 1 As shown, the present invention provides a method for detecting vacant parking spaces, applied to an intelligent parking system, comprising:

[0035] S101, acquire N consecutive frames of images of the parking space from the image acquisition unit, each frame of the image group including a depth image and a grayscale image.

[0036] Figure 2 This is a schematic diagram of the acquisition unit provided by the present invention installed on a charging pile. Figure 3 Provided by the present invention Figure 2 The corresponding top view.

[0037] like Figure 2 and Figure 3 As shown, in some embodiments, acquiring N consecutive frames of depth images about the parking space from the image acquisition unit 101 includes: the image acquisition unit 101 acquiring a group of several consecutive frames of images with a horizontal distance d from the parking space line, a height h from the ground, and a pitch angle θ. The height h of the image acquisition unit 101 from the ground satisfies:

[0038]

[0039] Where H is the preset vehicle height. d is the distance between the image acquisition unit 101 and the rear of the parking space line. L is the length of the parking space line.

[0040] In some embodiments, the field of view of the depth image in the vertical direction is α. The field of view of the depth image in the horizontal direction is β. The field of view angle α in the vertical direction and the field of view angle β in the horizontal direction respectively satisfy:

[0041]

[0042]

[0043] Where d is the horizontal distance between the image acquisition unit 101 and the parking space line. L is the length of the parking space line. w is the width of the parking space line. h is the height of the image acquisition unit 101 above the ground.

[0044] In some specific embodiments, the image acquisition unit 101 is disposed on the charging pile 110.

[0045] In some other embodiments, one image acquisition unit 101 corresponds to t parking spaces. t is set to any positive integer. The depth image is assigned a region of interest for each of the t parking spaces.

[0046] In some embodiments, the pitch angle θ of the image acquisition unit 101 satisfies:

[0047]

[0048] Where d is the distance between the image acquisition unit 101 and the rear of the parking space line. h is the height of the image acquisition unit 101 above the ground. α is the field of view angle in the vertical direction.

[0049] It is worth noting that the time interval between adjacent frames in the N consecutive frames of depth images of the parking space can be any unit of time. The frame rate at which the image acquisition unit 101 acquires the depth images includes, but is not limited to, at least one of 30fps, 60fps, 90fps, and 120fps.

[0050] In some embodiments, before acquiring N consecutive frames of depth images of the parking space from the image acquisition unit 101, the method further includes: acquiring a grayscale image of the parking space when it is vacant; identifying the pixel coordinates of the parking space lines based on the grayscale image; generating the region of interest; generating a reference plane based on the image data of the depth image within the region of interest; calculating a reference centroid and a reference normal vector based on the reference plane; and generating a distance threshold range for the reference centroid and an angle threshold range for the reference normal vector based on the temporal fluctuations of the depth.

[0051] Figure 4 This is a schematic diagram of the structure of the reference plane and the detection plane relative to the parking space provided by the present invention.

[0052] like Figure 4 As shown, in some specific embodiments, the normal vector of the reference plane A... The normal vector of the detection plane B The included angle is γ. The distance between the reference centroid and the probe centroid is m.

[0053] In some embodiments, generating a reference plane based on image data within the region of interest from the depth image includes: continuously acquiring several frames of depth images of parking spaces in a preset vacant state; obtaining a reference image by averaging the data; performing mean filtering on the depth values ​​within the region of interest in the reference image to generate depth parameters; converting the depth parameters into point cloud coordinates based on an intrinsic parameter matrix; and fitting the point cloud coordinates to a point cloud plane using the least squares method to obtain the reference plane.

[0054] S102, for the k-th frame image contained in the N-frame depth images, where the k-th frame depth image is any frame in the N-frame depth images, perform the following processing: acquire the image data of the depth image in the region of interest, and generate a probe plane.

[0055] In some embodiments, acquiring image data of the depth image within the region of interest and generating a detection plane includes: continuously acquiring several frames of depth images of arbitrary parking space states; obtaining a detection image by averaging the data; performing mean filtering on the depth values ​​within the region of interest in the detection image to generate depth parameters; converting the depth parameters into point cloud coordinates based on an intrinsic parameter matrix; and fitting the point cloud coordinates to a point cloud plane using the least squares method to obtain the detection plane.

[0056] It is worth noting that the detection plane is generated based on several frames of depth images showing arbitrary parking space states, while the reference plane is generated based on several consecutively acquired frames of depth images showing parking spaces in a preset vacant state. The closer the parking space state in the depth images is to an vacant state, the closer the parameters of the detection plane are to the parameters of the reference plane.

[0057] In some embodiments, generating the region of interest by recognizing the pixel coordinates of the parking lines in the grayscale image includes: detecting the edges of the parking lines in the depth image using an edge detection algorithm; and generating the region of interest based on the pixel coordinates of the edges of the parking lines.

[0058] For example, the edge detection algorithm is set to the Canny edge operator detection algorithm.

[0059] In some specific embodiments, because the reflectivity of the parking lines is different from that of the surrounding environment, the edges of the parking lines can be identified through grayscale images to determine the region of interest.

[0060] S103, calculate the detection centroid and detection normal vector based on the detection plane.

[0061] In some specific embodiments, the coordinates of the probe centroid are set to X1 represents the mean value of the x-coordinate of several of the probe centroids. Y1 represents the mean value of the ordinate of the centroid of the probe. Z1 represents the average of several centroid depth values ​​Z1.

[0062] S104, calculate the centroid distance based on the reference centroid and the probe centroid. Calculate the angle between the normal vectors based on the reference normal vector and the probe normal vector.

[0063] In some specific embodiments, the centroid distance dis satisfies:

[0064]

[0065] X1 represents the mean value of the x-coordinate of several of the probe centroids. Y1 represents the mean value of the ordinate of the centroid of the probe. Z1 represents the average of several centroid depth values ​​Z1. This represents the mean value of the x-coordinate X0 of several reference centroids. This represents the mean value of the ordinate Y0 of several reference centroids. This represents the average of several reference centroid depth values ​​Z0.

[0066] S105, when the centroid distance does not exceed the threshold distance range and the normal vector angle does not exceed the threshold angle range, the parking space status of the depth image is confirmed to be vacant. Otherwise, the parking space status of the depth image is confirmed to be occupied.

[0067] In some specific embodiments, when the centroid distance does not exceed the threshold distance range and the normal vector angle does not exceed the threshold angle range, the parking space status of the depth image is confirmed to be vacant, and the parking space status is updated to the vacant status.

[0068] In other specific embodiments, when the centroid distance exceeds the threshold distance range and the normal vector angle exceeds the threshold angle range, the parking space status of the depth image is confirmed to be a car-occupied state, and the parking space status is updated to the car-occupied state.

[0069] In some specific embodiments, when the centroid distance does not exceed the threshold distance range and the angle between the normal vectors exceeds the threshold angle range, the parking space status of the depth image is confirmed to be in a car-occupied state, and the parking space status is updated to the car-occupied state.

[0070] In some specific embodiments, when the centroid distance exceeds the threshold distance range and the angle between the normal vectors does not exceed the threshold angle range, the parking space status of the depth image is confirmed to be in a car-occupied state, and the parking space status is updated to the car-occupied state.

[0071] In some embodiments, the method further includes updating the parking space status to "occupied" when the parking space status of the n consecutive depth images is confirmed as "occupied". The method also includes updating the parking space status to "idle" when the parking space status of the n consecutive depth images is confirmed as "idle", where n is any positive integer.

[0072] It is worth noting that N consecutive frames of images about parking spaces are acquired from the image acquisition unit 101. For the k-th frame of the N-frame depth images (where the k-th frame is any frame in the N-frame depth images), the following processing is performed: The pixel coordinates of the parking space lines are identified based on the grayscale image, generating a region of interest (ROI). Image data of the depth image within the ROI is acquired, generating a detection plane. The detection centroid and detection normal vector are calculated based on the detection plane. The centroid distance is calculated based on the reference centroid and the detection centroid. The angle between the normal vectors is calculated based on the reference normal vector and the detection normal vector. When the centroid distance does not exceed a threshold distance range and the angle between the normal vectors does not exceed a threshold angle range, the parking space status of the depth image is confirmed as vacant. Otherwise, the parking space status of the depth image is confirmed as occupied. This method is not easily affected by abnormal fluctuations in the environment; dust or pedestrian movement will not cause errors in parking space status judgment, making it easy for users to accurately determine the parking space status. Meanwhile, it enables users to be promptly informed of parking space availability, preventing wasted parking space by waiting for vacant spaces, thus improving the user experience. This invention's method for detecting vacant parking spaces is simple to use and low-cost, reducing the need for manual judgment of parking space status and saving labor costs.

[0073] Figure 5 This is a schematic diagram of the device for detecting vacant parking spaces provided by the present invention.

[0074] like Figure 5 As shown, the present invention provides a parking space detection device for the method described in any of the above embodiments, comprising: a processing unit 102, an image acquisition unit 101, and a storage unit 103. The image acquisition unit 101 is used to acquire N consecutive frames of depth images of parking spaces. The processing unit 102 is used to perform the following processing on a k-th frame image included in the N frames of depth images, where the k-th frame is any frame in the N frames of depth images: identifying the pixel coordinates of parking space lines based on the grayscale image to generate a region of interest; acquiring image data of the depth image within the region of interest to generate a detection plane; calculating the detection centroid and detection normal vector based on the detection plane; calculating the centroid distance based on the reference centroid and the detection centroid; calculating the angle between the normal vectors based on the reference normal vector and the detection normal vector; confirming that the parking space status of the depth image is occupied when the centroid distance does not exceed a threshold distance range and the angle between the normal vectors does not exceed a threshold angle range; otherwise, confirming that the parking space status of the depth image is vacant. The storage unit 103 is used to store the parking space status.

[0075] In one possible design, the processor 202 and the memory 203 can be set up separately or integrated on the same integrated circuit chip.

[0076] It should be noted that the processor 202 in the embodiments of the present invention can be an image processing chip or an integrated circuit chip, having the ability to process image signals. In implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0077] It is understood that the memory 203 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0078] In some embodiments, the processing unit 102 is configured to acquire N consecutive frames of depth images of the parking space from the image acquisition unit 101, and further includes: acquiring a depth image when the parking space is vacant; generating a reference plane based on image data of the depth images within the region of interest; calculating a reference centroid and a reference normal vector based on the reference plane; and generating a distance threshold range for the reference centroid and an angle threshold range for the reference normal vector based on the temporal fluctuations of the depth.

[0079] In some other embodiments, the detection plane generated from the depth image when the parking space is in an vacant state is also used to calibrate the reference plane.

[0080] In some embodiments, the device further includes an interaction unit 104. At least one of the storage unit 103 and the processing unit 102 is electrically connected to the interaction unit 104. The interaction unit 104 is used to acquire the parking space status stored in the storage unit 103.

[0081] Figure 6This is a schematic diagram of the electronic device for detecting vacant parking spaces provided by the present invention.

[0082] like Figure 6 As shown, the present invention provides an electronic device including a memory, a processor, and a depth camera. The memory stores a program executable on the processor, which, when executed by the processor, causes the electronic device to perform the method described in any of the above embodiments.

[0083] In some embodiments, the electronic device 200 further includes a query terminal 204. The query terminal 204 is connected to the memory 203 and is used to obtain the parking space status.

[0084] In other embodiments, the query terminal 204 is connected to the processor 202 and is used to obtain the parking space status stored in the memory 203 through the processor 202.

[0085] It is worth noting that the query terminal 204 includes, but is not limited to, smartphones and parking lot electronic displays.

[0086] This invention provides a readable storage medium storing a program. When the program is executed, it implements the method described in any of the above embodiments.

[0087] It is worth noting that if the method is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0088] While embodiments of the present invention have been described in detail above, it will be apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations fall within the scope and spirit of the invention as set forth in the claims. Furthermore, the invention described herein may have other embodiments and can be implemented or carried out in various ways.

Claims

1. A method for detecting vacant parking spaces, applied to an intelligent parking system, characterized in that, include: Obtain a grayscale image of a parking space when it is vacant; Based on the grayscale image, the pixel coordinates of the parking space lines are identified, and a region of interest is generated. A reference plane is generated based on the image data of the depth image within the region of interest; a reference centroid and a reference normal vector are calculated based on the reference plane. The distance threshold range of the reference centroid and the angle threshold range of the reference normal vector are generated based on the fluctuation of depth in the time domain. The image acquisition unit acquires N consecutive frames of images of the parking space, each frame of which includes a depth image and a grayscale image. For the k-th frame image contained in the N-frame depth images, where the k-th frame depth image is any frame in the N-frame depth images, the following processing is performed: The edges of parking lines in the depth image are detected by an edge detection algorithm; a region of interest is generated based on the pixel coordinates of the edges of the parking lines; several frames of depth images of arbitrary parking space states are continuously acquired, and the detected image is obtained by averaging the data. The depth values ​​within the region of interest in the detected image are subjected to mean filtering to generate depth parameters; The depth parameters are converted into point cloud coordinates based on the intrinsic parameter matrix; the point cloud coordinates are fitted to a point cloud plane using the least squares method to obtain the detection plane; the detection centroid and detection normal vector are calculated based on the detection plane. The centroid distance is calculated based on the reference centroid and the probe centroid. Calculate the angle between the normal vectors based on the reference normal vector and the probe normal vector; When the centroid distance does not exceed the threshold distance range and the angle between the normal vectors does not exceed the threshold angle range, the parking space status of the depth image is confirmed to be vacant; otherwise, the parking space status of the depth image is confirmed to be occupied.

2. The method according to claim 1, characterized in that, Based on the image data of the depth image within the region of interest, a reference plane is generated, including: Several frames of depth images of parking spaces in a preset idle state are continuously acquired, and a reference image is obtained by averaging the data. The depth values ​​within the region of interest in the reference image are subjected to mean filtering to generate depth parameters. The depth parameters are converted into point cloud coordinates based on the intrinsic parameter matrix; The point cloud coordinates are fitted to a point cloud plane using the least squares method to obtain the reference plane.

3. The method according to claim 1, characterized in that, It also includes updating the parking space status to "car present" when the parking space status of n consecutive frames of depth images is confirmed to be "car present". The parking space status is updated to idle when the parking space status is confirmed to be idle in n consecutive frames of depth images, where n is any positive integer.

4. The method according to claim 1, characterized in that, The image acquisition unit acquires a group of N consecutive frames of images of the parking space, including: The image acquisition unit acquires a series of consecutive frames of images with a horizontal distance of d from the parking line, a height of h from the ground, and a pitch angle of θ. The height h of the image acquisition unit above the ground satisfies: Where H is the preset vehicle height; L is the length of the parking space line.

5. The method according to claim 4, characterized in that, The depth image has a field of view of α in the vertical direction and a field of view of β in the horizontal direction. The vertical field of view α and the horizontal field of view β respectively satisfy: Where L is the length of the parking space line; w is the width of the parking space line; and h is the height of the image acquisition unit from the ground.

6. The method according to claim 4, characterized in that, The pitch angle θ of the image acquisition unit satisfies: Where h is the height of the image acquisition unit above the ground; α is the field of view angle in the vertical direction.

7. A parking space detection device, used in the method according to any one of claims 1-6, characterized in that, include: Processing unit, image acquisition unit, and storage unit; The image acquisition unit is used to acquire N consecutive frames of images of the parking space, and each frame of the image group includes a depth image and a grayscale image; The processing unit is configured to perform the following processing on the kth frame image group contained in the N-frame image group, wherein the kth frame depth image is any frame in the N-frame image group: acquire image data of the depth image within the region of interest, generate a probe plane; and calculate the probe centroid and probe normal vector based on the probe plane. The centroid distance is calculated based on the reference centroid and the probe centroid. The angle between the normal vectors is calculated based on the reference normal vector and the probe normal vector; when the centroid distance does not exceed the threshold distance range and the angle between the normal vectors does not exceed the threshold angle range, the parking space status of the depth image is confirmed to be vacant; otherwise, the parking space status of the depth image is confirmed to be occupied. The storage unit is used to store the parking space status.

8. The apparatus according to claim 7, characterized in that, The image acquisition unit is also used to: acquire a depth image when the parking space is vacant; A reference plane is generated based on the image data of the depth image within the region of interest; a reference centroid and a reference normal vector are calculated based on the reference plane. The distance threshold range of the reference centroid and the angle threshold range of the reference normal vector are generated based on the fluctuation of depth in the time domain.

9. An electronic device, characterized in that, It includes a memory, a processor, and a depth camera; the memory stores a program that can run on the processor, which, when executed by the processor, causes the electronic device to perform the method of any one of claims 1 to 5.

10. A readable storage medium storing a program therein; characterized in that, When the program is executed, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for detecting usage of parking space, electronic equipment, and storage medium

    CN110533950A

  • Parking lot intelligent monitoring and identification system based on deep learning algorithm

    CN111062285A