CN110765816A - Vehicle line-pressing violation detection method and device and electronic equipment - Google Patents

Vehicle line-pressing violation detection method and device and electronic equipment Download PDF

Info

Publication number
CN110765816A
CN110765816A CN201810837149.3A CN201810837149A CN110765816A CN 110765816 A CN110765816 A CN 110765816A CN 201810837149 A CN201810837149 A CN 201810837149A CN 110765816 A CN110765816 A CN 110765816A
Authority
CN
China
Prior art keywords
vehicle
detected
license plate
lane
line
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.)
Granted
Application number
CN201810837149.3A
Other languages
Chinese (zh)
Other versions
CN110765816B (en
Inventor
陈航锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201810837149.3A priority Critical patent/CN110765816B/en
Publication of CN110765816A publication Critical patent/CN110765816A/en
Application granted granted Critical
Publication of CN110765816B publication Critical patent/CN110765816B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/54Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Traffic Control Systems (AREA)

Abstract

The embodiment of the application provides a method and a device for detecting vehicle line pressing violation and electronic equipment, wherein the method comprises the following steps: obtaining a preliminary judgment result according to the relation between the license plate image of the vehicle to be detected and the lane line in the collected image; if the preliminary judgment result shows that the vehicle is pressed against the rules and regulations, acquiring an effective occupied area of the vehicle to be detected; obtaining the effective occupation area of the comparison vehicle of the adjacent lanes; detecting and comparing whether the effective occupation area of the vehicle is overlapped with the effective occupation area of the vehicle to be detected; if not, judging that the preliminary judgment result is correct, and determining that the line is violated; if the judgment result is wrong, the judgment result is judged to be wrong, and the rule violation is determined to be not pressed. According to the detection method, the judgment result obtained according to the distance between the license plate and the lane line is verified by combining the relation between the effective occupation area of the vehicle in the adjacent lane and the effective occupation area of the vehicle to be detected, and the line pressing misjudgment rate of the vehicle with the license plate hung on the side is effectively reduced.

Description

Vehicle line-pressing violation detection method and device and electronic equipment
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for detecting vehicle line pressing violation and electronic equipment.
Background
In recent years, a large number of electronic police systems are deployed at important traffic intersections by traffic police departments to monitor and capture the illegal behaviors of vehicles and punish the illegal behaviors of drivers after the fact. The deployment of an electronic police system brings certain frightening effect to the violation behaviors of drivers, but the high and low penalty judging efficiency of the electronic police system determines the high and low efficiency of the traffic police department in screening the violation behaviors, and meanwhile, if invalid violation evidence is wrongly input into a penalty platform, administrative reeds can be caused, and social resources are wasted. Therefore, there is a need to improve the detection accuracy of the system.
In the vehicle violation behaviors, the effective rate of penalty of vehicle line-pressing violation is generally not high, which is mainly related to the penalty principle of line-pressing violation. At present, vehicle line pressing for penalty judgment in the industry is judged according to the distance between a license plate and a lane line, because the license plate is the most obvious characteristic of the tail of a vehicle and is most easily detected, and the position of the license plate can be accurately judged. Other such as vehicle profile, because the three-dimensional space passes through the two-dimensional conversion of camera, it is difficult to judge effectively whether the vehicle is pressed the line in the visual angle. In addition, the tail shapes of a plurality of large vehicles are different, and the influence of the interference of vehicles in adjacent lanes, the adhesion of image segmentation, light shadow and the like also causes that the vehicle outline cannot be calculated, and the pressing line cannot be effectively penalized. When the method for judging according to the distance between the license plate and the lane line in the prior art is applied to the vehicles with the license plate hung on the side, the license plate of the vehicle is located near the lane line, so that the misjudgment rate is high.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus and an electronic device for detecting vehicle line pressing violation, so as to improve the above problem.
The embodiment of the application provides a vehicle line-pressing violation detection method, which comprises the following steps:
obtaining a preliminary judgment result of whether the vehicle to be detected is subjected to line pressing violation according to the relation between the license plate image of the vehicle to be detected in the collected images and the lane line of the lane where the vehicle to be detected is located;
if the preliminary judgment result shows that the vehicle to be detected is pressed against the traffic rules, acquiring an effective occupied area of the vehicle to be detected in a corresponding lane;
obtaining an effective occupation area of a comparison vehicle in a lane adjacent to the lane where the vehicle to be detected is located;
detecting whether the effective occupation area of the comparison vehicle is overlapped with the effective occupation area of the vehicle to be detected or not;
if the overlapped part does not exist, judging that the preliminary judgment result is correct, and determining that the vehicle to be detected is pressed against the traffic rules;
and if the overlapped part exists, judging that the preliminary judgment result is wrong, and determining that the vehicle to be detected has no line pressing violation.
Optionally, the step of obtaining a preliminary judgment result of whether the vehicle to be detected violates a pressing line according to a relationship between the license plate image of the vehicle to be detected in the collected image and a lane line of a lane where the vehicle to be detected is located includes:
acquiring a vehicle to be detected in the acquired image, and identifying a license plate image of the vehicle to be detected;
mapping the license plate image to the ground to obtain a mapping position of the license plate image on the ground;
and obtaining a preliminary judgment result of whether the vehicle to be detected violates the pressing line according to the distance between the mapping position of the license plate image and the lane line of the lane where the vehicle to be detected is located.
Optionally, the step of obtaining the effective occupation area of the vehicle to be detected in the corresponding lane includes:
and obtaining the effective occupied area of the vehicle to be detected in the corresponding lane according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected.
Optionally, the vehicle type of the vehicle to be detected is obtained by:
identifying the license plate image of the vehicle to be detected to obtain the color of the license plate image;
and judging the vehicle type of the vehicle to be detected according to the color of the license plate image.
Optionally, the step of obtaining an effective occupied area of the vehicle to be detected in a corresponding lane according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected includes:
calculating to obtain a length value of the vehicle to be detected according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected;
and dividing the length value along the direction of the lane where the vehicle to be detected is located by taking the central point of the license plate image mapped to the ground as a starting point to obtain the effective occupied area of the vehicle to be detected in the corresponding lane.
Optionally, the step of detecting whether there is an overlapping portion between the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected includes:
and detecting whether the effective occupation area of the comparison vehicle is overlapped with the effective occupation area of the vehicle to be detected in the extending direction of the lane.
The embodiment of the application still provides a vehicle line ball detection device violating regulations, the device includes:
the preliminary judgment result acquisition module is used for acquiring a preliminary judgment result of whether the vehicle to be detected violates the pressing line according to the relationship between the license plate image of the vehicle to be detected in the acquired image and the lane line of the lane where the vehicle to be detected is located;
the first area acquisition module is used for acquiring an effective occupied area of the vehicle to be detected in a corresponding lane when the preliminary judgment result shows that the vehicle to be detected is pressed against the traffic rules;
the second area acquisition module is used for acquiring an effective occupation area of a comparison vehicle in a lane adjacent to the lane where the vehicle to be detected is located;
the detection module is used for detecting whether the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected have an overlapping part;
the first judging module is used for judging that the preliminary judgment result is correct and determining that the vehicle to be detected presses a line violation when the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected do not have an overlapping part;
and the second judgment module is used for judging that the preliminary judgment result is wrong when the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected have an overlapping part, and determining that the vehicle to be detected does not press the line violation.
Optionally, the preliminary determination result obtaining module includes:
the license plate image acquisition unit is used for acquiring a vehicle to be detected in the acquired image and identifying a license plate image of the vehicle to be detected;
the mapping unit is used for mapping the license plate image to the ground to obtain the mapping position of the license plate image on the ground;
and the preliminary judgment result acquisition unit is used for acquiring a preliminary judgment result of whether the vehicle to be detected breaks the rule or not according to the distance between the mapping position of the license plate image and the lane line of the lane where the vehicle to be detected is located.
Optionally, the first region acquisition module is configured to acquire an effective occupied region of the vehicle to be detected in a corresponding lane according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected.
An embodiment of the present application further provides an electronic device, which includes a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor executes the machine-executable instructions to implement the method described above.
The vehicle line pressing violation detection method, the vehicle line pressing violation detection device and the electronic equipment provided by the embodiment of the application comprise the steps of firstly obtaining a preliminary judgment result of whether the vehicle to be detected is in line pressing violation according to the relation between a license plate image of the vehicle to be detected in the collected image and a lane line of a lane where the vehicle to be detected is located, then obtaining an effective occupation area of the vehicle to be detected in a corresponding lane when the preliminary judgment result shows that the vehicle to be detected is in line pressing violation, detecting whether an overlapping part exists between the effective occupation area of the vehicle adjacent to the lane where the vehicle to be detected is located and the effective occupation area of the vehicle to be detected, if not, determining that the previously obtained preliminary judgment result is correct, and determining that the vehicle to be detected. If the overlapped part exists, the preliminarily obtained judging result is judged to be wrong, and the fact that the vehicle to be detected does not press the line and violate the regulations is determined. According to the detection method, the judgment result obtained according to the distance between the license plate and the lane line is verified by combining the relation between the effective occupation area of the vehicle in the adjacent lane and the effective occupation area of the vehicle to be detected, and the line pressing misjudgment rate of the vehicle with the license plate hung on the side is effectively reduced.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Fig. 2 is a flowchart of a vehicle line-pressing violation detection method provided by the embodiment of the application.
Fig. 3 is a flowchart of the substeps of step S101 in fig. 2.
Fig. 4 is a relationship schematic diagram of a vehicle effective occupation area provided by the embodiment of the present application.
Fig. 5 is a functional block diagram of the vehicle line pressing violation detection device provided by the embodiment of the application.
Fig. 6 is a functional block diagram of a preliminary determination result obtaining module according to an embodiment of the present disclosure.
Fig. 7 is another functional block diagram of the vehicle line pressing violation detection device provided by the embodiment of the application.
Fig. 8 is a functional block diagram of a first area obtaining module according to an embodiment of the present disclosure.
Icon: 100-an electronic device; 110-vehicle line-pressing violation detection device; 111-preliminary determination result obtaining module; 1111-license plate image acquisition unit; 1112-a mapping unit; 1113-preliminary determination result acquisition unit; 112-a first region acquisition module; 1121-length value calculating unit; 1122-a dividing unit; 113-a second region acquisition module; 114-a detection module; 115-a first decision module; 116-a second determination module; 117-identification module; 118-a vehicle type acquisition module; 120-a processor; 130-memory.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Referring to fig. 1, a schematic block diagram of an electronic device 100 according to an embodiment of the invention is shown. In this embodiment, the electronic device 100 may be an image capturing device, a photographing device, or the like, and the electronic device 100 has an image capturing function. As shown in fig. 1, the electronic device 100 may include a memory 130, a processor 120, and a computer program stored on the memory 130 and executable on the processor 120, the processor 120 executing the program causing the electronic device 100 to implement the vehicle line violation detection method of the present invention.
The memory 130 and the processor 120 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 130 stores software functional modules stored in the memory 130 in the form of software or Firmware (Firmware), and the processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 130, such as the vehicle line violation detecting device 110 in the embodiment of the present invention, so as to implement the vehicle line violation detecting method in the embodiment of the present invention.
It is to be understood that the configuration shown in fig. 1 is merely exemplary, and that the electronic device 100 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, fig. 2 is a flowchart of a vehicle line-pressing violation detection method applied to the electronic device 100 shown in fig. 1, and the steps included in the method will be described in detail below.
Step S101, obtaining a preliminary judgment result of whether the vehicle to be detected breaks the rule or not according to the relation between the license plate image of the vehicle to be detected in the collected images and the lane line of the lane where the vehicle to be detected is located.
The electronic device 100 may capture image information of a vehicle traveling in the detection area and analyze it to determine whether the vehicle is pressing a line. Optionally, the collected image is analyzed to obtain an image of the vehicle to be detected, and the image of the vehicle to be detected is analyzed to obtain a license plate image of the vehicle to be detected.
Referring to fig. 3, in the present embodiment, step S101 may include the following sub-steps:
step S1011, a vehicle to be detected in the collected images is obtained, and the license plate image of the vehicle to be detected is identified.
Step S1012, mapping the license plate image to the ground to obtain a mapping position of the license plate image on the ground.
And S1013, obtaining a preliminary judgment result of whether the vehicle to be detected violates the line pressing rule or not according to the distance between the mapping position of the license plate image and the lane line of the lane where the vehicle to be detected is located.
In this embodiment, a number of different number plate positioning methods may be employed to obtain a number plate image on a vehicle to be detected, for example, a shape-based, color tone-based, texture-based, or text feature-based detection method. For example, when a shape-based detection method is used, since the license plate is a rectangle with a regular shape, the detection of the license plate can be converted into the search of rectangular features, and the license plate is generally positioned by using the features of the length and width of the license plate, the proportion of the license plate occupying the image, and the like. When the detection is performed based on the color tone, the color of the general license plate is a white character with a blue background or a black character with a yellow background, and the like, and a binary image can be generated by adopting the color tone or the saturation characteristic of the image, so that the position of the license plate can be positioned. In this embodiment, any one of the above detection manners may be adopted to obtain the license plate image in the to-be-detected vehicle image, which is not particularly limited in this embodiment.
Optionally, after obtaining the license plate image of the vehicle to be detected, a preliminary judgment result of whether the vehicle to be detected violates the pressing line can be obtained according to the relationship between the license plate image and the lane line of the lane where the vehicle to be detected is located.
Considering that the distance between the license plate image and the lane line is directly calculated to have errors and influence on the result because the license plate image and the lane line are not in the same plane. Therefore, in the embodiment, the license plate image of the vehicle to be detected is mapped to the ground of the lane where the vehicle to be detected is located, so as to obtain the mapping position of the license plate image on the ground. And preliminarily judging whether the vehicle to be detected is pressed according to the distance between the mapping position of the license plate image and the lane line of the lane where the vehicle to be detected is located. Optionally, the distance between the mapping position of the license plate image and the lane line is calculated, and if the distance between the mapping position of the license plate image and the lane line is smaller than a preset distance threshold value, the vehicle line-pressing violation to be detected can be preliminarily judged. And if the distance between the mapping position of the license plate image and the lane line is greater than a preset distance threshold value, preliminarily judging that the vehicle to be detected is not subjected to line pressing violation.
Through the process, whether the vehicle is subjected to line pressing violation or not can be judged according to the distance between the license plate image and the lane line, the judgment accuracy of the judgment method is high when the license plate is hung at the middle position of the tail of the vehicle, but for the vehicle with the license plate hung on the side, the license plate is located near the lane line, so that the judgment result obtained by the method is not necessarily accurate, and the vehicle needs to be detected and verified again through the following process provided by the embodiment.
And S102, when the preliminary judgment result shows that the vehicle to be detected is pressed against the traffic rules, acquiring an effective occupied area of the vehicle to be detected on a corresponding lane.
If the vehicle really has the line-pressing violation behavior, the vehicle should ride the lane line to travel, and the vehicle with the line-pressing violation behavior can definitely influence the traffic of the vehicles on the adjacent lanes of the pressed lane line. If a certain lane is effectively occupied by a vehicle (no other vehicle has an overlapped occupied area with the vehicle along the lane direction), the condition that vehicles with line pressing violations cannot exist on the adjacent lanes of the vehicle is indicated, and the effectively occupied areas of the vehicles are overlapped. Because, if such vehicles are present, collisions and scratches of the vehicles will occur in the actual traffic.
Therefore, in this embodiment, whether the previous determination result is accurate is detected according to the relationship between the effective occupancy region of the vehicle to be detected and the effective occupancy regions of the vehicles in the adjacent lanes thereof. Optionally, in this embodiment, the effective occupied area of the vehicle to be detected in the corresponding lane is obtained according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected. When the vehicle type of the vehicle to be detected is obtained, the color of the license plate image can be obtained by identifying the license plate image of the vehicle to be detected, and then the vehicle type of the vehicle to be detected is obtained. Generally, the existing vehicles with yellow bottom color have large volume, such as trucks, passenger vehicles, tank trucks, etc. The vehicle with blue ground color has smaller volume, and is generally a car and the like. Therefore, if the ground color of the license plate image of the vehicle to be detected is yellow, it may be determined that the volume of the vehicle to be detected is large, and if the ground color of the license plate image of the vehicle to be detected is blue, it is determined that the volume of the vehicle to be detected is small.
In this embodiment, it is assumed that the width of the license plate of the vehicle to be detected is carpatelenth, for example, the width of the license plate may be 44 cm. Calculating to obtain a length value of the vehicle to be detected according to the bottom color of the license plate of the vehicle to be detected and the width value of the license plate in the size of the license plate, for example, if the bottom color of the license plate of the vehicle to be detected is yellow, it indicates that the volume of the vehicle to be detected is large, and the length value of the vehicle to be detected can be CarLenth 15 ═ CarPlatellen. If the background color of the license plate of the vehicle to be detected is blue, the size of the vehicle to be detected is small, and the length value of the vehicle to be detected can be CarLenth-10-CardPlateLenth. It should be noted that, when calculating the length of the vehicle, the length of the license plate in the size of the license plate may also be calculated by combining the length value of the license plate with the type of the vehicle, and the calculation manner is only one implementation manner of this embodiment, and is not limited to this, and may be set correspondingly according to actual requirements.
In this embodiment, the effective occupied area of the vehicle to be detected can be planned according to the length value of the vehicle to be detected. Optionally, a center point of a license plate image of the vehicle to be detected after being mapped to the ground is used as a starting point, a Y axis is set along an extending direction of a lane where the vehicle to be detected is located, and an axis which is perpendicular to a lane line where the vehicle to be detected is located and passes through the center point of the license plate image is set as an X axis. Optionally, the effective occupation area of the vehicle to be detected is obtained by dividing the length value of the vehicle to be detected along the direction (i.e., the Y-axis direction) of the lane where the vehicle to be detected is located with the center point of the license plate image as a starting point, as shown in fig. 4, which is CarLenth2 and CarLenth 3.
And S103, obtaining the effective occupation area of the comparison vehicle in the lane adjacent to the lane where the vehicle to be detected is located.
Step S104, detecting whether there is an overlapping portion between the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected, if there is no overlapping portion, executing the following step S105, and if there is an overlapping portion, executing the following step S106.
And S105, judging that the preliminary judgment result is correct, and determining that the vehicle to be detected is pressed against the traffic violation.
And S106, judging that the preliminary judgment result is wrong, and determining that the vehicle to be detected does not press the line violation.
In this embodiment, the effective occupation area of the comparison vehicle in the lane adjacent to the lane where the vehicle to be detected is located is obtained, and if the vehicle to be detected is located in the middle lane, the effective occupation area of the comparison vehicle in the lanes adjacent to the left and right sides of the lane where the vehicle to be detected is located needs to be obtained. For the method for acquiring the effective occupation area of the comparison vehicle, reference may be made to the above-mentioned method for acquiring the effective occupation area of the vehicle to be detected, which is not described in this embodiment one by one.
As can be seen from the above description, for two vehicles on adjacent lanes, if there is no overlapping portion in their respective effective occupation areas, that is, when one of the two vehicles is translated from its lane to the lane of the other vehicle, there is no collision between the two vehicles. In this case, there is a possibility that a vehicle line-pressing violation occurs, and collision and scratching of the vehicle do not occur even if the line-pressing violation occurs. If two vehicles on adjacent lanes have overlapping effective occupation areas, that is, one of the two vehicles is translated from the lane where the vehicle is located to the lane where the other vehicle is located, the two vehicles collide with each other. Under the condition, if two vehicles need to be ensured not to collide, the two vehicles do not have the phenomenon of line pressing violation.
Based on the consideration, in the embodiment, whether the effective occupied area of the comparison vehicle in the adjacent lane is overlapped with the effective occupied area of the vehicle to be detected can be detected, and if the overlapped part does not exist, the possibility that the vehicle to be detected has the rule violation of pressing is indicated on the premise that the vehicle collision is not ensured. And under the condition that the preliminary judgment result of the violation of line pressing obtained according to the distance between the license plate image and the lane line is the violation of line pressing, the violation of line pressing of the vehicle to be detected can be finally determined.
And if the effective occupied area of the vehicle and the effective occupied area of the vehicle to be detected are compared to form an overlapping part, the possibility that the vehicle to be detected does not have the rule violation of pressing lines is indicated on the premise that the vehicle collision does not occur. And the judgment result that the vehicle to be detected has the line pressing violation judged by the distance between the license plate image and the lane line is wrong is shown, and the condition that the vehicle to be detected has no line pressing violation can be finally determined.
Through the process, whether the vehicle is subjected to line pressing violation or not can be judged according to the distance between the license plate image of the vehicle and the lane line. The judgment method is high in accuracy when the license plate is hung on the vehicle at the middle position of the tail of the vehicle, but for the vehicle with the license plate hung on the side, the license plate of the vehicle is located near the lane line, so that the misjudgment phenomenon is often caused when the judgment is carried out on the rule-breaking judgment by only adopting the method. Therefore, when the vehicle is judged to have the line pressing violation phenomenon according to the mode, the effective occupation area of the vehicle and the effective occupation area of the vehicle on the adjacent lane are combined to verify whether the previous judgment result is accurate, and the line pressing misjudgment rate of the vehicle with the side-hung license plate is reduced.
Referring to fig. 5, a functional block diagram of a vehicle line pressing violation detecting device 110 applied to the electronic device 100 according to an embodiment of the present invention is provided. The vehicle line-pressing violation detection device 110 comprises a preliminary judgment result acquisition module 111, a first area acquisition module 112, a second area acquisition module 113, a detection module 114, a first judgment module 115 and a second judgment module 116.
The preliminary judgment result obtaining module 111 is configured to obtain a preliminary judgment result of whether the vehicle to be detected violates a line pressing rule according to a relationship between a license plate image of the vehicle to be detected in the collected image and a lane line of a lane where the vehicle to be detected is located.
The first area obtaining module 112 is configured to obtain an effective occupied area of the vehicle to be detected in the corresponding lane when the preliminary determination result indicates that the vehicle to be detected is pressed against the lane violation.
The second region acquiring module 113 is configured to acquire an effective occupation region of a comparison vehicle in a lane adjacent to the lane where the vehicle to be detected is located.
The detecting module 114 is configured to detect whether there is an overlapping portion between the effective occupancy area of the comparison vehicle and the effective occupancy area of the vehicle to be detected.
The first judging module 115 is configured to judge that the preliminary judgment result is correct and determine that the vehicle to be detected violates a pressing line when the effective occupation area of the comparison vehicle does not overlap with the effective occupation area of the vehicle to be detected.
The second determination module 116 is configured to determine that the preliminary determination result is incorrect and determine that the vehicle to be detected does not press a line violation when the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected have an overlapping portion.
Referring to fig. 6, in the present embodiment, the preliminary determination result obtaining module 111 includes a license plate image obtaining unit 1111, a mapping unit 1112, and a preliminary determination result obtaining unit 1113.
The license plate image acquisition unit 1111 is configured to acquire a vehicle to be detected in the acquired image and identify a license plate image of the vehicle to be detected.
The mapping unit 1112 is configured to map the license plate image to the ground to obtain a mapping position of the license plate image on the ground.
The preliminary judgment result obtaining unit 1113 is configured to obtain a preliminary judgment result of whether the vehicle to be detected violates a pressing line according to a distance between the mapping position of the license plate image and a lane line of a lane where the vehicle to be detected is located.
In this embodiment, the first region obtaining module 112 is configured to obtain an effective occupation region of the vehicle to be detected in a corresponding lane according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected. Referring to fig. 7, in the present embodiment, the vehicle line pressing violation detecting device 110 further includes an identifying module 117 and a vehicle type obtaining module 118.
The recognition module 117 is configured to recognize a license plate image of the vehicle to be detected to obtain a color of the license plate image.
The vehicle type obtaining module 118 is configured to determine a vehicle type of the vehicle to be detected according to the color of the license plate image.
Referring to fig. 8, in the present embodiment, the first region obtaining module 112 includes a length value calculating unit 1121 and a dividing unit 1122.
The length value calculating unit 1121 is configured to calculate a length value of the vehicle to be detected according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected.
The dividing unit 1122 is configured to divide the center point of the license plate image mapped to the ground into the effective occupied area of the vehicle to be detected according to the length value in the direction of the vehicle head of the vehicle to be detected.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method, and will not be described in too much detail herein.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present invention.
In summary, according to the method and the device for detecting vehicle line-pressing violation and the electronic device 100 provided by the embodiment of the application, a preliminary judgment result of whether the vehicle to be detected is in line-pressing violation is obtained according to the relationship between the license plate image of the vehicle to be detected and the lane line of the lane where the vehicle to be detected is located in the collected image. And when the preliminary judgment result shows that the vehicle to be detected is subjected to line pressing violation, acquiring the effective occupation area of the vehicle to be detected on the corresponding lane, detecting whether the effective occupation area of the vehicle to be detected and the effective occupation area of the vehicle to be detected adjacent to the lane where the vehicle to be detected is positioned have an overlapping part, and if the effective occupation area of the vehicle to be detected and the effective occupation area of the vehicle to be detected do not have the overlapping part, determining that the previously obtained preliminary judgment result is correct, and determining that the vehicle. If the overlapped part exists, the preliminarily obtained judging result is judged to be wrong, and the fact that the vehicle to be detected does not press the line and violate the regulations is determined. According to the detection method, the judgment result obtained according to the distance between the license plate and the lane line is verified by combining the relation between the effective occupation area of the vehicle in the adjacent lane and the effective occupation area of the vehicle to be detected, and the line pressing misjudgment rate of the vehicle with the license plate hung on the side is effectively reduced.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
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 spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A vehicle line-pressing violation detection method is characterized by comprising the following steps:
obtaining a preliminary judgment result of whether the vehicle to be detected is subjected to line pressing violation according to the relation between the license plate image of the vehicle to be detected in the collected images and the lane line of the lane where the vehicle to be detected is located;
if the preliminary judgment result shows that the vehicle to be detected is pressed against the traffic rules, acquiring an effective occupied area of the vehicle to be detected in a corresponding lane;
obtaining an effective occupation area of a comparison vehicle in a lane adjacent to the lane where the vehicle to be detected is located;
detecting whether the effective occupation area of the comparison vehicle is overlapped with the effective occupation area of the vehicle to be detected or not;
if the overlapped part does not exist, judging that the preliminary judgment result is correct, and determining that the vehicle to be detected is pressed against the traffic rules;
and if the overlapped part exists, judging that the preliminary judgment result is wrong, and determining that the vehicle to be detected has no line pressing violation.
2. The vehicle line-pressing violation detection method according to claim 1, wherein the step of obtaining a preliminary judgment result of whether the vehicle to be detected presses the line violation according to a relationship between a license plate image of the vehicle to be detected in the collected image and a lane line of a lane where the vehicle to be detected is located comprises:
acquiring a vehicle to be detected in the acquired image, and identifying a license plate image of the vehicle to be detected;
mapping the license plate image to the ground to obtain a mapping position of the license plate image on the ground;
and obtaining a preliminary judgment result of whether the vehicle to be detected violates the pressing line according to the distance between the mapping position of the license plate image and the lane line of the lane where the vehicle to be detected is located.
3. The vehicle line ball violation detection method according to claim 1, wherein the step of obtaining the effective occupation area of the vehicle to be detected on the corresponding lane comprises:
and obtaining the effective occupied area of the vehicle to be detected in the corresponding lane according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected.
4. The vehicle line pressing violation detection method according to claim 3, wherein the vehicle type of the vehicle to be detected is obtained by the steps of:
identifying the license plate image of the vehicle to be detected to obtain the color of the license plate image;
and judging the vehicle type of the vehicle to be detected according to the color of the license plate image.
5. The vehicle line pressing violation detection method according to claim 3, wherein the step of obtaining the effective occupation area of the vehicle to be detected on the corresponding lane according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected comprises:
calculating to obtain a length value of the vehicle to be detected according to the size of the license plate of the vehicle to be detected and the vehicle type of the vehicle to be detected;
and dividing the length value along the direction of the lane where the vehicle to be detected is located by taking the central point of the license plate image mapped to the ground as a starting point to obtain the effective occupied area of the vehicle to be detected in the corresponding lane.
6. The vehicle line ball violation detection method according to claim 1, wherein the step of detecting whether the effective occupancy area of the comparison vehicle overlaps with the effective occupancy area of the vehicle to be detected comprises:
and detecting whether the effective occupation area of the comparison vehicle is overlapped with the effective occupation area of the vehicle to be detected in the extending direction of the lane.
7. The utility model provides a vehicle line ball detection device violating regulations, its characterized in that, the device includes:
the preliminary judgment result acquisition module is used for acquiring a preliminary judgment result of whether the vehicle to be detected violates the pressing line according to the relationship between the license plate image of the vehicle to be detected in the acquired image and the lane line of the lane where the vehicle to be detected is located;
the first area acquisition module is used for acquiring an effective occupied area of the vehicle to be detected in a corresponding lane when the preliminary judgment result shows that the vehicle to be detected is pressed against the traffic rules;
the second area acquisition module is used for acquiring an effective occupation area of a comparison vehicle in a lane adjacent to the lane where the vehicle to be detected is located;
the detection module is used for detecting whether the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected have an overlapping part;
the first judging module is used for judging that the preliminary judgment result is correct and determining that the vehicle to be detected presses a line violation when the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected do not have an overlapping part;
and the second judgment module is used for judging that the preliminary judgment result is wrong when the effective occupation area of the comparison vehicle and the effective occupation area of the vehicle to be detected have an overlapping part, and determining that the vehicle to be detected does not press the line violation.
8. The vehicle line pressing violation detecting device according to claim 7, wherein the preliminary determination result obtaining module comprises:
the license plate image acquisition unit is used for acquiring a vehicle to be detected in the acquired image and identifying a license plate image of the vehicle to be detected;
the mapping unit is used for mapping the license plate image to the ground to obtain the mapping position of the license plate image on the ground;
and the preliminary judgment result acquisition unit is used for acquiring a preliminary judgment result of whether the vehicle to be detected breaks the rule or not according to the distance between the mapping position of the license plate image and the lane line of the lane where the vehicle to be detected is located.
9. The vehicle line ball violation detection device according to claim 7, wherein the first area acquisition module is configured to acquire an effective occupation area of the vehicle to be detected on a corresponding lane according to a license plate size of the vehicle to be detected and a vehicle type of the vehicle to be detected.
10. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to perform the method of any one of claims 1-6.
CN201810837149.3A 2018-07-26 2018-07-26 Vehicle line-pressing violation detection method and device and electronic equipment Active CN110765816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810837149.3A CN110765816B (en) 2018-07-26 2018-07-26 Vehicle line-pressing violation detection method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810837149.3A CN110765816B (en) 2018-07-26 2018-07-26 Vehicle line-pressing violation detection method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110765816A true CN110765816A (en) 2020-02-07
CN110765816B CN110765816B (en) 2022-08-23

Family

ID=69326983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810837149.3A Active CN110765816B (en) 2018-07-26 2018-07-26 Vehicle line-pressing violation detection method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110765816B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111243290A (en) * 2020-04-28 2020-06-05 江苏货斯基网络科技有限公司 Driving behavior data acquisition and analysis method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101135558A (en) * 2007-09-28 2008-03-05 深圳先进技术研究院 Vehicle anti-collision early warning method and apparatus based on machine vision
TW201527156A (en) * 2014-01-03 2015-07-16 Univ Nat Chiao Tung Lane recognition method and electronic device using the same
CN106781520A (en) * 2016-12-26 2017-05-31 无锡高新兴智能交通技术有限公司 A kind of traffic offence detection method and system based on vehicle tracking
CN107045789A (en) * 2017-04-05 2017-08-15 北京易华录信息技术股份有限公司 A kind of vehicle line ball traveling prompt system and method based on vehicle electron identifying
CN107688764A (en) * 2016-08-03 2018-02-13 浙江宇视科技有限公司 Detect the method and device of vehicle peccancy

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101135558A (en) * 2007-09-28 2008-03-05 深圳先进技术研究院 Vehicle anti-collision early warning method and apparatus based on machine vision
TW201527156A (en) * 2014-01-03 2015-07-16 Univ Nat Chiao Tung Lane recognition method and electronic device using the same
CN107688764A (en) * 2016-08-03 2018-02-13 浙江宇视科技有限公司 Detect the method and device of vehicle peccancy
CN106781520A (en) * 2016-12-26 2017-05-31 无锡高新兴智能交通技术有限公司 A kind of traffic offence detection method and system based on vehicle tracking
CN107045789A (en) * 2017-04-05 2017-08-15 北京易华录信息技术股份有限公司 A kind of vehicle line ball traveling prompt system and method based on vehicle electron identifying

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡鹏: "基于机器视觉的交通压线判别方法研究", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111243290A (en) * 2020-04-28 2020-06-05 江苏货斯基网络科技有限公司 Driving behavior data acquisition and analysis method and system

Also Published As

Publication number Publication date
CN110765816B (en) 2022-08-23

Similar Documents

Publication Publication Date Title
CN109740469B (en) Lane line detection method, lane line detection device, computer device, and storage medium
CA2858919C (en) License plate recognition
CN106991820B (en) Illegal vehicle processing method and device
CN111523464A (en) Method and device for detecting illegal lane change of vehicle
CN110751012B (en) Target detection evaluation method and device, electronic equipment and storage medium
JP2023505122A (en) Annotating, collecting and processing crowdsourced on-demand AI data
CN105260701A (en) Front vehicle detection method applied to complex scene
CN111368612A (en) Overman detection system, personnel detection method and electronic equipment
Ravirathinam et al. Automatic license plate recognition for indian roads using faster-rcnn
CN113055823A (en) Method and device for sharing bicycle based on roadside parking management
CN113496213A (en) Method, device and system for determining target perception data and storage medium
CN113947743A (en) Vehicle illegal driving detection method and device, computer equipment and storage medium
CN110765816B (en) Vehicle line-pressing violation detection method and device and electronic equipment
CN112183206B (en) Traffic participant positioning method and system based on road side monocular camera
CN113297939A (en) Obstacle detection method, system, terminal device and storage medium
CN111768630A (en) Violation waste image detection method and device and electronic equipment
CN111476245A (en) Vehicle left-turn violation detection method and device, computer equipment and storage medium
CN116721396A (en) Lane line detection method, device and storage medium
CN113642521B (en) Traffic light identification quality evaluation method and device and electronic equipment
US20150178577A1 (en) Image processing apparatus, and image processing method
CN112507874B (en) Method and device for detecting motor vehicle jamming behavior
CN115359438A (en) Vehicle jam detection method, system and device based on computer vision
CN111191603B (en) Method and device for identifying people in vehicle, terminal equipment and medium
CN109409247B (en) Traffic sign identification method and device
CN113128264A (en) Vehicle area determination method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant