CN113096394A - Method and device for determining object of target type, storage medium and electronic device - Google Patents
Method and device for determining object of target type, storage medium and electronic device Download PDFInfo
- Publication number
- CN113096394A CN113096394A CN202110336712.0A CN202110336712A CN113096394A CN 113096394 A CN113096394 A CN 113096394A CN 202110336712 A CN202110336712 A CN 202110336712A CN 113096394 A CN113096394 A CN 113096394A
- Authority
- CN
- China
- Prior art keywords
- target
- time
- determining
- stay
- image information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000001514 detection method Methods 0.000 claims description 47
- 238000004590 computer program Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 9
- 238000005516 engineering process Methods 0.000 abstract description 9
- 230000005540 biological transmission Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000008034 disappearance Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000009191 jumping Effects 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 206010039203 Road traffic accident Diseases 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- AYFVYJQAPQTCCC-GBXIJSLDSA-N L-threonine Chemical compound C[C@@H](O)[C@H](N)C(O)=O AYFVYJQAPQTCCC-GBXIJSLDSA-N 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/017—Detecting movement of traffic to be counted or controlled identifying vehicles
- G08G1/0175—Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0108—Measuring and analyzing of parameters relative to traffic conditions based on the source of data
- G08G1/0116—Measuring and analyzing of parameters relative to traffic conditions based on the source of data from roadside infrastructure, e.g. beacons
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0137—Measuring and analyzing of parameters relative to traffic conditions for specific applications
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the invention provides a method, a device, a storage medium and an electronic device for determining an object of a target type, wherein the method comprises the following steps: acquiring first image information obtained by shooting a target area by a camera device; determining a first duration for which the first object dwells in a stay-prohibited region included in the target region based on the first image information; determining a target stay time length of the first object based on the first time length and a second time length in which the second object stays in the stay-prohibited region in a case where the first time length is larger than a first threshold and it is determined that a second object identical to the first object exists in the target storage region; and under the condition that the target stay time is larger than a second threshold, determining that the first object is the object of the target type. The method and the device solve the problem of low accuracy rate of determining the target type of the object in the related technology, and improve the accuracy rate of determining the target type of the object.
Description
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a method and a device for determining a target type object, a storage medium and an electronic device.
Background
With the rapid development of infrastructure, a large number of highways, urban expressways, viaducts, tunnels, sea-crossing bridges and the like have been built in various regions, and huge demands for the management of traffic scenes and the operation and maintenance of roads are presented. In addition, in recent years, with rapid economic development, the quantity of motor vehicles kept is greatly increased, so that the probability of traffic accidents caused by motor vehicles parking against regulations under the scenes of expressways, expressways and the like is greatly increased. Therefore, the application of the current vision-based technology to detect the illegal parking of the vehicle, timely reduce the occurrence of accidents and protect the life and property safety of people is very important.
In the related technology, the vision technology is to detect whether the motor vehicle stays in a certain area for too long time through a multi-target detection and tracking technology, and judge whether the motor vehicle stops. However, traffic incident scenes are complex, for example, vehicles traveling on highways include cars, vans, and the like; the depth of field of the video is large, and the distance of reality is usually 300 meters to 800 meters. Due to the complex scenes, some vehicle targets in the video are shielded, and in the detection tracking technology, the targets are considered to be driven away from the video area, so that the illegal parking targets are missed.
Therefore, the related art has the problem that the accuracy rate of determining the target type of the object is low.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining an object of a target type, a storage medium and an electronic device, which are used for at least solving the problem of low accuracy rate of determining the target type of the object in the related art.
According to an embodiment of the present invention, there is provided a method of determining an object of a target type, including: acquiring first image information obtained by shooting a target area by a camera device, wherein the first image information comprises a plurality of frames of images, and each frame of image in the plurality of frames of images comprises a first object; determining a first length of time for which the first object dwells in a no-dwell region included in the target region based on the first image information; determining a target stay time length of the first object based on the first time length and a second time length for the second object to stay in the stay-prohibited area in a case that the first time length is larger than a first threshold and it is determined that a second object identical to the first object exists in a target storage area, wherein stay information and identification information of objects having stay time lengths exceeding the first threshold in the stay-prohibited area are stored in the target storage area, and the identification information of the first object is different from the identification information of the second object; and under the condition that the target stay time is larger than a second threshold, determining that the first object is an object of a target type.
According to another embodiment of the present invention, there is provided an apparatus for determining an object of a target type, including: the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring first image information obtained by shooting a target area by a shooting device, the first image information comprises a plurality of frames of images, and each frame of image in the plurality of frames of images comprises a first object; a first determination module configured to determine, based on the first image information, a first length of time for which the first object dwells in a no-dwell region included in the target region; a second determining module, configured to, when the first duration is greater than a first threshold and it is determined that a second object that is the same as the first object exists in a target storage area, determine a target stay duration of the first object based on the first duration and a second duration for which the second object stays in the stay-prohibited area, where stay information and identification information of an object whose stay duration in the stay-prohibited area exceeds the first threshold are stored in the target storage area, and the identification information of the first object is different from the identification information of the second object; and the third determining module is used for determining that the first object is the object of the target type under the condition that the target stay time is greater than a second threshold.
According to yet another embodiment of the invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the method and the device, the first image information obtained by shooting the target area by the camera equipment is obtained, the first time length for the first object to stay in the stay-prohibited area included in the target area is determined according to the first image information, under the condition that the first time length is larger than a first threshold value and a second object which is the same as the first object exists in the target storage area, the target stay time length of the first object is determined according to the first time length and the second time length of the second object in the stay-prohibited area, and under the condition that the target stay time length is larger than a second threshold value, the first object is determined to be the object of the target type. Under the condition that the first time length of the first object staying in the stay-prohibited area is larger than the first threshold, the second time length of a second object which is the same as the first object and exists in the target storage area and stays in the stay-prohibited area is determined, the target time length of the first object is determined according to the first time length and the second time length, and the problem that the target type of the object is determined inaccurately due to the fact that the stay time length of the object is inaccurate due to the fact that the object is shielded can be solved.
Drawings
Fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a method for determining a target type object according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a method of determining a target type of object according to an embodiment of the invention;
FIG. 3 is a flowchart of a method for determining a target type of object, in accordance with a specific embodiment of the present invention;
fig. 4 is a block diagram of a device for determining an object of a target type according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the example of the application in a mobile terminal, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a method for determining an object of a target type according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used for storing computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the method for determining the target type object in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a method for determining an object of a target type is provided, and fig. 2 is a flowchart of a method for determining an object of a target type according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, acquiring first image information obtained by shooting a target area by a shooting device, wherein the first image information comprises a plurality of frames of images, and each frame of image in the plurality of frames of images comprises a first object;
step S204, determining a first time length for the first object to stay in a stay-prohibited area included in the target area based on the first image information;
step S206, in the case that the first duration is greater than a first threshold value and a second object identical to the first object exists in a target storage area, determining a target stay duration of the first object based on the first duration and a second duration for the second object to stay in the stay-prohibited area, wherein stay information and identification information of objects whose stay duration in the stay-prohibited area exceeds the first threshold value are stored in the target storage area, and the identification information of the first object is different from the identification information of the second object;
step S208, determining that the first object is an object of the target type when the target staying time is greater than a second threshold.
In the above embodiments, the first object may be a vehicle, a person, an article, or the like, and the image pickup apparatus may be a traffic probe, a monitoring apparatus, or other image pickup apparatus. The target area may be a field of view area of the image pickup apparatus including a stay-prohibited area therein. When the first object is a vehicle, the no-stay area may be a no-parking area.
In the above-described embodiment, when the image pickup apparatus recognizes that an object enters the target area, an ID may be assigned to each object, and when the object satisfies the condition of being stored in the target storage area, a new node may be established in the target storage space for storing stay information of the object for the ID assigned to the object. In the field of vision, multi-target detection and tracking techniques assign a different number to each corresponding target of an image, theoretically each target having a unique ID number. The stay information may include a time when the target object enters the no-stay area for the first time, a time when the target object disappears in the no-stay area, that is, a time when the target object leaves the no-stay area, a time length of stay, and a stay position of the target object in the no-stay area. The staying position and the staying duration can be updated in real time according to the image information acquired in real time. The target storage area may be a data link table or other storage.
In the above embodiment, the video image of the target area may be obtained in real time by the camera device, and a video image coordinate system may be established, for example, with the upper left corner of the video image as the origin, the positive direction of the X axis from the upper left corner to the upper right corner, and the positive direction of the Y axis from the upper left corner to the lower left corner; and drawing a ParkingRect of the illegal parking area corresponding to the video image in the monitoring video. And a parking time threshold parkingthree (corresponding to the above-mentioned first threshold) is set. If a motor vehicle target breaks into the drawing area and the parking time in the area exceeds a parkingThree (unit: second) value, reporting the target; if a motor vehicle target enters the drawing area and the parking time in the area exceeds a ParkingThre (unit: second) value, the target is reported. And determining whether a second object which is the same as the first object is included in the target storage area according to the reported result, determining a second time length for the second object to stay in the stay-forbidden area under the condition that the second object exists, determining the target stay time length of the first object according to the first time length and the second time length, and determining the first object as the object of the target type under the condition that the target stay time length is greater than a second threshold value. Wherein the target type may be a violation parking type. After the first object is determined to be the object of the target type, an alarm operation can be executed, and the stay information of the first object is obtained and reported and recorded. The first threshold and the second threshold may be preset thresholds, and the first threshold is smaller than the second threshold, for example, the first threshold may be 2s, and the second threshold may be 5s, or the first threshold may be 3s, and the second threshold may be 4s, and the like.
Optionally, the main body of the above steps may be a background processor, or other devices with similar processing capabilities, and may also be a machine integrated with at least an image acquisition device and a data processing device, where the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a terminal such as a computer and a mobile phone, but is not limited thereto.
According to the method and the device, the first image information obtained by shooting the target area by the camera equipment is obtained, the first time length for the first object to stay in the stay-prohibited area included in the target area is determined according to the first image information, under the condition that the first time length is larger than a first threshold value and a second object which is the same as the first object exists in the target storage area, the target stay time length of the first object is determined according to the first time length and the second time length of the second object in the stay-prohibited area, and under the condition that the target stay time length is larger than a second threshold value, the first object is determined to be the object of the target type. Under the condition that the first time length of the first object staying in the stay-prohibited area is larger than the first threshold, the second time length of a second object which is the same as the first object and exists in the target storage area and stays in the stay-prohibited area is determined, the target time length of the first object is determined according to the first time length and the second time length, and the problem that the target type of the object is determined inaccurately due to the fact that the stay time length of the object is inaccurate due to the fact that the object is shielded can be solved.
In one exemplary embodiment, before determining the target stay time period for the first object based on the first time period and the second time period for the second object to stay in the no-stay area, the method further includes: determining a first dwell position of the first object in the no-dwell region and a first time at which the first object enters the no-dwell region based on the first image information; determining a second dwell position of each object of a plurality of objects included in the target storage area in the no-dwell area and a second time to dwell outside the no-dwell area; determining the second object identical to the first object among the plurality of objects based on the first dwell position, the second dwell position, the first time, and the second time. In this embodiment, when the ID of the first object may change due to occlusion or the like, the node may be traversed in the data link table to determine the second object that is the same as the first object. When the second object is determined, the second object may be determined according to the first time when the first object recorded in the first node starts to enter the no-stay area, the first stay position of the first object in the no-stay area, the second stay position of each object recorded in other nodes in the target storage area, and the second time when the first object leaves the no-stay area.
In an exemplary embodiment, determining the second object identical to the first object among the plurality of objects based on the first dwell position, the second dwell position, the first time, and the second time includes: determining a coincidence of the first dwell position with the second dwell position of each of the objects, respectively; respectively determining the sequence of the first time and the second time of each object; determining an object for which the contact ratio is greater than a third threshold value and the first time is a time after the second time as the second object. In this embodiment, when the stay information stored in the node in the target storage area satisfies the following two conditions, the object corresponding to the node may be determined as the second object. 1. The ID generation time (corresponding to the first time) of the first object is after the ID disappearance time (corresponding to the second time) recorded in the node recording the second object; 2. the coincidence ratio between the ID generation time detection frame position of the first object (corresponding to the first stay position) and the ID disappearance time detection frame position (corresponding to the second stay position) recorded in the node of the second object is equal to or higher than a third threshold value. The object meeting the two conditions can be regarded as the same object represented by the two IDs, after the same object is determined, the parking time recorded by the node meeting the conditions (namely the node of the second object) can be added to the time recorded in the ID after jumping (namely the node of the first object), the node meeting the conditions is deleted, the node of the ID after the object jumping (namely the ID of the first object) is added to the data link table, and the related information is recorded. And when the accumulated parking time is more than ParkingThre, reporting the parking target to alarm. The third threshold may be 80% (this value is merely an exemplary illustration, and the third threshold may also be 75%, 90%, etc., which is not limited in the present invention).
In the above embodiment, when the first object is a vehicle, when the current ID of a certain vehicle is 1, the vehicle is parked at the position of the video area a, and the parking Time reaches the Time of Time1, the data link list structure is established to record the ID number, the current frame position, the parking Time, and the Time when the ID of the object disappears by the adding node, and update the current frame position, the parking Time, and the Time when the ID disappears of the object at a subsequent Time; secondly, if the vehicle is blocked beside the vehicle or the detection tracking technology is defective, the detection tracking algorithm considers that the vehicle disappears, the vehicle is assigned with a new ID of 2 after reappearance, and the vehicle continues to stop at the original position; secondly, designing a flow at this time, and comparing whether the moment when the ID of the target is 2 appears is behind the moment when the ID is 1 disappeared, wherein the overlap ratio of the detection frame when the ID of the target is 2 appears and the moment when the ID is 1 disappeared reaches 80%; and when the condition is met, accumulating the parking time when the vehicle ID is 1 to the parking time when the vehicle ID is 2, deleting the node when the data link list ID is 1, and recording corresponding information by newly adding the node with the ID being 2.
In one exemplary embodiment, after determining a first duration for which the first object dwells in a no-dwell region included in the target region based on the first image information, the method further includes: acquiring second image information obtained by shooting the target area by the image pickup device under the condition that the first time length is larger than a first threshold value and the second object does not exist in the target storage area, wherein the second image information is image information shot continuously after the first image information and comprises image information shot before the first object leaves the stay-prohibited area; determining a total length of time that the first object dwells in the no-dwell region based on the second image information; determining that the first object is an object of the target type if the total duration is greater than the second threshold. In this embodiment, when it is determined that a second object that is the same as the first object does not exist in the target storage area, that is, the ID of the first object does not change during parking, second image information acquired by the image capturing device is continuously acquired, the total length of time that the first object stays in the stay-prohibited area is determined according to the second image information, and when the total length of time exceeds a second threshold, the first object is reported to an alarm.
In one exemplary embodiment, determining the total length of time that the first object dwells in the no-dwell region based on the second image information comprises: determining a third duration for which the first object dwells in the no-dwell region based on the second image information; determining a sum of the first duration and the third duration as the total duration. In this embodiment, a third duration during which the first object stays after staying in the stay-prohibited area for the first duration may be determined based on the second image information, and a sum of the first duration and the third duration may be determined as the total duration.
In one exemplary embodiment, determining a first length of time that the first object dwells in a no-dwell region included in the target region based on the first image information includes: determining continuous multi-frame target frame images from the first image information, wherein any two frame target frame images included in the continuous multi-frame target frame images meet the following conditions: a distance between a first detection frame of the first object in a first frame image and a second detection frame of the first object in a second frame image is smaller than a fourth threshold, wherein the first frame image and the second frame image are any two frame target frame images included in the target frame images of the plurality of frames; and determining the time length for shooting continuous multiple frames of target frame images as the first time length. In this embodiment, consecutive target frame images of multiple frames may be determined, where a distance between detection frames in two adjacent frame images included in the target frame images of multiple frames is smaller than a fourth threshold, and a time period for capturing the target frame images of multiple frames is determined as the first time period. It should be noted that, in the field of vision, the multi-target detection and tracking technology may give each target of an image a rectangular frame, and the rectangular frame contains the target, that is, the first detection frame and the second detection frame both include the first object.
In the above embodiment, when it is determined whether the first object stays in the stay-prohibited area for the first time period, the first detection frame of the first object in the first frame image included in the first image information may be determined, the second detection frame of the first object in the second frame image included in the first image information may be determined, the distance between the first detection frame and the second detection frame may be determined, and when the distance between the first detection frame and the second detection frame is smaller than the fourth threshold, it is determined that the first object stays, and therefore, the time counting may be started. And then, continuously detecting the distance between the detection frames in the second frame image and the third frame image, and accumulating the timing if the distance is still smaller than a fourth threshold value, which indicates that the first object still stays. If the distance between the detection frames in the second frame image and the third frame image is larger than the fourth threshold value, the first object is in motion and does not stay, and therefore the timing duration can be cleared. And when the distance between the detection frames in two continuous frames of images is detected to be smaller than a fourth threshold value, timing is started again. When the first object appears to enter a parkingway area for the first time (namely, a stay-forbidden area), recording a target detection frame ParkingPlace (namely, a first detection frame) at the moment, and considering the ParkingPlace as a target stay position; in the process that the first object enters and exits the parkingroad area, whether the distance between the center point of the current detection frame and the center point of the parkingroad is greater than height which is twice as much as height of the current target detection frame is judged (namely, a fourth threshold value, height thread is a threshold value, and the difference is caused by considering that the detection frames of the same target at the same position are different, height thread can be 0.25, and the value is only an exemplary illustration, and the invention is not limited to this). If the first object is larger than the second object, the first object is in motion, and the parking time is cleared. Updating the ParkingPlace as the current detection frame position of the first object; if the first object is less than the second object, the first object stays, parking timing is accumulated, and the ParkingPlace value is not updated.
In one exemplary embodiment, after determining a first duration for which the first object dwells in a no-dwell region included in the target region based on the first image information, the method further includes: determining whether a first node corresponding to the identification information of the first object exists in the target storage area if the first time length is larger than the first threshold; storing, in the presence of the first node, current location information of the first object, a stay start time, a time to leave the stay-prohibited area, and the first duration in the first node; creating a second node to store the current location information of the first object, the stay start time, the time to leave the stay-prohibited area, and the first duration in the second node, in a case where the first node does not exist. In this embodiment, when the first object is a vehicle, if the parking Time of the vehicle object reaches Time1 (i.e., the first duration, unit: second, the empirical value of 2 seconds, the Time1 value is less than the parkingthree value) and the data link structure does not have the object, the data link structure adds a node to the new node, and records the ID number of the object, the current detection frame position, the parking Time, and the Time when the ID disappears (if the object does not disappear, the value of the Time is 0) in the new node. And if the target already exists in the data linked list structure, updating the current detection frame position, the parking time and the time information when the ID of the vehicle target disappears at the corresponding node.
The following describes a method for determining an object of a target type in conjunction with a specific embodiment:
fig. 3 is a flowchart of a method for determining an object of a target type according to an embodiment of the present invention, as shown in fig. 3, the flowchart includes:
step S302, establishing a video image coordinate system, wherein the upper left corner of the video image is taken as an origin, the positive direction of an X axis is from the upper left corner to the upper right corner, and the positive direction of a Y axis is from the upper left corner to the lower left corner; and drawing a ParkingRect of the illegal parking area corresponding to the video image in the monitoring video.
In step S304, a parameter is set, and a parking time threshold parkingthree (corresponding to the second threshold) is set. If a motor vehicle target enters the drawing area and the parking time in the area exceeds a ParkingThre (unit: second) value, the target is reported. Time1 (corresponding to the first threshold), height thread (i.e., the multiple of the detection box corresponding to the length direction of the first object).
Step S306, if the vehicle target enters the parkingPlace area for the first time, recording a target detection frame parkingPlace at the moment, and considering the parkingPlace as a target parking position.
Step S308, in the process that the vehicle target enters and exits the parkingroad area, whether the distance between the center point of the current detection frame and the center point of the parkingPlace is larger than height Thre times of the height of the current target detection frame is judged (HeightThre is a threshold value, the difference is caused by considering that the detection frames of the same target at the same position are different, and the empirical value HeightThre is 0.25). If the determination result is yes, step S310 is performed, and if the determination result is no, step S312 is performed.
And step S310, if the judgment result is greater than the preset value, the vehicle is in motion, the parking time is cleared, and the parkingPlace is updated to the current detection frame position of the vehicle target.
In step S312, if the determination result is less than the predetermined threshold, the vehicle target is stopped, and the parking timings are accumulated, so that the ParkingPlace value is not updated.
And step S314, judging whether the parking Time of the vehicle target reaches the Time1 (unit: second, empirical value 2 seconds, Time1 value is less than the ParkingThre value), if so, executing step S316, and if not, executing step S330.
Step S316, determining whether the data link table result has the target, if yes, executing step S318, and if no, executing step S320.
Step S318, if the target already exists in the data linked list structure, the current detection frame position, the parking time and the time information when the ID of the vehicle target disappears are updated at the corresponding node.
Step S320, if the data chain table structure does not have the target, adding a new node to the data chain table structure, and recording the ID number of the target, the current detection frame position, the parking time, and the time when the ID disappears (if the target does not disappear, the value of the time is 0) in the new node.
Step S322, when the parking target ID changes due to reasons such as shielding, nodes are traversed in the data link table, and whether the information of the nodes meets 2 conditions is judged: 1. whether the ID generation time after the parking target jumps is behind the ID disappearance time recorded in the node or not; 2. and (4) whether the coincidence degree of the positions of the ID generation time detection frame after jumping and the ID disappearance time detection frame recorded in the node reaches more than 80 percent or not. If the determination result is yes, step S324 is performed, and if the determination result is no, step S326 is performed.
Step S324, if the former condition is met, the two IDs can be regarded as the same target, the recorded parking time of the node meeting the condition is added to the ID parking time after the jump, the node meeting the condition is deleted, the node of the ID after the jump of the vehicle target is added to the data link list, and the related information is recorded.
And step S326, judging whether the target parking time of the vehicle is greater than ParkingThre, if so, executing step S328, and if not, executing step S330.
And step S328, if the ID of the parking target is not changed in the parking process, and the parking target time exceeds ParkingThre, reporting the parking target to alarm. And when the accumulated parking time is more than ParkingThre, reporting the parking target to alarm.
And step S330, ending.
In the embodiment, the problem of missing parking reports is reduced and the detection rate of illegal parking alarming is improved by avoiding the defects of the current multi-target detection tracking technology; by solving the problem that the parking target is blocked and the ID jumps, the risk of traffic accidents is reduced, and the life and property safety of people is protected.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for determining an object of a target type is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a structure of an apparatus for determining an object of a target type according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes:
an obtaining module 42, configured to obtain first image information obtained by shooting a target area by using a shooting device, where the first image information includes multiple frames of images, and each frame of image in the multiple frames of images includes a first object;
a first determination module 44 configured to determine, based on the first image information, a first length of time for which the first object stays in a stay-prohibited area included in the target area;
a second determining module 46, configured to, when the first duration is greater than a first threshold and it is determined that a second object identical to the first object exists in a target storage area, determine a target stay duration of the first object based on the first duration and a second duration for which the second object stays in the stay-prohibited area, where stay information and identification information of objects whose stay duration exceeds the first threshold in the stay-prohibited area are stored in the target storage area, and the identification information of the first object is different from the identification information of the second object;
a third determining module 48, configured to determine that the first object is an object of the target type if the target staying time is greater than a second threshold.
In one exemplary embodiment, the apparatus may be configured to determine a first dwell position of the first object in the no-dwell region and a first time at which the first object enters the no-dwell region based on the first image information before determining a target dwell duration for the first object based on the first duration and a second duration of dwell of the second object in the no-dwell region; determining a second dwell position of each object of a plurality of objects included in the target storage area in the no-dwell area and a second time to dwell outside the no-dwell area; determining the second object identical to the first object among the plurality of objects based on the first dwell position, the second dwell position, the first time, and the second time.
In an exemplary embodiment, the apparatus may be configured to determine the second object identical to the first object among the plurality of objects based on the first dwell position, the second dwell position, the first time, and the second time as follows: determining a coincidence of the first dwell position with the second dwell position of each of the objects, respectively; respectively determining the sequence of the first time and the second time of each object; determining an object for which the contact ratio is greater than a third threshold value and the first time is a time after the second time as the second object.
In an exemplary embodiment, the apparatus may be configured to, after determining, based on the first image information, that the first object stays in a stay-prohibited area included in the target area for a first duration, obtain, when the first duration is greater than a first threshold and it is determined that the second object does not exist in the target storage area, second image information obtained by the imaging device capturing the target area, where the second image information is image information captured subsequently after the first image information and includes image information captured by the first object before leaving the stay-prohibited area; determining a total length of time that the first object dwells in the no-dwell region based on the second image information; determining that the first object is an object of the target type if the total duration is greater than the second threshold.
In an exemplary embodiment, the apparatus may determine the total length of time that the first object dwells in the no-dwell region based on the second image information by: determining a third duration for which the first object dwells in the no-dwell region based on the second image information; determining a sum of the first duration and the third duration as the total duration.
In an exemplary embodiment, the first determination module 44 may determine the first length of time that the first object dwells in a no-dwell region included in the target region based on the first image information by: determining continuous multi-frame target frame images from the first image information, wherein any two frame target frame images included in the continuous multi-frame target frame images meet the following conditions: a distance between a first detection frame of the first object in a first frame image and a second detection frame of the first object in a second frame image is smaller than a fourth threshold, wherein the first frame image and the second frame image are any two frame target frame images included in the target frame images of the plurality of frames; and determining the time length for shooting continuous multiple frames of target frame images as the first time length.
In one exemplary embodiment, the apparatus may be configured to determine whether a first node corresponding to identification information of the first object exists in the target storage area in a case where a first duration for which the first object dwells in a stay-prohibited area included in the target area is greater than the first threshold after determining the first duration based on the first image information; storing, in the presence of the first node, current location information of the first object, a stay start time, a time to leave the stay-prohibited area, and the first duration in the first node; creating a second node to store the current location information of the first object, the stay start time, the time to leave the stay-prohibited area, and the first duration in the second node, in a case where the first node does not exist.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A method for determining an object of a target type, comprising:
acquiring first image information obtained by shooting a target area by a camera device, wherein the first image information comprises a plurality of frames of images, and each frame of image in the plurality of frames of images comprises a first object;
determining a first length of time for which the first object dwells in a no-dwell region included in the target region based on the first image information;
determining a target stay time length of the first object based on the first time length and a second time length for the second object to stay in the stay-prohibited area in a case that the first time length is larger than a first threshold and it is determined that a second object identical to the first object exists in a target storage area, wherein stay information and identification information of objects having stay time lengths exceeding the first threshold in the stay-prohibited area are stored in the target storage area, and the identification information of the first object is different from the identification information of the second object;
and under the condition that the target stay time is larger than a second threshold, determining that the first object is an object of a target type.
2. The method of claim 1, wherein prior to determining the target length of stay for the first object based on the first length of time and the second length of time for the second object to stay in the no-stay zone, the method further comprises:
determining a first dwell position of the first object in the no-dwell region and a first time at which the first object enters the no-dwell region based on the first image information;
determining a second dwell position of each object of a plurality of objects included in the target storage area in the no-dwell area and a second time to dwell outside the no-dwell area;
determining the second object identical to the first object among the plurality of objects based on the first dwell position, the second dwell position, the first time, and the second time.
3. The method of claim 2, wherein determining the second object among the plurality of objects that is the same as the first object based on the first dwell position, the second dwell position, the first time, and the second time comprises:
determining a coincidence of the first dwell position with the second dwell position of each of the objects, respectively;
respectively determining the sequence of the first time and the second time of each object;
determining an object for which the contact ratio is greater than a third threshold value and the first time is a time after the second time as the second object.
4. The method according to claim 1, wherein after determining a first duration for which the first object dwells in a no-dwell region included in the target region based on the first image information, the method further comprises:
acquiring second image information obtained by shooting the target area by the image pickup device under the condition that the first time length is larger than a first threshold value and the second object does not exist in the target storage area, wherein the second image information is image information shot continuously after the first image information and comprises image information shot before the first object leaves the stay-prohibited area;
determining a total length of time that the first object dwells in the no-dwell region based on the second image information;
determining that the first object is an object of the target type if the total duration is greater than the second threshold.
5. The method of claim 4, wherein determining the total length of time that the first object dwells in the no-dwell region based on the second image information comprises:
determining a third duration for which the first object dwells in the no-dwell region based on the second image information;
determining a sum of the first duration and the third duration as the total duration.
6. The method according to claim 1, wherein determining, based on the first image information, a first length of time for which the first object dwells in a no-dwell region included in the target region comprises:
determining continuous multi-frame target frame images from the first image information, wherein any two frame target frame images included in the continuous multi-frame target frame images meet the following conditions: a distance between a first detection frame of the first object in a first frame image and a second detection frame of the first object in a second frame image is smaller than a fourth threshold, wherein the first frame image and the second frame image are any two frame target frame images included in the target frame images of the plurality of frames;
and determining the time length for shooting continuous multiple frames of target frame images as the first time length.
7. The method according to claim 1, wherein after determining a first duration for which the first object dwells in a no-dwell region included in the target region based on the first image information, the method further comprises:
determining whether a first node corresponding to the identification information of the first object exists in the target storage area if the first time length is larger than the first threshold;
storing, in the presence of the first node, current location information of the first object, a stay start time, a time to leave the stay-prohibited area, and the first duration in the first node;
creating a second node to store the current location information of the first object, the stay start time, the time to leave the stay-prohibited area, and the first duration in the second node, in a case where the first node does not exist.
8. An apparatus for determining an object of a target type, comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring first image information obtained by shooting a target area by a shooting device, the first image information comprises a plurality of frames of images, and each frame of image in the plurality of frames of images comprises a first object;
a first determination module configured to determine, based on the first image information, a first length of time for which the first object dwells in a no-dwell region included in the target region;
a second determining module, configured to, when the first duration is greater than a first threshold and it is determined that a second object that is the same as the first object exists in a target storage area, determine a target stay duration of the first object based on the first duration and a second duration for which the second object stays in the stay-prohibited area, where stay information and identification information of an object whose stay duration in the stay-prohibited area exceeds the first threshold are stored in the target storage area, and the identification information of the first object is different from the identification information of the second object;
and the third determining module is used for determining that the first object is the object of the target type under the condition that the target stay time is greater than a second threshold.
9. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110336712.0A CN113096394A (en) | 2021-03-29 | 2021-03-29 | Method and device for determining object of target type, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110336712.0A CN113096394A (en) | 2021-03-29 | 2021-03-29 | Method and device for determining object of target type, storage medium and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113096394A true CN113096394A (en) | 2021-07-09 |
Family
ID=76671095
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110336712.0A Pending CN113096394A (en) | 2021-03-29 | 2021-03-29 | Method and device for determining object of target type, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113096394A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009031196A (en) * | 2007-07-30 | 2009-02-12 | Aisin Aw Co Ltd | Information reporting system and program |
CN107330373A (en) * | 2017-06-02 | 2017-11-07 | 重庆大学 | A kind of parking offense monitoring system based on video |
CN107609491A (en) * | 2017-08-23 | 2018-01-19 | 中国科学院声学研究所 | A kind of vehicle peccancy parking detection method based on convolutional neural networks |
CN109948436A (en) * | 2019-02-01 | 2019-06-28 | 深兰科技(上海)有限公司 | The method and device of vehicle on a kind of monitoring road |
CN110491135A (en) * | 2019-08-20 | 2019-11-22 | 深圳市商汤科技有限公司 | Detect the method and relevant apparatus of parking offense |
CN112101223A (en) * | 2020-09-16 | 2020-12-18 | 北京百度网讯科技有限公司 | Detection method, device, equipment and computer storage medium |
CN112183350A (en) * | 2020-09-28 | 2021-01-05 | 天地伟业技术有限公司 | Video-based illegal parking detection method |
CN112365717A (en) * | 2020-10-10 | 2021-02-12 | 新疆爱华盈通信息技术有限公司 | Vehicle information acquisition method and system |
-
2021
- 2021-03-29 CN CN202110336712.0A patent/CN113096394A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009031196A (en) * | 2007-07-30 | 2009-02-12 | Aisin Aw Co Ltd | Information reporting system and program |
CN107330373A (en) * | 2017-06-02 | 2017-11-07 | 重庆大学 | A kind of parking offense monitoring system based on video |
CN107609491A (en) * | 2017-08-23 | 2018-01-19 | 中国科学院声学研究所 | A kind of vehicle peccancy parking detection method based on convolutional neural networks |
CN109948436A (en) * | 2019-02-01 | 2019-06-28 | 深兰科技(上海)有限公司 | The method and device of vehicle on a kind of monitoring road |
CN110491135A (en) * | 2019-08-20 | 2019-11-22 | 深圳市商汤科技有限公司 | Detect the method and relevant apparatus of parking offense |
CN112101223A (en) * | 2020-09-16 | 2020-12-18 | 北京百度网讯科技有限公司 | Detection method, device, equipment and computer storage medium |
CN112183350A (en) * | 2020-09-28 | 2021-01-05 | 天地伟业技术有限公司 | Video-based illegal parking detection method |
CN112365717A (en) * | 2020-10-10 | 2021-02-12 | 新疆爱华盈通信息技术有限公司 | Vehicle information acquisition method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9008359B2 (en) | Detection of static object on thoroughfare crossings | |
CN110490108A (en) | A kind of labeling method, device, storage medium and the electronic device of state violating the regulations | |
CN112069939A (en) | Event detection method and device, electronic equipment and storage medium | |
CN108806272A (en) | A kind of method and device for reminding more motor vehicle car owner's illegal parking behaviors | |
CN110111582B (en) | Multi-lane free flow vehicle detection method and system based on TOF camera | |
CN110379172A (en) | The generation method and device of traffic rules, storage medium, electronic device | |
CN113674314A (en) | Method and device for detecting throwing event, electronic device and storage medium | |
CN106560861A (en) | Intelligent supervision method based on computer vision | |
CN111354194A (en) | Highway vehicle identification method and device | |
CN110880205B (en) | Parking charging method and device | |
CN110533921B (en) | Triggering snapshot method and system for vehicle | |
CN101877132B (en) | Interactive event processing method and device used for motion tracking | |
CN113450578B (en) | Traffic violation event evidence obtaining method, device, equipment and system | |
CN112863195B (en) | Vehicle state determination method and device | |
WO2024098992A1 (en) | Vehicle reversing detection method and apparatus | |
CN116152753A (en) | Vehicle information identification method and system, storage medium and electronic device | |
CN113096394A (en) | Method and device for determining object of target type, storage medium and electronic device | |
CN113112814B (en) | Snapshot method and device without stopping right turn and computer storage medium | |
CN108932853A (en) | A kind of method and device recording more motor vehicle illegal parking behaviors | |
CN112597924B (en) | Electric bicycle track tracking method, camera device and server | |
CN114359828A (en) | Target behavior recording method, device, storage medium and electronic device | |
CN111243289A (en) | Target vehicle tracking method and device, storage medium and electronic device | |
CN112825193B (en) | Target tracking method, target tracking device, electronic equipment and storage medium | |
CN113823095B (en) | Method and device for determining traffic state, storage medium and electronic device | |
CN115841756A (en) | Vehicle illegal parking detection method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210709 |
|
RJ01 | Rejection of invention patent application after publication |