WO2021051621A1 - Parking space determination method, terminal device and computer readable storage medium - Google Patents

Parking space determination method, terminal device and computer readable storage medium Download PDF

Info

Publication number
WO2021051621A1
WO2021051621A1 PCT/CN2019/118689 CN2019118689W WO2021051621A1 WO 2021051621 A1 WO2021051621 A1 WO 2021051621A1 CN 2019118689 W CN2019118689 W CN 2019118689W WO 2021051621 A1 WO2021051621 A1 WO 2021051621A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
target
preset
area
surveillance
Prior art date
Application number
PCT/CN2019/118689
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 WO2021051621A1 publication Critical patent/WO2021051621A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/14Traffic control systems for road vehicles indicating individual free spaces in parking areas
    • G08G1/145Traffic control systems for road vehicles indicating individual free spaces in parking areas where the indication depends on the parking areas
    • G08G1/147Traffic control systems for road vehicles indicating individual free spaces in parking areas where the indication depends on the parking areas where the parking area is within an open public zone, e.g. city centre
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/14Traffic control systems for road vehicles indicating individual free spaces in parking areas
    • G08G1/145Traffic control systems for road vehicles indicating individual free spaces in parking areas where the indication depends on the parking areas
    • G08G1/148Management of a network of parking areas
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources

Definitions

  • This application belongs to the field of artificial intelligence technology, and in particular relates to a method for determining a parking space, a terminal device, and a computer non-volatile readable storage medium.
  • the embodiments of the present application provide a method, terminal equipment, and computer non-volatile readable storage medium for determining parking spaces, so as to solve the problem that the existing parking management system cannot obtain information about scattered outdoor parking spaces, resulting in a shortage of indoor parking spaces. It is impossible to make emergency dispatch to the scattered outdoor parking spaces at times, the difficulty of parking is high, and the parking efficiency is low.
  • a method for determining parking spaces including:
  • Obtain the surveillance videos collected by each preset surveillance device detect whether the surveillance video contains moving objects based on the preset moving object detection strategy, determine the surveillance video containing the moving objects as the initial surveillance video, and select the initial surveillance video.
  • the initial surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened includes Performing target recognition on the target area in the first preset number of consecutive frames of video images;
  • the surveillance video to be screened is determined as the target surveillance video, and the target surveillance video
  • the target area included in the video images of the first preset number of consecutive frames is determined to be a parking area, and the coordinate information of the parking area in the video images of the first consecutive preset number of frames is determined;
  • the coordinate information in determines the actual parking space information corresponding to the parkingable area contained in the target surveillance video.
  • a terminal device including:
  • the frame selection unit is used to obtain the surveillance video collected by each preset monitoring device, detect whether the surveillance video contains a moving object based on the preset moving object detection strategy, and determine the surveillance video containing the moving object as the initial surveillance video , Box select the target area occupied by the moving objects contained in the initial surveillance video in each frame of the video image;
  • the target recognition unit is configured to determine that the initial surveillance video is the surveillance video to be screened if at least the target area in the first preset number of consecutive frames of video images completely overlap Performing target recognition on the target area in the first preset number of consecutive frames of video images included in the surveillance video to be screened;
  • the first determining unit is configured to determine that the surveillance video to be screened is the target surveillance video if it is identified that the moving object in the target area of the video image of the first preset number of consecutive frames included in the surveillance video to be screened is a vehicle. , Determining the target area in the continuous first preset number of frames of video images included in the target surveillance video as a parkingable area, and determining that the parkingable area is in the first continuous preset number of frames of video images Coordinate information;
  • the second determining unit is configured to obtain information about the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first
  • the coordinate information in the video image of a preset number of frames determines the information of the actual parking space corresponding to the parking area included in the target surveillance video.
  • a terminal device including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor.
  • the processor executes the computer-readable instructions The steps of the method for determining a parking space described above.
  • a computer non-volatile readable storage medium stores computer readable instructions, which when executed by a processor, realize the above Steps of the method of determining parking spaces.
  • An embodiment of the application provides a method for determining a parking space, which detects the moving objects in the surveillance video collected by the preset surveillance equipment, and selects the target area occupied by the moving object in each frame of the surveillance video. , When there are at least a first preset number of consecutive frames in a surveillance video where the target area in the video image completely overlaps, the surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened contains the continuous first preset number of frames of video Target recognition is performed on the target area in the image.
  • the surveillance video to be screened is determined as the target surveillance video
  • the target area in the video image of the first preset number of consecutive frames contained in the target surveillance video is determined as the parking area, based on the information of the preset surveillance area of the target surveillance equipment corresponding to the target surveillance video and the parking area in the first consecutively
  • the coordinate information in the preset number of frames of video images determines the information of the actual parking space corresponding to the parking area.
  • the embodiment of the application can automatically determine the parking space information in the actual scene corresponding to the monitoring screen of the target monitoring device based on the monitoring video collected by the target monitoring device, so that the parking management system can easily determine the actual scene corresponding to the monitoring screen of the target monitoring device.
  • Statistics on the scattered parking spaces is beneficial to the parking management system to dispatch the scattered parking spaces when the indoor parking spaces are in short supply, which reduces the difficulty of parking and improves the parking efficiency.
  • Fig. 1 is an implementation flowchart of a method for determining a parking space provided by an embodiment of the present application
  • FIG. 2 is a specific implementation flowchart of S3 in a method for determining a parking space provided by an embodiment of the present application;
  • FIG. 3 is a specific implementation flowchart of S32 in a method for determining a parking space provided by an embodiment of the present application
  • FIG. 4 is a structural block diagram of a terminal device provided by an embodiment of the present application.
  • Fig. 5 is a structural block diagram of a terminal device provided by another embodiment of the present application.
  • FIG. 1 is an implementation flowchart of a method for determining a parking space provided by an embodiment of the present application.
  • the execution subject of the method for determining a parking space is a terminal device.
  • Terminal devices include but are not limited to smart phones, tablets or desktop computers.
  • the method for determining a parking space as shown in Figure 1 includes the following steps:
  • S1 Obtain surveillance videos collected by each preset monitoring device, detect whether the surveillance video contains moving objects based on the preset moving object detection strategy, determine the surveillance video containing the moving objects as the initial surveillance video, and select all The target area occupied by the moving objects contained in the initial surveillance video in each frame of the video image.
  • the preset monitoring device is a monitoring device used to monitor outdoor streets.
  • Each preset monitoring device has a unique identity, and each preset monitoring device has its corresponding preset monitoring area.
  • the unique identification of the preset monitoring device may be the number of the preset monitoring device, or the device identification code of the preset monitoring device, etc., and there is no restriction here.
  • the number of the preset monitoring device can be composed of the identification of the street monitored by the preset monitoring device and the position number of the preset monitoring device on the street monitored by the preset monitoring device; the information of the preset monitoring area of the preset monitoring device can be preset The name of the street monitored by the monitoring device, the location information of the preset monitoring device on the street it monitors, and the description of the field of view of the preset monitoring device.
  • the field of view of the preset monitoring device refers to the range of the area that the preset monitoring device can monitor in the actual scene, and the field of view of the preset monitoring device corresponds to the monitoring screen monitored by the preset monitoring device.
  • the embodiments of this application need to detect and analyze the surveillance videos collected by the preset monitoring equipment, by detecting whether there is a vehicle in a certain part of the monitoring screen of the preset monitoring equipment. The location stays for a long time to determine whether there is a parking area on the street monitored by the preset monitoring device and to determine the specific location of the parking area.
  • the monitoring screen of the monitoring device when there is a vehicle entering/exiting the monitoring screen of the monitoring device and a vehicle can stay in a certain position on the monitoring screen for a period of time, it means that there is a parking area in the area monitored by the monitoring device; when a vehicle passes by the monitoring device When the monitoring screen but no vehicle stays in the monitoring screen of the monitoring device, it means that there is no parking area in the area monitored by the monitoring device.
  • the terminal device may obtain the surveillance video collected by each preset surveillance device, and detect whether the surveillance video collected by the preset surveillance device contains a moving object based on the preset moving object detection strategy. If the terminal equipment detects that a surveillance video contains a moving object, the surveillance video containing the moving object is determined as the initial surveillance video, and the preset surveillance equipment corresponding to the surveillance video containing the moving object is determined as the initial surveillance equipment, and the terminal equipment frame Select the target area occupied by the moving objects in the initial surveillance video in each frame of the video image.
  • the purpose of the terminal device to detect whether there are moving objects in the surveillance video is to prevent the subsequent target recognition from mistakenly judging the objects that occupy a certain space but cannot move in the area monitored by the preset surveillance equipment as vehicles, and the moving objects are monitored at the initial stage.
  • the purpose of frame selection for the target area occupied in each frame of the video image of the video is to subsequently identify whether the framed moving object is a vehicle. It is understandable that if the terminal device does not detect a moving object in a surveillance video, it will not perform frame selection operations on the surveillance video.
  • the terminal equipment can be monitored from the relevant city department.
  • the surveillance video collected by the preset surveillance equipment is usually stored in the surveillance database of the relevant city department, in practical applications, after being authorized by the relevant city department, the terminal equipment can be monitored from the relevant city department.
  • the surveillance video collected by the preset surveillance equipment from the database.
  • the monitoring database usually uses the unique identification of the preset monitoring device as an index to store the monitoring video collected by the preset monitoring device.
  • the terminal device can obtain the surveillance video collected by each preset surveillance device within the preset time period from the surveillance database.
  • the preset time period can be set according to actual needs.
  • the preset time period can be the peak time when the parking action occurs. For example, people usually need to park during the working hours in the morning and the off-duty hours in the evening.
  • the preset monitoring equipment with a parking area in the monitoring area can capture the process of the vehicle entering the monitoring screen and staying in the monitoring screen with a greater probability. Therefore, only the monitoring video collected during the preset time period can be detected and analyzed. Efficiently and accurately detect whether there is a parking area in the area monitored by the preset monitoring equipment.
  • the terminal device detects whether the surveillance video contains a moving object based on a preset moving object detection strategy, which may specifically include the following steps:
  • the terminal device performing differential processing on the grayscale images of every two adjacent frames of video images is specifically: calculating the difference in grayscale values between corresponding pixels in the grayscale images of every two adjacent frames of video images.
  • the terminal device performs binarization processing on each of the gray-scale difference images based on the preset gray value threshold to obtain the binarized image corresponding to each two adjacent frames of the video image, which may specifically include: The pixel value of the pixel whose gray value is greater than or equal to the preset gray value threshold is determined as the first preset value, and the pixel value of the pixel in the gray differential image whose gray value is less than the preset gray value threshold is determined as The second preset value further obtains the binarized image corresponding to each two adjacent frames of the video image.
  • the preset gray value threshold can be set according to actual needs, and there is no limitation here.
  • the first preset value and the second preset value may also be set according to actual needs.
  • the first preset value may be 1, and the second preset value may be 0.
  • the terminal device After obtaining the binarized image corresponding to every two adjacent frames of video images, the terminal device determines the area formed by the pixels with the pixel value of the first preset value in the binarized image as the area where the moving object is located. Based on the area where the moving object is located in the binarized image, the terminal device selects the target area corresponding to the area where the moving object is located from the next frame of the two video images corresponding to the binarized image.
  • the initial surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened is monitored
  • the target area in the video image of the first preset number of consecutive frames included in the video is subjected to target recognition.
  • the terminal device after the terminal device selects the target area occupied by the moving object in the initial surveillance video in each frame of its video image, it overlaps and compares every two adjacent frames of video images in the initial surveillance video to detect Whether the target areas in every two adjacent frames of video images in the initial surveillance video completely overlap, and then detect whether the target areas in the initial surveillance video at least have a first predetermined number of consecutive frames of video images completely overlap.
  • the terminal device detects whether there are at least a first preset number of consecutive frames in the initial surveillance video.
  • the target area in the video image is completely overlapped. The purpose is to determine whether the moving object stays in the screen monitored by the initial surveillance device for a period of time and stays there. Whether the time is greater than the maximum temporary parking time.
  • the first preset number is related to the frame rate of the initial monitoring device and the maximum temporary parking duration. Specifically, the first preset number is the product of the frame rate of the initial monitoring device and the maximum temporary parking duration.
  • the terminal device detects whether the target area in every two adjacent frames of the video image in the initial surveillance video completely overlaps means: detecting the target area in the i-th frame of the video image in the initial surveillance video and the target area in the i+1-th frame of the video image Whether it completely overlaps.
  • 1 ⁇ i ⁇ T-1, i is an integer
  • T is the total number of frames of video images included in the initial surveillance video.
  • the terminal device detects whether the target area in the first frame of video image in the initial surveillance video completely overlaps with the target area in the second frame of video image, and detects the target area in the second frame of video image in the initial surveillance video Whether it completely overlaps with the target area in the third frame of video image, and so on.
  • the terminal device detecting whether the target areas in every two adjacent frames of video images in the initial surveillance video completely overlap may specifically include the following steps:
  • the first degree of overlap of the target area in every two adjacent frames of video images in the initial surveillance video is: the area of the overlapped part of the target area in every two adjacent frames of video images is equal to that of every two adjacent frames of video images.
  • the preset first overlap threshold can be set according to actual conditions, and there is no limitation here.
  • the terminal device detects that the target area in the video image of at least the first preset number of consecutive frames in an initial surveillance video completely overlaps, it means that a moving object has stayed in the screen monitored by the initial surveillance device for a period of time, and it has stayed The duration is greater than the maximum temporary parking duration.
  • the terminal device determines the initial surveillance video as the surveillance video to be screened, and performs target recognition on the target area in the video image of the first preset number of consecutive frames contained in the surveillance video to be screened.
  • the purpose of area target recognition is to identify whether the object in the target area is a vehicle.
  • the terminal device can use a deep learning-based target recognition algorithm to recognize whether the object in the target area is a vehicle.
  • the target recognition algorithm based on deep learning may be a convolutional neural network algorithm. Since the target recognition algorithm based on deep learning is an existing technology, the specific recognition principle based on the deep learning target recognition algorithm will not be repeated here.
  • the surveillance video to be screened is determined as the target surveillance video, and the target The target area in the video image of the first continuous preset number of frames included in the surveillance video is determined to be a parking area, and the coordinate information of the parking area in the video image of the continuous first preset number of frames is determined.
  • the terminal device if the terminal device recognizes that the moving object in the target area of the video image of the first preset number of consecutive frames included in a surveillance video to be screened is a vehicle, it indicates that the surveillance video to be screened includes the continuous first preset number.
  • the target area in the video image of the number of frames is the area where the vehicle can stay for a long time.
  • the terminal device determines the surveillance video to be screened as the target surveillance video, and determines the surveillance equipment corresponding to the target surveillance video as the target surveillance equipment.
  • the target area in the continuous first preset number of frames of video images included in the target surveillance video is determined to be a parkingable area, and the coordinate information of the parking area in the first continuous preset number of frames of video images included in the target surveillance video is determined.
  • the coordinate information of the parking area in the video image of the first preset number of consecutive frames contained in the target surveillance video can be determined by the coordinates of the center point of the parking area in the video image of the first preset number of consecutive frames contained in the target surveillance video.
  • Information description since the video image is usually rectangular, the terminal device can use one of the vertices of the video image of the first preset number of consecutive frames contained in the target surveillance video as the coordinate origin, and use the two sides constituting the vertex as the coordinate axis to establish Coordinate system, and then determine the coordinate information of the center point of the parking area in the first preset number of consecutive video images.
  • S4 Obtain the information of the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first preset number of frames
  • the coordinate information in the video image determines the information of the actual parking space corresponding to the parkingable area contained in the target surveillance video.
  • the terminal device Since the parking area determined by the terminal device is relative to the monitoring screen of the monitoring device, in order to map it to the actual scene, and then determine the parking space in the actual scene, the terminal device is determining the parking area After the coordinate information in the video image of the first preset number of consecutive frames included in the target surveillance video, the preset surveillance area information of the target surveillance device is acquired based on the unique identity of the target surveillance device corresponding to the target surveillance video.
  • the unique identification of the preset monitoring device and the information of the preset monitoring area of the preset monitoring device are correspondingly stored in the monitoring data of the relevant department of the city in advance.
  • the terminal device can obtain the information of the preset monitoring area of the target monitoring device from the monitoring database of the relevant department based on the unique identity of the target monitoring device.
  • the information of the preset monitoring area of the target monitoring device is described by the name of the street monitored by the target monitoring device, the location information of the target monitoring device on the street monitored by the target monitoring device, and the field of view of the target monitoring device.
  • the terminal device After the terminal device obtains the information of the preset monitoring area of the target monitoring device, based on the coordinate information of the parking area in the first preset number of consecutive video images, determine the actual parking area corresponding to the target monitoring device's field of view.
  • the area occupied by the parking space and based on the name of the street monitored by the target monitoring device, the location information of the target monitoring device on the street monitored by the target monitoring device, and the actual parking space corresponding to the parking area, generate a parking area
  • the corresponding actual parking space information That is to say, the information of the actual parking space corresponding to the parking area is through the name of the street monitored by the target monitoring device, the location information of the target monitoring device on the street monitored by the target monitoring device, and the actual parking space corresponding to the parking area. Scope description.
  • the method for determining parking spaces can automatically determine the parking space information in the actual scene corresponding to the monitoring screen of the target monitoring device based on the monitoring video collected by the target monitoring device, which is convenient for
  • the parking management system counts the scattered parking spaces in the actual scene corresponding to the monitoring screen of the target monitoring device, which is conducive to the parking management system to dispatch the scattered parking spaces when the indoor parking spaces are scarce, reducing the difficulty of parking and improving the parking efficiency .
  • FIG. 2 is an implementation flowchart of a method for determining a parking space provided by another embodiment of the present application.
  • This embodiment is based on the embodiment corresponding to FIG. 1, considering that there may be a marked parking space in the actual scene corresponding to the monitoring screen of the target monitoring device.
  • S3 in this embodiment specifically includes S31 ⁇ S34 , Detailed as follows:
  • S31 Perform target detection on the continuous first preset number of frames of video images included in the target surveillance video, and detect whether the first continuous frame of video images included in the target surveillance video includes a frame with a preset shape.
  • the terminal device After the terminal device determines the target surveillance video, it performs target detection on the continuous first preset number of frames of video images contained in the target surveillance video to detect the first preset number of consecutive frames of video images contained in the target surveillance video. Whether to include a frame with a preset shape.
  • the purpose of detecting whether the video image of the continuous first preset number of frames included in the target surveillance video contains a frame with a preset shape is to determine whether there is a lined parking space in the actual scene corresponding to the surveillance picture of the target surveillance device. Since the outline of the lined parking space is usually a parallelogram, in this embodiment, the preset shape can be set as a parallelogram.
  • the terminal device may use an edge detection algorithm based on the OpenCV algorithm to detect and acquire a frame with a preset shape in the video image. Since the edge detection algorithm based on the OpenCV algorithm is an existing technology, its specific detection principle will not be described here.
  • the terminal device detects that the video image of the first preset number of consecutive frames included in the target surveillance video contains a frame with a preset shape, it means that there may be a parking space in the actual scene corresponding to the surveillance screen of the target surveillance device.
  • the terminal device calculates the second degree of overlap between the frame of the preset shape and the target area.
  • S32 can be specifically implemented through S321 to S322 as shown in FIG. 3, and the details are as follows:
  • S322 Determine the ratio of the area of the overlapping part to the sum of the areas as the second degree of overlap between the frame of the preset shape and the target area.
  • the terminal device calculates the second degree of overlap between the frame of the preset shape and the target area, it compares the second degree of overlap with the second preset degree of overlap threshold.
  • the second preset overlap degree threshold can be set according to actual needs, and there is no limitation here.
  • the terminal device determines the target area in the video image of the first preset number of consecutive frames contained in the target video as Parking area.
  • the terminal device detects that the second overlap between the frame of the preset shape and the target area is greater than or equal to the second preset overlap threshold, it indicates the overlap between the frame of the preset shape and the target area.
  • the area is larger, which means that the frame of the preset shape corresponds to the marked parking space in the actual scene.
  • the terminal device converts the frame of the preset shape in the video image of the first preset number of consecutive frames contained in the target video.
  • the body is determined as a parking area.
  • the method for determining parking spaces provided by this embodiment, when there are marked parking spaces in the actual scene corresponding to the monitoring screen of the target monitoring device, priority is given to the parking spaces corresponding to the marked parking spaces.
  • the frame of the shape is determined as the parking area, so that the determined parking space is more accurate.
  • FIG. 4 is a structural block diagram of a terminal device according to an embodiment of the present application.
  • the terminal device in this embodiment may be a terminal device such as a smart phone or a tablet computer.
  • the units included in the terminal device are used to execute the steps in the embodiments corresponding to FIGS. 1 to 3.
  • the terminal device 400 includes: a frame selection unit 41, a target recognition unit 42, a first determination unit 43, and a second determination unit 44. among them:
  • the frame selection unit 41 is used to obtain the surveillance video collected by each preset monitoring device, detect whether the surveillance video contains a moving object based on the preset moving object detection strategy, and determine the surveillance video containing the moving object as the initial surveillance video , Box select the target area occupied by the moving objects contained in the initial surveillance video in each frame of the video image.
  • the target recognition unit 42 is configured to determine that the initial surveillance video is the surveillance video to be screened if at least the target area in the first preset number of consecutive frames of video images completely overlap Target recognition is performed on the target area in the first predetermined number of consecutive frames of video images included in the surveillance video to be screened.
  • the first determining unit 43 is configured to determine that the surveillance video to be screened is the target surveillance video if it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames included in the surveillance video to be screened is a vehicle. , Determining the target area in the continuous first preset number of frames of video images included in the target surveillance video as a parkingable area, and determining that the parkingable area is in the first continuous preset number of frames of video images The coordinate information.
  • the second determining unit 44 is configured to obtain the information of the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first
  • the coordinate information in the video image of a preset number of frames determines the information of the actual parking space corresponding to the parking area included in the target surveillance video.
  • the first determination unit 43 specifically includes: a target detection unit, a first calculation unit, and a third determination unit. among them:
  • the target detection unit is configured to perform target detection on the continuous first preset number of frames of video images included in the target surveillance video, and detect whether the first continuous preset number of frames of video images included in the target surveillance video contains a preset shape framework.
  • the first calculation unit is configured to calculate the frame of the preset shape and the second of the target area if the frame of the preset shape is included in the continuous first preset number of frames of the video image contained in the target surveillance video. Degree of overlap.
  • the third determining unit is configured to, if the second overlap degree is less than a second preset overlap degree threshold, determine the target area in the first preset number of consecutive video images contained in the target surveillance video as parking area.
  • the terminal device 400 further includes a fourth determining unit.
  • the fourth determining unit is configured to, if the second degree of overlap is greater than or equal to a second preset degree of overlap threshold, determine the shape of the preset shape in the continuous first preset number of frames of video images included in the target surveillance video The frame is determined as a parking area.
  • the first calculation unit is specifically configured to:
  • the video image of the first preset number of consecutive frames included in the target surveillance video includes a frame of a preset shape
  • the ratio of the area of the overlap portion to the sum of the area is determined as the second degree of overlap between the frame of the preset shape and the target area.
  • the frame selection unit 41 specifically includes a reading unit, a first processing unit, a second processing unit, a third processing unit, and a fifth determining unit. among them:
  • the reading unit is used for reading each frame of video images contained in the surveillance video.
  • the first processing unit is configured to perform smoothing processing and gray-scale processing on each frame of the video image included in the surveillance video, to obtain a gray-scale image of each frame of the video image.
  • the second processing unit is configured to perform differential processing on the grayscale images of each two adjacent frames of the video image to obtain a grayscale difference image corresponding to each two adjacent frames of the video image.
  • the third processing unit is configured to perform binarization processing on each of the gray-scale difference images based on a preset gray-scale value threshold to obtain a binarized image corresponding to every two adjacent frames of the video image.
  • the fifth determining unit is configured to determine whether the surveillance video contains a moving object based on each of the binarized images.
  • the terminal device provided in this embodiment can automatically determine the parking space information in the actual scene corresponding to the monitoring screen of the target monitoring device based on the monitoring video collected by the target monitoring device, which is convenient for the parking management system to check Statistics on the scattered parking spaces in the actual scene corresponding to the monitoring screen of the target monitoring device is helpful for the parking management system to dispatch the scattered parking spaces when the indoor parking spaces are in short supply, which reduces the difficulty of parking and improves the parking efficiency.
  • Fig. 5 is a structural block diagram of a terminal device provided by another embodiment of the present application.
  • the terminal device 5 of this embodiment includes: a processor 50, a memory 51, and computer-readable instructions 52 stored in the memory 51 and running on the processor 50, such as determining a parking space Method of the program.
  • the processor 50 executes the computer-readable instruction 52
  • the steps in the above embodiments of the method for determining a parking space are implemented, such as S1 to S4 shown in FIG. 1.
  • the processor 50 executes the computer-readable instructions 52
  • the functions of the units in the embodiment corresponding to FIG. 4 are implemented, for example, the functions of the units 41 to 44 shown in FIG. 4.
  • FIG. 4 The relevant description in the embodiment of, will not be repeated here.
  • the computer-readable instruction 52 may be divided into one or more units, and the one or more units are stored in the memory 51 and executed by the processor 50 to complete the present application .
  • the one or more units may be a series of computer-readable instruction instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instruction 52 in the terminal device 5.
  • the computer-readable instruction 52 may be divided into a frame selection unit, a target recognition unit, a first determination unit, and a second determination unit, and the specific functions of each unit are as described above.
  • the terminal device may include, but is not limited to, a processor 50 and a memory 51.
  • FIG. 5 is only an example of the terminal device 5, and does not constitute a limitation on the terminal device 5. It may include more or less components than shown in the figure, or a combination of certain components, or different components.
  • the terminal device may also include input and output devices, network access devices, buses, and the like.
  • the so-called processor 50 may be a central processing unit (Central Processing Unit, CPU), it can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5.
  • the memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) equipped on the terminal device 5. Card, Flash Card, etc.
  • the memory 51 may also include both an internal storage unit of the terminal device 5 and an external storage device.
  • the memory 51 is used to store the computer-readable instructions and other programs and data required by the terminal device.
  • the memory 51 can also be used to temporarily store data that has been output or will be output.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. in.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

A parking space determination method, a terminal device and a medium, which are applicable to the technical field of artificial intelligence, wherein the method comprises: acquiring a monitoring video collected by each preset monitoring device, detecting whether a moving object is contained in the monitoring video according to a preset moving object detection strategy, determining the monitoring video containing the moving object as an initial monitoring video, and selecting a target area occupied by the moving object contained in the initial monitoring video in each frame of video image (S1); if the target area in at least a first preset number of consecutive frames of video images in the initial monitoring video completely overlaps, determining the initial monitoring video as a monitoring video to be screened, and performing target recognition on the target area in the first preset number of consecutive frames of video images contained in the monitoring video to be screened (S2); if the recognized moving object in the target area of the first preset number of consecutive frames of video images contained in the monitoring video to be screened is a vehicle, determining the monitoring video to be screened as a target monitoring video, determining the target area in the first preset number of consecutive frames of video images contained in the target monitoring video as a parking area, and determining coordinate information of the parking area in the first preset number of consecutive frames of video images (S3); acquiring information of a preset monitoring area of a target monitoring device corresponding to the target monitoring video, and determining information of an actual parking space corresponding to the parking area contained in the target monitoring video according to the information of the preset monitoring area and the coordinate information of the parking area contained in the target monitoring video in the first preset number of consecutive frames of video images (S4). By determining the information of the corresponding actual parking space according to the parking area, a parking management system is convenient to perform statistics and scheduling on the scattered parking spaces in an actual scene, which reduces the parking difficulty, and improves the parking efficiency.

Description

一种确定停车位的方法、终端设备及计算机可读存储介质Method for determining parking space, terminal equipment and computer readable storage medium
本申请申明享有2019年9月16日递交的申请号为201910872304.X、名称为“一种确定停车位的方法、终端设备及计算机可读存储介质”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。This application affirms the priority of the Chinese patent application filed on September 16, 2019 with the application number 201910872304.X, titled "A method for determining parking spaces, terminal equipment and computer-readable storage media", the Chinese patent application The overall content of is incorporated in this application by reference.
技术领域Technical field
本申请属于人工智能技术领域,尤其涉及一种确定停车位的方法、终端设备及计算机非易失性可读存储介质。This application belongs to the field of artificial intelligence technology, and in particular relates to a method for determining a parking space, a terminal device, and a computer non-volatile readable storage medium.
背景技术Background technique
随着汽车行业的快速发展以及人们生活水平的不断提高,汽车已经成为大多数人出行的必备交通工具,随着汽车使用者的增多,大多数城市对停车位的需求量大幅度增加。而为了缓解停车场的停车压力,许多城市会在室外的一些街道上设置停车位,但由于这些室外停车位的分散性及不确定性,现有的停车管理系统很难获知这些零散停车位的信息,进而无法将这些零散停车位的信息进行统一归档记录,导致在停车场的停车位紧缺时无法对这些室外的零散停车位进行紧急调度,增加了停车困难度,降低了停车效率。With the rapid development of the automobile industry and the continuous improvement of people's living standards, cars have become an essential means of transportation for most people. With the increase of car users, the demand for parking spaces in most cities has greatly increased. In order to relieve the parking pressure of parking lots, many cities will set up parking spaces on some outdoor streets. However, due to the dispersion and uncertainty of these outdoor parking spaces, it is difficult for the existing parking management system to know the scattered parking spaces. In addition, it is impossible to archive and record the information of these scattered parking spaces in a unified manner. As a result, when parking spaces in the parking lot are in short supply, these scattered outdoor parking spaces cannot be urgently dispatched, which increases the difficulty of parking and reduces the parking efficiency.
技术问题technical problem
本申请实施例提供了一种确定停车位的方法、终端设备及计算机非易失性可读存储介质,以解决现有的停车管理系统无法获知室外零散停车位的信息,导致在室内停车位紧缺时无法对室外的零散停车位进行紧急调度,停车困难度较高,停车效率较低的问题。The embodiments of the present application provide a method, terminal equipment, and computer non-volatile readable storage medium for determining parking spaces, so as to solve the problem that the existing parking management system cannot obtain information about scattered outdoor parking spaces, resulting in a shortage of indoor parking spaces. It is impossible to make emergency dispatch to the scattered outdoor parking spaces at times, the difficulty of parking is high, and the parking efficiency is low.
技术解决方案Technical solutions
第一方面,提供了一种确定停车位的方法,包括:In the first aspect, a method for determining parking spaces is provided, including:
获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,将包含运动物体的所述监控视频确定为初始监控视频,框选所述初始监控视频中包含的运动物体在其各帧视频图像中所占的目标区域;Obtain the surveillance videos collected by each preset surveillance device, detect whether the surveillance video contains moving objects based on the preset moving object detection strategy, determine the surveillance video containing the moving objects as the initial surveillance video, and select the initial surveillance video. The target area occupied by the moving objects contained in the surveillance video in each frame of the video image;
若所述初始监控视频中至少有连续第一预设数目帧视频图像中的所述目标区域完全重叠,则将所述初始监控视频确定为待筛选监控视频,并对所述待筛选监控视频包含的连续第一预设数目帧视频图像中的所述目标区域进行目标识别;If at least the target area in the video image of the first preset number of consecutive frames completely overlaps in the initial surveillance video, the initial surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened includes Performing target recognition on the target area in the first preset number of consecutive frames of video images;
若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息;If it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames contained in the surveillance video to be screened is a vehicle, the surveillance video to be screened is determined as the target surveillance video, and the target surveillance video The target area included in the video images of the first preset number of consecutive frames is determined to be a parking area, and the coordinate information of the parking area in the video images of the first consecutive preset number of frames is determined;
获取所述目标监控视频对应的目标监控设备的预设监控区域的信息,基于所述预设监控区域的信息及所述目标监控视频包含的可停车区域在其连续第一预设数目帧视频图像中的坐标信息,确定所述目标监控视频包含的可停车区域对应的实际停车位的信息。Obtain the information of the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first preset number of frames of video images The coordinate information in, determines the actual parking space information corresponding to the parkingable area contained in the target surveillance video.
第二方面,提供了一种终端设备,包括:In a second aspect, a terminal device is provided, including:
框选单元,用于获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,将包含运动物体的所述监控视频确定为初始监控视频,框选所述初始监控视频中包含的运动物体在其各帧视频图像中所占的目标区域;The frame selection unit is used to obtain the surveillance video collected by each preset monitoring device, detect whether the surveillance video contains a moving object based on the preset moving object detection strategy, and determine the surveillance video containing the moving object as the initial surveillance video , Box select the target area occupied by the moving objects contained in the initial surveillance video in each frame of the video image;
目标识别单元,用于若所述初始监控视频中至少有连续第一预设数目帧视频图像中的所述目标区域完全重叠,则将所述初始监控视频确定为待筛选监控视频,并对所述待筛选监控视频包含的连续第一预设数目帧视频图像中的所述目标区域进行目标识别;The target recognition unit is configured to determine that the initial surveillance video is the surveillance video to be screened if at least the target area in the first preset number of consecutive frames of video images completely overlap Performing target recognition on the target area in the first preset number of consecutive frames of video images included in the surveillance video to be screened;
第一确定单元,用于若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息;The first determining unit is configured to determine that the surveillance video to be screened is the target surveillance video if it is identified that the moving object in the target area of the video image of the first preset number of consecutive frames included in the surveillance video to be screened is a vehicle. , Determining the target area in the continuous first preset number of frames of video images included in the target surveillance video as a parkingable area, and determining that the parkingable area is in the first continuous preset number of frames of video images Coordinate information;
第二确定单元,用于获取所述目标监控视频对应的目标监控设备的预设监控区域的信息,基于所述预设监控区域的信息及所述目标监控视频包含的可停车区域在其连续第一预设数目帧视频图像中的坐标信息,确定所述目标监控视频包含的可停车区域对应的实际停车位的信息。The second determining unit is configured to obtain information about the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first The coordinate information in the video image of a preset number of frames determines the information of the actual parking space corresponding to the parking area included in the target surveillance video.
第三方面,提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时上述的确定停车位的方法的步骤。In a third aspect, a terminal device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions The steps of the method for determining a parking space described above.
第四方面,提供了一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述的确定停车位的方法的步骤。In a fourth aspect, a computer non-volatile readable storage medium is provided, and the computer non-volatile readable storage medium stores computer readable instructions, which when executed by a processor, realize the above Steps of the method of determining parking spaces.
有益效果Beneficial effect
本申请实施例提供的一种确定停车位的方法,通过对预设监控设备采集到的监控视频中的运动物体进行检测,框选运动物体在监控视频的各帧视频图像中所占的目标区域,当某监控视频中至少有连续第一预设数目帧视频图像中的目标区域完全重叠时,将该监控视频确定为待筛选监控视频,对待筛选监控视频包含的连续第一预设数目帧视频图像中的目标区域进行目标识别,当识别出某待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆时,将该待筛选监控视频确定为目标监控视频,将目标监控视频包含的连续第一预设数目帧视频图像中的目标区域确定为可停车区域,基于目标监控视频对应的目标监控设备的预设监控区域的信息及可停车区域在连续第一预设数目帧视频图像中的坐标信息,确定可停车区域对应的实际停车位的信息。本申请实施例可以基于目标监控设备采集到的监控视频自动确定出目标监控设备的监控画面对应的实际场景中的停车位的信息,便于停车管理系统对目标监控设备的监控画面对应的实际场景中的零散停车位进行统计,有利于停车管理系统在室内停车位紧缺时对零散停车位进行调度,降低了停车困难度,提高了停车效率。An embodiment of the application provides a method for determining a parking space, which detects the moving objects in the surveillance video collected by the preset surveillance equipment, and selects the target area occupied by the moving object in each frame of the surveillance video. , When there are at least a first preset number of consecutive frames in a surveillance video where the target area in the video image completely overlaps, the surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened contains the continuous first preset number of frames of video Target recognition is performed on the target area in the image. When it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames contained in a surveillance video to be screened is a vehicle, the surveillance video to be screened is determined as the target surveillance video , The target area in the video image of the first preset number of consecutive frames contained in the target surveillance video is determined as the parking area, based on the information of the preset surveillance area of the target surveillance equipment corresponding to the target surveillance video and the parking area in the first consecutively The coordinate information in the preset number of frames of video images determines the information of the actual parking space corresponding to the parking area. The embodiment of the application can automatically determine the parking space information in the actual scene corresponding to the monitoring screen of the target monitoring device based on the monitoring video collected by the target monitoring device, so that the parking management system can easily determine the actual scene corresponding to the monitoring screen of the target monitoring device. Statistics on the scattered parking spaces is beneficial to the parking management system to dispatch the scattered parking spaces when the indoor parking spaces are in short supply, which reduces the difficulty of parking and improves the parking efficiency.
附图说明Description of the drawings
图1是本申请实施例提供的一种确定停车位的方法的实现流程图;Fig. 1 is an implementation flowchart of a method for determining a parking space provided by an embodiment of the present application;
图2是本申请实施例提供的一种确定停车位的方法中S3的具体实现流程图;FIG. 2 is a specific implementation flowchart of S3 in a method for determining a parking space provided by an embodiment of the present application;
图3是本申请实施例提供的一种确定停车位的方法中S32的具体实现流程图;FIG. 3 is a specific implementation flowchart of S32 in a method for determining a parking space provided by an embodiment of the present application;
图4是本申请实施例提供的一种终端设备的结构框图;FIG. 4 is a structural block diagram of a terminal device provided by an embodiment of the present application;
图5是本申请另一实施例提供的一种终端设备的结构框图。Fig. 5 is a structural block diagram of a terminal device provided by another embodiment of the present application.
本发明的实施方式Embodiments of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, and not used to limit the application.
请参阅图1,图1是本申请实施例提供的一种确定停车位的方法的实现流程图。本实施例中,确定停车位的方法的执行主体为终端设备。终端设备包括但不限于智能手机、平板电脑或台式电脑。如图1所示的确定停车位的方法包括以下步骤:Please refer to FIG. 1. FIG. 1 is an implementation flowchart of a method for determining a parking space provided by an embodiment of the present application. In this embodiment, the execution subject of the method for determining a parking space is a terminal device. Terminal devices include but are not limited to smart phones, tablets or desktop computers. The method for determining a parking space as shown in Figure 1 includes the following steps:
S1:获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,将包含运动物体的所述监控视频确定为初始监控视频,框选所述初始监控视频中包含的运动物体在其各帧视频图像中所占的目标区域。S1: Obtain surveillance videos collected by each preset monitoring device, detect whether the surveillance video contains moving objects based on the preset moving object detection strategy, determine the surveillance video containing the moving objects as the initial surveillance video, and select all The target area occupied by the moving objects contained in the initial surveillance video in each frame of the video image.
本申请实施例中,预设监控设备为用于监控室外街道的监控设备。每一预设监控设备都具有一个唯一身份标识,且每一预设监控设备均有其对应的预设监控区域。在实际应用中,预设监控设备的唯一身份标识可以是预设监控设备的编号,也可以是预设监控设备的设备识别码等,此处不做限制。预设监控设备的编号可以由预设监控设备所监控的街道的标识及预设监控设备在其所监控的街道上的位置编号构成;预设监控设备的预设监控区域的信息可以通过预设监控设备所监控的街道的名称、预设监控设备在其所监控的街道上的位置信息及预设监控设备的视野范围描述。预设监控设备的视野范围指预设监控设备在实际场景中能监控到的区域的范围,预设监控设备的视野范围与预设监控设备监控到的监控画面相对应。In the embodiment of the present application, the preset monitoring device is a monitoring device used to monitor outdoor streets. Each preset monitoring device has a unique identity, and each preset monitoring device has its corresponding preset monitoring area. In practical applications, the unique identification of the preset monitoring device may be the number of the preset monitoring device, or the device identification code of the preset monitoring device, etc., and there is no restriction here. The number of the preset monitoring device can be composed of the identification of the street monitored by the preset monitoring device and the position number of the preset monitoring device on the street monitored by the preset monitoring device; the information of the preset monitoring area of the preset monitoring device can be preset The name of the street monitored by the monitoring device, the location information of the preset monitoring device on the street it monitors, and the description of the field of view of the preset monitoring device. The field of view of the preset monitoring device refers to the range of the area that the preset monitoring device can monitor in the actual scene, and the field of view of the preset monitoring device corresponds to the monitoring screen monitored by the preset monitoring device.
本申请实施例为了统计室外街道上的可停车区域(即停车位),需要对预设监控设备采集到的监控视频进行检测分析,通过检测是否有车辆在预设监控设备的监控画面中的某位置长时间停留,来确定预设监控设备所监控的街道上是否有可停车区域以及确定可停车区域的具体位置。通常,当有车辆驶入/驶出监控设备的监控画面且有车辆能够在监控画面的某位置停留一段时间时,说明监控设备所监控的区域内有可停车区域;当有车辆经过监控设备的监控画面但无车辆在监控设备的监控画面中停留时,说明监控设备所监控的区域内没有可停车区域。In order to count the parking areas (i.e., parking spaces) on outdoor streets, the embodiments of this application need to detect and analyze the surveillance videos collected by the preset monitoring equipment, by detecting whether there is a vehicle in a certain part of the monitoring screen of the preset monitoring equipment. The location stays for a long time to determine whether there is a parking area on the street monitored by the preset monitoring device and to determine the specific location of the parking area. Generally, when there is a vehicle entering/exiting the monitoring screen of the monitoring device and a vehicle can stay in a certain position on the monitoring screen for a period of time, it means that there is a parking area in the area monitored by the monitoring device; when a vehicle passes by the monitoring device When the monitoring screen but no vehicle stays in the monitoring screen of the monitoring device, it means that there is no parking area in the area monitored by the monitoring device.
具体的,终端设备可以获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测预设监控设备采集到的监控视频中是否包含运动物体。终端设备若检测到某监控视频中包含运动物体,则将包含运动物体的监控视频确定为初始监控视频,将包含运动物体的监控视频对应的预设监控设备确定为初始监控设备,且终端设备框选初始监控视频中的运动物体在其各帧视频图像中所占的目标区域。终端设备检测监控视频中是否包含运动物体的目的是为了避免后续进行目标识别时将预设监控设备所监控的区域内占一定空间但无法移动的物体误判为车辆,而对运动物体在初始监控视频的各帧视频图像中所占的目标区域进行框选的目的是为了后续有针对性地识别所框选的运动物体是否为车辆。可以理解的是,终端设备如果未在某监控视频中检测到运动物体,则不对该监控视频进行框选操作。Specifically, the terminal device may obtain the surveillance video collected by each preset surveillance device, and detect whether the surveillance video collected by the preset surveillance device contains a moving object based on the preset moving object detection strategy. If the terminal equipment detects that a surveillance video contains a moving object, the surveillance video containing the moving object is determined as the initial surveillance video, and the preset surveillance equipment corresponding to the surveillance video containing the moving object is determined as the initial surveillance equipment, and the terminal equipment frame Select the target area occupied by the moving objects in the initial surveillance video in each frame of the video image. The purpose of the terminal device to detect whether there are moving objects in the surveillance video is to prevent the subsequent target recognition from mistakenly judging the objects that occupy a certain space but cannot move in the area monitored by the preset surveillance equipment as vehicles, and the moving objects are monitored at the initial stage. The purpose of frame selection for the target area occupied in each frame of the video image of the video is to subsequently identify whether the framed moving object is a vehicle. It is understandable that if the terminal device does not detect a moving object in a surveillance video, it will not perform frame selection operations on the surveillance video.
可以理解的是,由于预设监控设备采集到的监控视频通常存储在城市相关部门的监控数据库中,因此,在实际应用中,在经城市相关部门授权后,终端设备可以从城市相关部门的监控数据库中获取预设监控设备采集到的监控视频。需要说明的是,监控数据库通常以预设监控设备的唯一身份标识作为索引对预设监控设备采集到的监控视频进行存储。It is understandable that since the surveillance video collected by the preset surveillance equipment is usually stored in the surveillance database of the relevant city department, in practical applications, after being authorized by the relevant city department, the terminal equipment can be monitored from the relevant city department. Obtain the surveillance video collected by the preset surveillance equipment from the database. It should be noted that the monitoring database usually uses the unique identification of the preset monitoring device as an index to store the monitoring video collected by the preset monitoring device.
作为本申请一优选实施例,终端设备可以从监控数据库中获取每一预设监控设备在预设时段内采集到的监控视频。其中,预设时段可以根据实际需求设置,例如,预设时段可以为停车动作发生的高峰时段,示例性的,人们通常在早晨的上班时段及傍晚的下班时段需要停车,在这些时段内,所监控区域内有可停车区域的预设监控设备可以较大概率地拍摄到车辆驶入监控画面并在监控画面中停留的过程,因此,仅对预设时段内采集到的监控视频进行检测分析可以高效且准确地检测出预设监控设备监控的区域内是否有可停车区域。As a preferred embodiment of the present application, the terminal device can obtain the surveillance video collected by each preset surveillance device within the preset time period from the surveillance database. Among them, the preset time period can be set according to actual needs. For example, the preset time period can be the peak time when the parking action occurs. For example, people usually need to park during the working hours in the morning and the off-duty hours in the evening. The preset monitoring equipment with a parking area in the monitoring area can capture the process of the vehicle entering the monitoring screen and staying in the monitoring screen with a greater probability. Therefore, only the monitoring video collected during the preset time period can be detected and analyzed. Efficiently and accurately detect whether there is a parking area in the area monitored by the preset monitoring equipment.
作为本申请一实施例,终端设备基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,具体可以包括以下步骤:As an embodiment of the present application, the terminal device detects whether the surveillance video contains a moving object based on a preset moving object detection strategy, which may specifically include the following steps:
读取所述监控视频包含的各帧视频图像;Reading each frame of video images included in the surveillance video;
对所述监控视频包含的各帧所述视频图像分别进行平滑处理及灰度处理,得到各帧所述视频图像的灰度图像;Performing smoothing processing and gray-scale processing on each frame of the video image included in the surveillance video to obtain a gray-scale image of the video image of each frame;
对每相邻两帧所述视频图像的灰度图像进行差分处理,得到每相邻两帧所述视频图像对应的灰度差分图像;Performing differential processing on the grayscale images of each two adjacent frames of the video image to obtain a grayscale difference image corresponding to each two adjacent frames of the video image;
基于预设灰度值阈值对各个所述灰度差分图像进行二值化处理,得到每相邻两帧所述视频图像对应的二值化图像;Performing binarization processing on each of the gray-level difference images based on a preset gray-level value threshold to obtain a binarized image corresponding to each two adjacent frames of the video image;
基于各个所述二值化图像确定所述监控视频中是否包含运动物体。Determine whether the surveillance video contains a moving object based on each of the binarized images.
本实施例中,终端设备对每相邻两帧视频图像的灰度图像进行差分处理具体为:计算每相邻两帧视频图像的灰度图像中对应像素点之间的灰度值之差。In this embodiment, the terminal device performing differential processing on the grayscale images of every two adjacent frames of video images is specifically: calculating the difference in grayscale values between corresponding pixels in the grayscale images of every two adjacent frames of video images.
终端设备基于预设灰度值阈值对各个所述灰度差分图像进行二值化处理,得到每相邻两帧所述视频图像对应的二值化图像,具体可以包括:将灰度差分图像中灰度值大于或等于预设灰度值阈值的像素点的像素值确定为第一预设值,将灰度差分图像中灰度值小于预设灰度值阈值的像素点的像素值确定为第二预设值,进而得到每相邻两帧所述视频图像对应的二值化图像。The terminal device performs binarization processing on each of the gray-scale difference images based on the preset gray value threshold to obtain the binarized image corresponding to each two adjacent frames of the video image, which may specifically include: The pixel value of the pixel whose gray value is greater than or equal to the preset gray value threshold is determined as the first preset value, and the pixel value of the pixel in the gray differential image whose gray value is less than the preset gray value threshold is determined as The second preset value further obtains the binarized image corresponding to each two adjacent frames of the video image.
在实际应用中,预设灰度值阈值可根据实际需求设置,此处不做限制。第一预设值和第二预设值也可以根据实际需求设置,例如,第一预设值可以为1,第二预设值可以为0。In practical applications, the preset gray value threshold can be set according to actual needs, and there is no limitation here. The first preset value and the second preset value may also be set according to actual needs. For example, the first preset value may be 1, and the second preset value may be 0.
终端设备得到每相邻两帧视频图像对应的二值化图像后,将二值化图像中像素值为第一预设值的像素点构成的区域确定为运动物体所在区域。终端设备基于二值化图像中的运动物体所在区域,从二值化图像对应的两帧视频图像中的后一帧视频图像中框选与运动物体所在区域对应的目标区域。After obtaining the binarized image corresponding to every two adjacent frames of video images, the terminal device determines the area formed by the pixels with the pixel value of the first preset value in the binarized image as the area where the moving object is located. Based on the area where the moving object is located in the binarized image, the terminal device selects the target area corresponding to the area where the moving object is located from the next frame of the two video images corresponding to the binarized image.
S2:若所述初始监控视频中至少有连续第一预设数目帧视频图像中的所述目标区域完全重叠,则将所述初始监控视频确定为待筛选监控视频,并对所述待筛选监控视频包含的连续第一预设数目帧视频图像中的所述目标区域进行目标识别。S2: If at least the target area in the video image of the first preset number of consecutive frames in the initial surveillance video completely overlaps, the initial surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened is monitored The target area in the video image of the first preset number of consecutive frames included in the video is subjected to target recognition.
本申请实施例中,终端设备框选出初始监控视频中的运动物体在其各帧视频图像中所占的目标区域后,将初始监控视频中的每相邻两帧视频图像进行重叠对比,检测初始监控视频中每相邻两帧视频图像中的目标区域是否完全重叠,进而检测初始监控视频中是否至少有连续第一预设数目帧视频图像中的目标区域完全重叠。终端设备检测初始监控视频中是否至少有连续第一预设数目帧视频图像中的目标区域完全重叠的目的是为了确定运动物体是否在初始设监控设备所监控的画面中停留一段时间,且停留的时间是否大于最大临时停车时长。In the embodiment of this application, after the terminal device selects the target area occupied by the moving object in the initial surveillance video in each frame of its video image, it overlaps and compares every two adjacent frames of video images in the initial surveillance video to detect Whether the target areas in every two adjacent frames of video images in the initial surveillance video completely overlap, and then detect whether the target areas in the initial surveillance video at least have a first predetermined number of consecutive frames of video images completely overlap. The terminal device detects whether there are at least a first preset number of consecutive frames in the initial surveillance video. The target area in the video image is completely overlapped. The purpose is to determine whether the moving object stays in the screen monitored by the initial surveillance device for a period of time and stays there. Whether the time is greater than the maximum temporary parking time.
在实际应用中,当车辆在室外街道的某个区域停留的时长大于最大临时停车时长,说明该街道的该区域允许长时间停车,即说明该街道的该区域可以作为停车位,因此,本申请实施例中,第一预设数目与初始监控设备的帧率及最大临时停车时长相关,具体的,第一预设数目为初始监控设备的帧率与最大临时停车时长的乘积。In practical applications, when a vehicle stays in a certain area of an outdoor street longer than the maximum temporary parking time, it means that this area of the street allows long-term parking, which means that this area of the street can be used as a parking space. Therefore, this application In an embodiment, the first preset number is related to the frame rate of the initial monitoring device and the maximum temporary parking duration. Specifically, the first preset number is the product of the frame rate of the initial monitoring device and the maximum temporary parking duration.
终端设备检测初始监控视频中每相邻两帧视频图像中的目标区域是否完全重叠指:检测初始监控视频中的第i帧视频图像中的目标区域与第i+1帧视频图像中的目标区域是否完全重叠。其中,1≤i≤T-1,i为整数,T为初始监控视频包含的视频图像的总帧数。示例性的,终端设备检测初始监控视频中的第1帧视频图像中的目标区域与第2帧视频图像中的目标区域是否完全重叠,检测初始监控视频中的第2帧视频图像中的目标区域与第3帧视频图像中的目标区域是否完全重叠,以此类推。The terminal device detects whether the target area in every two adjacent frames of the video image in the initial surveillance video completely overlaps means: detecting the target area in the i-th frame of the video image in the initial surveillance video and the target area in the i+1-th frame of the video image Whether it completely overlaps. Among them, 1≤i≤T-1, i is an integer, and T is the total number of frames of video images included in the initial surveillance video. Exemplarily, the terminal device detects whether the target area in the first frame of video image in the initial surveillance video completely overlaps with the target area in the second frame of video image, and detects the target area in the second frame of video image in the initial surveillance video Whether it completely overlaps with the target area in the third frame of video image, and so on.
作为本申请一实施例,终端设备检测初始监控视频中每相邻两帧视频图像中的目标区域是否完全重叠具体可以包括以下步骤:As an embodiment of the present application, the terminal device detecting whether the target areas in every two adjacent frames of video images in the initial surveillance video completely overlap may specifically include the following steps:
计算初始监控视频中每相邻两帧视频图像中的目标区域的第一重叠度,检测初始监控视频中每相邻两帧视频图像中的目标区域的第一重叠度是否大于预设第一重叠度阈值。Calculate the first degree of overlap of the target area in every two adjacent frames of video images in the initial surveillance video, and detect whether the first degree of overlap of the target area in every two adjacent frames of video images in the initial surveillance video is greater than the preset first overlap Degree threshold.
其中,初始监控视频中每相邻两帧视频图像中的目标区域的第一重叠度为:每相邻两帧视频图像中的目标区域的重叠部分的面积与每相邻两帧视频图像中的目标区域的面积之和的比值。预设第一重叠度阈值可以根据实际情况设置,此处不做限制。Among them, the first degree of overlap of the target area in every two adjacent frames of video images in the initial surveillance video is: the area of the overlapped part of the target area in every two adjacent frames of video images is equal to that of every two adjacent frames of video images. The ratio of the sum of the area of the target area. The preset first overlap threshold can be set according to actual conditions, and there is no limitation here.
终端设备若检测到初始监控视频中某相邻两帧视频图像中的目标区域的第一重叠度大于预设第一重叠度阈值,则确定该相邻两帧视频图像中的目标区域完全重叠。终端设备若检测到初始监控视频中有连续第二预设数目个相邻两帧视频图像中的目标区域完全重叠,则确定初始监控视频中至少有连续第一预设数目帧视频图像中的目标区域完全重叠。其中,当第一预设数目为偶数时,第二预设数目=第一预设数目/2;当第一预设数目为奇数时,第二预设数目=(第一预设数目+1) /2。If the terminal device detects that the first overlap degree of the target area in two adjacent frames of video images in the initial surveillance video is greater than the preset first overlap degree threshold, it determines that the target areas in the two adjacent frames of video images completely overlap. If the terminal device detects that there are a second preset number of consecutive target areas in two adjacent frames of video images completely overlapped in the initial surveillance video, it determines that there are at least a first preset number of consecutive target areas in the video image of the initial surveillance video. The areas completely overlap. Wherein, when the first preset number is an even number, the second preset number = the first preset number/2; when the first preset number is an odd number, the second preset number = (the first preset number + 1 ) /2.
终端设备若检测到某初始监控视频中至少有连续第一预设数目帧视频图像中的目标区域完全重叠,则说明有运动物体在该初始监控设备所监控的画面中停留一段时间,且停留的时长大于最大临时停车时长,此时,终端设备将该初始监控视频确定为待筛选监控视频,并对待筛选监控视频包含的连续第一预设数目帧视频图像中的目标区域进行目标识别,对目标区域进行目标识别的目的是为了识别目标区域中的物体是否是车辆。If the terminal device detects that the target area in the video image of at least the first preset number of consecutive frames in an initial surveillance video completely overlaps, it means that a moving object has stayed in the screen monitored by the initial surveillance device for a period of time, and it has stayed The duration is greater than the maximum temporary parking duration. At this time, the terminal device determines the initial surveillance video as the surveillance video to be screened, and performs target recognition on the target area in the video image of the first preset number of consecutive frames contained in the surveillance video to be screened. The purpose of area target recognition is to identify whether the object in the target area is a vehicle.
在实际应用中,终端设备可以采用基于深度学习的目标识别算法识别目标区域中的物体是否为车辆。其中,基于深度学习的目标识别算法可以是卷积神经网络算法,由于基于深度学习的目标识别算法为现有技术,因此,此处不再对基于深度学习目标识别算法的具体识别原理进行赘述。In practical applications, the terminal device can use a deep learning-based target recognition algorithm to recognize whether the object in the target area is a vehicle. Among them, the target recognition algorithm based on deep learning may be a convolutional neural network algorithm. Since the target recognition algorithm based on deep learning is an existing technology, the specific recognition principle based on the deep learning target recognition algorithm will not be repeated here.
S3:若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息。S3: If it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames included in the surveillance video to be screened is a vehicle, the surveillance video to be screened is determined as the target surveillance video, and the target The target area in the video image of the first continuous preset number of frames included in the surveillance video is determined to be a parking area, and the coordinate information of the parking area in the video image of the continuous first preset number of frames is determined.
本申请实施例中,终端设备若识别出某待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则说明该待筛选监控视频包含的连续第一预设数目帧视频图像中的目标区域为车辆可长时间停留的区域,此时,终端设备将该待筛选监控视频确定为目标监控视频,将目标监控视频对应的监控设备确定为目标监控设备,将目标监控视频包含的连续第一预设数目帧视频图像中的目标区域确定为可停车区域,并确定可停车区域在目标监控视频包含的连续第一预设数目帧视频图像中的坐标信息。In the embodiment of the present application, if the terminal device recognizes that the moving object in the target area of the video image of the first preset number of consecutive frames included in a surveillance video to be screened is a vehicle, it indicates that the surveillance video to be screened includes the continuous first preset number. Suppose the target area in the video image of the number of frames is the area where the vehicle can stay for a long time. At this time, the terminal device determines the surveillance video to be screened as the target surveillance video, and determines the surveillance equipment corresponding to the target surveillance video as the target surveillance equipment. The target area in the continuous first preset number of frames of video images included in the target surveillance video is determined to be a parkingable area, and the coordinate information of the parking area in the first continuous preset number of frames of video images included in the target surveillance video is determined.
其中,可停车区域在目标监控视频包含的连续第一预设数目帧视频图像中的坐标信息可以通过可停车区域的中心点在目标监控视频包含的连续第一预设数目帧视频图像中的坐标信息描述。具体的,由于视频图像通常为矩形,因此,终端设备可以以目标监控视频包含的连续第一预设数目帧视频图像的其中一个顶点为坐标原点,以构成该顶点的两条边为坐标轴建立坐标系,进而确定可停车区域的中心点在连续第一预设数目帧视频图像中的坐标信息。Wherein, the coordinate information of the parking area in the video image of the first preset number of consecutive frames contained in the target surveillance video can be determined by the coordinates of the center point of the parking area in the video image of the first preset number of consecutive frames contained in the target surveillance video. Information description. Specifically, since the video image is usually rectangular, the terminal device can use one of the vertices of the video image of the first preset number of consecutive frames contained in the target surveillance video as the coordinate origin, and use the two sides constituting the vertex as the coordinate axis to establish Coordinate system, and then determine the coordinate information of the center point of the parking area in the first preset number of consecutive video images.
S4:获取所述目标监控视频对应的目标监控设备的预设监控区域的信息,基于所述预设监控区域的信息及所述目标监控视频包含的可停车区域在其连续第一预设数目帧视频图像中的坐标信息,确定所述目标监控视频包含的可停车区域对应的实际停车位的信息。S4: Obtain the information of the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first preset number of frames The coordinate information in the video image determines the information of the actual parking space corresponding to the parkingable area contained in the target surveillance video.
由于终端设备确定出的可停车区域是相对于监控设备的监控画面而言的,因此,为了将其对应到实际场景中,进而确定出实际场景中的停车位,终端设备在确定出可停车区域在目标监控视频包含的连续第一预设数目帧视频图像中的坐标信息后,基于目标监控视频对应的目标监控设备的唯一身份标识,获取目标监控设备的预设监控区域信息。Since the parking area determined by the terminal device is relative to the monitoring screen of the monitoring device, in order to map it to the actual scene, and then determine the parking space in the actual scene, the terminal device is determining the parking area After the coordinate information in the video image of the first preset number of consecutive frames included in the target surveillance video, the preset surveillance area information of the target surveillance device is acquired based on the unique identity of the target surveillance device corresponding to the target surveillance video.
需要说明的是,预设监控设备的唯一身份标识与预设监控设备的预设监控区的信息预先对应存储在城市相关部门的监控数据中。终端设备可以基于目标监控设备的唯一身份标识从相关部门的监控数据库中获取目标监控设备的预设监控区域的信息。其中,目标监控设备的预设监控区域的信息通过目标监控设备所监控的街道的名称、目标监控设备在其所监控的街道上的位置信息及目标监控设备的视野范围描述。It should be noted that the unique identification of the preset monitoring device and the information of the preset monitoring area of the preset monitoring device are correspondingly stored in the monitoring data of the relevant department of the city in advance. The terminal device can obtain the information of the preset monitoring area of the target monitoring device from the monitoring database of the relevant department based on the unique identity of the target monitoring device. Among them, the information of the preset monitoring area of the target monitoring device is described by the name of the street monitored by the target monitoring device, the location information of the target monitoring device on the street monitored by the target monitoring device, and the field of view of the target monitoring device.
终端设备获取到目标监控设备的预设监控区域的信息后,基于可停车区域在连续第一预设数目帧视频图像中的坐标信息,在目标监控设备的视野范围内确定可停车区域对应的实际停车位的占地范围,并基于目标监控设备所监控的街道的名称、目标监控设备在其所监控的街道上的位置信息及可停车区域对应的实际停车位的占地范围,生成可停车区域对应的实际停车位的信息。也就是说,可停车区域对应的实际停车位的信息通过目标监控设备所监控的街道的名称、目标监控设备在其所监控的街道上的位置信息及可停车区域对应的实际停车位的占地范围描述。After the terminal device obtains the information of the preset monitoring area of the target monitoring device, based on the coordinate information of the parking area in the first preset number of consecutive video images, determine the actual parking area corresponding to the target monitoring device's field of view. The area occupied by the parking space, and based on the name of the street monitored by the target monitoring device, the location information of the target monitoring device on the street monitored by the target monitoring device, and the actual parking space corresponding to the parking area, generate a parking area The corresponding actual parking space information. That is to say, the information of the actual parking space corresponding to the parking area is through the name of the street monitored by the target monitoring device, the location information of the target monitoring device on the street monitored by the target monitoring device, and the actual parking space corresponding to the parking area. Scope description.
以上可以看出,本申请实施例提供的一种确定停车位的方法,能够基于目标监控设备采集到的监控视频自动确定出目标监控设备的监控画面对应的实际场景中的停车位的信息,便于停车管理系统对目标监控设备的监控画面对应的实际场景中的零散停车位进行统计,有利于停车管理系统在室内停车位紧缺时对零散停车位进行调度,降低了停车困难度,提高了停车效率。It can be seen from the above that the method for determining parking spaces provided by the embodiments of the present application can automatically determine the parking space information in the actual scene corresponding to the monitoring screen of the target monitoring device based on the monitoring video collected by the target monitoring device, which is convenient for The parking management system counts the scattered parking spaces in the actual scene corresponding to the monitoring screen of the target monitoring device, which is conducive to the parking management system to dispatch the scattered parking spaces when the indoor parking spaces are scarce, reducing the difficulty of parking and improving the parking efficiency .
请参阅图2,图2是本申请另一实施例提供的一种确定停车位的方法的实现流程图。本实施例在图1对应的实施例的基础上,考虑到目标监控设备的监控画面对应的实际场景中可能存在已划线的停车位,基于此,本实施例中的S3具体包括S31~S34,详述如下:Please refer to FIG. 2, which is an implementation flowchart of a method for determining a parking space provided by another embodiment of the present application. This embodiment is based on the embodiment corresponding to FIG. 1, considering that there may be a marked parking space in the actual scene corresponding to the monitoring screen of the target monitoring device. Based on this, S3 in this embodiment specifically includes S31~S34 , Detailed as follows:
S31:对所述目标监控视频包含的连续第一预设数目帧视频图像进行目标检测,检测所述目标监控视频包含的连续第一预设数目帧视频图像中是否包含预设形状的框体。S31: Perform target detection on the continuous first preset number of frames of video images included in the target surveillance video, and detect whether the first continuous frame of video images included in the target surveillance video includes a frame with a preset shape.
本实施例中,终端设备确定了目标监控视频后,对目标监控视频包含的连续第一预设数目帧视频图像进行目标检测,以检测目标监控视频包含的连续第一预设数目帧视频图像中是否包含预设形状的框体。检测目标监控视频包含的连续第一预设数目帧视频图像中是否包含预设形状的框体的目的是为了确定目标监控设备的监控画面对应的实际场景中是否存在已划线的停车位。由于已划线的停车位的轮廓通常为平行四边形,因此,本实施例中,预设形状可以设置为平行四边形。In this embodiment, after the terminal device determines the target surveillance video, it performs target detection on the continuous first preset number of frames of video images contained in the target surveillance video to detect the first preset number of consecutive frames of video images contained in the target surveillance video. Whether to include a frame with a preset shape. The purpose of detecting whether the video image of the continuous first preset number of frames included in the target surveillance video contains a frame with a preset shape is to determine whether there is a lined parking space in the actual scene corresponding to the surveillance picture of the target surveillance device. Since the outline of the lined parking space is usually a parallelogram, in this embodiment, the preset shape can be set as a parallelogram.
作为本申请一实施例,终端设备可以采用基于OpenCV算法中的边缘检测算法检测并获取视频图像中的预设形状的框体。由于基于OpenCV算法中的边缘检测算法为现有技术,因此此处不对其具体检测原理进行赘述。As an embodiment of the present application, the terminal device may use an edge detection algorithm based on the OpenCV algorithm to detect and acquire a frame with a preset shape in the video image. Since the edge detection algorithm based on the OpenCV algorithm is an existing technology, its specific detection principle will not be described here.
S32:若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度。S32: If the continuous first preset number of frames of video images included in the target surveillance video include a frame of a preset shape, calculate a second degree of overlap between the frame of the preset shape and the target area.
本实施例中,终端设备若检测出目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则说明目标监控设备的监控画面对应的实际场景中可能存在停车位,此时,为了进一步确定检测出的预设形状的框体是否确实对应实际场景中的停车位,终端设备计算预设形状的框体与目标区域的第二重叠度。In this embodiment, if the terminal device detects that the video image of the first preset number of consecutive frames included in the target surveillance video contains a frame with a preset shape, it means that there may be a parking space in the actual scene corresponding to the surveillance screen of the target surveillance device. At this time, in order to further determine whether the detected frame of the preset shape actually corresponds to the parking space in the actual scene, the terminal device calculates the second degree of overlap between the frame of the preset shape and the target area.
作为本申请一实施例,S32具体可通过如图3所示的S321~S322实现,详述如下:As an embodiment of the present application, S32 can be specifically implemented through S321 to S322 as shown in FIG. 3, and the details are as follows:
S321:若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述视频图像包含的所述预设形状的框体与所述目标区域的重叠部分的面积,以及计算所述预设形状的框体的面积与所述目标区域的面积之和;S321: If the video image of the first preset number of consecutive frames included in the target surveillance video includes a frame of a preset shape, calculate the difference between the frame of the preset shape and the target area included in the video image. The area of the overlapping part, and calculating the sum of the area of the frame of the preset shape and the area of the target area;
S322:将所述重叠部分的面积与所述面积之和的比值确定为所述预设形状的框体与所述目标区域的第二重叠度。S322: Determine the ratio of the area of the overlapping part to the sum of the areas as the second degree of overlap between the frame of the preset shape and the target area.
本实施例中,终端设备计算出预设形状的框体与目标区域的第二重叠度后,将第二重叠度与第二预设重叠度阈值进行比较。其中,第二预设重叠度阈值可根据实际需求设置,此处不做限制。In this embodiment, after the terminal device calculates the second degree of overlap between the frame of the preset shape and the target area, it compares the second degree of overlap with the second preset degree of overlap threshold. Wherein, the second preset overlap degree threshold can be set according to actual needs, and there is no limitation here.
终端设备若检测到预设形状的框体与目标区域的第二重叠度小于第二预设重叠度阈值,则执行S33;终端设备若检测到预设形状的框体与目标区域的第二重叠度大于或等于第二预设重叠度阈值,则执行S34。If the terminal device detects that the second overlap between the frame of the preset shape and the target area is less than the second preset overlap threshold, execute S33; if the terminal device detects the second overlap between the frame of the preset shape and the target area If the degree is greater than or equal to the second preset overlap degree threshold, S34 is executed.
S33:若所述第二重叠度小于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域。S33: If the second degree of overlap is less than a second preset degree of overlap threshold, determine the target area in the first preset number of consecutive frames of video images included in the target surveillance video as a parking area.
本实施例中,终端设备若检测到预设形状的框体与目标区域的第二重叠度小于第二预设重叠度阈值,则说明预设形状的框体与目标区域之间的重叠面积较小,即说明预设形状的框体在实际场景中对应的并不是已划线的停车位,此时,终端设备将目标视频包含的连续第一预设数目帧视频图像中的目标区域确定为可停车区域。In this embodiment, if the terminal device detects that the second overlap between the frame of the preset shape and the target area is less than the second preset overlap threshold, it means that the overlap area between the frame of the preset shape and the target area is relatively large. Small, which means that the frame of the preset shape corresponds to the parking space in the actual scene and is not a lined parking space. At this time, the terminal device determines the target area in the video image of the first preset number of consecutive frames contained in the target video as Parking area.
S34:若所述第二重叠度大于或等于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述预设形状的框体确定为可停车区域。S34: If the second degree of overlap is greater than or equal to the second preset degree of overlap threshold, determine the frame of the preset shape in the first preset number of consecutive frames of video images included in the target surveillance video as Parking area.
本实施例中,终端设备若检测到预设形状的框体与目标区域的第二重叠度大于或等于第二预设重叠度阈值,则说明预设形状的框体与目标区域之间的重叠面积较大,即说明预设形状的框体在实际场景中对应已划线的停车位,此时,终端设备将目标视频包含的连续第一预设数目帧视频图像中的预设形状的框体确定为可停车区域。In this embodiment, if the terminal device detects that the second overlap between the frame of the preset shape and the target area is greater than or equal to the second preset overlap threshold, it indicates the overlap between the frame of the preset shape and the target area. The area is larger, which means that the frame of the preset shape corresponds to the marked parking space in the actual scene. At this time, the terminal device converts the frame of the preset shape in the video image of the first preset number of consecutive frames contained in the target video. The body is determined as a parking area.
以上可以看出,本实施例提供的一种确定停车位的方法,在目标监控设备的监控画面对应的实际场景中有已划线的停车位时,优先将已划线的停车位对应的预设形状的框体确定为可停车区域,进而使得确定出的停车位更加准确。As can be seen from the above, in the method for determining parking spaces provided by this embodiment, when there are marked parking spaces in the actual scene corresponding to the monitoring screen of the target monitoring device, priority is given to the parking spaces corresponding to the marked parking spaces. The frame of the shape is determined as the parking area, so that the determined parking space is more accurate.
请参阅图4,图4是本申请实施例提供的一种终端设备的结构框图。本实施例中的终端设备可以是智能手机、平板电脑等终端设备。该终端设备包括的各单元用于执行图1至图3对应的实施例中的各步骤。具体请参阅图1至图3以及图1至图3所对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参见图4,终端设备400包括:框选单元41、目标识别单元42、第一确定单元43及第二确定单元44。其中:Please refer to FIG. 4, which is a structural block diagram of a terminal device according to an embodiment of the present application. The terminal device in this embodiment may be a terminal device such as a smart phone or a tablet computer. The units included in the terminal device are used to execute the steps in the embodiments corresponding to FIGS. 1 to 3. For details, please refer to related descriptions in the embodiments corresponding to FIGS. 1 to 3 and FIGS. 1 to 3. For ease of description, only the parts related to this embodiment are shown. 4, the terminal device 400 includes: a frame selection unit 41, a target recognition unit 42, a first determination unit 43, and a second determination unit 44. among them:
框选单元41用于获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,将包含运动物体的所述监控视频确定为初始监控视频,框选所述初始监控视频中包含的运动物体在其各帧视频图像中所占的目标区域。The frame selection unit 41 is used to obtain the surveillance video collected by each preset monitoring device, detect whether the surveillance video contains a moving object based on the preset moving object detection strategy, and determine the surveillance video containing the moving object as the initial surveillance video , Box select the target area occupied by the moving objects contained in the initial surveillance video in each frame of the video image.
目标识别单元42用于若所述初始监控视频中至少有连续第一预设数目帧视频图像中的所述目标区域完全重叠,则将所述初始监控视频确定为待筛选监控视频,并对所述待筛选监控视频包含的连续第一预设数目帧视频图像中的所述目标区域进行目标识别。The target recognition unit 42 is configured to determine that the initial surveillance video is the surveillance video to be screened if at least the target area in the first preset number of consecutive frames of video images completely overlap Target recognition is performed on the target area in the first predetermined number of consecutive frames of video images included in the surveillance video to be screened.
第一确定单元43用于若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息。The first determining unit 43 is configured to determine that the surveillance video to be screened is the target surveillance video if it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames included in the surveillance video to be screened is a vehicle. , Determining the target area in the continuous first preset number of frames of video images included in the target surveillance video as a parkingable area, and determining that the parkingable area is in the first continuous preset number of frames of video images The coordinate information.
第二确定单元44用于获取所述目标监控视频对应的目标监控设备的预设监控区域的信息,基于所述预设监控区域的信息及所述目标监控视频包含的可停车区域在其连续第一预设数目帧视频图像中的坐标信息,确定所述目标监控视频包含的可停车区域对应的实际停车位的信息。The second determining unit 44 is configured to obtain the information of the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first The coordinate information in the video image of a preset number of frames determines the information of the actual parking space corresponding to the parking area included in the target surveillance video.
作为本申请一实施例,第一确定单元43具体包括:目标检测单元、第一计算单元及第三确定单元。其中:As an embodiment of the present application, the first determination unit 43 specifically includes: a target detection unit, a first calculation unit, and a third determination unit. among them:
目标检测单元用于对所述目标监控视频包含的连续第一预设数目帧视频图像进行目标检测,检测所述目标监控视频包含的连续第一预设数目帧视频图像中是否包含预设形状的框体。The target detection unit is configured to perform target detection on the continuous first preset number of frames of video images included in the target surveillance video, and detect whether the first continuous preset number of frames of video images included in the target surveillance video contains a preset shape framework.
第一计算单元用于若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度。The first calculation unit is configured to calculate the frame of the preset shape and the second of the target area if the frame of the preset shape is included in the continuous first preset number of frames of the video image contained in the target surveillance video. Degree of overlap.
第三确定单元用于若所述第二重叠度小于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域。The third determining unit is configured to, if the second overlap degree is less than a second preset overlap degree threshold, determine the target area in the first preset number of consecutive video images contained in the target surveillance video as parking area.
作为本申请一实施例,终端设备400还包括第四确定单元。As an embodiment of the present application, the terminal device 400 further includes a fourth determining unit.
第四确定单元用于若所述第二重叠度大于或等于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述预设形状的框体确定为可停车区域。The fourth determining unit is configured to, if the second degree of overlap is greater than or equal to a second preset degree of overlap threshold, determine the shape of the preset shape in the continuous first preset number of frames of video images included in the target surveillance video The frame is determined as a parking area.
作为本申请一实施例,第一计算单元具体用于:As an embodiment of the present application, the first calculation unit is specifically configured to:
若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述视频图像包含的所述预设形状的框体与所述目标区域的重叠部分的面积,以及计算所述预设形状的框体的面积与所述目标区域的面积之和;If the video image of the first preset number of consecutive frames included in the target surveillance video includes a frame of a preset shape, calculate the overlap between the frame of the preset shape contained in the video image and the target area The area of, and calculating the sum of the area of the frame of the preset shape and the area of the target area;
将所述重叠部分的面积与所述面积之和的比值确定为所述预设形状的框体与所述目标区域的第二重叠度。The ratio of the area of the overlap portion to the sum of the area is determined as the second degree of overlap between the frame of the preset shape and the target area.
作为本申请一实施例,框选单元41具体包括读取单元、第一处理单元、第二处理单元、第三处理单元及第五确定单元。其中:As an embodiment of the present application, the frame selection unit 41 specifically includes a reading unit, a first processing unit, a second processing unit, a third processing unit, and a fifth determining unit. among them:
读取单元用于读取所述监控视频包含的各帧视频图像。The reading unit is used for reading each frame of video images contained in the surveillance video.
第一处理单元用于对所述监控视频包含的各帧所述视频图像分别进行平滑处理及灰度处理,得到各帧所述视频图像的灰度图像。The first processing unit is configured to perform smoothing processing and gray-scale processing on each frame of the video image included in the surveillance video, to obtain a gray-scale image of each frame of the video image.
第二处理单元用于对每相邻两帧所述视频图像的灰度图像进行差分处理,得到每相邻两帧所述视频图像对应的灰度差分图像。The second processing unit is configured to perform differential processing on the grayscale images of each two adjacent frames of the video image to obtain a grayscale difference image corresponding to each two adjacent frames of the video image.
第三处理单元用于基于预设灰度值阈值对各个所述灰度差分图像进行二值化处理,得到每相邻两帧所述视频图像对应的二值化图像。The third processing unit is configured to perform binarization processing on each of the gray-scale difference images based on a preset gray-scale value threshold to obtain a binarized image corresponding to every two adjacent frames of the video image.
第五确定单元用于基于各个所述二值化图像确定所述监控视频中是否包含运动物体。The fifth determining unit is configured to determine whether the surveillance video contains a moving object based on each of the binarized images.
以上可以看出,本实施例提供的一种终端设备,能够基于目标监控设备采集到的监控视频自动确定出目标监控设备的监控画面对应的实际场景中的停车位的信息,便于停车管理系统对目标监控设备的监控画面对应的实际场景中的零散停车位进行统计,有利于停车管理系统在室内停车位紧缺时对零散停车位进行调度,降低了停车困难度,提高了停车效率。It can be seen from the above that the terminal device provided in this embodiment can automatically determine the parking space information in the actual scene corresponding to the monitoring screen of the target monitoring device based on the monitoring video collected by the target monitoring device, which is convenient for the parking management system to check Statistics on the scattered parking spaces in the actual scene corresponding to the monitoring screen of the target monitoring device is helpful for the parking management system to dispatch the scattered parking spaces when the indoor parking spaces are in short supply, which reduces the difficulty of parking and improves the parking efficiency.
图5是本申请另一实施例提供的一种终端设备的结构框图。如图5所示,该实施例的终端设备5包括:处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机可读指令52,例如确定停车位的方法的程序。处理器50执行所述计算机可读指令52时实现上述各个确定停车位的方法各实施例中的步骤,例如图1所示的S1至S4。或者,所述处理器50执行所述计算机可读指令52时实现上述图4对应的实施例中各单元的功能,例如,图4所示的单元41至44的功能,具体请参阅图4对应的实施例中的相关描述,此处不赘述。Fig. 5 is a structural block diagram of a terminal device provided by another embodiment of the present application. As shown in FIG. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51, and computer-readable instructions 52 stored in the memory 51 and running on the processor 50, such as determining a parking space Method of the program. When the processor 50 executes the computer-readable instruction 52, the steps in the above embodiments of the method for determining a parking space are implemented, such as S1 to S4 shown in FIG. 1. Alternatively, when the processor 50 executes the computer-readable instructions 52, the functions of the units in the embodiment corresponding to FIG. 4 are implemented, for example, the functions of the units 41 to 44 shown in FIG. 4. For details, please refer to the corresponding FIG. 4 The relevant description in the embodiment of, will not be repeated here.
示例性的,所述计算机可读指令52可以被分割成一个或多个单元,所述一个或者多个单元被存储在所述存储器51中,并由所述处理器50执行,以完成本申请。所述一个或多个单元可以是能够完成特定功能的一系列计算机可读指令指令段,该指令段用于描述所述计算机可读指令52在所述终端设备5中的执行过程。例如,所述计算机可读指令52可以被分割成框选单元、目标识别单元、第一确定单元及第二确定单元,各单元具体功能如上所述。Exemplarily, the computer-readable instruction 52 may be divided into one or more units, and the one or more units are stored in the memory 51 and executed by the processor 50 to complete the present application . The one or more units may be a series of computer-readable instruction instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instruction 52 in the terminal device 5. For example, the computer-readable instruction 52 may be divided into a frame selection unit, a target recognition unit, a first determination unit, and a second determination unit, and the specific functions of each unit are as described above.
所述终端设备可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是终端设备5的示例,并不构成对终端设备5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。The terminal device may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art can understand that FIG. 5 is only an example of the terminal device 5, and does not constitute a limitation on the terminal device 5. It may include more or less components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, and the like.
所称处理器50可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 50 may be a central processing unit (Central Processing Unit, CPU), it can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器51可以是所述终端设备5的内部存储单元,例如终端设备5的硬盘或内存。所述存储器51也可以是所述终端设备5的外部存储设备,例如所述终端设备5上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括所述终端设备5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机可读指令以及所述终端设备所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) equipped on the terminal device 5. Card, Flash Card, etc. Further, the memory 51 may also include both an internal storage unit of the terminal device 5 and an external storage device. The memory 51 is used to store the computer-readable instructions and other programs and data required by the terminal device. The memory 51 can also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as required. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only used to facilitate distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中。If the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. in.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be implemented by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile computer. In a readable storage medium, when the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements 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 application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种确定停车位的方法,其特征在于,包括:A method for determining a parking space is characterized in that it includes:
    获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,将包含运动物体的所述监控视频确定为初始监控视频,框选所述初始监控视频中包含的运动物体在其各帧视频图像中所占的目标区域;Obtain the surveillance videos collected by each preset surveillance device, detect whether the surveillance video contains moving objects based on the preset moving object detection strategy, determine the surveillance video containing the moving objects as the initial surveillance video, and select the initial surveillance video. The target area occupied by the moving objects contained in the surveillance video in each frame of the video image;
    若所述初始监控视频中至少有连续第一预设数目帧视频图像中的所述目标区域完全重叠,则将所述初始监控视频确定为待筛选监控视频,并对所述待筛选监控视频包含的连续第一预设数目帧视频图像中的所述目标区域进行目标识别;If at least the target area in the video image of the first preset number of consecutive frames completely overlaps in the initial surveillance video, the initial surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened includes Performing target recognition on the target area in the first preset number of consecutive frames of video images;
    若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息;If it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames contained in the surveillance video to be screened is a vehicle, the surveillance video to be screened is determined as the target surveillance video, and the target surveillance video The target area included in the video images of the first preset number of consecutive frames is determined to be a parking area, and the coordinate information of the parking area in the video images of the first consecutive preset number of frames is determined;
    获取所述目标监控视频对应的目标监控设备的预设监控区域的信息,基于所述预设监控区域的信息及所述目标监控视频包含的可停车区域在其连续第一预设数目帧视频图像中的坐标信息,确定所述目标监控视频包含的可停车区域对应的实际停车位的信息。Obtain the information of the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first preset number of frames of video images The coordinate information in, determines the actual parking space information corresponding to the parkingable area contained in the target surveillance video.
  2. 根据权利要求1所述的确定停车位的方法,其特征在于,所述若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息,包括:The method for determining a parking space according to claim 1, wherein if it is recognized that the moving object in the target area of the first preset number of consecutive video images contained in the surveillance video to be screened is a vehicle, then The surveillance video to be screened is determined as the target surveillance video, the target area in the video image of the first preset number of consecutive frames included in the target surveillance video is determined as a parking area, and it is determined that the parking area is The coordinate information in the first preset number of consecutive frames of video images includes:
    对所述目标监控视频包含的连续第一预设数目帧视频图像进行目标检测,检测所述目标监控视频包含的连续第一预设数目帧视频图像中是否包含预设形状的框体;Performing target detection on the continuous first preset number of frames of video images included in the target surveillance video, and detecting whether the target surveillance video includes a frame with a preset shape in the continuous first preset number of frames of video images;
    若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度;If the continuous first preset number of frames of video images included in the target surveillance video include a frame of a preset shape, calculating a second degree of overlap between the frame of the preset shape and the target area;
    若所述第二重叠度小于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域。If the second degree of overlap is less than a second preset degree of overlap threshold, the target area in the first preset number of consecutive frames of video images included in the target surveillance video is determined as a parking area.
  3. 根据权利要求2所述的确定停车位的方法,其特征在于,所述若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度之后,还包括:The method for determining a parking space according to claim 2, wherein if the first predetermined number of consecutive frames of video images included in the target surveillance video include a frame with a predetermined shape, the predetermined shape is calculated. After setting the second degree of overlap between the shaped frame and the target area, the method further includes:
    若所述第二重叠度大于或等于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述预设形状的框体确定为可停车区域。If the second degree of overlap is greater than or equal to the second preset degree of overlap threshold, the frame of the preset shape in the first preset number of consecutive frames of video images included in the target surveillance video is determined to be parkingable area.
  4. 根据权利要求2所述的确定停车位的方法,其特征在于,所述若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度,包括:The method for determining a parking space according to claim 2, wherein if the first predetermined number of consecutive frames of video images included in the target surveillance video include a frame with a predetermined shape, the predetermined shape is calculated. The second degree of overlap between the frame of the shape and the target area includes:
    若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述视频图像包含的所述预设形状的框体与所述目标区域的重叠部分的面积,以及计算所述预设形状的框体的面积与所述目标区域的面积之和;If the video image of the first preset number of consecutive frames included in the target surveillance video includes a frame of a preset shape, calculate the overlap between the frame of the preset shape contained in the video image and the target area The area of, and calculating the sum of the area of the frame of the preset shape and the area of the target area;
    将所述重叠部分的面积与所述面积之和的比值确定为所述预设形状的框体与所述目标区域的第二重叠度。The ratio of the area of the overlap portion to the sum of the area is determined as the second degree of overlap between the frame of the preset shape and the target area.
  5. 根据权利要求1-4任一项所述的确定停车位的方法,其特征在于,所述获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,包括:The method for determining a parking space according to any one of claims 1-4, wherein said acquiring surveillance video collected by each preset surveillance device, and detecting whether the surveillance video is included in the surveillance video based on a preset moving object detection strategy Contains moving objects, including:
    读取所述监控视频包含的各帧视频图像;Reading each frame of video images included in the surveillance video;
    对所述监控视频包含的各帧所述视频图像分别进行平滑处理及灰度处理,得到各帧所述视频图像的灰度图像;Performing smoothing processing and gray-scale processing on each frame of the video image included in the surveillance video to obtain a gray-scale image of the video image of each frame;
    对每相邻两帧所述视频图像的灰度图像进行差分处理,得到每相邻两帧所述视频图像对应的灰度差分图像;Performing differential processing on the grayscale images of each two adjacent frames of the video image to obtain a grayscale difference image corresponding to each two adjacent frames of the video image;
    基于预设灰度值阈值对各个所述灰度差分图像进行二值化处理,得到每相邻两帧所述视频图像对应的二值化图像;Performing binarization processing on each of the gray-level difference images based on a preset gray-level value threshold to obtain a binarized image corresponding to each two adjacent frames of the video image;
    基于各个所述二值化图像确定所述监控视频中是否包含运动物体。Determine whether the surveillance video contains a moving object based on each of the binarized images.
  6. 一种终端设备,其特征在于,包括:A terminal device, characterized in that it comprises:
    框选单元,用于获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,将包含运动物体的所述监控视频确定为初始监控视频,框选所述初始监控视频中包含的运动物体在其各帧视频图像中所占的目标区域;The frame selection unit is used to obtain the surveillance video collected by each preset monitoring device, detect whether the surveillance video contains a moving object based on the preset moving object detection strategy, and determine the surveillance video containing the moving object as the initial surveillance video , Box select the target area occupied by the moving objects contained in the initial surveillance video in each frame of the video image;
    目标识别单元,用于若所述初始监控视频中至少有连续第一预设数目帧视频图像中的所述目标区域完全重叠,则将所述初始监控视频确定为待筛选监控视频,并对所述待筛选监控视频包含的连续第一预设数目帧视频图像中的所述目标区域进行目标识别;The target recognition unit is configured to determine that the initial surveillance video is the surveillance video to be screened if at least the target area in the first preset number of consecutive frames of video images completely overlap Performing target recognition on the target area in the first preset number of consecutive frames of video images included in the surveillance video to be screened;
    第一确定单元,用于若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息;The first determining unit is configured to determine that the surveillance video to be screened is the target surveillance video if it is identified that the moving object in the target area of the video image of the first preset number of consecutive frames included in the surveillance video to be screened is a vehicle. , Determining the target area in the continuous first preset number of frames of video images included in the target surveillance video as a parkingable area, and determining that the parkingable area is in the first continuous preset number of frames of video images Coordinate information;
    第二确定单元,用于获取所述目标监控视频对应的目标监控设备的预设监控区域的信息,基于所述预设监控区域的信息及所述目标监控视频包含的可停车区域在其连续第一预设数目帧视频图像中的坐标信息,确定所述目标监控视频包含的可停车区域对应的实际停车位的信息。The second determining unit is configured to obtain information about the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first The coordinate information in the video image of a preset number of frames determines the information of the actual parking space corresponding to the parking area included in the target surveillance video.
  7. 根据权利要求6所述的终端设备,其特征在于,所述第一确定单元包括:The terminal device according to claim 6, wherein the first determining unit comprises:
    目标检测单元,用于对所述目标监控视频包含的连续第一预设数目帧视频图像进行目标检测,检测所述目标监控视频包含的连续第一预设数目帧视频图像中是否包含预设形状的框体;The target detection unit is configured to perform target detection on the continuous first preset number of frames of video images included in the target surveillance video, and detect whether the first continuous preset number of frames of video images included in the target surveillance video contains a preset shape The frame;
    第一计算单元,用于若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度;The first calculating unit is configured to calculate the frame of the preset shape and the first of the target area if the frame of the preset shape is included in the video image of the first preset number of consecutive frames included in the target surveillance video. Two degree of overlap
    第三确定单元,用于若所述第二重叠度小于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域。The third determining unit is configured to determine, if the second overlap degree is less than a second preset overlap degree threshold, that the target area in the first preset number of consecutive video images included in the target surveillance video is available Parking area.
  8. 根据权利要求7所述的终端设备,其特征在于,所述终端设备还包括:The terminal device according to claim 7, wherein the terminal device further comprises:
    第四确定单元,用于若所述第二重叠度大于或等于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述预设形状的框体确定为可停车区域。The fourth determining unit is configured to, if the second overlap degree is greater than or equal to a second preset overlap degree threshold, combine the preset shape in the first preset number of consecutive video images contained in the target surveillance video The frame of is determined as a parking area.
  9. 根据权利要求7所述的终端设备,其特征在于,所述第一计算单元具体用于:The terminal device according to claim 7, wherein the first calculation unit is specifically configured to:
    若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述视频图像包含的所述预设形状的框体与所述目标区域的重叠部分的面积,以及计算所述预设形状的框体的面积与所述目标区域的面积之和;If the video image of the first preset number of consecutive frames included in the target surveillance video includes a frame of a preset shape, calculate the overlap between the frame of the preset shape contained in the video image and the target area The area of, and calculating the sum of the area of the frame of the preset shape and the area of the target area;
    将所述重叠部分的面积与所述面积之和的比值确定为所述预设形状的框体与所述目标区域的第二重叠度。The ratio of the area of the overlap portion to the sum of the area is determined as the second degree of overlap between the frame of the preset shape and the target area.
  10. 根据权利要求6-9任一项所述的终端设备,其特征在于,所述框选单元包括:The terminal device according to any one of claims 6-9, wherein the frame selection unit comprises:
    读取单元,用于读取所述监控视频包含的各帧视频图像;A reading unit for reading each frame of video images included in the surveillance video;
    第一处理单元,用于对所述监控视频包含的各帧所述视频图像分别进行平滑处理及灰度处理,得到各帧所述视频图像的灰度图像;The first processing unit is configured to perform smoothing processing and gray-scale processing on each frame of the video image included in the surveillance video to obtain a gray-scale image of each frame of the video image;
    第二处理单元,用于对每相邻两帧所述视频图像的灰度图像进行差分处理,得到每相邻两帧所述视频图像对应的灰度差分图像;The second processing unit is configured to perform differential processing on the grayscale image of each two adjacent frames of the video image to obtain a grayscale difference image corresponding to each two adjacent frames of the video image;
    第三处理单元,用于基于预设灰度值阈值对各个所述灰度差分图像进行二值化处理,得到每相邻两帧所述视频图像对应的二值化图像;The third processing unit is configured to perform binarization processing on each of the gray-scale difference images based on a preset gray-scale value threshold to obtain a binarized image corresponding to each two adjacent frames of the video image;
    第五确定单元,用于基于各个所述二值化图像确定所述监控视频中是否包含运动物体。The fifth determining unit is configured to determine whether the surveillance video contains a moving object based on each of the binarized images.
  11. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:A terminal device, comprising a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, wherein the processor executes the computer-readable instructions as follows step:
    获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,将包含运动物体的所述监控视频确定为初始监控视频,框选所述初始监控视频中包含的运动物体在其各帧视频图像中所占的目标区域;Obtain the surveillance videos collected by each preset surveillance device, detect whether the surveillance video contains moving objects based on the preset moving object detection strategy, determine the surveillance video containing the moving objects as the initial surveillance video, and select the initial surveillance video. The target area occupied by the moving objects contained in the surveillance video in each frame of the video image;
    若所述初始监控视频中至少有连续第一预设数目帧视频图像中的所述目标区域完全重叠,则将所述初始监控视频确定为待筛选监控视频,并对所述待筛选监控视频包含的连续第一预设数目帧视频图像中的所述目标区域进行目标识别;If at least the target area in the video image of the first preset number of consecutive frames completely overlaps in the initial surveillance video, the initial surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened includes Performing target recognition on the target area in the first preset number of consecutive frames of video images;
    若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息;If it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames contained in the surveillance video to be screened is a vehicle, the surveillance video to be screened is determined as the target surveillance video, and the target surveillance video The target area included in the video images of the first preset number of consecutive frames is determined to be a parking area, and the coordinate information of the parking area in the video images of the first consecutive preset number of frames is determined;
    获取所述目标监控视频对应的目标监控设备的预设监控区域的信息,基于所述预设监控区域的信息及所述目标监控视频包含的可停车区域在其连续第一预设数目帧视频图像中的坐标信息,确定所述目标监控视频包含的可停车区域对应的实际停车位的信息。Obtain the information of the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first preset number of frames of video images The coordinate information in, determines the actual parking space information corresponding to the parkingable area contained in the target surveillance video.
  12. 根据权利要求11所述的终端设备,其特征在于,所述若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息,包括:The terminal device according to claim 11, wherein if it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames contained in the surveillance video to be screened is a vehicle, then the The surveillance video to be screened is determined to be the target surveillance video, the target area in the continuous first preset number of frames of video images contained in the target surveillance video is determined to be a parking area, and it is determined that the parking area is in the continuous The coordinate information in the video image of the first preset number of frames includes:
    对所述目标监控视频包含的连续第一预设数目帧视频图像进行目标检测,检测所述目标监控视频包含的连续第一预设数目帧视频图像中是否包含预设形状的框体;Performing target detection on the continuous first preset number of frames of video images included in the target surveillance video, and detecting whether the target surveillance video includes a frame with a preset shape in the continuous first preset number of frames of video images;
    若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度;If the continuous first preset number of frames of video images included in the target surveillance video include a frame of a preset shape, calculating a second degree of overlap between the frame of the preset shape and the target area;
    若所述第二重叠度小于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域。If the second degree of overlap is less than a second preset degree of overlap threshold, the target area in the first preset number of consecutive frames of video images included in the target surveillance video is determined as a parking area.
  13. 根据权利要求12所述的终端设备,其特征在于,所述若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度之后,还包括:The terminal device according to claim 12, wherein if the video image of the first preset number of consecutive frames included in the target surveillance video contains a frame with a preset shape, then calculating the frame of the preset shape After the second degree of overlap between the frame and the target area, the method further includes:
    若所述第二重叠度大于或等于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述预设形状的框体确定为可停车区域。If the second degree of overlap is greater than or equal to the second preset degree of overlap threshold, the frame of the preset shape in the first preset number of consecutive frames of video images included in the target surveillance video is determined to be parkingable area.
  14. 根据权利要求12所述的终端设备,其特征在于,所述若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度,包括:The terminal device according to claim 12, wherein, if the video image of the first preset number of consecutive frames included in the target surveillance video contains a frame with a preset shape, then calculating the frame of the preset shape The second degree of overlap between the frame and the target area includes:
    若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述视频图像包含的所述预设形状的框体与所述目标区域的重叠部分的面积,以及计算所述预设形状的框体的面积与所述目标区域的面积之和;If the video image of the first preset number of consecutive frames included in the target surveillance video includes a frame of a preset shape, calculate the overlap between the frame of the preset shape contained in the video image and the target area The area of, and calculating the sum of the area of the frame of the preset shape and the area of the target area;
    将所述重叠部分的面积与所述面积之和的比值确定为所述预设形状的框体与所述目标区域的第二重叠度。The ratio of the area of the overlap portion to the sum of the area is determined as the second degree of overlap between the frame of the preset shape and the target area.
  15. 根据权利要求11-14任一项所述的终端设备,其特征在于,所述获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,包括:The terminal device according to any one of claims 11-14, wherein the acquiring surveillance video collected by each preset surveillance device, and detecting whether the surveillance video contains a moving object based on a preset moving object detection strategy ,include:
    读取所述监控视频包含的各帧视频图像;Reading each frame of video images included in the surveillance video;
    对所述监控视频包含的各帧所述视频图像分别进行平滑处理及灰度处理,得到各帧所述视频图像的灰度图像;Performing smoothing processing and gray-scale processing on each frame of the video image included in the surveillance video to obtain a gray-scale image of the video image of each frame;
    对每相邻两帧所述视频图像的灰度图像进行差分处理,得到每相邻两帧所述视频图像对应的灰度差分图像;Performing differential processing on the grayscale images of each two adjacent frames of the video image to obtain a grayscale difference image corresponding to each two adjacent frames of the video image;
    基于预设灰度值阈值对各个所述灰度差分图像进行二值化处理,得到每相邻两帧所述视频图像对应的二值化图像;Performing binarization processing on each of the gray-level difference images based on a preset gray-level value threshold to obtain a binarized image corresponding to each two adjacent frames of the video image;
    基于各个所述二值化图像确定所述监控视频中是否包含运动物体。Determine whether the surveillance video contains a moving object based on each of the binarized images.
  16. 一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:A computer non-volatile readable storage medium, the computer non-volatile readable storage medium storing computer readable instructions, wherein the computer readable instructions are executed by a processor to implement the following steps:
    获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,将包含运动物体的所述监控视频确定为初始监控视频,框选所述初始监控视频中包含的运动物体在其各帧视频图像中所占的目标区域;Obtain the surveillance videos collected by each preset surveillance device, detect whether the surveillance video contains moving objects based on the preset moving object detection strategy, determine the surveillance video containing the moving objects as the initial surveillance video, and select the initial surveillance video. The target area occupied by the moving objects contained in the surveillance video in each frame of the video image;
    若所述初始监控视频中至少有连续第一预设数目帧视频图像中的所述目标区域完全重叠,则将所述初始监控视频确定为待筛选监控视频,并对所述待筛选监控视频包含的连续第一预设数目帧视频图像中的所述目标区域进行目标识别;If at least the target area in the video image of the first preset number of consecutive frames completely overlaps in the initial surveillance video, the initial surveillance video is determined to be the surveillance video to be screened, and the surveillance video to be screened includes Performing target recognition on the target area in the first preset number of consecutive frames of video images;
    若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息;If it is recognized that the moving object in the target area of the video image of the first preset number of consecutive frames contained in the surveillance video to be screened is a vehicle, the surveillance video to be screened is determined as the target surveillance video, and the target surveillance video The target area included in the video images of the first preset number of consecutive frames is determined to be a parking area, and the coordinate information of the parking area in the video images of the first consecutive preset number of frames is determined;
    获取所述目标监控视频对应的目标监控设备的预设监控区域的信息,基于所述预设监控区域的信息及所述目标监控视频包含的可停车区域在其连续第一预设数目帧视频图像中的坐标信息,确定所述目标监控视频包含的可停车区域对应的实际停车位的信息。Obtain the information of the preset monitoring area of the target monitoring device corresponding to the target monitoring video, based on the information of the preset monitoring area and the parking area included in the target monitoring video in its continuous first preset number of frames of video images The coordinate information in, determines the actual parking space information corresponding to the parkingable area contained in the target surveillance video.
  17. 根据权利要求16所述的计算机非易失性可读存储介质,其特征在于,所述若识别出所述待筛选监控视频包含的连续第一预设数目帧视频图像的目标区域中的运动物体为车辆,则将所述待筛选监控视频确定为目标监控视频,将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域,并确定所述可停车区域在所述连续第一预设数目帧视频图像中的坐标信息,包括:The computer non-volatile readable storage medium according to claim 16, wherein if a moving object in the target area of the video image of the first preset number of consecutive frames contained in the surveillance video to be screened is identified Is a vehicle, the surveillance video to be screened is determined as the target surveillance video, the target area in the first preset number of consecutive video images contained in the target surveillance video is determined as a parkingable area, and the The coordinate information of the parking area in the video image of the first predetermined number of consecutive frames includes:
    对所述目标监控视频包含的连续第一预设数目帧视频图像进行目标检测,检测所述目标监控视频包含的连续第一预设数目帧视频图像中是否包含预设形状的框体;Performing target detection on the continuous first preset number of frames of video images included in the target surveillance video, and detecting whether the target surveillance video includes a frame with a preset shape in the continuous first preset number of frames of video images;
    若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度;If the continuous first preset number of frames of video images included in the target surveillance video include a frame of a preset shape, calculating a second degree of overlap between the frame of the preset shape and the target area;
    若所述第二重叠度小于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述目标区域确定为可停车区域。If the second degree of overlap is less than a second preset degree of overlap threshold, the target area in the first preset number of consecutive frames of video images included in the target surveillance video is determined as a parking area.
  18. 根据权利要求17所述的计算机非易失性可读存储介质,其特征在于,所述若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度之后,还包括:The computer non-volatile readable storage medium according to claim 17, wherein if said target surveillance video contains a frame with a preset shape in a first predetermined number of consecutive frames of video images, After calculating the second degree of overlap between the frame of the preset shape and the target area, the method further includes:
    若所述第二重叠度大于或等于第二预设重叠度阈值,则将所述目标监控视频包含的连续第一预设数目帧视频图像中的所述预设形状的框体确定为可停车区域。If the second degree of overlap is greater than or equal to the second preset degree of overlap threshold, the frame of the preset shape in the first preset number of consecutive frames of video images included in the target surveillance video is determined to be parkingable area.
  19. 根据权利要求17所述的计算机非易失性可读存储介质,其特征在于,所述若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述预设形状的框体与所述目标区域的第二重叠度,包括:The computer non-volatile readable storage medium according to claim 17, wherein if said target surveillance video contains a frame with a preset shape in a first predetermined number of consecutive frames of video images, Calculating the second degree of overlap between the frame of the preset shape and the target area includes:
    若所述目标监控视频包含的连续第一预设数目帧视频图像中包含预设形状的框体,则计算所述视频图像包含的所述预设形状的框体与所述目标区域的重叠部分的面积,以及计算所述预设形状的框体的面积与所述目标区域的面积之和;If the video image of the first preset number of consecutive frames included in the target surveillance video includes a frame of a preset shape, calculate the overlap between the frame of the preset shape contained in the video image and the target area The area of, and calculating the sum of the area of the frame of the preset shape and the area of the target area;
    将所述重叠部分的面积与所述面积之和的比值确定为所述预设形状的框体与所述目标区域的第二重叠度。The ratio of the area of the overlap portion to the sum of the area is determined as the second degree of overlap between the frame of the preset shape and the target area.
  20. 根据权利要求16-19任一项所述的计算机非易失性可读存储介质,其特征在于,所述获取各个预设监控设备采集到的监控视频,基于预设运动物体检测策略检测所述监控视频中是否包含运动物体,包括:The computer non-volatile readable storage medium according to any one of claims 16-19, wherein said acquiring monitoring video collected by each preset monitoring device is detecting the monitoring video based on a preset moving object detection strategy. Whether the surveillance video contains moving objects, including:
    读取所述监控视频包含的各帧视频图像;Reading each frame of video images included in the surveillance video;
    对所述监控视频包含的各帧所述视频图像分别进行平滑处理及灰度处理,得到各帧所述视频图像的灰度图像;Performing smoothing processing and gray-scale processing on each frame of the video image included in the surveillance video to obtain a gray-scale image of the video image of each frame;
    对每相邻两帧所述视频图像的灰度图像进行差分处理,得到每相邻两帧所述视频图像对应的灰度差分图像;Performing differential processing on the grayscale images of each two adjacent frames of the video image to obtain a grayscale difference image corresponding to each two adjacent frames of the video image;
    基于预设灰度值阈值对各个所述灰度差分图像进行二值化处理,得到每相邻两帧所述视频图像对应的二值化图像;Performing binarization processing on each of the gray-level difference images based on a preset gray-level value threshold to obtain a binarized image corresponding to each two adjacent frames of the video image;
    基于各个所述二值化图像确定所述监控视频中是否包含运动物体。Determine whether the surveillance video contains a moving object based on each of the binarized images.
PCT/CN2019/118689 2019-09-16 2019-11-15 Parking space determination method, terminal device and computer readable storage medium WO2021051621A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910872304.X 2019-09-16
CN201910872304.XA CN110533955B (en) 2019-09-16 2019-09-16 Method for determining parking space, terminal equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2021051621A1 true WO2021051621A1 (en) 2021-03-25

Family

ID=68668758

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118689 WO2021051621A1 (en) 2019-09-16 2019-11-15 Parking space determination method, terminal device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110533955B (en)
WO (1) WO2021051621A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950819A (en) * 2021-05-14 2021-06-11 北京旗偲智能科技有限公司 Vehicle unlocking control method and device, server and storage medium
CN113450575A (en) * 2021-05-31 2021-09-28 超级视线科技有限公司 Management method and device for roadside parking
CN114664096A (en) * 2022-03-24 2022-06-24 北京四象网讯科技有限公司 Monitoring video processing method and device for parking lot
CN115145451A (en) * 2022-06-28 2022-10-04 网易(杭州)网络有限公司 Method, device, equipment and storage medium for frame selection on terminal equipment
CN117237854A (en) * 2023-10-31 2023-12-15 武汉无线飞翔科技有限公司 Parking space distribution method, system, equipment and storage medium based on video identification

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147763B (en) * 2019-12-29 2022-03-01 眸芯科技(上海)有限公司 Image processing method based on gray value and application
CN114332826B (en) * 2022-03-10 2022-07-08 浙江大华技术股份有限公司 Vehicle image recognition method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463913A (en) * 2014-12-25 2015-03-25 天津艾思科尔科技有限公司 Intelligent illegal parking detection device and method
US20150199814A1 (en) * 2011-05-16 2015-07-16 Sony Corporation Device for determining disappearing direction and method thereof, apparatus for video camera calibration and method thereof
US20170109892A1 (en) * 2015-10-14 2017-04-20 Fujitsu Limited Method and apparatus for detecting a traffic state and electronic equipment
CN106846357A (en) * 2016-12-15 2017-06-13 重庆凯泽科技股份有限公司 A kind of suspicious object detecting method and device
CN109559519A (en) * 2018-12-18 2019-04-02 广东中安金狮科创有限公司 Monitoring device and its parking offense detection method, device, readable storage medium storing program for executing
CN109726637A (en) * 2018-12-03 2019-05-07 初速度(苏州)科技有限公司 The parking site detecting system and method in parking stall region are indicated with resilient polygonal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015205855A1 (en) * 2015-04-01 2016-10-06 Bayerische Motoren Werke Aktiengesellschaft Method and system for automatic detection of parking zones
CN106652551B (en) * 2016-12-16 2021-03-09 浙江宇视科技有限公司 Parking space detection method and equipment
CN106878674B (en) * 2017-01-10 2019-08-30 哈尔滨工业大学深圳研究生院 A kind of parking detection method and device based on monitor video

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150199814A1 (en) * 2011-05-16 2015-07-16 Sony Corporation Device for determining disappearing direction and method thereof, apparatus for video camera calibration and method thereof
CN104463913A (en) * 2014-12-25 2015-03-25 天津艾思科尔科技有限公司 Intelligent illegal parking detection device and method
US20170109892A1 (en) * 2015-10-14 2017-04-20 Fujitsu Limited Method and apparatus for detecting a traffic state and electronic equipment
CN106846357A (en) * 2016-12-15 2017-06-13 重庆凯泽科技股份有限公司 A kind of suspicious object detecting method and device
CN109726637A (en) * 2018-12-03 2019-05-07 初速度(苏州)科技有限公司 The parking site detecting system and method in parking stall region are indicated with resilient polygonal
CN109559519A (en) * 2018-12-18 2019-04-02 广东中安金狮科创有限公司 Monitoring device and its parking offense detection method, device, readable storage medium storing program for executing

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950819A (en) * 2021-05-14 2021-06-11 北京旗偲智能科技有限公司 Vehicle unlocking control method and device, server and storage medium
CN113450575A (en) * 2021-05-31 2021-09-28 超级视线科技有限公司 Management method and device for roadside parking
CN114664096A (en) * 2022-03-24 2022-06-24 北京四象网讯科技有限公司 Monitoring video processing method and device for parking lot
CN114664096B (en) * 2022-03-24 2023-04-28 北京四象网讯科技有限公司 Method and device for processing monitoring video of parking lot
CN115145451A (en) * 2022-06-28 2022-10-04 网易(杭州)网络有限公司 Method, device, equipment and storage medium for frame selection on terminal equipment
CN117237854A (en) * 2023-10-31 2023-12-15 武汉无线飞翔科技有限公司 Parking space distribution method, system, equipment and storage medium based on video identification
CN117237854B (en) * 2023-10-31 2024-03-19 武汉无线飞翔科技有限公司 Parking space distribution method, system, equipment and storage medium based on video identification

Also Published As

Publication number Publication date
CN110533955A (en) 2019-12-03
CN110533955B (en) 2022-12-09

Similar Documents

Publication Publication Date Title
WO2021051621A1 (en) Parking space determination method, terminal device and computer readable storage medium
JP6488083B2 (en) Hybrid method and system of video and vision based access control for parking space occupancy determination
WO2019223586A1 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
WO2021051601A1 (en) Method and system for selecting detection box using mask r-cnn, and electronic device and storage medium
CN109584300B (en) Method and device for determining heading angle of vehicle head
CN108647587B (en) People counting method, device, terminal and storage medium
CN112419202B (en) Automatic wild animal image recognition system based on big data and deep learning
CN112991349B (en) Image processing method, device, equipment and storage medium
CN114067431A (en) Image processing method, image processing device, computer equipment and storage medium
CN114708291A (en) Image processing method, image processing device, electronic equipment and storage medium
Santos et al. Car recognition based on back lights and rear view features
CN114494994A (en) Vehicle abnormal aggregation monitoring method and device, computer equipment and storage medium
He et al. A double-region learning algorithm for counting the number of pedestrians in subway surveillance videos
CN112784494A (en) Training method of false positive recognition model, target recognition method and device
CN110516559B (en) Target tracking method and device suitable for accurate monitoring and computer equipment
CN112991397B (en) Traffic sign tracking method, apparatus, device and storage medium
CN113052058B (en) Vehicle-mounted passenger flow statistical method and device and storage medium
US11481881B2 (en) Adaptive video subsampling for energy efficient object detection
CN113947795A (en) Mask wearing detection method, device, equipment and storage medium
CN111783676A (en) Intelligent urban road video continuous covering method based on key area perception
CN112634141A (en) License plate correction method, device, equipment and medium
CN110264491A (en) Passenger flow statistical method, device, computer equipment and readable storage medium storing program for executing
CN112347853A (en) License plate data desensitization method based on video, storage medium and server
CN114943954B (en) Parking space detection method, device and system
CN113052190B (en) Visual auxiliary system and method based on image processing

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: 19945901

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19945901

Country of ref document: EP

Kind code of ref document: A1