WO2023179416A1 - Method and apparatus for determining entry and exit of vehicle into and out of parking space, device, and storage medium - Google Patents

Method and apparatus for determining entry and exit of vehicle into and out of parking space, device, and storage medium Download PDF

Info

Publication number
WO2023179416A1
WO2023179416A1 PCT/CN2023/081494 CN2023081494W WO2023179416A1 WO 2023179416 A1 WO2023179416 A1 WO 2023179416A1 CN 2023081494 W CN2023081494 W CN 2023081494W WO 2023179416 A1 WO2023179416 A1 WO 2023179416A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
frame
image
target
parking space
Prior art date
Application number
PCT/CN2023/081494
Other languages
French (fr)
Chinese (zh)
Inventor
神克乐
陈新
周浩
荆碧晨
徐博文
龙一民
邵懿
杜伟
Original Assignee
阿里云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里云计算有限公司 filed Critical 阿里云计算有限公司
Publication of WO2023179416A1 publication Critical patent/WO2023179416A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B15/00Arrangements or apparatus for collecting fares, tolls or entrance fees at one or more control points
    • G07B15/02Arrangements or apparatus for collecting fares, tolls or entrance fees at one or more control points taking into account a variable factor such as distance or time, e.g. for passenger transport, parking systems or car rental systems

Definitions

  • the present invention relates to the technical field of image processing, and in particular to a method, device, equipment and storage medium for determining the entry and exit of a vehicle into a parking space.
  • Automated charging strategies for roadside parking spaces currently include the following methods: charging with handheld terminal devices, installing geomagnetism, and installing video piles.
  • the charging method of handheld terminal equipment requires manual labor to carry the terminal equipment continuously for duty, and there are omissions and other phenomena. It also relies heavily on manual labor and low technology, resulting in high operating costs. This method is obviously not suitable for today's smart city technology.
  • Target. The second is the geomagnetic solution, which uses sensors within the geomagnetic field to sense whether there are obstacles above the geomagnetic field. Since it is impossible to determine whether the obstacle is a parking vehicle or other non-motorized vehicle, this method is susceptible to interference and has a high false alarm rate.
  • the premise of the automated charging strategy for roadside parking spaces is to be able to automatically and accurately identify vehicles entering and leaving the parking spaces. Therefore, how to complete the automatic and accurate identification of vehicles entering and parking at the berth and leaving the berth is a problem that needs to be solved.
  • Embodiments of the present invention provide a method, device, equipment and storage medium for determining vehicle entry and exit from a berth, so as to improve the accuracy of the determination result of a vehicle's entry and exit from a berth.
  • an embodiment of the present invention provides a method for determining whether a vehicle enters or exits a parking space.
  • the method includes:
  • the vehicle tracking information includes the corresponding positioning positions of the vehicle identification of the target vehicle in the multi-frame second images; wherein the target parking frame is the position of any of the parking spots in the camera.
  • the target vehicle enters the parking space corresponding to the target parking frame and stops; wherein the warning frame is the entrance to the parking space.
  • the pre-warning area that multiple parking spaces need to pass through is the corresponding image area boundary in the shooting picture of the camera.
  • the early warning area is a roadway area surrounding the multiple parking spaces.
  • an embodiment of the present invention provides a device for determining the entry and exit of a vehicle into a parking space.
  • the device includes:
  • An acquisition module used to acquire the first image collected by a camera covering multiple berths
  • a detection module configured to perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body;
  • a processing module configured to obtain all the second images in multiple frames collected within a preset time before the first image if it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking occupancy conditions of the target parking frame.
  • the vehicle tracking information of the target vehicle includes the respective corresponding positioning positions of the vehicle identification of the target vehicle in the plurality of second images; and if the vehicle identification is determined according to the vehicle tracking information appears in the preset early warning frame, then it is determined that the target vehicle has entered the parking space corresponding to the target parking space frame and is parked; wherein, the early warning frame is the early warning area required to pass in and out of the multiple parking spaces.
  • the corresponding image area boundary in the camera's shooting screen, the warning area is the roadway area surrounding the multiple parking spaces, and the target parking frame is the corresponding image area of any of the parking spaces in the camera's shooting screen. the image area boundary.
  • embodiments of the present invention provide an electronic device, including: a memory, a processor, and a communication interface; wherein executable code is stored on the memory, and when the executable code is executed by the processor, The processor is enabled to at least implement the method for determining the vehicle entering and exiting the parking space as described in the first aspect.
  • embodiments of the present invention provide a non-transitory machine-readable storage medium.
  • the non-transitory machine-readable storage medium stores executable code.
  • the executable code is processed by a processor of an electronic device, When executed, the processor is enabled to at least implement the method for determining the entry and exit of a vehicle into a parking space as described in the first aspect.
  • embodiments of the present invention provide a method for determining vehicle entry and exit from a roadside parking space, including:
  • the roadside camera includes a camera arranged on the same side of the roadside parking space, and the roadside camera covers multiple roadside parking spaces;
  • the vehicle tracking information includes the corresponding position of the vehicle identification of the target vehicle in the multi-frame second image. position; wherein, the target parking frame is the boundary of the image area corresponding to any of the roadside parking spaces in the shooting screen of the roadside camera;
  • the target vehicle drives into the roadside parking space corresponding to the target parking frame and stops; wherein the warning frame is the entrance and exit
  • the warning area that the multiple roadside parking spaces need to pass through is the corresponding image area boundary in the picture captured by the roadside camera.
  • the warning area is a roadway area surrounding the multiple roadside parking spaces.
  • a camera can be set up on the roadside on the same side of the roadside parking space, called a roadside camera.
  • One roadside camera can be configured to cover multiple fixed roadside parking spaces.
  • the roadside camera cannot be rotated, so the roadside camera has a fixed shooting range. That is to say, for the multiple roadside parking spaces that can be covered by one roadside camera, these multiple roadside parking spaces can be covered by the roadside camera.
  • the captured image always corresponds to a fixed image area, and the closed curve enclosed by the boundaries of the image area is called the berth border.
  • an early warning area is defined on the same side of the roadside parking space.
  • the early warning area is the roadway area surrounding the multiple roadside parking spaces. Vehicles entering and exiting these multiple roadside parking spaces can Roadside parking spaces must pass through this warning area. Based on this definition, it can be understood that the warning area also has a fixed image area in the picture captured by the roadside camera, and the closed curve formed by the boundary of the image area is called a warning frame.
  • the camera takes a video picture, and the video picture captured by the camera can be sampled to obtain a frame of image.
  • the video picture captured by the camera can be sampled to obtain a frame of image.
  • vehicle detection is to detect the vehicle detection frame of each vehicle contained in the image and the position of a certain center point preset on the body. This position refers to the position of the center point in the image. corresponding pixel position in .
  • vehicle tracking is to identify the same vehicle in different frame images and determine the vehicle's vehicle identity.
  • the vehicle identification can be a recognized license plate number or the same tracking number assigned to the same vehicle.
  • vehicle detection processing is performed on the first image to obtain the vehicle detection corresponding to the target vehicle (referring to any vehicle included in it) in the first image.
  • the position of the center point of the frame and the body is preset, and on the premise that the multiple parking spaces covered by the camera are known to have corresponding parking frame frames in the image, first, determine whether the target vehicle meets the parking occupancy conditions, that is, combined with the detected
  • the vehicle detection frame of the target vehicle and the position of the preset center point on the vehicle body determine whether the target vehicle currently occupies a parking space corresponding to a target parking frame.
  • the time will be traced back to obtain the second image of multiple frames collected within the preset time (such as 10 seconds) before the first image.
  • Vehicle tracking information of the target vehicle includes the corresponding positioning positions of the vehicle identification of the target vehicle in the multiple second images. That is to say, based on the previous vehicle tracking process, the target vehicle corresponding to the same vehicle identification can be obtained. The position where the frame appears in the image.
  • the target vehicle that entered the parking space corresponding to the target parking frame has appeared in the warning area before entering the parking space, that is, it is determined whether the vehicle identification of the target vehicle appears in the second image of the multiple frames.
  • the vehicle identification of the target vehicle appears in the second image of the multiple frames.
  • the vehicle logo appears in one or several frames of the second image, it is finally determined that the target vehicle enters the parking space corresponding to the target parking space frame and stops.
  • an early warning area is defined outside several consecutive parking spaces covered by the same camera to assist in the judgment of vehicles entering and exiting the parking spaces. Only after it is first determined that the vehicle meets the conditions for occupying the parking space, it is determined that the vehicle meets the requirements of the early warning area. When the conditions are met, it is finally determined that the vehicle has entered the parking space and parked, thereby improving the accuracy of the entry determination result. Moreover, when determining parking space occupancy, combining the two factors of the vehicle detection frame and a specific center point on the vehicle body to determine whether the vehicle occupies a certain parking space can improve the accuracy of the parking space occupancy determination result.
  • Figure 1 is a schematic diagram of a berth parking scene provided by an embodiment of the present invention.
  • Figure 2 is a flow chart of a method for determining that a vehicle has entered a parking space according to an embodiment of the present invention
  • Figure 3 is a schematic diagram of a vehicle detection frame and a vehicle chassis detection frame provided by an embodiment of the present invention
  • Figure 4 is a schematic diagram of a vehicle detection frame and a vehicle chassis center point determination principle provided by an embodiment of the present invention
  • Figure 5 is a flow chart of a method for determining that a vehicle moves out of a parking space according to an embodiment of the present invention
  • Figure 6 is a schematic structural diagram of a device for determining vehicle entry and exit from a parking space provided by an embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of an electronic device provided by the embodiment shown in FIG. 6 .
  • the method for determining vehicle entry and exit parking spaces provided by the embodiment of the present invention is suitable for parking management application scenarios of roadside parking spaces and indoor and outdoor parking lots.
  • Roadside parking spaces refer to the allowed spaces demarcated on the side of the roadway close to the sidewalk. Parking space.
  • each berth needs to independently set up a geomagnetic device, which also has a large equipment overhead. Moreover, this solution also didn't stop Car pictures or video evidence links can easily lead to parking fee disputes. For this reason, for roadside parking spaces, the video pile solution can be used.
  • the video pile solution mainly installs a camera on the road sidewalk at the same height as the vehicle, close to the roadside parking space. Although this solution can retain the parking evidence chain, however, The maintenance cost is high and it is easy to be damaged manually.
  • the roads in many northern cities have a lot of dust, and the dust can easily block the camera within 3 meters of the road. Therefore, manual cleaning is also required on a regular basis.
  • the embodiment of the present invention proposes a high-level video solution.
  • This solution requires the installation of high poles with higher heights (generally more than 6 meters) on the sidewalks of the roads, and then Cameras are installed on high poles.
  • Each camera is responsible for photographing several (usually 3-4) parking spaces, and uses artificial intelligence algorithms to identify vehicles entering and exiting the parking spaces and generate corresponding entry and exit events, such as recording the parking start of vehicles. and end time, as well as the corresponding vehicle identification (such as license plate number), and save the picture/video evidence chain of the vehicle entering and exiting, so as to realize automatic vehicle toll collection management for roadside parking spaces.
  • high poles can be installed by borrowing poles (such as borrowing street light poles), making rational use of existing municipal facilities. Reduce impact on urban landscape. Similarly, for indoor and outdoor parking lots, cameras can also be set up at higher locations.
  • the embodiment of the present invention takes the roadside parking scene as an example for description.
  • the camera used to take pictures of the roadside parking space (called a roadside camera) can be set on the opposite side of the roadside parking space or on the roadside. Same side of the berth.
  • the roadside camera can be located on the sidewalk on the left side of the road, that is, on the same side as the roadside parking spaces, or it can be located on the sidewalk on the right side of the road, that is, opposite to the roadside parking spaces. side settings.
  • roadside cameras may exist on both the same side and the opposite side.
  • a roadside camera has a limited shooting range. Therefore, a roadside camera is generally configured to cover several roadside parking spaces. Moreover, the roadside camera can be configured not to rotate, that is, to have a fixed shooting angle. In this way, multiple roadside parking spaces covered by the same roadside camera have a fixed image area in all the images captured by the roadside camera. .
  • the blocking of vehicles in the front and rear parking spaces is often serious, and the blocking rate is generally greater than 60%, and sometimes even close to 100%. Therefore , in the case of roadside cameras installed on the same side as the roadside parking space, it is very challenging to accurately identify vehicles entering and exiting the parking space.
  • the vehicles entering and exiting the berth mentioned here refer to vehicles that actually drive into the berth for parking and then drive out of the berth after parking for a period of time.
  • an early warning area is defined.
  • an early warning area represents the area that all vehicles must pass through from appearing in the roadside camera's picture to entering one of the roadside parking spaces or leaving the roadside parking space.
  • the early warning area "surrounds" multiple roadside berths.
  • This warning area is only an area defined to assist in accurately identifying vehicles entering and exiting the parking space. Since the multiple roadside areas it surrounds have fixed image areas in the pictures captured by the corresponding roadside cameras, and the positional relationship between the warning area and the multiple roadside areas is also fixed, therefore, the warning The area also has a fixed image area in the picture captured by the roadside camera.
  • the boundary of the image area corresponding to the roadside parking space in the shooting screen of the corresponding roadside camera is called the parking frame, and the boundary of the image area corresponding to the warning area in the shooting screen of the roadside camera is called For the warning border.
  • the parking space frame may be based on the actual roadside parking boundary line drawn on the roadway in the picture taken by the roadside camera in advance when no vehicle enters the multiple roadside parking spaces covered by the roadside camera.
  • the image area is marked.
  • the early warning frame can be based on the spatial positional relationship between the predefined early warning area and multiple roadside parking spaces (that is, the position and distance relationship between the two in real road scenes), as well as the images captured by roadside cameras of multiple roadside parking spaces.
  • the corresponding image area in the image area of the warning area in the picture captured by the roadside camera is mapped.
  • the method for determining whether a vehicle enters or exits a roadside parking space provided by the embodiment of the present invention can be executed by an electronic device.
  • the electronic device can be a server or terminal device that is communicatively connected to the roadside camera.
  • the server can be a physical server or a virtual server in the cloud. (virtual machine).
  • the roadside camera can also be completed by cooperating with the electronic device.
  • the vehicle detection, vehicle tracking and other processing of the image can also be completed locally on the roadside camera.
  • the electronic device receives data transmitted by the roadside camera related to generating the parking record in order to generate and store the parking record.
  • Figure 2 is a flow chart of a method for determining that a vehicle has entered a parking space according to an embodiment of the present invention. As shown in Figure 2, the method includes the following steps:
  • the roadside camera includes a camera installed on the same side of the roadside parking space.
  • the roadside camera covers multiple roadside parking spaces.
  • the vehicle tracking information includes the corresponding positioning positions of the vehicle identification of the target vehicle in the plurality of second images.
  • the target parking frame is the boundary of the image area corresponding to one of the plurality of roadside parking spaces in the picture captured by the roadside camera.
  • the target vehicle drives into the roadside parking space corresponding to the target parking space frame and stops.
  • the early warning frame is the boundary of the image area corresponding to the early warning area required to enter and exit the multiple roadside parking spaces in the shooting screen of the roadside camera, and the early warning area is surrounding the multiple roadside parking spaces.
  • the roadway area of the parking space is the boundary of the image area corresponding to the early warning area required to enter and exit the multiple roadside parking spaces in the shooting screen of the roadside camera, and the early warning area is surrounding the multiple roadside parking spaces.
  • the roadside camera X For the roadside camera X covering the above-mentioned multiple roadside parking spaces, the roadside camera X can continuously capture video images. Faced with the need to accurately identify vehicles entering and exiting roadside parking spaces, the video footage captured by the roadside camera Track processing. Among them, the sampling frequency can be preset, such as 5 frames/second.
  • the purpose of vehicle detection is to detect the vehicle detection frame of each vehicle contained in the image and the position of a certain center point preset on the vehicle body. This position refers to the corresponding pixel position in the image.
  • the purpose of vehicle tracking is to identify the same vehicle in different frame images and determine the vehicle's vehicle identity.
  • the above-mentioned preset center point may be the center point of the vehicle chassis.
  • the above-mentioned first image can be any frame image collected by the roadside camera
  • Vehicle detection processing can be implemented as:
  • the pre-trained deep neural network model uses the pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain the vehicle detection frame and vehicle chassis detection frame corresponding to the target vehicle in the first image, and determine the position of the center point of the vehicle chassis detection frame as the vehicle The position of the center point of the chassis.
  • the target vehicle refers to any vehicle detected from the first image.
  • the vehicle detection frame refers to the detection frame including the complete vehicle
  • the vehicle chassis detection frame refers to the detection frame including the vehicle chassis area, as shown in Figure 3.
  • the vehicle detection frame and the vehicle chassis detection frame are both a rectangular frame.
  • the vehicle chassis detection frame is obtained, the pixel coordinates of its four vertices in the image can be obtained, and then the pixels of the center point can be obtained based on the pixel coordinates of the four vertices.
  • the coordinate is the position of the center point of the vehicle chassis.
  • vehicle detection is also a target detection task for specific targets such as vehicles in images. Therefore, the above-mentioned deep neural network model can be trained using the training ideas of the target detection task. Simply put, a large number of training samples are collected in advance, which can include training sample images in which the vehicle presents various postures and occlusion situations in the image. By annotating the supervision information in the training sample images, the depth is carried out based on the annotated supervision information. Training of neural network models. Among them, the annotated supervision information is the vehicle detection frame and vehicle chassis detection frame corresponding to the vehicle in the corresponding training sample image.
  • optionally performing vehicle detection processing on the first image can also be implemented as:
  • the position of the top center point of the sub-detection frame is determined as the position of the center point of the vehicle chassis.
  • the deep neural network model can only be trained to identify the vehicle detection frame, and the corresponding position coordinates of the vehicle chassis center point in the first image are indirectly determined based on the obtained vehicle detection frame.
  • Figure 4 it is assumed that the deep neural network model detects a vehicle detection frame Q illustrated in the figure from the first image, and it is assumed that the above-mentioned preset height ratio is 1/5 , that is, the height H of the vehicle detection frame is divided into 5 parts, and the bottom 1/5H forms a sub-detection frame q.
  • the center point of the top width of the sub-detection frame q (the circle point in the picture) is the chassis center point.
  • This height of 1/5H is obtained by counting the ratio of the height of the vehicle chassis from the ground to the height of the top of the vehicle from the ground.
  • the Continuous different frame images are processed for vehicle tracking. Because the vehicle detection process can only determine whether a frame of image contains a vehicle and the corresponding position of the contained vehicle in the image, it cannot know the identification information of the vehicle and the movement trajectory information of the vehicle, so it cannot know the different frame images. Identity between vehicles. Through vehicle tracking processing, the identification information of the vehicle can be obtained and the corresponding position of the same vehicle in different frame images can be determined through tracking.
  • Vehicle detection processing and vehicle tracking processing can cooperate with each other. For example, when a vehicle is found in a frame of image through vehicle detection processing and the corresponding vehicle detection frame is obtained, vehicle tracking processing can identify the visual characteristics of the vehicle (such as color, model, etc.) , size, outline, etc.), combined with characteristic information such as moving speed, you can know whether this vehicle is the same vehicle as a vehicle that appeared in some previous images. Vehicle tracking processing can be implemented with reference to existing related technologies, and will not be described in detail in this embodiment.
  • vehicle detection processing and vehicle tracking processing can be executed by different processes.
  • the vehicle detection processing process and the vehicle tracking processing process detect the vehicle for the first time.
  • the vehicle tracking process will assign a tracking number as a kind of identification information for the vehicle.
  • the vehicle tracking processing process can also perform license plate recognition processing to identify the license plate number of the vehicle. If the license plate number can be recognized (actually, it may be due to factors such as long distance, fast moving speed, occlusion between vehicles, etc.). If the license plate number cannot be recognized), the license plate number and the tracking number can be used as the identification information of the vehicle.
  • the vehicle tracking processing process will extract the characteristics of the vehicle such as visual features, moving speed, etc.
  • the vehicle identification can be associated with the corresponding vehicle detection frame. In this way, through the joint processing of vehicle detection and vehicle tracking, it is possible to know the corresponding vehicle detection frame and vehicle identification of a vehicle in different frame images. Therefore, based on the same vehicle identification, the corresponding vehicle in multiple consecutive frames of images can be determined.
  • the position of the detection frame can form the movement trajectory of the car.
  • the above introduces the process of vehicle detection and vehicle tracking processing for each frame of image collected by the roadside camera X.
  • the vehicle detection frame corresponding to the target vehicle detected in the first image and the preset center point of the body (such as For example, in order to determine whether the target vehicle has parked at a certain roadside parking space covered by the roadside camera The position is compared with the corresponding parking frame of the multiple roadside parking spaces covered by the roadside camera
  • the parking space occupancy conditions include: the coincidence degree between the vehicle detection frame and the target parking frame is greater than the set threshold, and the position of the center point of the vehicle chassis is within the target parking frame.
  • the target parking frame is any one of the parking frame corresponding to the above-mentioned multiple roadside parking spaces. If the above conditions are met, it is determined that the target vehicle occupies the roadside parking space corresponding to the target parking frame.
  • the set threshold corresponding to the above-mentioned degree of coincidence is, for example, a preset value such as 30%.
  • the coincidence degree of the vehicle detection frame and the target parking frame can be judged first. If the coincidence degree is greater than the set threshold, then it is judged whether the center point of the vehicle chassis is within the target parking frame. Only these two conditions are met. , the subsequent judgment process is executed. If the degree of coincidence is less than the above set threshold, no subsequent judgment will be made to determine that the target vehicle does not occupy the roadside parking space corresponding to the target parking frame.
  • the present invention through the dual judgment of the above-mentioned coincidence degree and the center point of the vehicle chassis, it can be more accurately determined whether the target vehicle occupies a roadside parking space, that is, a more accurate judgment of parking entry can be achieved. Because in fact, there may be situations where vehicles just pass by the roadside parking space instead of parking, and it is generally difficult for passing vehicles to meet the above two judgment conditions at the same time. For example, due to their relatively large bodies, large vehicles (such as buses and coaches) may meet the above-mentioned judgment conditions for coincidence when passing by roadside parking spaces, but they may not be able to meet the judgment conditions for the center point of the chassis.
  • the target vehicle does not drive into the roadside parking space and park.
  • the vehicle tracking information includes the corresponding positioning position of the vehicle identification of the target vehicle in the multiple second images.
  • the positioning position may be in the corresponding second image. The position of the vehicle detection frame that hits the target vehicle.
  • the position of a certain feature point (such as the center point, corner point) on the vehicle detection frame can also be used as the positioning position, and the positioning position is based on the vehicle tracking processing and The vehicle detection process has been obtained. If it is determined based on the vehicle tracking information that the vehicle identification of the target vehicle appears in the warning frame, it is determined that the target vehicle drives into the roadside parking space corresponding to the target parking frame and stops.
  • the vehicle identification may include the license plate number and tracking number.
  • Using the double confirmation method of license plate number and tracking number to determine whether the target vehicle appears in the warning area can improve the anti-interference of the determination result and overcome the interference of complex environments (such as occlusion, high-speed movement, and long distances).
  • an early warning area is defined outside several consecutive roadside parking spaces on the same side covered by the same roadside camera to assist in the judgment of vehicles entering and exiting the parking spaces. Only when it is first determined that the vehicle meets the requirements for occupying the roadside parking space After the conditions are met, it is determined that the vehicle meets the conditions for passing through the warning area before it is finally determined that the vehicle will enter the roadside parking space and park, thereby improving the accuracy of the entry determination result. Moreover, when determining parking space occupancy, combining the two factors of the vehicle detection frame and a specific center point on the vehicle body to determine whether the vehicle occupies a certain parking space can improve the accuracy of the parking space occupancy determination result.
  • the vehicle detection frame and the center point of the vehicle chassis, as well as the positioning position of the target vehicle's vehicle identification in the corresponding second image tracked and determined from the multi-frame second image determine that the target vehicle drove from the warning area into the road corresponding to the target parking frame. After parking in the roadside berth, it can be further determined whether the target vehicle will park stably in the roadside berth in the next period of time. If so, it is finally determined that the target vehicle has entered the roadside berth and parked. Otherwise, it is determined that the target vehicle is just passing by. The roadside berth.
  • determining the roadside parking space corresponding to the target vehicle driving into the target parking frame can be implemented as:
  • the target vehicle drives into the roadside parking lot corresponding to the target parking frame and stops.
  • the preset time is, for example, 10 seconds, 15 seconds and other preset values.
  • the multi-frame third image is similar to the multi-frame second image. It does not mean that there are multiple images of the same frame, but different frame images sampled respectively within the corresponding time period.
  • the vehicle tracking information here is mainly used to identify the same target vehicle.
  • the vehicle identification corresponding to the vehicle detection frame can be used to determine the vehicle detection frame of the target vehicle.
  • an entry record corresponding to the target vehicle may be generated.
  • the entry record includes the identification of the roadside parking space corresponding to the target parking space frame, the target vehicle The vehicle identification, entry time and entry video, wherein the entry video at least includes video clips obtained by sampling multiple frames of the second image and the first image. Of course, it may also include video clips obtained by sampling multiple frames of the third image.
  • the entry record may also include the entry trajectory of the target vehicle: the entry trajectory is generated based on the positioning position corresponding to the vehicle identification of the target vehicle in the images obtained by sampling the entry video.
  • the following berth occupancy condition determination strategy is provided:
  • the vehicle detection frame For any sampled image i (such as the first image above), if the vehicle detection frame and the center point of the vehicle chassis of a vehicle (called the target vehicle) are detected, the vehicle detection frame is compared with the target When it is found that the vehicle detection frame is relatively far away from the target parking frame when the parking frame overlaps, the next image j for judging the parking occupancy conditions for the target vehicle can be determined based on the sampling frequency.
  • the image j and the image i generally include samples. at least one frame of image. Assume that it is determined that the above judgment on the target vehicle needs to be made after m frames of images are separated, and m is greater than or equal to 1.
  • the vehicle detection frame and vehicle detection frame of the target vehicle are obtained in the image j after m frames are separated. After determining the center point of the chassis, compare the overlap between the vehicle detection frame and the target parking frame and determine whether the center point of the vehicle chassis is located within the target parking frame.
  • Figure 5 is a flow chart of a method for determining a vehicle to drive out of a parking space provided by an embodiment of the present invention. As shown in Figure 5, the method may include the following steps:
  • the example taken from the previous embodiment is as follows: It is assumed that the target vehicle has been determined to drive into the roadside parking space corresponding to the target parking space frame and park based on the above-mentioned first image and multiple frames of second images collected before the first image.
  • the first image in step 501 is replaced by the multi-frame third image.
  • the "first image” in this step refers to the frame of image collected when the target vehicle is finally determined to drive into the roadside parking space corresponding to the target parking space frame for stable parking.
  • the roadside berth corresponding to the target berth frame is called the target roadside berth.
  • the vehicle detection frame and the center point of the vehicle chassis that originally met the above parking occupancy conditions with the target parking frame no longer meet the parking occupancy conditions, that is, the vehicle detection frame If the coincidence degree with the target parking frame is lower than the set threshold, and/or the center point of the vehicle chassis is no longer within the target parking frame, it can be initially believed that the target vehicle originally parked at the target roadside parking space may have driven out of the target roadside parking space. .
  • the multi-frame images collected from T1 to T2 are the above-mentioned multi-frame fourth images.
  • vehicle tracking processing is also performed, so that the vehicle detection frame corresponding to the target vehicle corresponding to the same vehicle identification in each frame image can be obtained and the vehicle chassis center point.
  • the target vehicle is further determined based on the vehicle tracking information of the target vehicle obtained from the multi-frame fourth image. Whether it appears in the warning area during the time period from T1 to T2 is to determine whether the vehicle logo of the target vehicle has appeared within the warning frame in some of the images.
  • the vehicle tracking information includes corresponding positioning positions of the vehicle identification of the target vehicle in the plurality of fourth images. If it has happened, it is determined that the target vehicle drove out of the target roadside parking lot. At this time, an exit record corresponding to the target vehicle can be generated.
  • the exit record includes the identification of the target roadside parking space, the vehicle identification of the target vehicle, the exit time and A drive-out video, wherein the drive-out video at least includes video segments sampled to obtain the plurality of frames of fourth images.
  • the corresponding relationship between the identification of the target roadside parking and its corresponding target parking frame is stored in advance and can be determined through query.
  • the roadside camera Since the roadside camera is set up on the same side as the roadside parking space, after the target vehicle parks at the target roadside parking space, due to the obstruction of other vehicles in front and behind it, it creates more difficulties to determine whether the target vehicle has left the target roadside parking space where it is parked. , therefore, in this embodiment, the dual confirmation method of the vehicle detection frame and the center point of the vehicle chassis is combined to determine whether the target vehicle no longer occupies the target roadside parking space, and at the same time, it is combined with whether the target vehicle passes the warning after not occupying the target roadside parking space. Regional judgment and multiple judgments can accurately determine the behavior of the target vehicle driving out of the target roadside parking space.
  • the scene of a vehicle entering and exiting a roadside parking lot is used as an example to illustrate the process of determining whether a vehicle enters or leaves the parking lot.
  • this solution can also be applied to indoor and outdoor parking lots. In other words, it is applicable to any scenario where there is a need for vehicles to enter and exit the parking space.
  • one camera can be configured to capture multiple parking spaces (i.e., berths), and the warning area mentioned in the aforementioned embodiments can be set for each camera.
  • the processing of video images collected by each camera can determine the entry and exit of vehicles in each parking space.
  • the present invention provides a solution that is suitable for determining vehicles entering and exiting the parking space in any parking space scenario, as follows:
  • the vehicle tracking information includes the corresponding position of the vehicle identification of the target vehicle in the multi-frame second image. position; wherein, the target berth border is the boundary of the image area corresponding to any of the berths in the shooting screen of the camera;
  • the target vehicle enters the parking space corresponding to the target parking frame and stops; wherein the warning frame is the entrance to the parking space.
  • the pre-warning area that multiple parking spaces need to pass through is the corresponding image area boundary in the shooting picture of the camera.
  • the early warning area is a roadway area surrounding the multiple parking spaces.
  • the device for determining the entry and exit of a vehicle into a parking space will be described in detail below. Those skilled in the art can understand that these devices can be constructed using commercially available hardware components and configured through the steps taught in this solution.
  • Figure 6 is a schematic structural diagram of a device for determining vehicle entry and exit from a parking space provided by an embodiment of the present invention. As shown in Figure 6, the device includes: an acquisition module 11, a detection module 12, and a processing module 13.
  • the acquisition module 11 is used to acquire the first image collected by a camera covering multiple berths.
  • the detection module 12 is configured to perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body.
  • the processing module 13 is configured to, if it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking occupancy conditions of the target parking frame, obtain the second image of the plurality of frames collected within the preset time before the first image.
  • the vehicle tracking information of the target vehicle includes the corresponding positioning positions of the vehicle identification of the target vehicle in the multiple frames of second images; and if the vehicle is determined based on the vehicle tracking information If the logo appears in the preset warning frame, it is determined that the target vehicle has entered the parking space corresponding to the target parking space frame and is parked; wherein, the warning frame is where the warning area required to enter and exit the multiple parking spaces is located.
  • the corresponding image area boundary in the shooting picture of the camera, the warning area is the roadway area surrounding the plurality of parking spaces, and the target parking frame is the location of any of the parking spaces in the shooting picture of the camera. The corresponding image area boundary.
  • the parking space occupancy condition includes: the coincidence degree of the vehicle detection frame and the target parking space frame is greater than a set threshold, and the position of the preset center point of the vehicle body is located within the target parking space frame.
  • the preset center point of the vehicle body includes the center point of the vehicle chassis.
  • the detection module 12 is specifically configured to use a pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain a vehicle detection frame corresponding to the target vehicle in the first image and
  • the vehicle chassis detection frame refers to a detection frame containing a complete vehicle; the position of the center point of the vehicle chassis detection frame is determined as the position of the center point of the vehicle chassis.
  • the detection module 12 is specifically configured to: use a pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain a vehicle detection frame corresponding to the target vehicle in the first image; Determine the sub-detection frame with a preset height ratio at the bottom of the vehicle detection frame, and the preset height ratio is set according to the height of the vehicle chassis from the ground; determine the position of the top center point of the sub-detection frame as the The position of the center point of the vehicle chassis.
  • the vehicle identification includes a license plate number and a tracking number.
  • the tracking number is assigned during vehicle tracking processing of the image, and the same vehicle has the same tracking number.
  • the processing module 13 is specifically configured to: obtain the vehicle tracking information of the target vehicle in multiple frames of third images collected within a preset time after the first image; Carry out vehicle detection processing to obtain vehicle detection frames and vehicle body preset center points respectively corresponding to the target vehicle in the multi-frame third image in combination with the vehicle tracking information of the target vehicle in the multi-frame third image. position; if the positions of the target vehicle's corresponding vehicle detection frame and body preset center point in the multi-frame third image meet the parking space occupancy conditions, then it is determined that the target vehicle has entered the target parking frame. Stop at the corresponding berth.
  • the device further includes: a recording module, configured to generate an entry record corresponding to the target vehicle, the entry record including the identification of the parking space corresponding to the target parking space frame, the vehicle identification , the driving-in time and the driving-in video, wherein the driving-in video at least includes video segments sampling the plurality of frames of the second image and the first image.
  • a recording module configured to generate an entry record corresponding to the target vehicle, the entry record including the identification of the parking space corresponding to the target parking space frame, the vehicle identification , the driving-in time and the driving-in video, wherein the driving-in video at least includes video segments sampling the plurality of frames of the second image and the first image.
  • the detection module 12 is also configured to perform vehicle detection processing on multiple fourth frames of images collected after the first image.
  • the processing module 13 is also configured to: if it is determined that the target vehicle does not meet the parking occupancy conditions of the target parking frame according to the vehicle detection results of the multi-frame fourth image, obtain all the information in the multi-frame fourth image. vehicle tracking information of the target vehicle; if it is determined that the vehicle identification appears in the warning frame according to the vehicle tracking information of the target vehicle in the fourth multi-frame image, then it is determined that the target vehicle has driven away from the warning frame. The berth corresponding to the target berth border.
  • the recording module is also used to generate a drive-out record corresponding to the target vehicle.
  • the drive-out record includes the identification of the parking space corresponding to the target parking space frame, the vehicle identification, the drive-out record time and a drive-out video, wherein the drive-out video at least includes a video segment sampling the plurality of frames of the fourth image.
  • the device shown in Figure 6 can perform the steps provided in the foregoing embodiments.
  • the structure of the device for determining the vehicle entering and exiting the parking space shown in FIG. 6 can be implemented as an electronic device.
  • the electronic device may include: a processor 21 , a memory 22 , and a communication interface 23 .
  • the memory 22 stores executable code.
  • the processor 21 can at least implement the method for determining the vehicle entering and exiting the parking space as provided in the previous embodiment.
  • embodiments of the present invention provide a non-transitory machine-readable storage medium.
  • the non-transitory machine-readable storage medium stores executable code.
  • the executable code is executed by a processor of an electronic device, , so that the processor can at least implement the method for determining the vehicle entering and exiting the parking space as provided in the previous embodiment.
  • each embodiment can be implemented by adding the necessary general hardware platform, or of course, can also be implemented by combining hardware and software.
  • the above technical solution can be embodied in the form of a computer product in nature or in other words, the part that contributes to the existing technology.
  • the present invention can use one or more computer-usable storage devices containing computer-usable program codes.
  • the form of a computer program product implemented on media including but not limited to disk storage, CD-ROM, optical storage, etc.).

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

The present application provides a method and an apparatus for determining entry and exit of a vehicle into and out of a parking space, a device, and a storage medium. The method comprises: acquiring a first image collected by a camera, and determining positions of a vehicle detection frame and a preset vehicle body center point of a target vehicle in the first image; if it is determined that the positions of the vehicle detection frame and the preset vehicle body center point meet a parking space occupation condition of a target parking space border, acquiring vehicle tracking information of the target vehicle in multiple second images collected within a preset time before acquiring the first image, and if it is determined, according to the vehicle tracking information, that the target vehicle is within an early warning border, determining that the target vehicle enters a parking space corresponding to the target parking space border to park. By means of defining an early warning region outside multiple parking spaces covered by a camera, so as to assist in determining entry and exit of a vehicle into and out of a parking space, and by means of dual determination of a parking space occupation condition and an early warning region passed through, the accuracy of a result of determining entry and exit into and out of a parking space is improved.

Description

确定车辆进出泊位的方法、装置、设备和存储介质Determine the methods, devices, equipment and storage media for vehicles entering and exiting parking spaces
本申请要求于2022年03月22日提交中国专利局、申请号为202210288663.2、申请名称为“确定车辆进出泊位的方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on March 22, 2022, with the application number 202210288663.2, and the application name is "Method, device, equipment and storage medium for determining vehicle entry and exit from parking spaces", and its entire content has been approved This reference is incorporated into this application.
技术领域Technical field
本发明涉及图像处理技术领域,尤其涉及一种确定车辆进出泊位的方法、装置、设备和存储介质。The present invention relates to the technical field of image processing, and in particular to a method, device, equipment and storage medium for determining the entry and exit of a vehicle into a parking space.
背景技术Background technique
随着我国城市化进程愈发加速,车辆的增速也与日俱增,这样造成的问题就是城市停车难。而对于城市的管理者来说,优化停车资源,提升停车管理智能化水平,成了发展新型智慧化城市中很重要的目标,因此,道路旁的泊位自动化收费管理,就显得尤为重要。As my country's urbanization process accelerates, the growth rate of vehicles is also increasing day by day. The problem caused by this is the difficulty of urban parking. For city managers, optimizing parking resources and improving the level of intelligent parking management have become very important goals in the development of new smart cities. Therefore, automated toll management of roadside parking spaces is particularly important.
针对道路旁泊位的自动化收费策略,目前包括如下方式:手持终端设备收费、安装地磁、安装视频桩。其中,采用手持终端设备收费的方式,需要人工不断的携带终端设备进行值守,存在遗漏等现象,并且人工依赖严重,技术低导致的运营成本高,此种方法显然不适合如今的智慧城市的技术目标。第二种是地磁方案,利用地磁内的传感器感知地磁上方是否有障碍物,由于无法判断障碍物是否是停泊车,抑或其他非机动车,因此,该方法易受干扰,误报率高。Automated charging strategies for roadside parking spaces currently include the following methods: charging with handheld terminal devices, installing geomagnetism, and installing video piles. Among them, the charging method of handheld terminal equipment requires manual labor to carry the terminal equipment continuously for duty, and there are omissions and other phenomena. It also relies heavily on manual labor and low technology, resulting in high operating costs. This method is obviously not suitable for today's smart city technology. Target. The second is the geomagnetic solution, which uses sensors within the geomagnetic field to sense whether there are obstacles above the geomagnetic field. Since it is impossible to determine whether the obstacle is a parking vehicle or other non-motorized vehicle, this method is susceptible to interference and has a high false alarm rate.
道路旁泊位的自动化收费策略的前提是能够自动地、准确地识别出进入泊位停靠以及驶离泊位的车辆。因此,如何完成进入泊位停靠以及驶离泊位的车辆的自动准确识别,是需要解决的问题。The premise of the automated charging strategy for roadside parking spaces is to be able to automatically and accurately identify vehicles entering and leaving the parking spaces. Therefore, how to complete the automatic and accurate identification of vehicles entering and parking at the berth and leaving the berth is a problem that needs to be solved.
发明内容Contents of the invention
本发明实施例提供一种确定车辆进出泊位的方法、装置、设备和存储介质,用以提高车辆进出泊位的确定结果的准确性。Embodiments of the present invention provide a method, device, equipment and storage medium for determining vehicle entry and exit from a berth, so as to improve the accuracy of the determination result of a vehicle's entry and exit from a berth.
第一方面,本发明实施例提供一种确定车辆进出泊位的方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for determining whether a vehicle enters or exits a parking space. The method includes:
获取摄像头采集的第一图像,所述摄像头覆盖多个泊位;Obtaining a first image collected by a camera covering multiple berths;
对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车身预设中心点的位置; Perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body;
若确定所述车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则获取所述第一图像前预设时间内采集的多帧第二图像中所述目标车辆的车辆跟踪信息,所述车辆跟踪信息中包括所述目标车辆的车辆标识在所述多帧第二图像中各自对应的定位位置;其中,所述目标泊位边框是任一所述泊位在所述摄像头的拍摄画面中所对应的图像区域边界;If it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking space occupancy conditions of the target parking frame, then the vehicle of the target vehicle in the multiple frames of the second image collected within the preset time before the first image is acquired. Tracking information, the vehicle tracking information includes the corresponding positioning positions of the vehicle identification of the target vehicle in the multi-frame second images; wherein the target parking frame is the position of any of the parking spots in the camera. The corresponding image area boundary in the shooting screen;
若根据所述车辆跟踪信息确定所述车辆标识出现于预设的预警边框内,则确定所述目标车辆驶入所述目标泊位边框所对应的泊位停靠;其中,所述预警边框是进出所述多个泊位所需途经的预警区域在所述摄像头的拍摄画面中所对应的图像区域边界,所述预警区域是包围所述多个泊位的车行道区域。If it is determined according to the vehicle tracking information that the vehicle identification appears in the preset warning frame, it is determined that the target vehicle enters the parking space corresponding to the target parking frame and stops; wherein the warning frame is the entrance to the parking space. The pre-warning area that multiple parking spaces need to pass through is the corresponding image area boundary in the shooting picture of the camera. The early warning area is a roadway area surrounding the multiple parking spaces.
第二方面,本发明实施例提供一种确定车辆进出泊位的装置,所述装置包括:In a second aspect, an embodiment of the present invention provides a device for determining the entry and exit of a vehicle into a parking space. The device includes:
获取模块,用于获取摄像头采集的第一图像,所述摄像头覆盖多个泊位;An acquisition module, used to acquire the first image collected by a camera covering multiple berths;
检测模块,用于对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车身预设中心点的位置;A detection module configured to perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body;
处理模块,用于若确定所述车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则获取所述第一图像前预设时间内采集的多帧第二图像中所述目标车辆的车辆跟踪信息,所述车辆跟踪信息中包括所述目标车辆的车辆标识在所述多帧第二图像中各自对应的定位位置;以及若根据所述车辆跟踪信息确定所述车辆标识出现于预设的预警边框内,则确定所述目标车辆驶入所述目标泊位边框所对应的泊位停靠;其中,所述预警边框是进出所述多个泊位所需途经的预警区域在所述摄像头的拍摄画面中所对应的图像区域边界,所述预警区域是包围所述多个泊位的车行道区域,所述目标泊位边框是任一所述泊位在所述摄像头的拍摄画面中所对应的图像区域边界。A processing module configured to obtain all the second images in multiple frames collected within a preset time before the first image if it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking occupancy conditions of the target parking frame. The vehicle tracking information of the target vehicle, the vehicle tracking information includes the respective corresponding positioning positions of the vehicle identification of the target vehicle in the plurality of second images; and if the vehicle identification is determined according to the vehicle tracking information appears in the preset early warning frame, then it is determined that the target vehicle has entered the parking space corresponding to the target parking space frame and is parked; wherein, the early warning frame is the early warning area required to pass in and out of the multiple parking spaces. The corresponding image area boundary in the camera's shooting screen, the warning area is the roadway area surrounding the multiple parking spaces, and the target parking frame is the corresponding image area of any of the parking spaces in the camera's shooting screen. the image area boundary.
第三方面,本发明实施例提供一种电子设备,包括:存储器、处理器、通信接口;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器至少可以实现如第一方面所述的确定车辆进出泊位的方法。In a third aspect, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a communication interface; wherein executable code is stored on the memory, and when the executable code is executed by the processor, The processor is enabled to at least implement the method for determining the vehicle entering and exiting the parking space as described in the first aspect.
第四方面,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如第一方面所述的确定车辆进出泊位的方法。In a fourth aspect, embodiments of the present invention provide a non-transitory machine-readable storage medium. The non-transitory machine-readable storage medium stores executable code. When the executable code is processed by a processor of an electronic device, When executed, the processor is enabled to at least implement the method for determining the entry and exit of a vehicle into a parking space as described in the first aspect.
第五方面,本发明实施例提供了一种确定车辆进出路侧泊位的方法,包括:In a fifth aspect, embodiments of the present invention provide a method for determining vehicle entry and exit from a roadside parking space, including:
获取路侧摄像头采集的第一图像,所述路侧摄像头包括设置在路侧泊位同侧的摄像头,所述路侧摄像头覆盖多个路侧泊位;Obtaining the first image collected by a roadside camera, the roadside camera includes a camera arranged on the same side of the roadside parking space, and the roadside camera covers multiple roadside parking spaces;
对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车身预设中心点的位置;Perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body;
若确定所述车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则获取所述第一图像前预设时间内采集的多帧第二图像中所述目标车辆的车辆跟踪信息,所述车辆跟踪信息中包括所述目标车辆的车辆标识在所述多帧第二图像中各自对应的定 位位置;其中,所述目标泊位边框是任一所述路侧泊位在所述路侧摄像头的拍摄画面中所对应的图像区域边界;If it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking space occupancy conditions of the target parking frame, then the vehicle of the target vehicle in the multiple frames of the second image collected within the preset time before the first image is acquired. Tracking information, the vehicle tracking information includes the corresponding position of the vehicle identification of the target vehicle in the multi-frame second image. position; wherein, the target parking frame is the boundary of the image area corresponding to any of the roadside parking spaces in the shooting screen of the roadside camera;
若根据所述车辆跟踪信息确定所述车辆标识出现于预设的预警边框内,则确定所述目标车辆驶入所述目标泊位边框所对应的路侧泊位停靠;其中,所述预警边框是进出所述多个路侧泊位所需途经的预警区域在所述路侧摄像头的拍摄画面中所对应的图像区域边界,所述预警区域是包围所述多个路侧泊位的车行道区域。If it is determined according to the vehicle tracking information that the vehicle identification appears in the preset warning frame, it is determined that the target vehicle drives into the roadside parking space corresponding to the target parking frame and stops; wherein the warning frame is the entrance and exit The warning area that the multiple roadside parking spaces need to pass through is the corresponding image area boundary in the picture captured by the roadside camera. The warning area is a roadway area surrounding the multiple roadside parking spaces.
针对车辆进入路侧设置的泊位停车的情形,可以在路侧泊位同侧的路边设置摄像头称为路侧摄像头,一个路侧摄像头可以被配置为覆盖多个固定的路侧泊位。路侧摄像头不可旋转,这样路侧摄像头具有固定的拍摄范围,也就是说,针对一个路侧摄像头所能覆盖的多个路侧泊位来说,这多个路侧泊位在该路侧摄像头所能拍得的画面中始终对应于固定的图像区域,将该图像区域的边界所围成的闭合曲线称为泊位边框。针对一个路侧摄像头所覆盖的多个路侧泊位来说,在路侧泊位的同侧定义一个预警区域,该预警区域是包围这多个路侧泊位的车行道区域,车辆进出这多个路侧泊位必须途经该预警区域。基于该定义,可以理解的是,该预警区域在该路侧摄像头拍得的画面中也具有固定的图像区域,将该图像区域的边界所围成的闭合曲线称为预警边框。For the situation where a vehicle enters a parking space set up on the roadside to park, a camera can be set up on the roadside on the same side of the roadside parking space, called a roadside camera. One roadside camera can be configured to cover multiple fixed roadside parking spaces. The roadside camera cannot be rotated, so the roadside camera has a fixed shooting range. That is to say, for the multiple roadside parking spaces that can be covered by one roadside camera, these multiple roadside parking spaces can be covered by the roadside camera. The captured image always corresponds to a fixed image area, and the closed curve enclosed by the boundaries of the image area is called the berth border. For multiple roadside parking spaces covered by a roadside camera, an early warning area is defined on the same side of the roadside parking space. The early warning area is the roadway area surrounding the multiple roadside parking spaces. Vehicles entering and exiting these multiple roadside parking spaces can Roadside parking spaces must pass through this warning area. Based on this definition, it can be understood that the warning area also has a fixed image area in the picture captured by the roadside camera, and the closed curve formed by the boundary of the image area is called a warning frame.
本发明实施例中,针对任一摄像(比如上述路侧摄像头)头来说,该摄像头拍摄视频画面,可以对其拍得的视频画面进行采样得到一帧帧图像,针对采样得到的每帧图像,都可以进行车辆检测以及车辆跟踪处理,其中,车辆检测的目的是检测出图像中所含的各个车辆的车辆检测框以及车身上预设的某种中心点的位置,该位置是指在图像中对应的像素位置。车辆跟踪的目的是确定不同帧图像中的同一辆车,并确定车辆的车辆标识。车辆标识可以是识别出的车牌号也可以是为同一辆车分配的同一跟踪号。In the embodiment of the present invention, for any camera (such as the above-mentioned roadside camera), the camera takes a video picture, and the video picture captured by the camera can be sampled to obtain a frame of image. For each frame of image obtained by sampling, , can perform vehicle detection and vehicle tracking processing. The purpose of vehicle detection is to detect the vehicle detection frame of each vehicle contained in the image and the position of a certain center point preset on the body. This position refers to the position of the center point in the image. corresponding pixel position in . The purpose of vehicle tracking is to identify the same vehicle in different frame images and determine the vehicle's vehicle identity. The vehicle identification can be a recognized license plate number or the same tracking number assigned to the same vehicle.
针对上述摄像头采集的任一帧图像(称为第一图像)来说,在对第一图像进行车辆检测处理,得到第一图像中目标车辆(指其中包含的任一车辆)所对应的车辆检测框和车身预设中心点的位置后,在已知该摄像头覆盖的多个泊位在图像中各自对应的泊位边框的前提下,首先,判断该目标车辆是否满足泊位占用条件,即结合检测出的目标车辆的车辆检测框以及车身上预设中心点的位置确定目标车辆是否当前是否占用某个目标泊位边框所对应的泊位。若确定上述车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则时间回溯,以获取第一图像前预设时间(比如10秒)内采集的多帧第二图像中目标车辆的车辆跟踪信息。车辆跟踪信息中包括目标车辆的车辆标识在多帧第二图像中各自对应的定位位置,也即是说,基于此前对车辆跟踪处理的过程,可以得到对应于同一车辆标识的目标车辆在此前各帧图像中出现的位置。进一步,根据得到的车辆跟踪信息确定进入上述目标泊位边框所对应泊位的目标车辆在进入该泊位前是否在预警区域内出现过,即确定目标车辆的车辆标识是否在多帧第二图像中出现于预警边框内,若该车辆标识在一帧或几帧第二图像中都出现过,则最终确定目标车辆驶入目标泊位边框所对应的泊位停靠。 For any frame of image collected by the above camera (called the first image), vehicle detection processing is performed on the first image to obtain the vehicle detection corresponding to the target vehicle (referring to any vehicle included in it) in the first image. After the position of the center point of the frame and the body is preset, and on the premise that the multiple parking spaces covered by the camera are known to have corresponding parking frame frames in the image, first, determine whether the target vehicle meets the parking occupancy conditions, that is, combined with the detected The vehicle detection frame of the target vehicle and the position of the preset center point on the vehicle body determine whether the target vehicle currently occupies a parking space corresponding to a target parking frame. If it is determined that the positions of the above-mentioned vehicle detection frame and the preset center point of the vehicle body meet the parking occupancy conditions of the target parking frame, the time will be traced back to obtain the second image of multiple frames collected within the preset time (such as 10 seconds) before the first image. Vehicle tracking information of the target vehicle. The vehicle tracking information includes the corresponding positioning positions of the vehicle identification of the target vehicle in the multiple second images. That is to say, based on the previous vehicle tracking process, the target vehicle corresponding to the same vehicle identification can be obtained. The position where the frame appears in the image. Further, it is determined according to the obtained vehicle tracking information whether the target vehicle that entered the parking space corresponding to the target parking frame has appeared in the warning area before entering the parking space, that is, it is determined whether the vehicle identification of the target vehicle appears in the second image of the multiple frames. Within the warning frame, if the vehicle logo appears in one or several frames of the second image, it is finally determined that the target vehicle enters the parking space corresponding to the target parking space frame and stops.
在上述方案中,通过在同一摄像头覆盖的连续几个泊位外定义一个预警区域来辅助进行车辆进出泊位的判断,只有在先确定车辆满足占用泊位的条件后,又确定车辆满足此前途经预警区域的条件时,才最终判定车辆驶入该泊位进行停靠,提高驶入确定结果的准确性。而且,在进行泊位占用判断时,结合车辆检测框以及车身上特定的某中心点这两个因素来判断车辆是否占用某个泊位,能够提高泊位占用确定结果的准确性。In the above solution, an early warning area is defined outside several consecutive parking spaces covered by the same camera to assist in the judgment of vehicles entering and exiting the parking spaces. Only after it is first determined that the vehicle meets the conditions for occupying the parking space, it is determined that the vehicle meets the requirements of the early warning area. When the conditions are met, it is finally determined that the vehicle has entered the parking space and parked, thereby improving the accuracy of the entry determination result. Moreover, when determining parking space occupancy, combining the two factors of the vehicle detection frame and a specific center point on the vehicle body to determine whether the vehicle occupies a certain parking space can improve the accuracy of the parking space occupancy determination result.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1为本发明实施例提供的一种泊位停车场景的示意图;Figure 1 is a schematic diagram of a berth parking scene provided by an embodiment of the present invention;
图2为本发明实施例提供的一种确定车辆驶入泊位的方法的流程图;Figure 2 is a flow chart of a method for determining that a vehicle has entered a parking space according to an embodiment of the present invention;
图3为本发明实施例提供的一种车辆检测框与车辆底盘检测框的示意图;Figure 3 is a schematic diagram of a vehicle detection frame and a vehicle chassis detection frame provided by an embodiment of the present invention;
图4为本发明实施例提供的一种车辆检测框与车辆底盘中心点确定原理的示意图;Figure 4 is a schematic diagram of a vehicle detection frame and a vehicle chassis center point determination principle provided by an embodiment of the present invention;
图5为本发明实施例提供的一种确定车辆驶出泊位的方法的流程图;Figure 5 is a flow chart of a method for determining that a vehicle moves out of a parking space according to an embodiment of the present invention;
图6为本发明实施例提供的一种确定车辆进出泊位的装置的结构示意图;Figure 6 is a schematic structural diagram of a device for determining vehicle entry and exit from a parking space provided by an embodiment of the present invention;
图7为与图6所示实施例提供的一种电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by the embodiment shown in FIG. 6 .
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present invention.
下面结合附图对本发明的一些实施方式作详细说明。在各实施例之间不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。Some embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following embodiments and features in the embodiments may be combined with each other as long as there is no conflict between the embodiments. In addition, the sequence of steps in the following method embodiments is only an example and is not strictly limited.
本发明实施例提供的确定车辆进出泊位的方法适用于对路侧泊位、室内外停车场进行停车管理的应用场景中,路侧泊位是指在车行道靠近人行道的一侧所划定的允许停车的泊位。The method for determining vehicle entry and exit parking spaces provided by the embodiment of the present invention is suitable for parking management application scenarios of roadside parking spaces and indoor and outdoor parking lots. Roadside parking spaces refer to the allowed spaces demarcated on the side of the roadway close to the sidewalk. Parking space.
在传统的基于人工、地磁的泊位收费管理的方案中,除了有较大的人力成本外,每个泊位上都需要独立地设置一个地磁设备也具有较大的设备开销,而且,这种方案也没有停 车的图片或者视频证据链,容易产生停车资费纠纷。为此,针对路侧泊位来说,可以采用视频桩方案,视频桩方案主要是在与车辆同等高度的马路人行道上,靠近路边泊位安装一个摄像头,该方案虽然能保留停车证据链,然而,维护成本高,容易被人工损坏,加上北方很多城市的道路扬灰较多,且在道路3米高度内,这些灰尘容易遮挡住摄像头,因此,也需要定期人工清理。In the traditional manual and geomagnetic berth charging management solution, in addition to the large labor cost, each berth needs to independently set up a geomagnetic device, which also has a large equipment overhead. Moreover, this solution also didn't stop Car pictures or video evidence links can easily lead to parking fee disputes. For this reason, for roadside parking spaces, the video pile solution can be used. The video pile solution mainly installs a camera on the road sidewalk at the same height as the vehicle, close to the roadside parking space. Although this solution can retain the parking evidence chain, however, The maintenance cost is high and it is easy to be damaged manually. In addition, the roads in many northern cities have a lot of dust, and the dust can easily block the camera within 3 meters of the road. Therefore, manual cleaning is also required on a regular basis.
针对以上方案的劣势,以路侧泊位来说,本发明实施例提出了一种高位视频的方案,该方案需要在道路的人行道上安装高度较高(一般超过6米以上)的高杆,然后在高杆上面安装摄像头,每个摄像头负责拍摄几个(一般3-4个)泊位,并且通过人工智能算法,对泊位的进出车辆进行识别,产生对应的进出事件,比如记录车辆的停泊起始和结束时间,以及对应的车辆标识(比如车牌号),并保存车辆驶入驶出的图片/视频证据链,以便实现路侧泊位的车辆自动收费管理。该方案可以有效地解决以往方案易受干扰、无证据链以及人工运维成本高的问题,且高杆可以采用借杆(比如借用路灯杆)的方式进行安装,合理利用了已有市政设施,降低对城市景观影响。同理,针对室内、室外停车场来说,也可以在较高位置处设置摄像头。In view of the disadvantages of the above solutions, in the case of roadside parking spaces, the embodiment of the present invention proposes a high-level video solution. This solution requires the installation of high poles with higher heights (generally more than 6 meters) on the sidewalks of the roads, and then Cameras are installed on high poles. Each camera is responsible for photographing several (usually 3-4) parking spaces, and uses artificial intelligence algorithms to identify vehicles entering and exiting the parking spaces and generate corresponding entry and exit events, such as recording the parking start of vehicles. and end time, as well as the corresponding vehicle identification (such as license plate number), and save the picture/video evidence chain of the vehicle entering and exiting, so as to realize automatic vehicle toll collection management for roadside parking spaces. This solution can effectively solve the problems of previous solutions that are susceptible to interference, have no evidence chain, and have high manual operation and maintenance costs. Moreover, high poles can be installed by borrowing poles (such as borrowing street light poles), making rational use of existing municipal facilities. Reduce impact on urban landscape. Similarly, for indoor and outdoor parking lots, cameras can also be set up at higher locations.
为便于描述,本发明实施例中以路侧泊位停车场景为例进行说明。针对某侧道路上划定的路侧泊位来说,用于对该路侧泊位进行拍摄的摄像头(称为路侧摄像头)可以设置在该路侧泊位的对侧,也可以设置在该路侧泊位的同侧。比如,某条道路的左侧边缘划定有一排路侧泊位,路侧摄像头可以位于道路左侧人行道上即与路侧泊位同侧设置,也可以位于道路右侧人行道上即与路侧泊位对侧设置。当然,实际应用中,同侧和对侧设置的路侧摄像头可能都存在。For the convenience of description, the embodiment of the present invention takes the roadside parking scene as an example for description. For a roadside parking space designated on a certain side of the road, the camera used to take pictures of the roadside parking space (called a roadside camera) can be set on the opposite side of the roadside parking space or on the roadside. Same side of the berth. For example, if there is a row of roadside parking spaces defined on the left edge of a certain road, the roadside camera can be located on the sidewalk on the left side of the road, that is, on the same side as the roadside parking spaces, or it can be located on the sidewalk on the right side of the road, that is, opposite to the roadside parking spaces. side settings. Of course, in actual applications, roadside cameras may exist on both the same side and the opposite side.
需要说明的是,一个路侧摄像头具有有限的拍摄范围,因此,一个路侧摄像头一般被配置为覆盖几个路侧泊位。并且,路侧摄像头可以被配置为不可以转动,即具有固定的拍摄视角,这样,同一路侧摄像头覆盖的多个路侧泊位在该路侧摄像头采集的所有画面中具有固定不变的图像区域。It should be noted that a roadside camera has a limited shooting range. Therefore, a roadside camera is generally configured to cover several roadside parking spaces. Moreover, the roadside camera can be configured not to rotate, that is, to have a fixed shooting angle. In this way, multiple roadside parking spaces covered by the same roadside camera have a fixed image area in all the images captured by the roadside camera. .
当路侧摄像头与路侧泊位同侧设置的时候,如图1所示,前后泊位上的车辆的遮挡往往是比较严重的,遮挡率一般会大于60%,甚至有时候会接近100%,因此,在与路侧泊位同侧设置的路侧摄像头的情形下,准确地识别出进出泊位的车辆具有很大挑战。这里所说的进出泊位的车辆是指真正驶入泊位进行停靠,并在停靠一段时间后驶出泊位的车辆。When the roadside camera is set up on the same side as the roadside parking space, as shown in Figure 1, the blocking of vehicles in the front and rear parking spaces is often serious, and the blocking rate is generally greater than 60%, and sometimes even close to 100%. Therefore , in the case of roadside cameras installed on the same side as the roadside parking space, it is very challenging to accurately identify vehicles entering and exiting the parking space. The vehicles entering and exiting the berth mentioned here refer to vehicles that actually drive into the berth for parking and then drive out of the berth after parking for a period of time.
在本发明实施例中,为了能够准确地识别出进出泊位的车辆,定义了一个预警区域。如图1中所示,在同一路侧摄像头覆盖的多个路侧泊位所占区域外的同一方向的车行道上,设定一个包围这多个路侧泊位的车行道区域,称为预警区域。这个预警区域表示所有的车辆从出现在这个路侧摄像头的拍摄画面到进入其中某个路侧泊位或离开路侧泊位,都要经过的区域。如图1中所示,该预警区域“包围”多个路侧泊位,并不是说多个路侧泊位位于该预警区域内部(属于包含关系),而是从位置关系上来说,预警区域与多个路侧泊位是相离的,即不存在包含以及相交关系。 In the embodiment of the present invention, in order to accurately identify vehicles entering and exiting the parking space, an early warning area is defined. As shown in Figure 1, on the roadway in the same direction outside the area occupied by multiple roadside parking spaces covered by the same roadside camera, a roadway area surrounding these multiple roadside parking spaces is set, which is called an early warning. area. This warning area represents the area that all vehicles must pass through from appearing in the roadside camera's picture to entering one of the roadside parking spaces or leaving the roadside parking space. As shown in Figure 1, the early warning area "surrounds" multiple roadside berths. It does not mean that multiple roadside berths are located inside the early warning area (belonging to an inclusion relationship), but from a positional relationship, the early warning area and multiple roadside berths are The two roadside berths are separate, that is, there is no inclusion or intersection relationship.
可以理解的是,在现实的车行道上并不需要真实地画出这个预警区域,该预警区域只是为了辅助准确地识别出进出泊位的车辆而定义的区域。由于其所包围的多个路侧区域在对应的路侧摄像头所拍摄画面中具有固定的图像区域,而且该预警区域与这多个路侧区域的位置关系也是固定不变的,因此,该预警区域在该路侧摄像头所拍摄的画面中也具有固定的图像区域。It is understandable that there is no need to actually draw this warning area on a real roadway. This warning area is only an area defined to assist in accurately identifying vehicles entering and exiting the parking space. Since the multiple roadside areas it surrounds have fixed image areas in the pictures captured by the corresponding roadside cameras, and the positional relationship between the warning area and the multiple roadside areas is also fixed, therefore, the warning The area also has a fixed image area in the picture captured by the roadside camera.
在本发明实施例中,将路侧泊位在相应路侧摄像头的拍摄画面中所对应的图像区域边界称为泊位边框,将预警区域在该路侧摄像头的拍摄画面中所对应的图像区域边界称为预警边框。In the embodiment of the present invention, the boundary of the image area corresponding to the roadside parking space in the shooting screen of the corresponding roadside camera is called the parking frame, and the boundary of the image area corresponding to the warning area in the shooting screen of the roadside camera is called For the warning border.
其中,泊位边框可以是预先基于路侧摄像头在无车辆驶入其覆盖的多个路侧泊位的情形下,基于车行道上真实画出的路侧泊位边界线在其所拍画面中所占的图像区域标注出的。The parking space frame may be based on the actual roadside parking boundary line drawn on the roadway in the picture taken by the roadside camera in advance when no vehicle enters the multiple roadside parking spaces covered by the roadside camera. The image area is marked.
其中,预警边框可以是基于预先定义的预警区域与多个路侧泊位的空间位置关系(即现实道路场景下两者的位置、距离关系),以及多个路侧泊位在路侧摄像头所拍摄画面中对应的图像区域,映射得到预警区域在路侧摄像头所拍摄画面中的图像区域。Among them, the early warning frame can be based on the spatial positional relationship between the predefined early warning area and multiple roadside parking spaces (that is, the position and distance relationship between the two in real road scenes), as well as the images captured by roadside cameras of multiple roadside parking spaces. The corresponding image area in , the image area of the warning area in the picture captured by the roadside camera is mapped.
本发明实施例提供的确定车辆进出路侧泊位的方法可以由一电子设备来执行,该电子设备可以是与路侧摄像头通信连接的服务器或终端设备,该服务器可以是云端的物理服务器或虚拟服务器(虚拟机)。当然,本发明实施例提供的方法,在实际执行过程中,也可以由路侧摄像头与该电子设备配合完成,其中,比如也可以在路侧摄像头本地完成图像的车辆检测、车辆跟踪等处理,该电子设备接收路侧摄像头传输的与生成停车记录相关的数据以便生成并存储停车记录。The method for determining whether a vehicle enters or exits a roadside parking space provided by the embodiment of the present invention can be executed by an electronic device. The electronic device can be a server or terminal device that is communicatively connected to the roadside camera. The server can be a physical server or a virtual server in the cloud. (virtual machine). Of course, during the actual execution of the method provided by the embodiment of the present invention, the roadside camera can also be completed by cooperating with the electronic device. For example, the vehicle detection, vehicle tracking and other processing of the image can also be completed locally on the roadside camera. The electronic device receives data transmitted by the roadside camera related to generating the parking record in order to generate and store the parking record.
下面对本发明实施例提供的确定车辆进出路侧泊位的方案的实施过程进行说明。The implementation process of the solution for determining vehicle entry and exit from a roadside parking space provided by the embodiment of the present invention is described below.
图2为本发明实施例提供的一种确定车辆驶入泊位的方法的流程图,如图2所示,该方法包括如下步骤:Figure 2 is a flow chart of a method for determining that a vehicle has entered a parking space according to an embodiment of the present invention. As shown in Figure 2, the method includes the following steps:
201、获取路侧摄像头采集的第一图像,路侧摄像头包括设置在路侧泊位同侧的摄像头,该路侧摄像头覆盖多个路侧泊位。201. Obtain the first image collected by the roadside camera. The roadside camera includes a camera installed on the same side of the roadside parking space. The roadside camera covers multiple roadside parking spaces.
202、对第一图像进行车辆检测处理,以得到第一图像中目标车辆所对应的车辆检测框和车身预设中心点的位置。202. Perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body.
203、若确定车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则获取第一图像前预设时间内采集的多帧第二图像中所述目标车辆的车辆跟踪信息,车辆跟踪信息中包括目标车辆的车辆标识在多帧第二图像中各自对应的定位位置。203. If it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking occupancy conditions of the target parking frame, obtain the vehicle tracking information of the target vehicle in the second image collected within the preset time before the first image. , the vehicle tracking information includes the corresponding positioning positions of the vehicle identification of the target vehicle in the plurality of second images.
其中,目标泊位边框是所述多个路侧泊位中的一个在路侧摄像头的拍摄画面中所对应的图像区域边界。Wherein, the target parking frame is the boundary of the image area corresponding to one of the plurality of roadside parking spaces in the picture captured by the roadside camera.
204、若根据所述车辆跟踪信息确定所述车辆标识出现于预设的预警边框内,则确定目标车辆驶入目标泊位边框所对应的路侧泊位停靠。 204. If it is determined according to the vehicle tracking information that the vehicle identification appears within the preset warning frame, then determine that the target vehicle drives into the roadside parking space corresponding to the target parking space frame and stops.
其中,如上文所述,预警边框是进出所述多个路侧泊位所需途经的预警区域在所述路侧摄像头的拍摄画面中所对应的图像区域边界,预警区域是包围这多个路侧泊位的车行道区域。Wherein, as mentioned above, the early warning frame is the boundary of the image area corresponding to the early warning area required to enter and exit the multiple roadside parking spaces in the shooting screen of the roadside camera, and the early warning area is surrounding the multiple roadside parking spaces. The roadway area of the parking space.
针对覆盖上述多个路侧泊位的路侧摄像头X来说,该路侧摄像头X可以持续拍摄视频画面。面对需要对进出路侧泊位的车辆进行准确识别的需求,可以对路侧摄像头X拍得的视频画面进行采样得到一帧帧图像,针对采样得到的各帧图像,都可以进行车辆检测以及车辆跟踪处理。其中,采样频率可以预先设定,比如5帧/秒。For the roadside camera X covering the above-mentioned multiple roadside parking spaces, the roadside camera X can continuously capture video images. Faced with the need to accurately identify vehicles entering and exiting roadside parking spaces, the video footage captured by the roadside camera Track processing. Among them, the sampling frequency can be preset, such as 5 frames/second.
其中,车辆检测的目的是检测出图像中所含的各个车辆的车辆检测框以及车身上预设的某种中心点的位置,该位置是指在图像中对应的像素位置。车辆跟踪的目的是确定不同帧图像中的同一辆车,并确定车辆的车辆标识。上述预设中心点可以是车辆底盘中心点。Among them, the purpose of vehicle detection is to detect the vehicle detection frame of each vehicle contained in the image and the position of a certain center point preset on the vehicle body. This position refers to the corresponding pixel position in the image. The purpose of vehicle tracking is to identify the same vehicle in different frame images and determine the vehicle's vehicle identity. The above-mentioned preset center point may be the center point of the vehicle chassis.
针对车辆检测处理来说,上述第一图像可以是路侧摄像头X采集的任一帧图像,以第一图像为例,假设上述车身预设中心点为车辆底盘中心点,对所述第一图像进行车辆检测处理,可以实现为:For vehicle detection processing, the above-mentioned first image can be any frame image collected by the roadside camera Vehicle detection processing can be implemented as:
使用预先训练得到的深度神经网络模型对第一图像进行车辆检测处理,以得到第一图像中目标车辆所对应的车辆检测框和车辆底盘检测框,确定车辆底盘检测框的中心点的位置作为车辆底盘中心点的位置。其中,目标车辆是指从第一图像中检测出的任一车辆。Use the pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain the vehicle detection frame and vehicle chassis detection frame corresponding to the target vehicle in the first image, and determine the position of the center point of the vehicle chassis detection frame as the vehicle The position of the center point of the chassis. The target vehicle refers to any vehicle detected from the first image.
本发明实施例中,车辆检测框是指包含完整车辆的检测框,车辆底盘检测框是指包含车辆底盘区域的检测框,如图3中所示。In the embodiment of the present invention, the vehicle detection frame refers to the detection frame including the complete vehicle, and the vehicle chassis detection frame refers to the detection frame including the vehicle chassis area, as shown in Figure 3.
车辆检测框和车辆底盘检测框都是一个矩形框,在得到车辆底盘检测框时便可以得到其四个顶点在图像中的像素坐标,进而可以基于四个顶点的像素坐标求得中心点的像素坐标,即为车辆底盘中心点的位置。The vehicle detection frame and the vehicle chassis detection frame are both a rectangular frame. When the vehicle chassis detection frame is obtained, the pixel coordinates of its four vertices in the image can be obtained, and then the pixels of the center point can be obtained based on the pixel coordinates of the four vertices. The coordinate is the position of the center point of the vehicle chassis.
实际上,车辆检测也是针对图像进行车辆这种特定目标的目标检测任务,因此,上述深度神经网络模型可以采用目标检测任务的训练思路进行训练。简单来说,预先收集大量的训练样本,其中可以包括车辆在图像中呈现各种姿态和遮挡情形的训练样本图像,通过对训练样本图像中进行监督信息的标注,基于标注的监督信息进行该深度神经网络模型的训练。其中,标注的监督信息即为车辆在相应训练样本图像中对应的车辆检测框和车辆底盘检测框。In fact, vehicle detection is also a target detection task for specific targets such as vehicles in images. Therefore, the above-mentioned deep neural network model can be trained using the training ideas of the target detection task. Simply put, a large number of training samples are collected in advance, which can include training sample images in which the vehicle presents various postures and occlusion situations in the image. By annotating the supervision information in the training sample images, the depth is carried out based on the annotated supervision information. Training of neural network models. Among them, the annotated supervision information is the vehicle detection frame and vehicle chassis detection frame corresponding to the vehicle in the corresponding training sample image.
实际上,在路侧摄像头与路侧泊位同侧设置的情形下,从该路侧摄像头的视角来看,停在路侧泊位上的车辆之间可能存在很严重的遮挡情况,如图1中所示,车牌为A的车辆遮挡住车牌为B的车辆的大部分,此时,完全依赖上述深度神经网络模型的检测结果来确定底盘中心点的位置可能不可靠,因为深度神经网络模型此时可能不能输出车辆底盘检测框。In fact, when the roadside camera is installed on the same side as the roadside parking space, from the perspective of the roadside camera, there may be serious occlusion between the vehicles parked on the roadside parking space, as shown in Figure 1 As shown, the vehicle with license plate A blocks most of the vehicle with license plate B. At this time, it may be unreliable to rely solely on the detection results of the above-mentioned deep neural network model to determine the location of the chassis center point, because the deep neural network model at this time The vehicle chassis detection frame may not be output.
针对这种情形,可选地,对所述第一图像进行车辆检测处理,还可以实现为:For this situation, optionally performing vehicle detection processing on the first image can also be implemented as:
使用预先训练得到的深度神经网络模型对第一图像进行车辆检测处理,以得到第一图像中目标车辆所对应的车辆检测框; Use the pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image;
确定车辆检测框的底部预设高度占比的子检测框,所述预设高度占比根据车辆底盘距离地面的高度设定;Determine the sub-detection frame with a preset height ratio at the bottom of the vehicle detection frame, where the preset height ratio is set based on the height of the vehicle chassis from the ground;
确定所述子检测框的顶端中心点的位置作为车辆底盘中心点的位置。The position of the top center point of the sub-detection frame is determined as the position of the center point of the vehicle chassis.
也就是说,此时该深度神经网络模型可以仅被训练用于进行车辆检测框的识别,基于其得到的车辆检测框间接地确定车辆底盘中心点在第一图像中对应的位置坐标。That is to say, at this time, the deep neural network model can only be trained to identify the vehicle detection frame, and the corresponding position coordinates of the vehicle chassis center point in the first image are indirectly determined based on the obtained vehicle detection frame.
为便于理解,结合图4来示例性说明,在图4中,假设深度神经网络模型从第一图像中检测到图中示意的一个车辆检测框Q,假设上述预设高度占比为1/5,即将车辆检测框的高度H分成5份,底部的1/5H形成一个子检测框q,子检测框q的顶端宽度的中心点(图中的圆点)即作为底盘中心点。这个1/5H的高度是通过统计车辆底盘距离地面高度与车辆顶端距离地面高度的比值情况得到的。For ease of understanding, an exemplary description is provided with reference to Figure 4. In Figure 4, it is assumed that the deep neural network model detects a vehicle detection frame Q illustrated in the figure from the first image, and it is assumed that the above-mentioned preset height ratio is 1/5 , that is, the height H of the vehicle detection frame is divided into 5 parts, and the bottom 1/5H forms a sub-detection frame q. The center point of the top width of the sub-detection frame q (the circle point in the picture) is the chassis center point. This height of 1/5H is obtained by counting the ratio of the height of the vehicle chassis from the ground to the height of the top of the vehicle from the ground.
在本发明实施例中,除了针对采样得到的每帧图像进行车辆检测处理,以得到每帧图像中包含的各个车辆所对应的车辆检测框以及车身上设定中心点的位置外,还会对连续不同帧图像进行车辆跟踪处理。因为车辆检测处理只能确定一帧帧图像中是否包含车辆以及所包含车辆在图像中的对应位置,并不能得知车辆的标识信息以及车辆的运动轨迹信息,从而也就不能得知不同帧图像之间车辆的同一性。而通过车辆跟踪处理,便可以得到车辆的标识信息以及跟踪确定同一车辆在不同帧图像中对应的位置。In the embodiment of the present invention, in addition to performing vehicle detection processing on each frame of image sampled to obtain the vehicle detection frame corresponding to each vehicle contained in each frame of image and the position of the center point set on the vehicle body, the Continuous different frame images are processed for vehicle tracking. Because the vehicle detection process can only determine whether a frame of image contains a vehicle and the corresponding position of the contained vehicle in the image, it cannot know the identification information of the vehicle and the movement trajectory information of the vehicle, so it cannot know the different frame images. Identity between vehicles. Through vehicle tracking processing, the identification information of the vehicle can be obtained and the corresponding position of the same vehicle in different frame images can be determined through tracking.
车辆检测处理和车辆跟踪处理可以相互配合,比如在通过车辆检测处理在一帧图像中发现一个车辆得到对应的车辆检测框时,车辆跟踪处理可以通过识别这辆车的视觉特征(比如颜色、车型、大小、轮廓等),结合移动速度等特征信息,便可以得知这个车辆与此前一些图像出现的某个车辆是否为同一车辆。车辆跟踪处理可以参考现有相关技术实现,本实施例中不做详细说明。Vehicle detection processing and vehicle tracking processing can cooperate with each other. For example, when a vehicle is found in a frame of image through vehicle detection processing and the corresponding vehicle detection frame is obtained, vehicle tracking processing can identify the visual characteristics of the vehicle (such as color, model, etc.) , size, outline, etc.), combined with characteristic information such as moving speed, you can know whether this vehicle is the same vehicle as a vehicle that appeared in some previous images. Vehicle tracking processing can be implemented with reference to existing related technologies, and will not be described in detail in this embodiment.
在实际应用中,车辆检测处理和车辆跟踪处理可以由不同进程来执行,当一辆车刚刚出现在上述路侧摄像头X的画面中时,车辆检测处理进程与车辆跟踪处理进程首次检测到这辆车,车辆跟踪处理进程会为其分配一个跟踪号作为该车辆的一种标识信息。同时,车辆跟踪处理进程还可以执行车牌识别处理,以识别出这辆车的车牌号,如果能够识别到车牌号(实际上可能由于距离远、移动速度快、车辆间遮挡等因素在一些帧图像中识别不到该车牌号),则车牌号与该跟踪号一起,可以作为车辆的标识信息。In practical applications, vehicle detection processing and vehicle tracking processing can be executed by different processes. When a vehicle just appears in the picture of the roadside camera X, the vehicle detection processing process and the vehicle tracking processing process detect the vehicle for the first time. For a vehicle, the vehicle tracking process will assign a tracking number as a kind of identification information for the vehicle. At the same time, the vehicle tracking processing process can also perform license plate recognition processing to identify the license plate number of the vehicle. If the license plate number can be recognized (actually, it may be due to factors such as long distance, fast moving speed, occlusion between vehicles, etc.). If the license plate number cannot be recognized), the license plate number and the tracking number can be used as the identification information of the vehicle.
可选地,在具体实施时,如果车辆检测处理进程在某帧图像中检测到一个车辆,车辆跟踪处理进程在提取得到这辆车的诸如视觉特征、移动速度等特征的同时,为这辆车确定了车辆标识,则可以将该车辆标识与对应的车辆检测框关联标记。这样,通过车辆检测与车辆跟踪的联合处理,便可以得知一辆车在不同帧图像中各自对应的车辆检测框以及车辆标识,从而,基于同一车辆标识在连续多帧图像中所对应的车辆检测框的位置,便可以形成这辆车的移动轨迹。Optionally, during specific implementation, if the vehicle detection processing process detects a vehicle in a certain frame of image, the vehicle tracking processing process will extract the characteristics of the vehicle such as visual features, moving speed, etc. Once the vehicle identification is determined, the vehicle identification can be associated with the corresponding vehicle detection frame. In this way, through the joint processing of vehicle detection and vehicle tracking, it is possible to know the corresponding vehicle detection frame and vehicle identification of a vehicle in different frame images. Therefore, based on the same vehicle identification, the corresponding vehicle in multiple consecutive frames of images can be determined. The position of the detection frame can form the movement trajectory of the car.
以上介绍了对路侧摄像头X采集的每帧图像进行车辆检测处理以及车辆跟踪处理的过程。承接于上述在第一图像中检测到目标车辆所对应的车辆检测框和车身预设中心点(如 车辆底盘中心点)的位置的举例,为了确定目标车辆是否驶入路侧摄像头X覆盖的某路侧泊位停靠,首先,以路侧泊位作为核心,先基于该车辆检测框和车辆底盘中心点的位置与路侧摄像头X覆盖的多个路侧泊位各自对应的泊位边框进行位置比较,以确定目标车辆是否满足泊位占用条件,换言之,确定路侧泊位的状态是否处于被占用状态。The above introduces the process of vehicle detection and vehicle tracking processing for each frame of image collected by the roadside camera X. Continuing from the above, the vehicle detection frame corresponding to the target vehicle detected in the first image and the preset center point of the body (such as For example, in order to determine whether the target vehicle has parked at a certain roadside parking space covered by the roadside camera The position is compared with the corresponding parking frame of the multiple roadside parking spaces covered by the roadside camera
所述泊位占用条件包括:车辆检测框与目标泊位边框的重合度大于设定阈值,以及车辆底盘中心点的位置位于目标泊位边框内。其中,目标泊位边框为上述多个路侧泊位对应的泊位边框中的任一个。如果上述条件满足,则确定目标车辆占用目标泊位边框所对应的路侧泊位。上述重合度对应的设定阈值比如为30%等预设值。The parking space occupancy conditions include: the coincidence degree between the vehicle detection frame and the target parking frame is greater than the set threshold, and the position of the center point of the vehicle chassis is within the target parking frame. Wherein, the target parking frame is any one of the parking frame corresponding to the above-mentioned multiple roadside parking spaces. If the above conditions are met, it is determined that the target vehicle occupies the roadside parking space corresponding to the target parking frame. The set threshold corresponding to the above-mentioned degree of coincidence is, for example, a preset value such as 30%.
在实际应用中,可以先进行车辆检测框与目标泊位边框的重合度的判断,如果重合度大于设定阈值,则再判断车辆底盘中心点是否位于目标泊位边框内,只有这两个条件都满足时,才执行后续的判断流程。如果重合度小于上述设定阈值,则不进行后续判断,确定目标车辆未占用目标泊位边框对应的路侧泊位。In practical applications, the coincidence degree of the vehicle detection frame and the target parking frame can be judged first. If the coincidence degree is greater than the set threshold, then it is judged whether the center point of the vehicle chassis is within the target parking frame. Only these two conditions are met. , the subsequent judgment process is executed. If the degree of coincidence is less than the above set threshold, no subsequent judgment will be made to determine that the target vehicle does not occupy the roadside parking space corresponding to the target parking frame.
本发明实施例中,通过上述重合度和车辆底盘中心点的双重判断,可以更加准确地确定目标车辆是否占用了一个路侧泊位,即实现泊位进场的更精确判断。因为实际上,可能会有车辆只是途经路侧泊位而非停靠的情形,途经车辆一般难以同时满足上述两个判断条件。比如:大型车辆(例如公交车、客车)由于车体比较大,所以在途经路侧泊位的时候,可能会满足上述重合度的判断条件,但是未必能够满足底盘中心点的判断条件。In the embodiment of the present invention, through the dual judgment of the above-mentioned coincidence degree and the center point of the vehicle chassis, it can be more accurately determined whether the target vehicle occupies a roadside parking space, that is, a more accurate judgment of parking entry can be achieved. Because in fact, there may be situations where vehicles just pass by the roadside parking space instead of parking, and it is generally difficult for passing vehicles to meet the above two judgment conditions at the same time. For example, due to their relatively large bodies, large vehicles (such as buses and coaches) may meet the above-mentioned judgment conditions for coincidence when passing by roadside parking spaces, but they may not be able to meet the judgment conditions for the center point of the chassis.
当目标车辆的车辆检测框以及车辆底盘中心点的位置满足上述目标泊位边框的泊位占用条件时,为更加准确地确定目标车辆是驶入相应路侧泊位进行停靠的车辆,继而还需要再判断该目标车辆在进入路侧泊位之前,是否在预警区域出现过。如果在预警区域出现过,则最终确定目标车辆是驶入目标泊位边框所对应的路侧泊位停靠的车辆,即目标车辆存在驶入该路侧泊位停靠的行为。如果没有在预警区域出现过,在确定目标车辆不存在驶入该路侧泊位停靠的行为。When the vehicle detection frame of the target vehicle and the position of the center point of the vehicle chassis meet the parking occupancy conditions of the target parking frame, in order to more accurately determine that the target vehicle is a vehicle that drives into the corresponding roadside parking space, it is necessary to further determine whether the target vehicle is parked in the corresponding roadside parking space. Whether the target vehicle appeared in the warning area before entering the roadside parking space. If it has appeared in the warning area, it is finally determined that the target vehicle is a vehicle that drives into the roadside parking space corresponding to the target parking space frame, that is, the target vehicle has the behavior of driving into the roadside parking space and parking. If it has not appeared in the warning area, it is determined that the target vehicle does not drive into the roadside parking space and park.
为实现上述在预警区域出现过的判断,需要获取第一图像前预设时间内采集的多帧第二图像中目标车辆的车辆跟踪信息。该预设时间比如为10秒、15秒等预设值,多帧第二图像是指在这个预设时间内依次采样得到的多帧图像,为与第一图像区分,称为多帧第二图像。结合上述对车辆检测以及车辆跟踪处理的介绍,可以理解的是,车辆跟踪信息中包括目标车辆的车辆标识在多帧第二图像中各自对应的定位位置,该定位位置可以是在相应第二图像中目标车辆的车辆检测框的位置,当然,也可以以该车辆检测框上的某特征点(如中心点、角点)的位置作为该定位位置,而该定位位置是此前基于车辆跟踪处理和车辆检测处理过程便已经得到的。若根据该车辆跟踪信息确定目标车辆的车辆标识出现于预警边框内,则确定目标车辆驶入目标泊位边框所对应的路侧泊位停靠。In order to realize the above-mentioned judgment that the vehicle has appeared in the warning area, it is necessary to obtain vehicle tracking information of the target vehicle in multiple frames of second images collected within a preset time before the first image. The preset time is, for example, 10 seconds, 15 seconds and other preset values. The multi-frame second image refers to the multi-frame images obtained by sampling sequentially within this preset time. In order to distinguish it from the first image, it is called the multi-frame second image. image. Based on the above introduction to vehicle detection and vehicle tracking processing, it can be understood that the vehicle tracking information includes the corresponding positioning position of the vehicle identification of the target vehicle in the multiple second images. The positioning position may be in the corresponding second image. The position of the vehicle detection frame that hits the target vehicle. Of course, the position of a certain feature point (such as the center point, corner point) on the vehicle detection frame can also be used as the positioning position, and the positioning position is based on the vehicle tracking processing and The vehicle detection process has been obtained. If it is determined based on the vehicle tracking information that the vehicle identification of the target vehicle appears in the warning frame, it is determined that the target vehicle drives into the roadside parking space corresponding to the target parking frame and stops.
其中,如上文所述,车辆标识可以包括车牌号、跟踪号。在判断过程中,可以首先判断车牌号是否在预警边框内出现过,如果因为距离远、车辆移动速度快等原因未成功识别到车牌号,则可以再判断跟踪号是否出现在预警边框内。 Among them, as mentioned above, the vehicle identification may include the license plate number and tracking number. During the judgment process, you can first determine whether the license plate number appears in the warning frame. If the license plate number is not successfully recognized due to long distance, fast vehicle movement, etc., you can then determine whether the tracking number appears in the warning frame.
采用车牌号和跟踪号的双重确认方式判断目标车辆是否出现在预警区域内,可以提高确定结果的抗干扰性,克服复杂环境(如遮挡、高速移动、距离远)的干扰。Using the double confirmation method of license plate number and tracking number to determine whether the target vehicle appears in the warning area can improve the anti-interference of the determination result and overcome the interference of complex environments (such as occlusion, high-speed movement, and long distances).
综上,在上述方案中,通过在同一路侧摄像头覆盖的连续几个同侧的路侧泊位外定义一个预警区域来辅助进行车辆进出泊位的判断,只有在先确定车辆满足占用路侧泊位的条件后,又确定车辆满足此前途经预警区域的条件时,才最终判定车辆驶入该路侧泊位进行停靠,提高驶入确定结果的准确性。而且,在进行泊位占用判断时,结合车辆检测框以及车身上特定的某中心点这两个因素来判断车辆是否占用某个泊位,能够提高泊位占用确定结果的准确性。To sum up, in the above scheme, an early warning area is defined outside several consecutive roadside parking spaces on the same side covered by the same roadside camera to assist in the judgment of vehicles entering and exiting the parking spaces. Only when it is first determined that the vehicle meets the requirements for occupying the roadside parking space After the conditions are met, it is determined that the vehicle meets the conditions for passing through the warning area before it is finally determined that the vehicle will enter the roadside parking space and park, thereby improving the accuracy of the entry determination result. Moreover, when determining parking space occupancy, combining the two factors of the vehicle detection frame and a specific center point on the vehicle body to determine whether the vehicle occupies a certain parking space can improve the accuracy of the parking space occupancy determination result.
在一可选实施例中,为进一步提高车辆驶入泊位停靠的判断结果的准确性,承接于上述第一图像以及多帧第二图像的举例,在结合第一图像中检测到的目标车辆的车辆检测框和车辆底盘中心点,以及从多帧第二图像中跟踪确定的目标车辆的车辆标识在相应第二图像中的定位位置,确定目标车辆是从预警区域驶入目标泊位边框对应的路侧泊位后,还可以进一步判断目标车辆是否在接下来的一段时间内稳定地停靠在该路侧泊位内,若是,则最终确定目标车辆驶入该路侧泊位停靠,否则,确定目标车辆只是途经该路侧泊位。In an optional embodiment, in order to further improve the accuracy of the judgment result of the vehicle entering the parking space, following the above example of the first image and the multi-frame second image, in combination with the target vehicle detected in the first image The vehicle detection frame and the center point of the vehicle chassis, as well as the positioning position of the target vehicle's vehicle identification in the corresponding second image tracked and determined from the multi-frame second image, determine that the target vehicle drove from the warning area into the road corresponding to the target parking frame. After parking in the roadside berth, it can be further determined whether the target vehicle will park stably in the roadside berth in the next period of time. If so, it is finally determined that the target vehicle has entered the roadside berth and parked. Otherwise, it is determined that the target vehicle is just passing by. The roadside berth.
基于此,确定目标车辆驶入目标泊位边框所对应的路侧泊位停靠,可以实现为:Based on this, determining the roadside parking space corresponding to the target vehicle driving into the target parking frame can be implemented as:
获取第一图像后预设时间内采集的多帧第三图像中目标车辆的车辆跟踪信息;Obtain vehicle tracking information of the target vehicle in multiple frames of third images collected within a preset time after the first image;
分别对多帧第三图像进行车辆检测处理,以结合多帧第三图像中目标车辆的车辆跟踪信息得到目标车辆在多帧第三图像中分别对应的车辆检测框和车身预设中心点的位置;Carry out vehicle detection processing on multiple frames of third images respectively to obtain the positions of the target vehicle's corresponding vehicle detection frame and body preset center point in the multiple frames of third images by combining the vehicle tracking information of the target vehicle in the multiple frames of third images. ;
若目标车辆在多帧第三图像中分别对应的车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则确定目标车辆驶入目标泊位边框所对应的路侧泊位停靠。If the positions of the vehicle detection frame and the preset center point of the vehicle body respectively corresponding to the target vehicle in the multi-frame third image meet the parking occupancy conditions of the target parking frame, it is determined that the target vehicle drives into the roadside parking lot corresponding to the target parking frame and stops.
该预设时间比如为10秒、15秒等预设值。多帧第三图像与多帧第二图像类似,并未意味着同一帧图像有多个,而是在相应时间段内分别采样得到的不同帧图像。The preset time is, for example, 10 seconds, 15 seconds and other preset values. The multi-frame third image is similar to the multi-frame second image. It does not mean that there are multiple images of the same frame, but different frame images sampled respectively within the corresponding time period.
概括来说,这里的车辆跟踪信息主要是用于识别同一目标车辆的。分别对多帧第三图像进行车辆检测处理得到每帧图像中包含的车辆检测框以及车身预设中心点(如车辆底盘中心点)的位置,可以结合车辆跟踪处理结果确定每帧图像中包含的车辆检测框所对应的车辆标识,从而可以确定目标车辆的车辆检测框。如果基于目标车辆在多帧第三图像中分别对应的车辆检测框以及车辆底盘中心点的位置确定在上述预设时间内目标车辆都满足占用目标泊位边框所对应的路侧泊位的条件,则认为目标车辆稳定地停靠在该路侧泊位中。In summary, the vehicle tracking information here is mainly used to identify the same target vehicle. Carry out vehicle detection processing on multiple frames of the third image respectively to obtain the vehicle detection frame contained in each frame of image and the position of the preset center point of the vehicle body (such as the center point of the vehicle chassis), which can be combined with the vehicle tracking processing results to determine the location of the vehicle detection frame contained in each frame of image. The vehicle identification corresponding to the vehicle detection frame can be used to determine the vehicle detection frame of the target vehicle. If it is determined based on the corresponding vehicle detection frame and the position of the vehicle chassis center point of the target vehicle in the multi-frame third image that the target vehicle satisfies the conditions for occupying the roadside parking space corresponding to the target parking frame within the above preset time, then it is considered that The target vehicle is parked stably in the roadside parking space.
在最终确定目标车辆停靠在目标泊位边框所对应的路侧泊位时,可以生成与目标车辆对应的驶入记录,所述驶入记录中包括目标泊位边框所对应的路侧泊位的标识、目标车辆的车辆标识、驶入时间以及驶入视频,其中,驶入视频至少包括采样得到多帧第二图像和第一图像的视频片段,当然,也可以包括采样得到多帧第三图像的视频片段。进一步地,该驶入记录中还可以包括目标车辆的驶入轨迹:基于对驶入视频进行采样得到的这些图像中,目标车辆的车辆标识所对应的定位位置,生成该驶入轨迹。When it is finally determined that the target vehicle is parked at the roadside parking space corresponding to the target parking space frame, an entry record corresponding to the target vehicle may be generated. The entry record includes the identification of the roadside parking space corresponding to the target parking space frame, the target vehicle The vehicle identification, entry time and entry video, wherein the entry video at least includes video clips obtained by sampling multiple frames of the second image and the first image. Of course, it may also include video clips obtained by sampling multiple frames of the third image. Further, the entry record may also include the entry trajectory of the target vehicle: the entry trajectory is generated based on the positioning position corresponding to the vehicle identification of the target vehicle in the images obtained by sampling the entry video.
在一可选实施例中,为节省算力,提供了如下的泊位占用条件判断策略: In an optional embodiment, in order to save computing power, the following berth occupancy condition determination strategy is provided:
针对采样得到的任一帧图像i(比如上述第一图像)来说,如果在其中检测到一个车辆(称为目标车辆)的车辆检测框和车辆底盘中心点,在比较该车辆检测框与目标泊位边框的重合度时发现该车辆检测框相距目标泊位边框比较远,则可以基于采样频率确定下一次针对该目标车辆进行泊位占用条件判断的图像j,图像j与图像i之间一般包含了采样的至少一帧图像。假设确定需要隔m帧图像后再对目标车辆进行上述判断,m大于或等于1,那么在基于车辆跟踪和车辆检测处理,在相隔m帧后的图像j中得到目标车辆的车辆检测框和车辆底盘中心点后,再比较该车辆检测框与目标泊位边框的重合度以及确定车辆底盘中心点是否位于目标泊位边框内。For any sampled image i (such as the first image above), if the vehicle detection frame and the center point of the vehicle chassis of a vehicle (called the target vehicle) are detected, the vehicle detection frame is compared with the target When it is found that the vehicle detection frame is relatively far away from the target parking frame when the parking frame overlaps, the next image j for judging the parking occupancy conditions for the target vehicle can be determined based on the sampling frequency. The image j and the image i generally include samples. at least one frame of image. Assume that it is determined that the above judgment on the target vehicle needs to be made after m frames of images are separated, and m is greater than or equal to 1. Then based on vehicle tracking and vehicle detection processing, the vehicle detection frame and vehicle detection frame of the target vehicle are obtained in the image j after m frames are separated. After determining the center point of the chassis, compare the overlap between the vehicle detection frame and the target parking frame and determine whether the center point of the vehicle chassis is located within the target parking frame.
由于车辆检测和车辆跟踪都是基于确定的深度神经网络模型和车辆跟踪算法实现的,这两个处理过程具有稳定的算力开销,进行泊位占用条件判断也是需要算力开销的,通过上述策略可以减少该判断的执行次数,从而减少算力开销。Since vehicle detection and vehicle tracking are both implemented based on deterministic deep neural network models and vehicle tracking algorithms, these two processes have stable computing power overhead. Judging parking space occupancy conditions also requires computing power overhead. Through the above strategy, we can Reduce the number of executions of this judgment, thereby reducing computing power overhead.
图5为本发明实施例提供的一种确定车辆驶出泊位的方法的流程图,如图5所示,该方法可以包括如下步骤:Figure 5 is a flow chart of a method for determining a vehicle to drive out of a parking space provided by an embodiment of the present invention. As shown in Figure 5, the method may include the following steps:
501、分别对第一图像后采集的多帧第四图像进行车辆检测处理。501. Perform vehicle detection processing on multiple fourth frames of images collected after the first image.
502、若根据多帧第四图像的车辆检测结果确定目标车辆不符合目标泊位边框的泊位占用条件,则获取多帧第四图像中目标车辆的车辆跟踪信息。502. If it is determined based on the vehicle detection results of the fourth multi-frame image that the target vehicle does not meet the parking occupancy conditions of the target parking frame, obtain the vehicle tracking information of the target vehicle in the multi-frame fourth image.
503、若根据多帧第四图像中目标车辆的车辆跟踪信息,确定目标车辆的车辆标识出现于预警边框内,则确定目标车辆驶离目标泊位边框所对应的路侧泊位。503. If it is determined that the vehicle identification of the target vehicle appears in the warning frame based on the vehicle tracking information of the target vehicle in the fourth multi-frame image, then it is determined that the target vehicle has left the roadside parking space corresponding to the target parking frame.
承接于前述实施例中的举例:假设在基于上述第一图像以及第一图像前采集的多帧第二图像已经确定目标车辆驶入目标泊位边框对应的路侧泊位进行停靠。The example taken from the previous embodiment is as follows: It is assumed that the target vehicle has been determined to drive into the roadside parking space corresponding to the target parking space frame and park based on the above-mentioned first image and multiple frames of second images collected before the first image.
可以理解的是,在基于前述实施例中所说的多帧第三图像确定目标车辆驶入目标泊位边框对应的路侧泊位进行停靠一段时间的情形下,步骤501中的第一图像替换为多帧第三图像中的最后一帧第三图像。It can be understood that when it is determined based on the multi-frame third image mentioned in the previous embodiment that the target vehicle drives into the roadside parking space corresponding to the target parking space frame and parks for a period of time, the first image in step 501 is replaced by the multi-frame third image. The last frame of the third image in the frame third image.
概括来说,该步骤中的“第一图像”是指最终确定目标车辆驶入目标泊位边框对应的路侧泊位进行稳定停靠时所采集的那帧图像。In summary, the "first image" in this step refers to the frame of image collected when the target vehicle is finally determined to drive into the roadside parking space corresponding to the target parking space frame for stable parking.
为便于描述,将该目标泊位边框对应的路侧泊位称为目标路侧泊位。之后,为了确定目标车辆何时驶出目标路侧泊位,需要继续对上述路侧摄像头X自第一图像后采集的图像进行车辆检测和车辆跟踪处理。For the convenience of description, the roadside berth corresponding to the target berth frame is called the target roadside berth. Afterwards, in order to determine when the target vehicle drove out of the target roadside parking space, it is necessary to continue to perform vehicle detection and vehicle tracking processing on the images collected by the roadside camera X since the first image.
假设在之后的T1时刻采集到的一帧图像中,基于车辆检测结果发现原本与目标泊位边框满足上述泊位占用条件的车辆检测框和车辆底盘中心点不再满足该泊位占用条件,即车辆检测框与目标泊位边框的重合度低于设定阈值,和/或车辆底盘中心点不再位于目标泊位边框内,则可以初步认为原本停靠在目标路侧泊位的目标车辆可能已经驶出目标路侧泊位。为保证确定结果的可靠性,继续观察T1时刻之后一段时间(假设时间到T2)内采集的多帧图像中,是否都在目标泊位边框内检测不到目标车辆的车辆检测框和车辆底盘中 心点,若是,则最终认为目标车辆不满足目标路侧泊位的占用条件。在上述举例中,T1到T2时间内采集的多帧图像即为上述多帧第四图像。Assume that in the subsequent frame of image collected at T1, based on the vehicle detection results, it is found that the vehicle detection frame and the center point of the vehicle chassis that originally met the above parking occupancy conditions with the target parking frame no longer meet the parking occupancy conditions, that is, the vehicle detection frame If the coincidence degree with the target parking frame is lower than the set threshold, and/or the center point of the vehicle chassis is no longer within the target parking frame, it can be initially believed that the target vehicle originally parked at the target roadside parking space may have driven out of the target roadside parking space. . In order to ensure the reliability of the determination results, continue to observe whether the multi-frame images collected within a period of time after T1 (assuming the time reaches T2) are all in the vehicle detection frame and vehicle chassis of the target parking space where the target vehicle cannot be detected. If so, it is finally considered that the target vehicle does not meet the occupancy conditions of the target roadside parking space. In the above example, the multi-frame images collected from T1 to T2 are the above-mentioned multi-frame fourth images.
可以理解的是,如前文所述,在对这些帧图像进行车辆检测处理的同时,也会进行车辆跟踪处理,从而可以得到对应于同一车辆标识的目标车辆在每帧图像中对应的车辆检测框和车辆底盘中心点。It can be understood that, as mentioned above, while vehicle detection processing is performed on these frame images, vehicle tracking processing is also performed, so that the vehicle detection frame corresponding to the target vehicle corresponding to the same vehicle identification in each frame image can be obtained and the vehicle chassis center point.
在基于多帧第四图像的车辆检测结果以及车辆跟踪结果确定目标车辆已经不满足目标路侧泊位的占用条件后,进一步基于从多帧第四图像中获取的目标车辆的车辆跟踪信息确定目标车辆在T1到T2时间段内是否出现在预警区域,即确定目标车辆的车辆标识是否在其中一些图像中的预警边框内出现过。其中,车辆跟踪信息中包括目标车辆的车辆标识在多帧第四图像中各自对应的定位位置。若出现过,则确定目标车辆驶出目标路侧泊位,此时可以生成与目标车辆对应的驶出记录,驶出记录中包括目标路侧泊位的标识、目标车辆的车辆标识、驶出时间以及驶出视频,其中,驶出视频至少包括采样得到所述多帧第四图像的视频片段。目标路侧泊位的标识与其对应的目标泊位边框的对应关系被预先存储,通过查询即可确定。After determining that the target vehicle no longer satisfies the occupancy conditions of the target roadside parking space based on the vehicle detection results and vehicle tracking results of the fourth multi-frame image, the target vehicle is further determined based on the vehicle tracking information of the target vehicle obtained from the multi-frame fourth image. Whether it appears in the warning area during the time period from T1 to T2 is to determine whether the vehicle logo of the target vehicle has appeared within the warning frame in some of the images. The vehicle tracking information includes corresponding positioning positions of the vehicle identification of the target vehicle in the plurality of fourth images. If it has happened, it is determined that the target vehicle drove out of the target roadside parking lot. At this time, an exit record corresponding to the target vehicle can be generated. The exit record includes the identification of the target roadside parking space, the vehicle identification of the target vehicle, the exit time and A drive-out video, wherein the drive-out video at least includes video segments sampled to obtain the plurality of frames of fourth images. The corresponding relationship between the identification of the target roadside parking and its corresponding target parking frame is stored in advance and can be determined through query.
由于路侧摄像头与路侧泊位同侧设置,在目标车辆停靠到目标路侧泊位后,由于其前后其他车辆的遮挡,对目标车辆是否离开其停靠的目标路侧泊位的判断制造了更多困难,因此,本实施例中,结合车辆检测框和车辆底盘中心点的双重确认方式来确定目标车辆是否不再占用目标路侧泊位,同时再结合目标车辆是否在不占用目标路侧泊位后经过预警区域的判断,多重判断可以精确确定目标车辆驶出目标路侧泊位的行为。Since the roadside camera is set up on the same side as the roadside parking space, after the target vehicle parks at the target roadside parking space, due to the obstruction of other vehicles in front and behind it, it creates more difficulties to determine whether the target vehicle has left the target roadside parking space where it is parked. , therefore, in this embodiment, the dual confirmation method of the vehicle detection frame and the center point of the vehicle chassis is combined to determine whether the target vehicle no longer occupies the target roadside parking space, and at the same time, it is combined with whether the target vehicle passes the warning after not occupying the target roadside parking space. Regional judgment and multiple judgments can accurately determine the behavior of the target vehicle driving out of the target roadside parking space.
基于目标车辆对应的驶入和驶出记录,不仅可以实现对目标车辆的收费,还可以形成准确的证据链。Based on the entry and exit records corresponding to the target vehicle, not only can the target vehicle be charged, but an accurate evidence chain can also be formed.
以上各实施例中以车辆进出路侧泊位的场景对车辆是否驶入、驶离泊位的判断过程进行了举例说明,如前文所述,该方案同样可以适用于室内、室外停车场的场景中,也就是说,任何有车辆进出泊位确定需求的场景都适用。概括来说,这些室内、室外停车场场景中,一个摄像头可以被配置为可以拍摄到多个停车位(即泊位),针对每个摄像头可以设置前述实施例中所说的预警区域,参考前述实施例中对每个摄像头采集的视频图像所进行的处理过程,便可以确定每个停车位上车辆的驶入、驶离情况。In each of the above embodiments, the scene of a vehicle entering and exiting a roadside parking lot is used as an example to illustrate the process of determining whether a vehicle enters or leaves the parking lot. As mentioned above, this solution can also be applied to indoor and outdoor parking lots. In other words, it is applicable to any scenario where there is a need for vehicles to enter and exit the parking space. In summary, in these indoor and outdoor parking scenes, one camera can be configured to capture multiple parking spaces (i.e., berths), and the warning area mentioned in the aforementioned embodiments can be set for each camera. Refer to the aforementioned implementation. In this example, the processing of video images collected by each camera can determine the entry and exit of vehicles in each parking space.
基于此,概括来说,本发明提供了一种适用于任何停车泊位的场景中确定车辆进出泊位的方案,如下:Based on this, in summary, the present invention provides a solution that is suitable for determining vehicles entering and exiting the parking space in any parking space scenario, as follows:
获取摄像头采集的第一图像,所述摄像头覆盖多个泊位;Obtaining a first image collected by a camera covering multiple berths;
对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车身预设中心点的位置;Perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body;
若确定所述车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则获取所述第一图像前预设时间内采集的多帧第二图像中所述目标车辆的车辆跟踪信息,所述车辆跟踪信息中包括所述目标车辆的车辆标识在所述多帧第二图像中各自对应的定 位位置;其中,所述目标泊位边框是任一所述泊位在所述摄像头的拍摄画面中所对应的图像区域边界;If it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking space occupancy conditions of the target parking frame, then the vehicle of the target vehicle in the multiple frames of the second image collected within the preset time before the first image is acquired. Tracking information, the vehicle tracking information includes the corresponding position of the vehicle identification of the target vehicle in the multi-frame second image. position; wherein, the target berth border is the boundary of the image area corresponding to any of the berths in the shooting screen of the camera;
若根据所述车辆跟踪信息确定所述车辆标识出现于预设的预警边框内,则确定所述目标车辆驶入所述目标泊位边框所对应的泊位停靠;其中,所述预警边框是进出所述多个泊位所需途经的预警区域在所述摄像头的拍摄画面中所对应的图像区域边界,所述预警区域是包围所述多个泊位的车行道区域。If it is determined according to the vehicle tracking information that the vehicle identification appears in the preset warning frame, it is determined that the target vehicle enters the parking space corresponding to the target parking frame and stops; wherein the warning frame is the entrance to the parking space. The pre-warning area that multiple parking spaces need to pass through is the corresponding image area boundary in the shooting picture of the camera. The early warning area is a roadway area surrounding the multiple parking spaces.
该方案的具体实施过程可以参考前述其他实施例中的相关说明,在此不赘述。For the specific implementation process of this solution, reference can be made to the relevant descriptions in other aforementioned embodiments and will not be described again here.
以下将详细描述本发明的一个或多个实施例的确定车辆进出泊位的装置。本领域技术人员可以理解,这些装置均可使用市售的硬件组件通过本方案所教导的步骤进行配置来构成。The device for determining the entry and exit of a vehicle into a parking space according to one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these devices can be constructed using commercially available hardware components and configured through the steps taught in this solution.
图6为本发明实施例提供的一种确定车辆进出泊位的装置的结构示意图,如图6所示,该装置包括:获取模块11、检测模块12、处理模块13。Figure 6 is a schematic structural diagram of a device for determining vehicle entry and exit from a parking space provided by an embodiment of the present invention. As shown in Figure 6, the device includes: an acquisition module 11, a detection module 12, and a processing module 13.
获取模块11,用于获取摄像头采集的第一图像,所述摄像头覆盖多个泊位。The acquisition module 11 is used to acquire the first image collected by a camera covering multiple berths.
检测模块12,用于对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车身预设中心点的位置。The detection module 12 is configured to perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body.
处理模块13,用于若确定所述车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则获取所述第一图像前预设时间内采集的多帧第二图像中所述目标车辆的车辆跟踪信息,所述车辆跟踪信息中包括所述目标车辆的车辆标识在所述多帧第二图像中各自对应的定位位置;以及若根据所述车辆跟踪信息确定所述车辆标识出现于预设的预警边框内,则确定所述目标车辆驶入所述目标泊位边框所对应的泊位停靠;其中,所述预警边框是进出所述多个泊位所需途经的预警区域在所述摄像头的拍摄画面中所对应的图像区域边界,所述预警区域是包围所述多个泊位的车行道区域,所述目标泊位边框是任一所述泊位在所述摄像头的拍摄画面中所对应的图像区域边界。The processing module 13 is configured to, if it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking occupancy conditions of the target parking frame, obtain the second image of the plurality of frames collected within the preset time before the first image. The vehicle tracking information of the target vehicle, the vehicle tracking information includes the corresponding positioning positions of the vehicle identification of the target vehicle in the multiple frames of second images; and if the vehicle is determined based on the vehicle tracking information If the logo appears in the preset warning frame, it is determined that the target vehicle has entered the parking space corresponding to the target parking space frame and is parked; wherein, the warning frame is where the warning area required to enter and exit the multiple parking spaces is located. The corresponding image area boundary in the shooting picture of the camera, the warning area is the roadway area surrounding the plurality of parking spaces, and the target parking frame is the location of any of the parking spaces in the shooting picture of the camera. The corresponding image area boundary.
可选地,所述泊位占用条件包括:所述车辆检测框与所述目标泊位边框的重合度大于设定阈值,以及所述车身预设中心点的位置位于所述目标泊位边框内。Optionally, the parking space occupancy condition includes: the coincidence degree of the vehicle detection frame and the target parking space frame is greater than a set threshold, and the position of the preset center point of the vehicle body is located within the target parking space frame.
可选地,所述车身预设中心点包括车辆底盘中心点。Optionally, the preset center point of the vehicle body includes the center point of the vehicle chassis.
可选地,所述检测模块12具体用于:使用预先训练得到的深度神经网络模型对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车辆底盘检测框,所述车辆检测框是指包含完整车辆的检测框;确定所述车辆底盘检测框的中心点的位置作为所述车辆底盘中心点的位置。Optionally, the detection module 12 is specifically configured to use a pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain a vehicle detection frame corresponding to the target vehicle in the first image and The vehicle chassis detection frame refers to a detection frame containing a complete vehicle; the position of the center point of the vehicle chassis detection frame is determined as the position of the center point of the vehicle chassis.
可选地,所述检测模块12具体用于:使用预先训练得到的深度神经网络模型对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框;确定所述车辆检测框的底部预设高度占比的子检测框,所述预设高度占比根据车辆底盘距离地面的高度设定;确定所述子检测框的顶端中心点的位置作为所述车辆底盘中心点的位置。 Optionally, the detection module 12 is specifically configured to: use a pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain a vehicle detection frame corresponding to the target vehicle in the first image; Determine the sub-detection frame with a preset height ratio at the bottom of the vehicle detection frame, and the preset height ratio is set according to the height of the vehicle chassis from the ground; determine the position of the top center point of the sub-detection frame as the The position of the center point of the vehicle chassis.
可选地,所述车辆标识包括车牌号和跟踪号,所述跟踪号是对图像进行车辆跟踪处理过程中分配的,同一车辆具有同一跟踪号。Optionally, the vehicle identification includes a license plate number and a tracking number. The tracking number is assigned during vehicle tracking processing of the image, and the same vehicle has the same tracking number.
可选地,所述处理模块13具体用于:获取所述第一图像后预设时间内采集的多帧第三图像中所述目标车辆的车辆跟踪信息;分别对所述多帧第三图像进行车辆检测处理,以结合所述多帧第三图像中所述目标车辆的车辆跟踪信息得到所述目标车辆在所述多帧第三图像中分别对应的车辆检测框和车身预设中心点的位置;若所述目标车辆在所述多帧第三图像中分别对应的车辆检测框和车身预设中心点的位置符合所述泊位占用条件,则确定所述目标车辆驶入所述目标泊位边框所对应的泊位停靠。Optionally, the processing module 13 is specifically configured to: obtain the vehicle tracking information of the target vehicle in multiple frames of third images collected within a preset time after the first image; Carry out vehicle detection processing to obtain vehicle detection frames and vehicle body preset center points respectively corresponding to the target vehicle in the multi-frame third image in combination with the vehicle tracking information of the target vehicle in the multi-frame third image. position; if the positions of the target vehicle's corresponding vehicle detection frame and body preset center point in the multi-frame third image meet the parking space occupancy conditions, then it is determined that the target vehicle has entered the target parking frame. Stop at the corresponding berth.
可选地,所述装置还包括:记录模块,用于生成与所述目标车辆对应的驶入记录,所述驶入记录中包括所述目标泊位边框所对应的泊位的标识、所述车辆标识、驶入时间以及驶入视频,其中,所述驶入视频至少包括采样得到所述多帧第二图像和所述第一图像的视频片段。Optionally, the device further includes: a recording module, configured to generate an entry record corresponding to the target vehicle, the entry record including the identification of the parking space corresponding to the target parking space frame, the vehicle identification , the driving-in time and the driving-in video, wherein the driving-in video at least includes video segments sampling the plurality of frames of the second image and the first image.
可选地,所述检测模块12还用于:分别对所述第一图像后采集的多帧第四图像进行车辆检测处理。所述处理模块13还用于:若根据所述多帧第四图像的车辆检测结果确定所述目标车辆不符合所述目标泊位边框的泊位占用条件,则获取所述多帧第四图像中所述目标车辆的车辆跟踪信息;若根据所述多帧第四图像中所述目标车辆的车辆跟踪信息,确定所述车辆标识出现于所述预警边框内,则确定所述目标车辆驶离所述目标泊位边框所对应的泊位。Optionally, the detection module 12 is also configured to perform vehicle detection processing on multiple fourth frames of images collected after the first image. The processing module 13 is also configured to: if it is determined that the target vehicle does not meet the parking occupancy conditions of the target parking frame according to the vehicle detection results of the multi-frame fourth image, obtain all the information in the multi-frame fourth image. vehicle tracking information of the target vehicle; if it is determined that the vehicle identification appears in the warning frame according to the vehicle tracking information of the target vehicle in the fourth multi-frame image, then it is determined that the target vehicle has driven away from the warning frame. The berth corresponding to the target berth border.
可选地,所述记录模块,还用于生成与所述目标车辆对应的驶出记录,所述驶出记录中包括所述目标泊位边框所对应的泊位的标识、所述车辆标识、驶出时间以及驶出视频,其中,所述驶出视频至少包括采样得到所述多帧第四图像的视频片段。Optionally, the recording module is also used to generate a drive-out record corresponding to the target vehicle. The drive-out record includes the identification of the parking space corresponding to the target parking space frame, the vehicle identification, the drive-out record time and a drive-out video, wherein the drive-out video at least includes a video segment sampling the plurality of frames of the fourth image.
图6所示装置可以执行前述实施例中提供的步骤,详细的执行过程和技术效果参见前述实施例中的描述,在此不再赘述。The device shown in Figure 6 can perform the steps provided in the foregoing embodiments. For detailed execution processes and technical effects, please refer to the descriptions in the foregoing embodiments and will not be described again here.
在一个可能的设计中,上述图6所示确定车辆进出泊位的装置的结构可实现为一电子设备。如图7所示,该电子设备可以包括:处理器21、存储器22、通信接口23。其中,存储器22上存储有可执行代码,当所述可执行代码被处理器21执行时,使处理器21至少可以实现如前述实施例中提供的确定车辆进出泊位的方法。In a possible design, the structure of the device for determining the vehicle entering and exiting the parking space shown in FIG. 6 can be implemented as an electronic device. As shown in FIG. 7 , the electronic device may include: a processor 21 , a memory 22 , and a communication interface 23 . The memory 22 stores executable code. When the executable code is executed by the processor 21, the processor 21 can at least implement the method for determining the vehicle entering and exiting the parking space as provided in the previous embodiment.
另外,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如前述实施例中提供的确定车辆进出泊位的方法。In addition, embodiments of the present invention provide a non-transitory machine-readable storage medium. The non-transitory machine-readable storage medium stores executable code. When the executable code is executed by a processor of an electronic device, , so that the processor can at least implement the method for determining the vehicle entering and exiting the parking space as provided in the previous embodiment.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的网元可以是或者也可以不是物理上分开的。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。 The device embodiments described above are only illustrative, and the network elements described as separate components may or may not be physically separated. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Persons of ordinary skill in the art can understand and implement the method without any creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。From the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding the necessary general hardware platform, or of course, can also be implemented by combining hardware and software. Based on this understanding, the above technical solution can be embodied in the form of a computer product in nature or in other words, the part that contributes to the existing technology. The present invention can use one or more computer-usable storage devices containing computer-usable program codes. The form of a computer program product implemented on media (including but not limited to disk storage, CD-ROM, optical storage, etc.).
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be used Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent substitutions are made to some of the technical features; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (13)

  1. 一种确定车辆进出泊位的方法,其特征在于,包括:A method for determining the entry and exit of vehicles into a parking space, which is characterized by including:
    获取摄像头采集的第一图像,所述摄像头覆盖多个泊位;Obtaining a first image collected by a camera covering multiple berths;
    对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车身预设中心点的位置;Perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body;
    若确定所述车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则获取所述第一图像前预设时间内采集的多帧第二图像中所述目标车辆的车辆跟踪信息,所述车辆跟踪信息中包括所述目标车辆的车辆标识在所述多帧第二图像中各自对应的定位位置;其中,所述目标泊位边框是任一所述泊位在所述摄像头的拍摄画面中所对应的图像区域边界;If it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking space occupancy conditions of the target parking frame, then the vehicle of the target vehicle in the multiple frames of the second image collected within the preset time before the first image is acquired. Tracking information, the vehicle tracking information includes the corresponding positioning positions of the vehicle identification of the target vehicle in the multi-frame second images; wherein the target parking frame is the position of any of the parking spots in the camera. The corresponding image area boundary in the shooting screen;
    若根据所述车辆跟踪信息确定所述车辆标识出现于预设的预警边框内,则确定所述目标车辆驶入所述目标泊位边框所对应的泊位停靠;其中,所述预警边框是进出所述多个泊位所需途经的预警区域在所述摄像头的拍摄画面中所对应的图像区域边界,所述预警区域是包围所述多个泊位的车行道区域。If it is determined according to the vehicle tracking information that the vehicle identification appears in the preset warning frame, it is determined that the target vehicle enters the parking space corresponding to the target parking frame and stops; wherein the warning frame is the entrance to the parking space. The pre-warning area that multiple parking spaces need to pass through is the corresponding image area boundary in the shooting picture of the camera. The early warning area is a roadway area surrounding the multiple parking spaces.
  2. 根据权利要求1所述的方法,其特征在于,所述泊位占用条件包括:所述车辆检测框与所述目标泊位边框的重合度大于设定阈值,以及所述车身预设中心点的位置位于所述目标泊位边框内。The method according to claim 1, wherein the parking space occupancy condition includes: the coincidence degree between the vehicle detection frame and the target parking frame is greater than a set threshold, and the position of the preset center point of the vehicle body is located at Within the bounding box of the target berth.
  3. 根据权利要求1所述的方法,其特征在于,所述确定所述目标车辆驶入所述目标泊位边框所对应的泊位停靠,包括:The method according to claim 1, wherein determining that the target vehicle drives into the parking space corresponding to the target parking space frame includes:
    获取所述第一图像后预设时间内采集的多帧第三图像中所述目标车辆的车辆跟踪信息;Obtaining vehicle tracking information of the target vehicle in multiple frames of third images collected within a preset time after the first image;
    分别对所述多帧第三图像进行车辆检测处理,以结合所述多帧第三图像中所述目标车辆的车辆跟踪信息得到所述目标车辆在所述多帧第三图像中分别对应的车辆检测框和车身预设中心点的位置;Carry out vehicle detection processing on the plurality of third frames of images respectively, so as to obtain the corresponding vehicles of the target vehicle in the plurality of frames of third images in combination with the vehicle tracking information of the target vehicle in the plurality of frames of third images. The position of the detection frame and the preset center point of the body;
    若所述目标车辆在所述多帧第三图像中分别对应的车辆检测框和车身预设中心点的位置符合所述泊位占用条件,则确定所述目标车辆驶入所述目标泊位边框所对应的泊位停靠。If the positions of the vehicle detection frame and the preset center point of the vehicle body respectively corresponding to the target vehicle in the multi-frame third image meet the parking space occupancy conditions, it is determined that the target vehicle enters the location corresponding to the target parking space frame. berth.
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    生成与所述目标车辆对应的驶入记录,所述驶入记录中包括所述目标泊位边框所对应的泊位的标识、所述车辆标识、驶入时间以及驶入视频,其中,所述驶入视频至少包括采样得到所述多帧第二图像和所述第一图像的视频片段。Generate a drive-in record corresponding to the target vehicle. The drive-in record includes the identification of the parking space corresponding to the target parking space frame, the vehicle identification, the drive-in time, and the drive-in video, wherein the drive-in record The video at least includes a video segment sampled from the plurality of frames of the second image and the first image.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    分别对所述第一图像后采集的多帧第四图像进行车辆检测处理;Perform vehicle detection processing on multiple frames of fourth images collected after the first image respectively;
    若根据所述多帧第四图像的车辆检测结果确定所述目标车辆不符合所述目标泊位边框的泊位占用条件,则获取所述多帧第四图像中所述目标车辆的车辆跟踪信息; If it is determined based on the vehicle detection results of the fourth multi-frame image that the target vehicle does not meet the parking occupancy conditions of the target parking frame, then obtain the vehicle tracking information of the target vehicle in the fourth multi-frame image;
    若根据所述多帧第四图像中所述目标车辆的车辆跟踪信息,确定所述车辆标识出现于所述预警边框内,则确定所述目标车辆驶离所述目标泊位边框所对应的泊位。If it is determined that the vehicle identification appears in the warning frame according to the vehicle tracking information of the target vehicle in the fourth multi-frame image, then it is determined that the target vehicle leaves the parking space corresponding to the target parking space frame.
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, further comprising:
    生成与所述目标车辆对应的驶出记录,所述驶出记录中包括所述目标泊位边框所对应的泊位的标识、所述车辆标识、驶出时间以及驶出视频,其中,所述驶出视频至少包括采样得到所述多帧第四图像的视频片段。Generate a drive-out record corresponding to the target vehicle. The drive-out record includes the identity of the parking space corresponding to the target parking space frame, the vehicle identity, the drive-out time, and the drive-out video, wherein the drive-out record The video at least includes video segments sampled from the plurality of frames of fourth images.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述车身预设中心点包括车辆底盘中心点。The method according to any one of claims 1 to 6, characterized in that the preset center point of the vehicle body includes a vehicle chassis center point.
  8. 根据权利要求7所述的方法,其特征在于,所述对所述第一图像进行车辆检测处理,包括:The method according to claim 7, wherein the vehicle detection processing on the first image includes:
    使用预先训练得到的深度神经网络模型对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车辆底盘检测框,所述车辆检测框是指包含完整车辆的检测框;Use the pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain the vehicle detection frame and vehicle chassis detection frame corresponding to the target vehicle in the first image. The vehicle detection frame refers to a vehicle detection frame containing Detection frame of complete vehicle;
    确定所述车辆底盘检测框的中心点的位置作为所述车辆底盘中心点的位置。The position of the center point of the vehicle chassis detection frame is determined as the position of the center point of the vehicle chassis.
  9. 根据权利要求7所述的方法,其特征在于,所述对所述第一图像进行车辆检测处理,包括:The method according to claim 7, wherein the vehicle detection processing on the first image includes:
    使用预先训练得到的深度神经网络模型对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框;Use a pre-trained deep neural network model to perform vehicle detection processing on the first image to obtain a vehicle detection frame corresponding to the target vehicle in the first image;
    确定所述车辆检测框的底部预设高度占比的子检测框,所述预设高度占比根据车辆底盘距离地面的高度设定;Determine the sub-detection frame with a preset height ratio at the bottom of the vehicle detection frame, where the preset height ratio is set based on the height of the vehicle chassis from the ground;
    确定所述子检测框的顶端中心点的位置作为所述车辆底盘中心点的位置。The position of the top center point of the sub-detection frame is determined as the position of the center point of the vehicle chassis.
  10. 根据权利要求1至6中任一项所述的方法,其特征在于,所述车辆标识包括车牌号和跟踪号,所述跟踪号是对图像进行车辆跟踪处理过程中分配的,同一车辆具有同一跟踪号。The method according to any one of claims 1 to 6, characterized in that the vehicle identification includes a license plate number and a tracking number, the tracking number is assigned during vehicle tracking processing of the image, and the same vehicle has the same Tracking Number.
  11. 一种电子设备,其特征在于,包括:存储器、处理器、通信接口;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行如权利要求1至10中任一项所述的确定车辆进出泊位的方法。An electronic device, characterized by comprising: a memory, a processor, and a communication interface; wherein executable code is stored on the memory, and when the executable code is executed by the processor, the processor The method for determining vehicle entry and exit from a parking space according to any one of claims 1 to 10 is performed.
  12. 一种非暂时性机器可读存储介质,其特征在于,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如权利要求1至10中任一项所述的确定车辆进出泊位的方法。A non-transitory machine-readable storage medium, characterized in that executable code is stored on the non-transitory machine-readable storage medium. When the executable code is executed by a processor of an electronic device, the The processor executes the method for determining the entry and exit of a vehicle into a parking space as claimed in any one of claims 1 to 10.
  13. 一种确定车辆进出路侧泊位的方法,其特征在于,包括:A method for determining the entry and exit of vehicles into roadside parking spaces, which is characterized by including:
    获取路侧摄像头采集的第一图像,所述路侧摄像头包括设置在路侧泊位同侧的摄像头,所述路侧摄像头覆盖多个路侧泊位;Obtaining the first image collected by a roadside camera, the roadside camera includes a camera arranged on the same side of the roadside parking space, and the roadside camera covers multiple roadside parking spaces;
    对所述第一图像进行车辆检测处理,以得到所述第一图像中目标车辆所对应的车辆检测框和车身预设中心点的位置; Perform vehicle detection processing on the first image to obtain the vehicle detection frame corresponding to the target vehicle in the first image and the position of the preset center point of the vehicle body;
    若确定所述车辆检测框和车身预设中心点的位置符合目标泊位边框的泊位占用条件,则获取所述第一图像前预设时间内采集的多帧第二图像中所述目标车辆的车辆跟踪信息,所述车辆跟踪信息中包括所述目标车辆的车辆标识在所述多帧第二图像中各自对应的定位位置;其中,所述目标泊位边框是任一所述路侧泊位在所述路侧摄像头的拍摄画面中所对应的图像区域边界;If it is determined that the positions of the vehicle detection frame and the preset center point of the vehicle body meet the parking space occupancy conditions of the target parking frame, then the vehicle of the target vehicle in the multiple frames of the second image collected within the preset time before the first image is acquired. Tracking information, the vehicle tracking information includes the corresponding positioning positions of the vehicle identification of the target vehicle in the multiple frames of second images; wherein the target parking frame is the location of any of the roadside parking spaces in the second image. The corresponding image area boundary in the picture taken by the roadside camera;
    若根据所述车辆跟踪信息确定所述车辆标识出现于预设的预警边框内,则确定所述目标车辆驶入所述目标泊位边框所对应的路侧泊位停靠;其中,所述预警边框是进出所述多个路侧泊位所需途经的预警区域在所述路侧摄像头的拍摄画面中所对应的图像区域边界,所述预警区域是包围所述多个路侧泊位的车行道区域。 If it is determined according to the vehicle tracking information that the vehicle identification appears in the preset warning frame, it is determined that the target vehicle drives into the roadside parking space corresponding to the target parking frame and stops; wherein the warning frame is the entrance and exit The warning area that the multiple roadside parking spaces need to pass through is the corresponding image area boundary in the picture captured by the roadside camera. The warning area is a roadway area surrounding the multiple roadside parking spaces.
PCT/CN2023/081494 2022-03-22 2023-03-15 Method and apparatus for determining entry and exit of vehicle into and out of parking space, device, and storage medium WO2023179416A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210288663.2 2022-03-22
CN202210288663.2A CN114694095A (en) 2022-03-22 2022-03-22 Method, device, equipment and storage medium for determining parking position of vehicle

Publications (1)

Publication Number Publication Date
WO2023179416A1 true WO2023179416A1 (en) 2023-09-28

Family

ID=82138964

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081494 WO2023179416A1 (en) 2022-03-22 2023-03-15 Method and apparatus for determining entry and exit of vehicle into and out of parking space, device, and storage medium

Country Status (2)

Country Link
CN (1) CN114694095A (en)
WO (1) WO2023179416A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117765417A (en) * 2023-12-20 2024-03-26 城市大脑(广州)科技有限公司 Shared vehicle inspection method and device based on unmanned aerial vehicle and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114694095A (en) * 2022-03-22 2022-07-01 阿里云计算有限公司 Method, device, equipment and storage medium for determining parking position of vehicle
CN115359650A (en) * 2022-07-06 2022-11-18 浙江大华技术股份有限公司 Parking position detection method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170024619A1 (en) * 2015-07-22 2017-01-26 Xerox Corporation Video-based system and method for parking occupancy detection
CN109800696A (en) * 2019-01-09 2019-05-24 深圳中兴网信科技有限公司 Monitoring method, system and the computer readable storage medium of target vehicle
CN112002131A (en) * 2020-07-16 2020-11-27 深圳云游四海信息科技有限公司 In-road parking behavior detection method and device
CN113487649A (en) * 2021-05-20 2021-10-08 浙江大华技术股份有限公司 Vehicle detection method and device and computer storage medium
CN114694095A (en) * 2022-03-22 2022-07-01 阿里云计算有限公司 Method, device, equipment and storage medium for determining parking position of vehicle

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170024619A1 (en) * 2015-07-22 2017-01-26 Xerox Corporation Video-based system and method for parking occupancy detection
CN109800696A (en) * 2019-01-09 2019-05-24 深圳中兴网信科技有限公司 Monitoring method, system and the computer readable storage medium of target vehicle
CN112002131A (en) * 2020-07-16 2020-11-27 深圳云游四海信息科技有限公司 In-road parking behavior detection method and device
CN113487649A (en) * 2021-05-20 2021-10-08 浙江大华技术股份有限公司 Vehicle detection method and device and computer storage medium
CN114694095A (en) * 2022-03-22 2022-07-01 阿里云计算有限公司 Method, device, equipment and storage medium for determining parking position of vehicle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117765417A (en) * 2023-12-20 2024-03-26 城市大脑(广州)科技有限公司 Shared vehicle inspection method and device based on unmanned aerial vehicle and storage medium

Also Published As

Publication number Publication date
CN114694095A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
WO2023179416A1 (en) Method and apparatus for determining entry and exit of vehicle into and out of parking space, device, and storage medium
CN108765976B (en) Roadside parallel parking information management system and method
CN108921956A (en) A kind of curb parking charge management method based on Video Analysis Technology
Che et al. D $^ 2$-city: a large-scale dashcam video dataset of diverse traffic scenarios
CN103778786B (en) A kind of break in traffic rules and regulations detection method based on remarkable vehicle part model
CN100578562C (en) Method for monitoring vehicle offences by video
CN110163107B (en) Method and device for recognizing roadside parking behavior based on video frames
CN106781675A (en) A kind of system and method for collecting parking lot information
CN108765975B (en) Roadside vertical parking lot management system and method
CN102298844A (en) Automatic rule breaking vehicle detection system and method
CN105046966A (en) System and method for automatically detecting illegal parking behaviors in drop-off areas
CN102819764A (en) Method for counting pedestrian flow from multiple views under complex scene of traffic junction
CN114898296A (en) Bus lane occupation detection method based on millimeter wave radar and vision fusion
CN103325258A (en) Red light running detecting device and method based on video processing
CN111696364A (en) Roadside parking management method
CN111311766A (en) Roadside parking intelligent charging system and method based on license plate recognition and tracking technology
CN111898485A (en) Parking space vehicle detection processing method and device
CN105574502A (en) Automatic detection method for violation behaviors of self-service card sender
CN105046948A (en) System and method of monitoring illegal traffic parking in yellow grid line area
CN112861773A (en) Multi-level-based berthing state detection method and system
CN113903008A (en) Ramp exit vehicle violation identification method based on deep learning and trajectory tracking
CN112382104A (en) Roadside parking management method based on vehicle track analysis
CN204856897U (en) It is detection device violating regulations in abscission zone territory that motor vehicle stops promptly
CN114155619A (en) Method, device, medium and system for automatically monitoring parking space
CN111523385B (en) Stationary vehicle detection method and system based on frame difference method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23773664

Country of ref document: EP

Kind code of ref document: A1