[go: up one dir, main page]

CN113674350A - A parking space state detection method, device, computer equipment and storage medium - Google Patents

A parking space state detection method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN113674350A
CN113674350A CN202110800005.2A CN202110800005A CN113674350A CN 113674350 A CN113674350 A CN 113674350A CN 202110800005 A CN202110800005 A CN 202110800005A CN 113674350 A CN113674350 A CN 113674350A
Authority
CN
China
Prior art keywords
parking space
processed
target vehicle
determining
position information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110800005.2A
Other languages
Chinese (zh)
Inventor
王原原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110800005.2A priority Critical patent/CN113674350A/en
Publication of CN113674350A publication Critical patent/CN113674350A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/75Determining position or orientation of objects or cameras using feature-based methods involving models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30264Parking

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

本申请涉及图像分析技术领域,特别是涉及一种车位状态检测方法、装置、计算机设备和存储介质,所述方法包括:确定待处理视频中待处理车位的车位位置信息,并根据所述车位位置信息确定参考车位区域;在所述参考车位区域中设置至少一条参考线,所述参考线用于确定车辆驶入或驶出所述待处理车位;确定所述待处理视频中各个视频帧对应的目标车辆位置信息;所述目标车辆位置信息是基于对应的视频帧中所述目标车辆的位置信息确定的;根据所述参考车位区域、所述至少一条参考线和所述目标车辆位置信息在预设参考系中的相对位置关系,确定所述待处理车位的车位状态。本发明可以实现车位状态的判断,且具有较高准确度。

Figure 202110800005

The present application relates to the technical field of image analysis, and in particular to a parking space state detection method, device, computer equipment and storage medium. The method includes: determining the parking space position information of the to-be-processed parking space in the video to be processed, and according to the parking space position The information determines a reference parking space area; at least one reference line is set in the reference parking space area, and the reference line is used to determine whether the vehicle enters or leaves the parking space to be processed; determine the corresponding video frames in the video to be processed. Target vehicle position information; the target vehicle position information is determined based on the position information of the target vehicle in the corresponding video frame; according to the reference parking space area, the at least one reference line and the target vehicle position information Assuming the relative positional relationship in the reference frame, the parking space status of the to-be-processed parking space is determined. The present invention can realize the judgment of the parking space state, and has high accuracy.

Figure 202110800005

Description

Parking space state detection method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of image analysis technologies, and in particular, to a parking space state detection method and apparatus, a computer device, and a storage medium.
Background
With the rapid development of the internet of things and regional chains, logistics play an important role in economic activities. Land traffic is the main loop of logistics. In China, other express companies such as the three-way express, the Shunfeng and the postal service provide great convenience for promoting the purchase and circulation of goods on the internet. In these trades, especially in the online shopping rush hour such as two eleven, the parking stall in logistics park becomes unusual nervous, consequently provides the parking stall state in real time, will promote the vehicle loading and unloading goods speed in logistics park by a wide margin, and then accelerates the circulation of goods.
At present, the parking space state is judged mainly by manually checking that the parking space is occupied, but the manual judgment mode is inefficient.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a parking space state detection method, device, computer device and storage medium for solving the above technical problems.
In a first aspect, an embodiment of the present invention provides a parking space state detection method, including:
determining parking space position information of a parking space to be processed in a video to be processed, and determining a reference parking space area according to the parking space position information;
setting at least one reference line in the reference parking space area, wherein the reference line is used for determining that a vehicle enters or exits the parking space to be processed;
determining target vehicle position information corresponding to each video frame in the video to be processed; the target vehicle location information is determined based on the location information of the target vehicle in the corresponding video frame;
and determining the parking space state of the parking space to be processed according to the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system.
In an embodiment, the determining the parking space position information of the parking space to be processed in the video to be processed includes:
inputting any video frame containing the parking space to be processed in the videos to be processed into a first detection model to obtain a parking space area to be processed; the first detection model is obtained based on image training including parking spaces;
and determining corresponding parking space position information according to the parking space area to be processed.
In an embodiment, the determining the target vehicle position information corresponding to each video frame in the video to be processed includes:
inputting video frames containing target vehicles in the video to be processed into a second detection model to obtain each target vehicle area corresponding to the target vehicles; wherein the second detection model is trained based on images containing vehicles;
and determining corresponding target vehicle position information according to each target vehicle area.
In an embodiment, the determining, according to a relative position relationship among the reference parking space area, the at least one reference line, and the target vehicle position information in a preset reference system, a parking space state of the parking space to be processed includes:
determining the running track of a target vehicle according to the position information of the target vehicle corresponding to each video frame in the video to be processed;
determining initial position information of the target vehicle according to the running track of the target vehicle;
and determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track in the preset reference system.
In an embodiment, the setting of at least one reference line in the reference parking space area includes:
setting a first reference line in the reference parking space area;
the determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information of the target vehicle and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track of the target vehicle in the preset reference system comprises:
if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the first reference line, determining that the parking space state of the parking space to be processed is occupied;
and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the first reference line, determining that the parking space state of the parking space to be processed is idle.
In an embodiment, the setting of at least one reference line in the reference parking space area includes:
setting a second reference line on the entrance side of the reference parking space area, and setting a third reference line on the exit side of the reference parking space area;
the determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information of the target vehicle and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track of the target vehicle in the preset reference system comprises:
if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the second reference line, determining that the parking space state of the parking space to be processed is occupied;
and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the third reference line, determining that the parking space state of the parking space to be processed is idle.
In one embodiment, the method further comprises:
inputting the last video frame of the video to be processed into a third detection model, and determining whether the parking space to be processed in the last video frame contains a carriage door or not; wherein the third detection model is obtained based on characteristic training of a carriage door;
and determining the final parking space state of the parking space to be processed based on whether the parking space to be processed in the last video frame contains a carriage door or not and based on the parking space state of the parking space to be processed determined by the relative position relation of the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system.
In an embodiment, the determining a final parking space state of the parking space to be processed based on whether a car door is included in the parking space to be processed in the last video frame and based on the parking space state of the parking space to be processed determined by a relative position relationship among the reference parking space region, the at least one reference line, and the target vehicle position information in a preset reference system includes:
if the parking space to be processed in the last video frame comprises a carriage door and the parking space state of the parking space to be processed, which is determined based on the relative position relation of the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system, is occupied, determining that the final parking space state of the parking space to be processed is occupied; or
If the parking space to be processed in the last video frame comprises a carriage door or the parking space state of the parking space to be processed, which is determined based on the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system, is occupied, determining that the final parking space state of the parking space to be processed is occupied; or
And if the parking space to be processed in the last video frame does not contain a carriage door and the parking space state of the parking space to be processed determined based on the relative position relationship among the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system is idle, determining that the final parking space state of the parking space to be processed is idle.
In a second aspect, a parking space status detection apparatus according to an embodiment of the present invention includes:
the first determining module is used for determining parking space position information of a parking space to be processed in a video to be processed and determining a reference parking space area according to the parking space position information;
the device comprises a setting module, a processing module and a processing module, wherein the setting module is used for setting at least one reference line in the reference parking space area, and the reference line is used for determining that a vehicle enters or exits the parking space to be processed;
the second determining module is used for determining the position information of the target vehicle corresponding to each video frame in the video to be processed; the target vehicle location information is determined based on the location information of the target vehicle in the corresponding video frame;
and the third determining module is used for determining the parking space state of the parking space to be processed according to the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
determining parking space position information of a parking space to be processed in a video to be processed, and determining a reference parking space area according to the parking space position information;
setting at least one reference line in the reference parking space area, wherein the reference line is used for determining that a vehicle enters or exits the parking space to be processed;
determining target vehicle position information corresponding to each video frame in the video to be processed; the target vehicle location information is determined based on the location information of the target vehicle in the corresponding video frame;
determining the parking space state of the parking space to be processed according to the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the processor implements the following steps:
determining parking space position information of a parking space to be processed in a video to be processed, and determining a reference parking space area according to the parking space position information;
setting at least one reference line in the reference parking space area, wherein the reference line is used for determining that a vehicle enters or exits the parking space to be processed;
determining target vehicle position information corresponding to each video frame in the video to be processed; the target vehicle location information is determined based on the location information of the target vehicle in the corresponding video frame;
the action method, the device, the computer equipment and the storage medium are used for determining the parking space state of the parking space to be processed according to the relative position relationship among the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system. The method can realize accurate judgment of the parking space state, and has higher efficiency compared with manual judgment.
Drawings
Fig. 1 is an application environment diagram of a parking space state detection method in an embodiment;
FIG. 2 is a schematic flow chart illustrating a parking space status detection method according to an embodiment;
fig. 3 is a schematic flow chart illustrating a method for determining parking space position information according to an embodiment;
FIG. 4 is a schematic flow chart diagram of a method for determining location information of a target vehicle in one embodiment;
FIG. 5 is a flowchart illustrating a parking space status determination method according to an embodiment;
fig. 6 is a schematic flow chart illustrating a method for determining a parking space state corresponding to one reference line in one embodiment;
fig. 7 is a schematic flow chart illustrating a method for determining a parking space state corresponding to two reference lines in one embodiment;
fig. 8 is a schematic flow chart illustrating a method for determining a final parking space state in one embodiment;
fig. 9 is a schematic flow chart of a parking space status detection method in another embodiment;
fig. 10 is a schematic structural diagram of a parking space state detection device in one embodiment;
FIG. 11 is a diagram illustrating the internal architecture of a computing device, in accordance with one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The parking space state detection method can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The method comprises the steps that a terminal 102 firstly determines parking space position information of a parking space to be processed in a video to be processed, a reference parking space area is determined according to the parking space position information, at least one reference line is arranged in the reference parking space area, target vehicle position information corresponding to each video frame in the video to be processed is determined, a parking space state of the parking space to be processed is determined to drive according to the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system, and then the terminal 102 sends the parking space state of the parking space to be processed to a server 104. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, a parking space status detection method is provided, which is described by taking the example that the method is applied to the terminal in fig. 1, and includes the following steps:
s202: and determining parking space position information of a parking space to be processed in the video to be processed, and determining a reference parking space area according to the parking space position information.
In this embodiment, the video to be processed may be a video shot by the camera at the parking space to be processed in real time, or may be a video shot by the camera at a certain time period at the parking space to be processed.
In the embodiment, the video to be processed is subjected to framing processing to obtain a plurality of single-frame images, one single-frame image containing all parking spaces to be processed is selected from the single-frame images, and parking space position information is determined according to the single-frame image.
It can be understood that the parking space position information includes coordinate information of the parking space, and the coordinate information may be an actual geographic coordinate or a coordinate in a preset reference system, so that a reference parking space area of the parking space to be processed in the corresponding reference system may be determined according to the coordinate information.
S204: and setting at least one reference line in the reference parking space area.
The reference line is used for determining that the vehicle enters or exits the reference parking space area.
S206: and determining the position information of the target vehicle corresponding to each video frame in the video to be processed.
Wherein the target vehicle position information is a travel determined based on the position information of the target vehicle in the corresponding video frame.
It is understood that the target vehicle position information includes coordinate information of the target vehicle, which may be actual geographic coordinates or coordinates in a preset reference frame, so that the position of the target vehicle in the corresponding reference frame can be determined according to the coordinate information.
Traveling travel S208: and determining the parking space state of the parking space to be processed to drive according to the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system.
The reference parking space area, the reference line and the position information of the target vehicle are all in the same preset coordinate system, so that whether the target vehicle enters or exits the parking space can be judged according to the relative position relation of the reference parking space area, the reference line and the position information of the target vehicle, and the parking space state of the parking space to be processed is determined.
In an embodiment, as shown in fig. 3, determining the parking space position information of the parking space to be processed in the video to be processed includes the following steps:
s302: and inputting any video frame containing the parking space to be processed in the videos to be processed into a first detection model to obtain a parking space area to be processed.
The first detection model is obtained based on image training including parking spaces.
S304: and determining corresponding parking space position information according to the parking space area to be processed.
The first monitoring model obtained through training can identify the parking space area in the image. In this embodiment, any video frame containing the parking space to be processed in the video to be processed is input into the first detection model, so as to obtain the parking space area to be processed.
It is understood that in some embodiments, the parking space area to be processed may also be determined by other image recognition algorithms, such as an image edge recognition algorithm.
In this embodiment, the position of the camera for shooting the video to be processed is known, and meanwhile, the shooting angle and the shooting focal length of the camera are known, and the camera can also measure the distance of the shot object, that is, the distance between the camera and the parking space area to be processed, and the parking space area to be processed can be determined by combining the information to determine the corresponding parking space position information. It should be noted that, determining the parking space position information corresponding to the parking space region to be processed by the above information is prior art, and may also be implemented by other methods, and therefore, the details are not repeated.
In an embodiment, as shown in fig. 4, the method for determining the target vehicle position information corresponding to each video frame in the video to be processed includes the following steps:
s402: and inputting video frames containing the target vehicles in the video to be processed into a second detection model to obtain each target vehicle area corresponding to the target vehicles.
Wherein the second detection model is trained based on images including vehicles.
S404: and determining corresponding target vehicle position information according to each target vehicle area.
The trained second detection model can identify the vehicle in the image. In the embodiment, the video frame containing the target vehicle is input into the second detection model, the target vehicle in the video frame is determined, and the target vehicle area is determined according to the identification frame.
It will be appreciated that in some embodiments, the target vehicle region may also be determined by other image recognition algorithms, such as image edge recognition algorithms and the like.
In this embodiment, the method for determining the corresponding target vehicle position information according to each target vehicle region is the same as the method for determining the corresponding parking space position information according to the parking space region to be processed, and therefore, the description is omitted.
In an embodiment, as shown in fig. 5, the method for determining the parking space state of the parking space to be processed according to the relative position relationship among the reference parking space area, the at least one reference line, and the target vehicle position information in a preset reference system includes the following steps:
s502: determining the running track of a target vehicle according to the position information of the target vehicle corresponding to each video frame in the video to be processed;
s504: determining initial position information of the target vehicle according to the running track of the target vehicle;
s506: and determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track in the preset reference system.
In this embodiment, the position information of the target vehicle corresponding to the adjacent video frames is connected to obtain the driving track of the target vehicle. The initial position information of the target vehicle can be determined according to the traveling direction of the target vehicle after the traveling track of the target vehicle is acquired.
The initial position information of the target vehicle, the reference parking space area, the at least one reference line and the running track of the target vehicle are all in the same preset reference system, and the relative position relationship of the initial position information, the reference parking space area, the at least one reference line and the running track of the target vehicle in the preset reference system corresponds to the actual relative position relationship. For example, if the driving trajectory of the target vehicle intersects a reference line in the reference parking space region, it indicates that the target vehicle actually enters the parking space to be processed or exits the parking space to be processed. Therefore, the parking space state of the parking space to be processed can be determined based on the relative position relationship between the initial position information and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track in the preset reference system.
In one embodiment, a first reference line is provided in the reference parking space region. As shown in fig. 6, the method for determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information of the target vehicle and the reference parking space region in the preset reference system, and the relative position relationship between the at least one reference line and the driving track of the target vehicle in the preset reference system includes the following steps:
s602: if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the first reference line, determining that the parking space state of the parking space to be processed is occupied;
s604: and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the first reference line, determining that the parking space state of the parking space to be processed is idle.
In general, the first reference line is disposed at a middle position of the reference parking space region and perpendicular to a driving direction of the vehicle, and the first reference line is disposed such that a driving track corresponding to the driving direction of the vehicle into or out of the parking space can pass through the first detection line. Aiming at the parking spaces to be processed which enter and exit from the same side, the first reference line can also be arranged at the entrance (exit) side of the reference parking space area, so that the corresponding driving tracks of the vehicles entering or exiting the parking spaces can both pass through the first detection line. In this embodiment, the position where the first reference line is provided is not limited.
And if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the first reference line, indicating that the target vehicle runs outside the parking space to be processed into the parking space to be processed, determining that the parking space state of the parking space to be processed is occupied. And if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the first reference line, indicating that the target vehicle runs to the outside of the parking space to be processed in the parking space to be processed, determining that the parking space state of the parking space to be processed is idle.
In another embodiment, a second reference line is provided at the entrance side of the reference space area, and a third reference line is provided at the exit side of the reference space area. As shown in fig. 7, determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information of the target vehicle and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track of the target vehicle in the preset reference system includes the following steps:
s702: if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the second reference line, determining that the parking space state of the parking space to be processed is occupied;
s704: and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the third reference line, determining that the parking space state of the parking space to be processed is idle.
If a reference line is arranged on one side of a reference parking space area, the vehicle may not pass through the reference line when entering or exiting the parking space on the other side, thereby causing the misjudgment of the parking space state. Therefore, in this embodiment, the reference lines are set on both sides of the reference parking space region, and the corresponding driving tracks of the vehicle entering or exiting the parking space to be processed pass through the corresponding reference lines.
Specifically, the second reference line is close to the parking space entrance and is generally a quarter of the reference parking space area, and the third detection line is close to the parking space exit and is generally a quarter of the reference parking space area. It should be noted that the second reference line and the third reference line may be set according to actual detection requirements, and are not limited in this embodiment.
If the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through a second reference line, the target vehicle is indicated to run outside the parking space to be processed into the parking space to be processed, and the parking space state of the parking space to be processed is determined to be occupied; and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the third reference line, indicating that the target vehicle runs to the outside of the parking space to be processed in the parking space to be processed, determining that the parking space state of the parking space to be processed is idle.
In one embodiment, a parking space status detection method further includes the following steps:
s802: inputting the last video frame of the video to be processed into a third detection model, and determining whether the parking space to be processed in the last video frame contains a carriage door or not; wherein the third detection model is obtained based on characteristic training of a carriage door;
s804: and determining the final parking space state of the parking space to be processed based on whether the parking space to be processed in the last video frame contains a carriage door or not and based on the parking space state of the parking space to be processed determined by the relative position relation of the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system.
It can be understood that, in the above embodiment, the parking space state of the parking space to be processed, which is determined based on the relative position relationship among the reference parking space region, the at least one reference line, and the target vehicle position information in the preset reference system, may be misjudged as the parking space state due to a setting error of the reference parking space region or an acquisition error of the target vehicle position information, so that whether a car door is included in the upper level to be processed is increased in the embodiment to detect, so as to improve the accuracy of detecting the parking space state.
If the parking space to be processed in the last video frame comprises a carriage door and the parking space state of the parking space to be processed, which is determined based on the relative position relation of the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system, is occupied, determining that the final parking space state of the parking space to be processed is occupied; or if the parking space to be processed in the last video frame contains a carriage door, or the parking space state of the parking space to be processed, which is determined based on the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system, is occupied, determining that the final parking space state of the parking space to be processed is occupied; or if the parking space to be processed in the last video frame does not contain a carriage door, and the parking space state of the parking space to be processed, which is determined based on the relative position relationship among the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system, is idle, determining that the final parking space state of the parking space to be processed is idle.
When the parking space to be processed in the last video frame contains a carriage door, it is indicated that a vehicle exists in the parking space to be processed; and when the parking space in the last video frame to be processed does not contain the carriage door, the situation that no vehicle exists in the parking space to be processed is indicated. And when the parking space state of the parking space to be processed determined based on whether the parking space to be processed in the last video frame contains the carriage door is inconsistent with the parking space state of the parking space to be processed determined based on the relative position relation of the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system, determining that the final parking space state of the parking space to be processed is occupied, thereby avoiding the planning and arrangement error of the parking space to be processed caused by the judgment error.
In an embodiment, as shown in fig. 9, a parking space status detection method further includes the following steps:
s902: and inputting each video frame in the video to be processed into a license plate detection model, and outputting the license plate number of the target vehicle.
The license plate detection model extracts the license plate number through an OCR algorithm, and registers the target vehicle according to the license plate number, so that the vehicle can be better supervised.
S904: and merging the target vehicle, the carriage door and the license plate number and putting the merged numbers into the tracking OT model, so that the target vehicle, the carriage door and the license plate number have the same ID.
The target vehicle, the carriage door and the license plate number are associated, so that the information of the target vehicle, the carriage door and the license plate number can be obtained only according to the ID, and the vehicle can be better supervised.
It should be understood that although the various steps in the flow charts of fig. 1-9 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-9 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 10, the present invention provides a parking space status detecting device, including:
the first determining module 101 is configured to determine parking space position information of a parking space to be processed in a video to be processed, and determine a reference parking space region according to the parking space position information;
a setting module 103, configured to set at least one reference line in the reference parking space area, where the reference line is used to determine that a vehicle enters or exits the parking space to be processed;
a second determining module 105, configured to determine target vehicle position information corresponding to each video frame in the video to be processed; the target vehicle location information is determined based on the location information of the target vehicle in the corresponding video frame;
a third determining module 107, configured to determine a parking space state of the parking space to be processed according to a relative position relationship between the reference parking space area, the at least one reference line, and the target vehicle position information in a preset reference system.
In an embodiment, the first determining module is specifically configured to:
inputting any video frame containing the parking space to be processed in the videos to be processed into a first detection model to obtain a parking space area to be processed; the first detection model is obtained based on image training including parking spaces;
and determining corresponding parking space position information according to the parking space area to be processed.
In an embodiment, the second determining module is specifically configured to:
inputting video frames containing target vehicles in the video to be processed into a second detection model to obtain each target vehicle area corresponding to the target vehicles; wherein the second detection model is trained based on images containing vehicles;
and determining corresponding target vehicle position information according to each target vehicle area.
In one embodiment, the third determining module includes:
the driving track determining module is used for determining the driving track of the target vehicle according to the position information of the target vehicle corresponding to each video frame in the video to be processed;
the initial position determining module is used for determining initial position information of the target vehicle according to the running track of the target vehicle;
and the parking space state determining module is used for determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track in the preset reference system.
In one embodiment, a first reference line is set in the reference parking space area; the parking space state determination module is specifically used for:
if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the first reference line, determining that the parking space state of the parking space to be processed is occupied;
and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the first reference line, determining that the parking space state of the parking space to be processed is idle.
In one embodiment, a second reference line is arranged at the entrance side of the reference parking space area, and a third reference line is arranged at the exit side of the reference parking space area; the parking space state determination module is specifically used for:
if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the second reference line, determining that the parking space state of the parking space to be processed is occupied;
and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the third reference line, determining that the parking space state of the parking space to be processed is idle.
In one embodiment, the method further comprises:
the fourth determining module is used for inputting the last video frame of the video to be processed into the third detection model and determining whether the parking space to be processed in the last video frame contains a carriage door or not; wherein the third detection model is obtained based on characteristic training of a carriage door;
and the fifth determining module is used for determining the final parking space state of the parking space to be processed based on whether the parking space to be processed in the last video frame contains a carriage door or not and based on the parking space state of the parking space to be processed determined by the relative position relationship among the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system.
In an embodiment, the fifth determining module is specifically configured to:
if the parking space to be processed in the last video frame comprises a carriage door and the parking space state of the parking space to be processed, which is determined based on the relative position relation of the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system, is occupied, determining that the final parking space state of the parking space to be processed is occupied; or
If the parking space to be processed in the last video frame comprises a carriage door or the parking space state of the parking space to be processed, which is determined based on the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system, is occupied, determining that the final parking space state of the parking space to be processed is occupied; or
And if the parking space to be processed in the last video frame does not contain a carriage door and the parking space state of the parking space to be processed determined based on the relative position relationship among the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system is idle, determining that the final parking space state of the parking space to be processed is idle.
For specific limitations of the parking space state detection device, reference may be made to the above limitations of the parking space state detection method, which is not described herein again. All modules in the parking space state detection device can be completely or partially realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 11. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation system and the execution of the computer program in the nonvolatile storage medium. The database of the computer device is used for storing motion detection data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the steps of any of the above-mentioned parking space state detection method embodiments.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is provided, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps in any of the above embodiments of the parking space state detection method when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, implements the steps of any of the above-mentioned parking space state detection method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A parking space state detection method is characterized by comprising the following steps:
determining parking space position information of a parking space to be processed in a video to be processed, and determining a reference parking space area according to the parking space position information;
setting at least one reference line in the reference parking space area, wherein the reference line is used for determining that a vehicle enters or exits the parking space to be processed;
determining target vehicle position information corresponding to each video frame in the video to be processed; the target vehicle location information is determined based on the location information of the target vehicle in the corresponding video frame;
and determining the parking space state of the parking space to be processed according to the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system.
2. The method of claim 1, wherein the determining the parking space position information of the parking space to be processed in the video to be processed comprises:
inputting any video frame containing the parking space to be processed in the videos to be processed into a first detection model to obtain a parking space area to be processed; the first detection model is obtained based on image training including parking spaces;
and determining corresponding parking space position information according to the parking space area to be processed.
3. The method according to claim 1, wherein the determining the target vehicle position information corresponding to each video frame in the video to be processed comprises:
inputting video frames containing target vehicles in the video to be processed into a second detection model to obtain each target vehicle area corresponding to the target vehicles; wherein the second detection model is trained based on images containing vehicles;
and determining corresponding target vehicle position information according to each target vehicle area.
4. The method of claim 1, wherein the determining the parking space state of the parking space to be processed according to the relative position relationship among the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system comprises:
determining the running track of a target vehicle according to the position information of the target vehicle corresponding to each video frame in the video to be processed;
determining initial position information of the target vehicle according to the running track of the target vehicle;
and determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track in the preset reference system.
5. The method of claim 4, wherein the providing at least one reference line in the reference space area comprises:
setting a first reference line in the reference parking space area;
the determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information of the target vehicle and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track of the target vehicle in the preset reference system comprises:
if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the first reference line, determining that the parking space state of the parking space to be processed is occupied;
and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the first reference line, determining that the parking space state of the parking space to be processed is idle.
6. The method of claim 4, wherein the providing at least one reference line in the reference space area comprises:
setting a second reference line on the entrance side of the reference parking space area, and setting a third reference line on the exit side of the reference parking space area;
the determining the parking space state of the parking space to be processed based on the relative position relationship between the initial position information of the target vehicle and the reference parking space region in the preset reference system and the relative position relationship between the at least one reference line and the driving track of the target vehicle in the preset reference system comprises:
if the initial position information of the target vehicle is outside the reference parking space area and the running track of the target vehicle passes through the second reference line, determining that the parking space state of the parking space to be processed is occupied;
and if the initial position information of the target vehicle is in the reference parking space area and the running track of the target vehicle passes through the third reference line, determining that the parking space state of the parking space to be processed is idle.
7. The method of any one of claims 1 to 6, further comprising:
inputting the last video frame of the video to be processed into a third detection model, and determining whether the parking space to be processed in the last video frame contains a carriage door or not; wherein the third detection model is obtained based on characteristic training of a carriage door;
and determining the final parking space state of the parking space to be processed based on whether the parking space to be processed in the last video frame contains a carriage door or not and based on the parking space state of the parking space to be processed determined by the relative position relation of the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system.
8. The method of claim 7, wherein the determining the final slot status of the slot to be processed based on whether a car door is included in the slot to be processed in the last video frame and the slot status of the slot to be processed determined based on a relative position relationship among the reference slot area, the at least one reference line, and the target vehicle position information in a preset reference system comprises:
if the parking space to be processed in the last video frame comprises a carriage door and the parking space state of the parking space to be processed, which is determined based on the relative position relation of the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system, is occupied, determining that the final parking space state of the parking space to be processed is occupied; or
If the parking space to be processed in the last video frame comprises a carriage door or the parking space state of the parking space to be processed, which is determined based on the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system, is occupied, determining that the final parking space state of the parking space to be processed is occupied; or
And if the parking space to be processed in the last video frame does not contain a carriage door and the parking space state of the parking space to be processed determined based on the relative position relationship among the reference parking space region, the at least one reference line and the target vehicle position information in a preset reference system is idle, determining that the final parking space state of the parking space to be processed is idle.
9. The utility model provides a parking stall state detection device which characterized in that includes:
the first determining module is used for determining parking space position information of a parking space to be processed in a video to be processed and determining a reference parking space area according to the parking space position information;
the device comprises a setting module, a processing module and a processing module, wherein the setting module is used for setting at least one reference line in the reference parking space area, and the reference line is used for determining that a vehicle enters or exits the parking space to be processed;
the second determining module is used for determining the position information of the target vehicle corresponding to each video frame in the video to be processed; the target vehicle location information is determined based on the location information of the target vehicle in the corresponding video frame;
and the third determining module is used for determining the parking space state of the parking space to be processed according to the relative position relation of the reference parking space area, the at least one reference line and the target vehicle position information in a preset reference system.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 8.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202110800005.2A 2021-07-15 2021-07-15 A parking space state detection method, device, computer equipment and storage medium Pending CN113674350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110800005.2A CN113674350A (en) 2021-07-15 2021-07-15 A parking space state detection method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110800005.2A CN113674350A (en) 2021-07-15 2021-07-15 A parking space state detection method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113674350A true CN113674350A (en) 2021-11-19

Family

ID=78539212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110800005.2A Pending CN113674350A (en) 2021-07-15 2021-07-15 A parking space state detection method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113674350A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115953472A (en) * 2023-03-13 2023-04-11 鱼台顺驰工贸有限公司 Intelligent positioning method for cargo carrying area of low-flat-bed semitrailer
CN119228848A (en) * 2024-11-28 2024-12-31 杭州海康威视数字技术股份有限公司 Method and electronic device for determining vehicle trajectory

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376741A (en) * 2014-12-02 2015-02-25 深圳市捷顺科技实业股份有限公司 Parking lot state detection method and system
CN104574351A (en) * 2014-08-06 2015-04-29 深圳市捷顺科技实业股份有限公司 Parking space detection method based on video processing
CN105844959A (en) * 2016-06-13 2016-08-10 北京精英智通科技股份有限公司 Method and device for judging vehicle in-position and judging method and device for vehicle out-of-position
CN107123274A (en) * 2017-06-30 2017-09-01 深圳信路通智能技术有限公司 Double parking stall video detecting devices and method
WO2018113602A1 (en) * 2016-12-20 2018-06-28 纳恩博(北京)科技有限公司 Parking management robot, and parking management method and system
CN111081059A (en) * 2019-12-25 2020-04-28 深圳人人停技术有限公司 Parking management method, device and equipment based on TOF and readable storage medium
CN111105639A (en) * 2018-10-25 2020-05-05 杭州海康威视系统技术有限公司 Parking space state detection method and device, vehicle guiding method and system and camera
CN111739175A (en) * 2020-08-11 2020-10-02 上海高德威智能交通系统有限公司 Method and device for monitoring vehicle parking
CN112017467A (en) * 2019-05-28 2020-12-01 杭州海康威视数字技术股份有限公司 Parking space detection method and device
CN112330601A (en) * 2020-10-15 2021-02-05 浙江大华技术股份有限公司 Parking detection method, device, equipment and medium based on fisheye camera
CN112634645A (en) * 2020-12-08 2021-04-09 深圳市豪位科技有限公司 Parking navigation method and device
CN112991807A (en) * 2019-12-13 2021-06-18 浙江宇视科技有限公司 Parking space state detection method, device, equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574351A (en) * 2014-08-06 2015-04-29 深圳市捷顺科技实业股份有限公司 Parking space detection method based on video processing
CN104376741A (en) * 2014-12-02 2015-02-25 深圳市捷顺科技实业股份有限公司 Parking lot state detection method and system
CN105844959A (en) * 2016-06-13 2016-08-10 北京精英智通科技股份有限公司 Method and device for judging vehicle in-position and judging method and device for vehicle out-of-position
WO2018113602A1 (en) * 2016-12-20 2018-06-28 纳恩博(北京)科技有限公司 Parking management robot, and parking management method and system
CN107123274A (en) * 2017-06-30 2017-09-01 深圳信路通智能技术有限公司 Double parking stall video detecting devices and method
CN111105639A (en) * 2018-10-25 2020-05-05 杭州海康威视系统技术有限公司 Parking space state detection method and device, vehicle guiding method and system and camera
CN112017467A (en) * 2019-05-28 2020-12-01 杭州海康威视数字技术股份有限公司 Parking space detection method and device
CN112991807A (en) * 2019-12-13 2021-06-18 浙江宇视科技有限公司 Parking space state detection method, device, equipment and storage medium
CN111081059A (en) * 2019-12-25 2020-04-28 深圳人人停技术有限公司 Parking management method, device and equipment based on TOF and readable storage medium
CN111739175A (en) * 2020-08-11 2020-10-02 上海高德威智能交通系统有限公司 Method and device for monitoring vehicle parking
CN112330601A (en) * 2020-10-15 2021-02-05 浙江大华技术股份有限公司 Parking detection method, device, equipment and medium based on fisheye camera
CN112634645A (en) * 2020-12-08 2021-04-09 深圳市豪位科技有限公司 Parking navigation method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115953472A (en) * 2023-03-13 2023-04-11 鱼台顺驰工贸有限公司 Intelligent positioning method for cargo carrying area of low-flat-bed semitrailer
CN115953472B (en) * 2023-03-13 2023-05-23 鱼台顺驰工贸有限公司 Intelligent positioning method for cargo carrying area of low-bed semi-trailer
CN119228848A (en) * 2024-11-28 2024-12-31 杭州海康威视数字技术股份有限公司 Method and electronic device for determining vehicle trajectory

Similar Documents

Publication Publication Date Title
CN110533925B (en) Vehicle illegal video processing method and device, computer equipment and storage medium
Fernandez-Sanjurjo et al. Real-time visual detection and tracking system for traffic monitoring
US20200290608A1 (en) Forward collision control method and apparatus, electronic device, program, and medium
CN110634153A (en) Target tracking template updating method and device, computer equipment and storage medium
CN110334569B (en) Passenger flow volume in-out identification method, device, equipment and storage medium
CN110263713B (en) Lane line detection method, lane line detection device, electronic device, and storage medium
CN112183307B (en) Text recognition method, computer device, and storage medium
CN110826484A (en) Vehicle weight recognition method and device, computer equipment and model training method
CN111104925B (en) Image processing method, image processing apparatus, storage medium, and electronic device
CN115298705A (en) License plate recognition method and device, electronic equipment and storage medium
CN112712703A (en) Vehicle video processing method and device, computer equipment and storage medium
CN113674350A (en) A parking space state detection method, device, computer equipment and storage medium
CN112489436B (en) Vehicle identity recognition method, device and system and electronic device
CN112241705B (en) Object detection model training method and object detection method based on classification regression
CN112580457A (en) Vehicle video processing method and device, computer equipment and storage medium
CN112200191A (en) Image processing method, image processing device, computing equipment and medium
CN112580565A (en) Lane line detection method, lane line detection device, computer device, and storage medium
US20230343062A1 (en) Tracking users across image frames using fingerprints obtained from image analysis
CN110298302B (en) Human body target detection method and related equipment
CN113673513B (en) A license plate recognition method, device, equipment and medium
CN115170851A (en) Image clustering method and device
CN115520216A (en) Driving state judging method and device, computer equipment and storage medium
CN112634628B (en) Vehicle speed determination method, terminal and storage medium
US11995600B2 (en) System and method for geofence based cycle time determination
CN116580063B (en) Target tracking method, target tracking device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20211119

RJ01 Rejection of invention patent application after publication