Vehicle separation method, electronic device, and computer-readable storage medium
By analyzing the vehicle's driving direction, posture, and position, and using image processing technology to separate passing vehicles, the problems of false alarms and missed alarms in existing technologies are solved, and the accuracy of parking vehicle identification is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2026-04-07
AI Technical Summary
Existing parking management and monitoring equipment suffers from false alarms and missed alarms when identifying vehicles, especially due to interference from passing vehicles in identifying parked vehicles, and there is a lack of effective solutions.
By analyzing the vehicle's driving direction, attitude, and position, image processing technology is used to separate passing vehicles from parked vehicles, reducing misjudgments and interference.
It improved the accuracy of parking vehicle identification, reduced false alarms and missed alarms, and improved the efficiency of parking management.
Smart Images

Figure CN114973157B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of video monitoring, in particular to a vehicle separation method, an electronic device and a computer readable storage medium. BACKGROUND
[0002] Currently, there are more and more monitoring devices for parking management, but due to the complexity of road traffic, there are many false positives and false negatives, and there is no good solution to the problem of false positives and false negatives in the industry. SUMMARY
[0003] The present application provides a vehicle separation method, an electronic device and a computer readable storage medium, which can separate the passing vehicles in the target video collected by the parking monitoring device, and improve the accuracy of identifying parked vehicles.
[0004] The first aspect of the embodiment of the present application provides a vehicle separation method, which comprises: acquiring a target video collected by a parking monitoring device; determining whether a vehicle in the target video is a passing vehicle based on at least one of the driving direction, posture and position of the vehicle.
[0005] The second aspect of the embodiment of the present application provides an electronic device, which comprises a processor, a memory and a communication circuit, the processor is coupled to the memory and the communication circuit respectively, the memory stores program data, and the processor executes the program data in the memory to realize the steps in the above method.
[0006] The third aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program can be executed by a processor to realize the steps in the above method.
[0007] The present application has the beneficial effect that the present application separates the passing vehicles based on at least one of the driving method, posture and position of the vehicle, which can reduce the interference of passing vehicles on the analysis of vehicle parking behavior, thereby improving the accuracy of identifying parked vehicles. BRIEF DESCRIPTION OF DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. Among them:
[0009] Figure 1 is a flowchart of an embodiment of the vehicle separation method of the present application;
[0010] Figure 2 This is a schematic diagram showing the relative positions of parking monitoring equipment and parking spaces in an application scenario;
[0011] Figure 3 This is a schematic diagram showing the relative positions of parking monitoring equipment and parking spaces in another application scenario;
[0012] Figure 4 It corresponds Figure 2 A schematic diagram of video frames in the target video within an application scenario;
[0013] Figure 5 It corresponds Figure 3 A schematic diagram of video frames in the target video within an application scenario;
[0014] Figure 6 It is a schematic diagram of a video frame in a target video in an application scenario;
[0015] Figure 7 This is a schematic diagram of a video frame in a target video in another application scenario;
[0016] Figure 8 This is a partial schematic diagram of a video frame in a target video in another application scenario;
[0017] Figure 9 This is a schematic diagram of the structure of one embodiment of the electronic device of this application;
[0018] Figure 10 This is a schematic diagram of another embodiment of the electronic device of this application;
[0019] Figure 11 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0021] See Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the vehicle separation method of this application, which includes:
[0022] S110: Acquire the target video collected by the parking monitoring equipment.
[0023] Among them, parking monitoring equipment captures images of parking spaces to obtain target videos. Through the target videos, the parking behavior of vehicles can be analyzed, such as the time when a vehicle enters a parking space, the time when it leaves a parking space, or the total time it stays in a parking space.
[0024] S120: Based on at least one of the vehicle's driving direction, attitude, and position, determine whether the vehicle in the target video is a passing vehicle.
[0025] Specifically, passing vehicles refer to vehicles that pass by the road next to the parking space without actually entering the parking space to park.
[0026] In the first application scenario, based on one or more of the vehicle's driving mode, posture, and position, when it is determined that the vehicle is not a passing vehicle, it can be identified as a suspected parked vehicle.
[0027] Specifically, suspected parking vehicles refer to vehicles that may enter parking spaces for parking, but whether they have actually entered a parking space for parking requires further judgment.
[0028] Unlike the first application scenario mentioned above, in the second application scenario, based on one or more of the vehicle's driving mode, posture, and position, when it is determined that the vehicle is not a passing vehicle, it can also be directly identified as a parked vehicle. In other words, when it is determined that the vehicle is not a passing vehicle, it can be directly determined that the vehicle has entered the parking space and is parking.
[0029] For ease of explanation, the following descriptions will all use the first application scenario.
[0030] It is understandable that passing vehicles and suspected parked vehicles differ in at least one aspect, such as driving direction, posture, or position.
[0031] For example, passing vehicles generally have the following common characteristics: a) The vehicle's first appearance is always at the edge of the video frame, and it travels in basically the same direction throughout its appearance and disappearance; b) The vehicle maintains basically the same posture throughout its appearance and disappearance; c) The vehicle does not approach a parking space throughout its appearance and disappearance.
[0032] Suspected parked vehicles generally share the following characteristics: a) The vehicle's initial appearance is not necessarily at the edge of the video frame (for example, when vehicle A first appears in the monitoring equipment's field of view, a large truck parked in another parking space obscures vehicle A, causing the equipment to fail to identify vehicle A. When the truck drives away, vehicle A is identified for the first time, and by then vehicle A is already in the middle of the frame. However, passing vehicles are driving in the driving lane and do not obstruct the view, so the initial appearance of passing vehicles must be at the edge of the video frame), and the direction of travel of the suspected parked vehicle changes throughout its appearance and disappearance; b) The vehicle's posture changes throughout its appearance and disappearance; c) Throughout its appearance and disappearance, the vehicle approaches the parking space and eventually stops at or leaves the parking space.
[0033] Therefore, based on one or more combinations of driving direction, posture, and position, passing vehicles and suspected parked vehicles in the target video can be separated.
[0034] In existing technologies, the following types of false alarms frequently occur:
[0035] In the first scenario, when vehicle A drives out of the parking space, a larger vehicle, such as a truck, is parked in another parking space, causing vehicle A to be missed in the report. That is, the record will continue to show vehicle A's status as parked in the parking space. However, if vehicle A reappears in the scene later and passes by, since vehicle A's status in the record is still parked in the parking space, it will be considered that vehicle A has just left the parking space, resulting in a false alarm.
[0036] In the second scenario, when vehicle B is parking, vehicle C passes by the edge of vehicle B, and the two overlap or obscure each other. In this case, a cross-referencing phenomenon will occur during vehicle recognition, that is, the information of vehicle B and vehicle C will be swapped, thus making it seem as if vehicle C has entered the parking space, resulting in a false alarm.
[0037] However, after separating the passing vehicles using the method in this embodiment, in the first case, when vehicle A reappears in the frame and passes by, vehicle A will be identified as a passing vehicle and will not be considered as having just left the parking space, thus avoiding false alarms. In the second case, passing vehicle C and suspected parked vehicle B will be separated, and vehicle B and vehicle C will be determined to be two different vehicles, thus avoiding crosstalk caused by obstruction.
[0038] As can be seen from the above, this embodiment can separate passing vehicles based on at least one of the vehicle's driving method, posture, and position, thereby reducing the interference of passing vehicles on the analysis of vehicle parking behavior and improving the accuracy of identifying parked vehicles.
[0039] In this embodiment, the vehicle separation method is applied to the following scenario: the target video is obtained by the parking monitoring device capturing images in the direction of the roadside parking spaces. In other words, the parking monitoring device can simultaneously capture the heads or tails of multiple vehicles parked in roadside parking spaces.
[0040] Specifically, Figure 2 and Figure 3 All meet the requirements of the above application scenarios, among which Figure 2 and Figure 3 The difference is that, Figure 2 The parking monitoring equipment (labeled 102) installed on the cantilever arm (labeled 101) captures images of parking spaces (labeled 103) located on the same side of the road. This means both the parking spaces and the monitoring equipment are located on the same side of the road. Figure 3 The parking monitoring equipment installed on the cantilever arm captures images of parking spaces located on different sides of the road, meaning the parking spaces and the parking monitoring equipment are located on different sides of the road.
[0041] Simultaneously combined Figure 4 and Figure 5 , Figure 4 yes Figure 2 A single frame from the target video captured in the application scenario. Figure 5 yes Figure 3 A single frame from the target video captured in the application scenario.
[0042] Meanwhile, in this embodiment, in order to improve the accuracy of vehicle separation and reduce the probability of mistakenly identifying a suspected parked vehicle as a passing vehicle, step S120 specifically includes: in response to the fact that the vehicle's driving direction is always consistent with the extension direction of the road from the time of its appearance to the current time, it never tilts in the video frame of the target video, and it never enters the roadside parking space, the vehicle is determined to be a passing vehicle.
[0043] Specifically, the system determines whether a vehicle is a passing vehicle at preset time intervals. Each time the system makes a determination, if the vehicle meets the following three conditions from the moment it appears in the video frame until the current moment: the vehicle is always traveling in the same direction as the road, it is never tilted in the video frame, and it never enters the roadside parking space, then the vehicle is determined to be a passing vehicle. Otherwise, the vehicle is determined to be a suspected parked vehicle.
[0044] It is understandable that once a vehicle is determined to be a suspected parked vehicle at a certain moment, it is impossible to determine it as a passing vehicle in the subsequent process. However, if a vehicle is determined to be a passing vehicle at a certain moment, but in the subsequent process, the vehicle may not meet the above three conditions, so the vehicle will be determined to be a suspected parked vehicle in the future.
[0045] Therefore, in order to improve efficiency, in one application scenario, when determining whether a vehicle in the target video is a passing vehicle at a certain moment, it is only necessary to determine whether the vehicle that was determined to be a passing vehicle in the previous moment still meets the conditions at the current moment. That is, it is necessary to determine whether the vehicle that was determined to be a passing vehicle in the previous moment is traveling in the same direction as the road, whether it is not tilted in the video frame, and whether it has entered the roadside parking space.
[0046] However, this application is not limited to this. In other application scenarios, when determining whether a vehicle in the target video is a passing vehicle at a certain moment, it is also possible to determine whether each vehicle in the video frame at the current moment is a passing vehicle without relying on the judgment result of the previous moment.
[0047] It should be noted that in other implementations, a vehicle may be identified as a passing vehicle only if it meets one or two of the above three conditions. For example, in one application scenario, a vehicle is identified as a passing vehicle if it meets one of the above three conditions, and is only identified as a suspected parked vehicle if it does not meet any of the above three conditions. Alternatively, a vehicle is identified as a passing vehicle if it meets two of the above three conditions, and is only identified as a suspected parked vehicle if it does not meet any of the above three conditions or meets only one of the above three conditions.
[0048] In this embodiment, considering that lane markings are generally provided on roads to indicate vehicle movement, and that the direction of lane markings in the video image always aligns with the direction of road extension regardless of the location of the parking monitoring equipment, the vehicle separation method further includes:
[0049] (a1) Obtain the vehicle's current driving direction and the lane lines in the target video's current video frame.
[0050] (b1) In response to the fact that the direction of travel is consistent with the direction of extension of the lane line, determine that the direction of travel of the vehicle at the current moment is consistent with the direction of extension of the road.
[0051] The process involves determining the vehicle's current direction of travel based on its position within the target video frame at the current moment and its position in the previous moment's video frame. Specifically, the vehicle's position can be determined by any point within the vehicle detection frame in the video frame; for example, the center point of the detection frame can be used. For clarity, the following explanation will use the center point of the detection frame as the vehicle's position.
[0052] Specifically, in Figure 6In the diagram, the solid line represents the vehicle detection box in the current moment's video frame, and the dashed line represents the vehicle detection box in the previous moment's video frame. Based on these two detection boxes, a directional straight line L1 is determined, which points from the vehicle's position in the video frame in the previous moment to its position in the video frame in the current moment.
[0053] Simultaneously, target recognition is performed on the current moment's video frame in the target video to obtain the lane line, and the lane line is also regarded as a straight line with direction, denoted as line L2.
[0054] Therefore, if the directions of straight lines L1 and L2 are the same, then the vehicle's driving direction is consistent with the road's extension direction; otherwise, the vehicle's driving direction is inconsistent with the road's extension direction.
[0055] Specifically, if the angle between the driving direction and the extension direction of the lane line does not exceed a first angle threshold, it is determined that the driving direction is consistent with the extension direction of the lane line; otherwise, it is determined that the driving direction is inconsistent with the extension direction of the lane line.
[0056] In other words, if the angle between straight lines L1 and L2 does not exceed the first angle threshold, then the driving direction is determined to be consistent with the extension direction of the lane line; otherwise, the driving direction is determined to be inconsistent with the extension direction of the lane line.
[0057] The angle θ between lines L1 and L2 can be determined using the following formula:
[0058] k1 and K2 are the slopes of lines L1 and L2, respectively.
[0059] The angle between the driving direction and the extension direction of the lane line mentioned above ranges from [0° to 90°]. The first angle threshold can be set according to actual needs, for example, to 45°.
[0060] In other embodiments, the direction of travel can be determined to be consistent with the direction of lane extension by judging whether straight lines L1 and L2 are parallel. That is, if straight lines L1 and L2 are parallel, the direction of travel is determined to be consistent with the direction of lane extension; otherwise, the direction of travel is determined to be inconsistent with the direction of lane extension.
[0061] The above describes how to determine whether the vehicle's driving direction is consistent with the road's extension direction based on lane lines. However, this application is not limited to this. In other embodiments, after acquiring the target video, the designer can manually determine a direction vector parallel to the road's extension direction based on the actual extension direction of the road in the video frame. Then, the angle between the vehicle's driving direction and the direction vector is determined to be greater than a first angle threshold. In other words, it is no longer necessary to identify lane lines in the video frame at this time.
[0062] In other embodiments, the step of determining whether the vehicle's driving direction is always consistent with the road's extension direction from the moment it appears to the present moment may further include: obtaining the angle between the vehicle's driving direction at each moment from the moment it appears to the present moment and the extension direction of the lane line in the video frame of the target video at the corresponding moment, and determining the maximum angle. If the maximum angle does not exceed a first angle threshold, it is determined that the vehicle's driving direction is always consistent with the road's extension direction from the moment it appears to the present moment; otherwise, it is determined that the vehicle's driving direction is not always consistent with the road's extension direction from the moment it appears to the present moment.
[0063] Alternatively, the step of determining whether the vehicle's driving direction has always been consistent with the road's extension direction from the moment it appeared to the present moment may also include: obtaining whether the vehicle's driving direction in the initial stage is consistent with the road's extension direction; if they are consistent, then it is determined that the vehicle's driving direction has always been consistent with the road's extension direction from the moment it appeared to the present moment; otherwise, it is determined that the vehicle's driving direction has not always been consistent with the road's extension direction from the moment it appeared to the present moment.
[0064] The initial stage refers to the stage when the vehicle first appears in the field of view of the parking monitoring equipment. For example, based on the first 5 frames of video footage after the vehicle appears, it is determined whether the vehicle's driving direction in the initial stage is consistent with the direction of the road's extension.
[0065] In this embodiment, the step of determining whether the vehicle is tilted in the video frame at the current moment includes:
[0066] (a2) Identify the vehicle roof detection frame and license plate detection frame in the video frame at the current moment of the target video.
[0067] Specifically, in combination Figure 7 The target video is used to identify the target at the current moment, and the vehicle roof detection box (denoted by 104) and the license plate detection box (denoted by 105) are obtained.
[0068] (b2) Based on the vehicle detection frame and the license plate detection frame, determine whether the vehicle is tilted in the video frame of the target video at the current moment.
[0069] The relative positions of the vehicle detection frame and the license plate detection frame indicate the vehicle's posture in the video footage, thus allowing determination of whether the vehicle is tilted in the video footage.
[0070] In one application scenario, step (b2) specifically includes: determining the line connecting the first preset point in the roof detection frame and the second preset point in the license plate detection frame; determining the angle between the extension direction of the line and the preset direction to obtain the tilt attitude angle of the vehicle at the current moment; and determining that the vehicle is not tilted in the video frame of the target video at the current moment in response to the tilt attitude angle not exceeding the second angle threshold.
[0071] The position of the first preset point in the vehicle roof detection frame and the position of the second preset point in the license plate detection frame can be the same or different. For example, the first preset point and the second preset point can be the center points of the vehicle roof detection frame and the license plate detection frame, respectively, or the first preset point can be the center point of the vehicle roof detection frame, while the second preset point can be the upper left vertex of the license plate detection frame. Figure 7 The line connecting the first preset point and the second preset point is denoted as vector L3.
[0072] Among them, Figure 7 In this context, the preset direction is set to the vertical direction, and the vertical vector is represented by vector L4.
[0073] Specifically, if the angle between vectors L3 and L4 does not exceed the second angle threshold, it is determined that the vehicle is not tilted in the target video at the current moment; otherwise, it is determined that the vehicle is tilted in the target video at the current moment. The second angle threshold can be set according to actual needs, for example, to 15°.
[0074] The process of determining the angle between vectors L3 and L4 is the same as the process of determining the angle between lines L1 and L2 described above.
[0075] Meanwhile, the angle between vector L3 and vector L4 is in the range of [0, 90°].
[0076] The process of determining whether the vehicle has remained untilted in the target video frame from the moment it appeared until the present moment can also be: obtaining the attitude tilt angle of the vehicle at each moment from the moment it appeared until the present moment, and determining the maximum attitude tilt angle. If the maximum attitude tilt angle does not exceed the second angle threshold, it is determined that the vehicle has remained untilted in the target video frame from the moment it appeared until the present moment; otherwise, it is determined that the vehicle has tilted from the moment it reappeared until the present moment.
[0077] It should be noted that in other embodiments, the preset direction described above can also be set according to the specific installation location of the parking monitoring equipment, and no restrictions are imposed here.
[0078] In this embodiment, the step of determining whether a vehicle has entered a roadside parking space at the current moment includes:
[0079] (a3) Obtain the overlap rate between vehicles and roadside parking spaces in the current video frame of the target video.
[0080] Specifically, the higher the overlap between a vehicle and a roadside parking space, the greater the likelihood that the vehicle will enter the roadside parking space.
[0081] In one application scenario, the steps to obtain the overlap rate between a vehicle and a roadside parking space include: obtaining the overlap area between the first region occupied by the vehicle detection box of the vehicle and the roadside parking space in the video frame at the current moment of the target video; and determining the overlap rate based on the ratio of the area of the overlap area to the area of the first region.
[0082] Specifically, in combination Figure 8 First, identify vehicles in the current video frame of the target video to obtain vehicle detection bounding boxes (denoted by number 106). Then, calculate the overlap area between the first region occupied by the vehicle detection box and the roadside parking space. Finally, determine the overlap rate based on the ratio of the area of the overlapping area to the area of the first region. The overlap rate α can be determined using the following formula:
[0083] Where N is the area of the overlapping region and S is the area of the first region.
[0084] (b3) In response to the overlap rate not exceeding the overlap rate threshold, determine that the vehicle has not entered the roadside parking space at the current time.
[0085] The overlap rate threshold can be set according to the actual scenario, and is not restricted here.
[0086] It should be noted that in other implementations, it is not necessary to determine whether a vehicle has entered a roadside parking space based on the overlap rate between the vehicle and the roadside parking space. For example, the center point of the vehicle detection box in the current video frame of the target video can be obtained. If the center point is located in a roadside parking space, it can be determined that the vehicle has entered the roadside parking space at the current moment; otherwise, it can be determined that the vehicle has not entered the roadside parking space at the current moment.
[0087] In other embodiments, the step of determining whether the vehicle has never entered the roadside parking space from the time of its appearance to the current time includes: obtaining the overlap rate between the vehicle and the roadside parking space at each time from the time of its appearance to the current time, then determining the maximum overlap rate, and in response to the maximum overlap rate not exceeding the overlap rate threshold, determining that the vehicle has never entered the roadside parking space from the time of its appearance to the current time; otherwise, determining that the vehicle has entered the roadside parking space.
[0088] The above description details the solution of this application for determining whether a vehicle in a target video is a passing vehicle based on parameters such as driving direction, attitude, and position. However, this application is not limited to this. In other embodiments, parameters such as speed can be further combined to determine whether a vehicle is a passing vehicle. For example, if the change in the vehicle's speed from the time it appears to the current time exceeds a change threshold, the vehicle is determined to be a suspected parked vehicle; otherwise, it indicates that the vehicle's speed is relatively stable and it is a passing vehicle.
[0089] In other embodiments, when determining whether a vehicle is a passing vehicle based on its direction of travel, it is not necessary to compare the vehicle's direction of travel with the direction of road extension. Instead, the direction of travel of the vehicle can be compared between two consecutive moments. For example, the direction of travel of the vehicle at the current moment and the previous moment can be obtained. If the two directions of travel are consistent (the angle between them is less than a threshold), it is determined that the direction of travel of the vehicle at the current moment has not changed. If the direction of travel of the vehicle has not changed at any moment from the moment of occurrence to the current moment, it is determined that the vehicle is a passing vehicle. Otherwise, it is determined that the vehicle is a suspected parked vehicle.
[0090] Similarly, the vehicle's attitude can be compared between two consecutive moments. For example, the vehicle's tilt angle can be obtained at the current moment and the previous moment. If these two angles are equal or the difference is less than a threshold, it is determined that the vehicle's attitude has not changed at the current moment. If the vehicle's attitude has not changed at any moment from the moment of occurrence to the current moment, it is determined that the vehicle is a passing vehicle; otherwise, it is determined that the vehicle is a suspected parked vehicle.
[0091] In summary, this application does not impose specific restrictions on how to determine whether a vehicle is a passing vehicle based on at least one of the following: driving direction, attitude, and position.
[0092] See Figure 9 , Figure 9 This is a schematic diagram of one embodiment of the electronic device of this application. The electronic device 200 includes a processor 210, a memory 220, and a communication circuit 230. The processor 210 is coupled to the memory 220 and the communication circuit 230 respectively. The memory 220 stores program data. The processor 210 executes the program data in the memory 220 to implement the steps in any of the above embodiments. The detailed steps can be found in the above embodiments and will not be repeated here.
[0093] The electronic device 200 can be any device with video processing capabilities, such as a computer or mobile phone, and there are no restrictions on this.
[0094] See Figure 10 , Figure 10This is a schematic diagram of one embodiment of the electronic device of this application. The electronic device 300 includes an acquisition module 310 and a determination module 320.
[0095] The acquisition module 310 is used to acquire the target video collected by the parking monitoring equipment.
[0096] The determination module 320 is connected to the acquisition module 310 and is used to determine whether a vehicle in the target video is a passing vehicle based on at least one of the vehicle's driving direction, attitude, and position.
[0097] When the electronic device 300 is in operation, it executes the method steps of any of the above embodiments. For detailed steps, please refer to the above embodiments, which will not be repeated here.
[0098] Among them, electronic device 300 can be any device with video processing capabilities, such as a computer or mobile phone, without any restrictions.
[0099] In one embodiment, the target video is obtained by the parking monitoring device capturing images of the roadside parking spaces in the direction of their arrangement. In this case, the determination module 320 is specifically used to: determine that the vehicle is a passing vehicle in response to the fact that the vehicle's driving direction is always consistent with the direction of the road's extension from the time of its appearance to the current time, that it is never tilted in the video frame of the target video, and that it never enters a roadside parking space.
[0100] In one embodiment, the determining module 320 is further configured to: acquire the vehicle's driving direction at the current moment and the lane lines in the video frame of the target video at the current moment; and determine that the vehicle's driving direction at the current moment is consistent with the extension direction of the road in response to the driving direction being consistent with the extension direction of the lane lines.
[0101] In one embodiment, the determining module 320 is further configured to: determine that the driving direction is consistent with the extension direction of the lane line in response to the angle between the driving direction and the extension direction of the lane line not exceeding a first angle threshold; otherwise, determine that the driving direction is inconsistent with the extension direction of the lane line.
[0102] In one embodiment, the determining module 320 is further configured to: identify the vehicle roof detection frame and the license plate detection frame in the video frame of the target video at the current moment; and determine whether the vehicle is tilted in the video frame of the target video at the current moment based on the vehicle roof detection frame and the license plate detection frame.
[0103] In one embodiment, the determining module 320 is further configured to: determine the line connecting the first preset point in the roof detection frame and the second preset point in the license plate detection frame; determine the angle between the extension direction of the line and the preset direction to obtain the tilt attitude angle of the vehicle at the current moment; and determine that the vehicle is not tilted in the video frame of the target video at the current moment in response to the tilt attitude angle not exceeding the second angle threshold.
[0104] In one embodiment, the determining module 320 is further configured to: obtain the overlap rate between the vehicle and the roadside parking space in the video frame of the target video at the current moment; and determine that the vehicle has not entered the roadside parking space at the current moment in response to the overlap rate not exceeding the overlap rate threshold.
[0105] In one embodiment, the determining module 320 is further configured to: obtain the overlapping area between the first region occupied by the vehicle detection frame of the vehicle and the roadside parking space in the video frame of the target video at the current moment; and determine the overlap rate based on the ratio of the area of the overlapping area to the area of the first region.
[0106] See Figure 11 , Figure 11 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 400 stores a computer program 410, which can be executed by a processor to implement the steps in any of the above methods.
[0107] Specifically, the computer-readable storage medium 400 can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or a device that can store the computer program 410. Alternatively, it can be a server that stores the computer program 410, which can send the stored computer program 410 to other devices for execution, or it can run the stored computer program 410 itself.
[0108] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A vehicle separation method, characterized in that, The method includes: Acquire the target video captured by the parking monitoring equipment; The step of determining whether a vehicle in the target video is a passing vehicle based on at least one of the vehicle's driving direction, attitude, position, and speed includes: In response to the fact that the vehicle's driving direction has always been consistent with the road's extension direction from the moment it appeared until the current moment, it has never tilted in the target video frame, the change value of its driving speed has not exceeded the change threshold, and it has never entered the roadside parking space, it is determined that the vehicle is a passing vehicle. The method further includes: identifying a first vehicle detection box of a vehicle in the target video at the current moment and a second vehicle detection box of the vehicle at the previous moment; determining the driving direction of the vehicle based on the first vehicle detection box and the second vehicle detection box; and determining that the driving direction of the vehicle is always consistent with the extension direction of the road if the driving direction of the vehicle is parallel to the extension direction of the road. The method further includes: in response to the fact that the change value of the vehicle's driving speed from the time of occurrence to the current time is less than the change threshold, determining that the change value of the vehicle's driving speed has not exceeded the change threshold; The method further includes: identifying the vehicle's roof detection frame and license plate detection frame in the video frame of the target video at the current moment; and determining whether the vehicle is tilted in the video frame of the target video at the current moment based on the roof detection frame and license plate detection frame, including: determining the line connecting a first preset point in the roof detection frame and a second preset point in the license plate detection frame, determining the angle between the extension direction of the line and the preset direction, obtaining the tilt attitude angle of the vehicle at each moment, and determining that the vehicle has not tilted in the video frame of the target video from the moment of appearance to the current moment if the maximum tilt attitude angle does not exceed a second angle threshold.
2. The method according to claim 1, characterized in that, The target video is obtained by the parking monitoring device capturing images of the roadside parking spaces in the direction they are arranged.
3. The method according to claim 2, characterized in that, The method further includes: Obtain the vehicle's current driving direction and the lane lines in the current video frame of the target video; In response to the fact that the driving direction is consistent with the extension direction of the lane line, it is determined that the driving direction of the vehicle at the current moment is consistent with the extension direction of the road.
4. The method according to claim 3, characterized in that, The method further includes: If the angle between the driving direction and the extension direction of the lane line does not exceed a first angle threshold, it is determined that the driving direction is consistent with the extension direction of the lane line; otherwise, it is determined that the driving direction is inconsistent with the extension direction of the lane line.
5. The method according to claim 1, characterized in that, The method further includes: Obtain the overlap rate between the vehicle and the roadside parking space in the current video frame of the target video; In response to the overlap rate not exceeding the overlap rate threshold, it is determined that the vehicle has not entered the roadside parking space at the current moment.
6. The method according to claim 5, characterized in that, The step of obtaining the overlap rate between the vehicle and the roadside parking space in the video frame of the target video at the current moment includes: Obtain the overlapping area between the first region occupied by the vehicle detection frame of the vehicle and the roadside parking space in the video frame of the target video at the current moment; The overlap rate is determined based on the ratio of the area of the overlapping region to the area of the first region.
7. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a communication circuit. The processor is coupled to the memory and the communication circuit. The memory stores program data. The processor executes the program data in the memory to implement the steps of the method as described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by a processor to implement the steps of the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Parking management method, device and equipment
CN110910655A
Roadside vehicle parking behavior detection method based on high-order camera
CN112258668A
Vehicle driving state detection method and device, electronic equipment and storage medium
CN112530170A