Vehicle line pressing detection method and device, readable storage medium and electronic equipment
By obtaining the video frame sequence during vehicle line crossing detection, determining the vehicle's driving direction and selecting an appropriate vehicle geometric projection type, the problem of poor applicability of vehicle line crossing detection in the existing technology is solved, and accurate pressing in multi-lane scenarios is achieved. Line detection.
Patent Information
- Application Number
- CN202411380550.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
AI Technical Summary
The existing vehicle line-press detection methods are poor in applicability, especially when the camera monitors multiple lanes. For lane areas at the edges in the picture, vehicle detection at the side viewing angle is prone to false alarms.
By obtaining the video frame sequence, determine the driving direction of the vehicle, and select the appropriate vehicle geometric projection type for vehicle geometric projection according to the corresponding projection type corresponding relationship, and finally perform the vehicle pressure line inspection according to the projection results.
This method can achieve accurate and stable line pressure detection in various complex scenarios, significantly improving the applicability and accuracy of detection.
Smart Images

Figure CN119360319A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and in particular, relates to a vehicle crossing detection method, device, computer-readable storage medium and electronic device. Background Art
[0002] In the field of traffic, driving over the line is an important type of violation. This behavior not only brings safety hazards to oneself, but also threatens the lives of other people. Therefore, how to determine whether a vehicle is driving over the line has become a focus of attention.
[0003] In the prior art, the vehicle crossing line detection method based on geometric projection is mainly used, that is, the vehicle geometric projection is performed in a fixed manner, and whether the vehicle crosses the line is determined based on the vehicle geometric projection result. However, the applicability of this method is poor, and good detection results can only be obtained when the camera is shooting directly at the front of the vehicle. However, when a camera monitors multiple lanes, it is inevitable that many vehicles from the side view will appear in the lane area at the edge of the picture. This method is very likely to have false alarms for these vehicles crossing the line detection from the side view. Summary of the invention
[0004] In view of this, embodiments of the present application provide a vehicle crossing line detection method, device, computer-readable storage medium and electronic device to solve the problem of poor applicability of existing vehicle crossing line detection methods.
[0005] A first aspect of an embodiment of the present application provides a vehicle crossing line detection method, which may include:
[0006] Obtain a video frame sequence to be detected;
[0007] Determining a vehicle driving direction for each frame of the video frame sequence;
[0008] According to a preset projection type correspondence relationship, the target projection type corresponding to the vehicle driving direction of each frame is determined respectively; wherein the projection type correspondence relationship is a correspondence relationship between various vehicle driving directions and various vehicle geometric projection types;
[0009] Performing vehicle geometry projection in each frame according to the target projection type to obtain a vehicle geometry projection result for each frame;
[0010] The vehicle crossing line detection is performed according to the vehicle geometric projection results of each frame to obtain the vehicle crossing line detection result.
[0011] In a specific implementation of the first aspect, performing vehicle line crossing detection according to the vehicle geometric projection results of each frame to obtain the vehicle line crossing detection result may include:
[0012] According to the vehicle geometry projection results of each frame, the projection segmentation ratio of each frame is calculated respectively;
[0013] Determine an image frame whose projection segmentation ratio is greater than a preset ratio threshold as a target image frame;
[0014] Calculate the proportion of the target image frame in the L consecutive frames of the video frame sequence; where L is a positive integer;
[0015] The vehicle crossing line detection result is determined according to the frame number ratio.
[0016] In a specific implementation of the first aspect, determining the vehicle line crossing detection result according to the frame number proportion may include:
[0017] If the frame number ratio is greater than a preset ratio threshold, determining the outer tire point of the vehicle according to the target projection type;
[0018] The vehicle lane crossing detection result is determined according to the positional relationship between the line connecting the outer side points of the tire and the lane line.
[0019] In a specific implementation of the first aspect, determining the outer tire point of the vehicle according to the target projection type may include:
[0020] determining a vehicle type of the vehicle;
[0021] Determining a tire outer point calculation coefficient corresponding to the vehicle type;
[0022] The tire outer point is determined according to the target projection type and the tire outer point calculation coefficient.
[0023] In a specific implementation of the first aspect, determining the vehicle lane crossing detection result according to the positional relationship between the line connecting the outer side points of the tire and the lane line may include:
[0024] If the line connecting the outer points of the tires does not intersect the lane line, it is determined that the vehicle does not cross the lane;
[0025] If the line connecting the outer points of the tires intersects the lane line, and the vehicle is in the boundary area, it is determined that the lane crossing state of the vehicle is pending;
[0026] If the line connecting the outer points of the tires intersects the lane line and the vehicle is not in the boundary area, it is determined that the vehicle is crossing the lane.
[0027] In a specific implementation of the first aspect, determining the vehicle driving direction of each frame in the video frame sequence may include:
[0028] Performing vehicle target detection and tracking in each frame of the video frame sequence to obtain vehicle target frame information of each frame;
[0029] The vehicle target frame information in the boundary area of each frame is completed to obtain the complete vehicle target frame information of each frame;
[0030] According to the complete vehicle target frame information of each frame, the vehicle driving direction of each frame is determined respectively.
[0031] In a specific implementation of the first aspect, the completing the vehicle target frame information in the boundary area of each frame to obtain the complete vehicle target frame information of each frame may include:
[0032] According to the vehicle target frame information of the current frame, the shortest distance between the corner point of the vehicle target frame of the current frame and the image boundary is calculated; wherein the current frame is any frame of the video frame sequence;
[0033] If the shortest distance is less than a preset distance threshold, obtaining the complete vehicle target frame information of the most recent frame before the current frame;
[0034] Completing the vehicle target frame information of the current frame according to the complete vehicle target frame information of the most recent frame to obtain the complete vehicle target frame information of the current frame;
[0035] If there is no complete vehicle target frame information in any frame before the current frame, the vehicle target frame information of the current frame is completed according to a preset reference shape to obtain the complete vehicle target frame information of the current frame.
[0036] A second aspect of an embodiment of the present application provides a vehicle line crossing detection device, which may include:
[0037] A video frame sequence acquisition module, used to acquire a video frame sequence to be detected;
[0038] A vehicle driving direction determination module, used to determine the vehicle driving direction of each frame in the video frame sequence;
[0039] A target projection type determination module is used to determine the target projection type corresponding to the vehicle driving direction of each frame according to a preset projection type correspondence relationship; wherein the projection type correspondence relationship is a correspondence relationship between various vehicle driving directions and various vehicle geometric projection types;
[0040] A vehicle geometry projection module, used to perform vehicle geometry projection in each frame according to the target projection type, and obtain a vehicle geometry projection result for each frame;
[0041] The vehicle crossing line detection module is used to perform vehicle crossing line detection according to the vehicle geometric projection results of each frame to obtain the vehicle crossing line detection results.
[0042] In a specific implementation of the second aspect, the vehicle crossing line detection module may include:
[0043] The projection segmentation ratio calculation submodule is used to calculate the projection segmentation ratio of each frame according to the vehicle geometry projection result of each frame;
[0044] A target image frame determination submodule, used to determine an image frame whose projection segmentation ratio is greater than a preset ratio threshold as a target image frame;
[0045] The frame ratio calculation submodule is used to calculate the frame ratio of the target image frame in the continuous L frames of the video frame sequence; wherein L is a positive integer;
[0046] The vehicle line crossing detection submodule is used to determine the vehicle line crossing detection result according to the frame number ratio.
[0047] In a specific implementation of the second aspect, the vehicle crossing line detection submodule may include:
[0048] A tire outer point determination unit, configured to determine the tire outer point of the vehicle according to the target projection type if the frame number ratio is greater than a preset ratio threshold;
[0049] The vehicle line crossing detection unit is used to determine the vehicle line crossing detection result according to the positional relationship between the line connecting the outer side points of the tire and the lane line.
[0050] In a specific implementation of the second aspect, the tire outer point determination unit can be specifically used to: determine the vehicle type of the vehicle; determine the tire outer point calculation coefficient corresponding to the vehicle type; and determine the tire outer point based on the target projection type and the tire outer point calculation coefficient.
[0051] In a specific implementation of the second aspect, the vehicle crossing the line detection unit can be specifically used to: if the line connecting the outer points of the tires does not intersect with the lane line, determine that the vehicle does not cross the line; if the line connecting the outer points of the tires intersects with the lane line and the vehicle is in a boundary area, determine that the vehicle's crossing the line status is pending; if the line connecting the outer points of the tires intersects with the lane line and the vehicle is not in the boundary area, determine that the vehicle crosses the line.
[0052] In a specific implementation of the second aspect, the vehicle driving direction determination module may include:
[0053] A vehicle target frame information determination submodule is used to detect and track vehicle targets in each frame of the video frame sequence to obtain vehicle target frame information for each frame;
[0054] The vehicle target frame information completion submodule is used to complete the vehicle target frame information in the boundary area of each frame to obtain the complete vehicle target frame information of each frame;
[0055] The vehicle driving direction determination submodule is used to determine the vehicle driving direction of each frame according to the complete vehicle target frame information of each frame.
[0056] In a specific implementation of the second aspect, the vehicle target frame information completion submodule can be specifically used to: calculate the shortest distance between the corner points of the vehicle target frame of the current frame and the image boundary based on the vehicle target frame information of the current frame; wherein the current frame is any frame of the video frame sequence; if the shortest distance is less than a preset distance threshold, obtain the complete vehicle target frame information of the most recent frame before the current frame; complete the vehicle target frame information of the current frame based on the complete vehicle target frame information of the most recent frame to obtain the complete vehicle target frame information of the current frame; if there is no complete vehicle target frame information in any frame before the current frame, complete the vehicle target frame information of the current frame according to a preset reference shape to obtain the complete vehicle target frame information of the current frame.
[0057] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned vehicle line crossing detection methods are implemented.
[0058] A fourth aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned vehicle line crossing detection methods when executing the computer program.
[0059] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the steps of any one of the above-mentioned vehicle line crossing detection methods.
[0060] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain a video frame sequence to be detected; determine the vehicle driving direction of each frame of the video frame sequence; determine the target projection type corresponding to the vehicle driving direction of each frame according to a preset projection type correspondence; wherein the projection type correspondence is the correspondence between various vehicle driving directions and various vehicle geometric projection types; perform vehicle geometric projection in each frame according to the target projection type to obtain the vehicle geometric projection result of each frame; perform vehicle line pressing detection according to the vehicle geometric projection result of each frame to obtain the vehicle line pressing detection result. Through the embodiments of the present application, the corresponding vehicle geometric projection type can be flexibly set according to different vehicle driving directions, ensuring accurate and stable line pressing detection effects in various complex scenes, thereby significantly improving the applicability and accuracy of line pressing detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0062] Figure 1 This is a flow chart of an embodiment of a vehicle crossing line detection method in an embodiment of the present application;
[0063] Figure 2 A schematic diagram of completing the vehicle target frame information of the current frame based on the complete vehicle target frame information of the most recent frame;
[0064] Figure 3 is a schematic diagram of performing vehicle geometry projection according to a first projection type;
[0065] Figure 4 is a schematic diagram of performing vehicle geometry projection according to a second projection type;
[0066] Figure 5 is a schematic diagram of vehicle geometry projection according to the third projection type;
[0067] Figure 6 A schematic flow chart for further optimizing the vehicle's line-crossing strategy;
[0068] Figure 7 A schematic diagram of determining a tire outer side point of a vehicle according to a first projection type;
[0069] Figure 8 A schematic diagram of determining a tire outer side point of a vehicle according to a second projection type;
[0070] Fig. 9 A schematic diagram of determining a tire outer side point of a vehicle according to a third projection type;
[0071] Fig.10 This is a structural diagram of an embodiment of a vehicle wire crossing detection device in an embodiment of the present application;
[0072] Fig.11 A structural diagram of an embodiment of a vehicle wire crossing detection submodule;
[0073] Fig.12 This is a schematic block diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0074] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0075] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0076] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0077] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0078] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0079] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0080] In the field of traffic, driving over the line is an important type of violation. This behavior not only brings safety hazards to oneself, but also threatens the lives of other people. Therefore, how to determine whether a vehicle is driving over the line has become a focus of attention.
[0081] In the prior art, the vehicle crossing line detection method based on geometric projection is mainly used, that is, the vehicle geometric projection is performed in a fixed manner, and whether the vehicle crosses the line is determined based on the vehicle geometric projection result. However, the applicability of this method is poor, and good detection results can only be obtained when the camera is shooting directly at the front of the vehicle. However, when a camera monitors multiple lanes, it is inevitable that many vehicles from the side view will appear in the lane area at the edge of the picture. This method is very likely to have false alarms for these vehicles crossing the line detection from the side view.
[0082] In view of this, embodiments of the present application provide a vehicle crossing line detection method, device, computer-readable storage medium and electronic device to solve the problem of poor applicability of existing vehicle crossing line detection methods.
[0083] In an embodiment of the present application, different corresponding vehicle geometric projection types can be set in advance according to different vehicle driving directions, so that better detection effects can be achieved in various scenarios and it has better applicability.
[0084] The execution subject of the embodiments of the present application may be an electronic device, which may include but is not limited to monitoring equipment, desktop computers, notebooks, PDAs, servers and other devices.
[0085] See also Figure 1 In the embodiments of the present application, an embodiment of a vehicle crossing line detection method may include:
[0086] Step S101: Acquire a video frame sequence to be detected.
[0087] In a specific application scenario of an embodiment of the present application, a preset camera device can be used to continuously monitor the vehicle conditions on the road, thereby forming a video frame sequence to be detected.
[0088] In a specific implementation of the embodiment of the present application, an electronic device that performs vehicle crossing line detection can acquire a video frame sequence captured by a camera device in real time and perform continuous vehicle crossing line detection thereon.
[0089] In another specific implementation method of the embodiment of the present application, when the user needs to perform a vehicle crossing the line detection, a vehicle crossing the line detection instruction can be sent to the electronic device, and the detection time period during which the vehicle crossing the line detection is required can be specified. The electronic device can receive and respond to the vehicle crossing the line detection instruction, obtain the video frame sequence captured by the camera device during the detection time period, and perform a vehicle crossing the line detection on it.
[0090] Step S102: determining the vehicle driving direction of each frame in the video frame sequence.
[0091] After acquiring the video frame sequence, the electronic device can detect and track the vehicle target in each frame of the video frame sequence, thereby obtaining the vehicle target frame information of each frame. The specific target detection and tracking algorithm used can be flexibly selected according to actual conditions, and the embodiments of the present application do not specifically limit this.
[0092] The vehicle target frame information may include, but is not limited to, the position information and identification information (ID) of the vehicle target frame. For a rectangular vehicle target frame, its position information can generally be represented by the coordinates of the upper left corner point and the coordinates of the lower right corner point. Of course, its position information can also be represented by the coordinates of other points according to actual conditions, such as the coordinates of the upper right corner point and the coordinates of the lower left corner point, etc., which are not specifically limited in the embodiments of the present application. The identification information can be used to distinguish different vehicles, that is, the identification information corresponding to different vehicles is different, while the identification information corresponding to the same vehicle in different frames remains consistent. In an embodiment of the present application, vehicle pressure line detection can be performed simultaneously on vehicles with different identification information in each frame, thereby obtaining the pressure line detection results of all vehicles in the video frame sequence. For the sake of ease of narration, the following text is explained by taking the same vehicle with the same identification information as an example.
[0093] In a specific implementation of the embodiment of the present application, after obtaining the vehicle target frame information of each frame, the vehicle driving direction of each frame can be determined directly based on the vehicle target frame information of each frame.
[0094] Considering that in actual applications, the vehicle in the video frame may not be complete, for example, the vehicle may be located near the image boundary of the video frame, and only a part of the vehicle body is in the image, the vehicle target frame information obtained at this time is inaccurate. Therefore, in another specific implementation of the embodiment of the present application, after obtaining the vehicle target frame information of each frame, the vehicle target frame information in the boundary area of each frame can be first completed to obtain the complete vehicle target frame information of each frame; then, according to the complete vehicle target frame information of each frame, the driving direction of the vehicle in each frame is determined respectively.
[0095] Here, taking any frame of the video frame sequence (referred to as the current frame) as an example, the process of completing the vehicle target frame information is described in detail.
[0096] First, the shortest distance between the corner points of the vehicle target frame of the current frame and the image boundary can be calculated according to the vehicle target frame information of the current frame.
[0097] If the shortest distance is greater than or equal to the preset distance threshold, it means that the vehicle is not in the boundary area. At this time, the vehicle target frame information can be considered complete and no further completion is required. The vehicle target frame information can be directly used as the complete vehicle target frame information. The distance threshold can be set according to actual conditions, and the embodiment of the present application does not specifically limit this.
[0098] If the shortest distance is less than the distance threshold, it means that the vehicle is in the boundary area. At this time, it can be considered that the vehicle target frame information may be incomplete and needs to be completed.
[0099] Specifically, it can be determined whether there is complete vehicle target frame information in the frames before the current frame. If so, the complete vehicle target frame information of the most recent frame is obtained, and the vehicle target frame information of the current frame is completed based on the complete vehicle target frame information of the most recent frame, so as to obtain the complete vehicle target frame information of the current frame.
[0100] like Figure 2 As shown, frame A is the current frame, frame B is the most recent frame with complete vehicle target frame information before the current frame, and the aspect ratio of the complete vehicle target frame can be determined based on the complete vehicle target frame information of frame B, which is recorded as the reference aspect ratio. Based on the reference aspect ratio, the vehicle target frame of the current frame can be extended outside the image boundary so that the aspect ratio of the extended vehicle target frame of the current frame is consistent with the reference aspect ratio. At this time, the extended vehicle target frame is the complete vehicle target frame of the current frame, and its corresponding vehicle target frame information is the complete vehicle target frame information of the current frame.
[0101] If the complete vehicle target frame information does not exist in any frame before the current frame, the vehicle target frame information of the current frame can be completed according to a preset reference shape, so as to obtain the complete vehicle target frame information of the current frame. The reference shape can be a square or other rectangle with a specific aspect ratio. According to the aspect ratio of the reference shape, the vehicle target frame of the current frame can be extended outside the image boundary, so that the aspect ratio of the extended vehicle target frame of the current frame is consistent with the aspect ratio of the reference shape. At this time, the extended vehicle target frame is the complete vehicle target frame of the current frame, and the corresponding vehicle target frame information is the complete vehicle target frame information of the current frame.
[0102] By traversing each frame of the video frame sequence in the above manner, the complete vehicle target frame information of each frame can be obtained, and the center point of the vehicle target frame of each frame can be calculated based on this. Then, the vehicle driving direction of each frame can be determined according to the following formula:
[0103]
[0104] Among them, n is the serial number of the current frame. Here, it is assumed that the frames of the video frame sequence are arranged in sequence according to the serial numbers 0, 1, 2, 3,...... center[n] is the center point of the vehicle target box of the current frame, center[0] is the center point of the vehicle target box of the frame with serial number 0, center[n - N] is the center point of the vehicle target box of the frame with serial number n - N, track vetor is the driving direction of the vehicle in the current frame represented in vector form, M is the first threshold, N is the second threshold, and M < N. The specific values of both can be set according to the actual situation, and the embodiments of the present application do not make specific limitations in this regard. As an example, M = 5 and N = 40 can be taken.
[0105] Considering that when the vehicle is parked or driving slowly, the accuracy of the calculated driving direction of the vehicle is poor. Therefore, in a specific implementation manner of the embodiments of the present application, the distance d between the center point of the vehicle target box in the current frame and the center points of the vehicle target boxes in the previous N frames can be calculated. If d ≥ diagonal × δ, it can be considered that the current frame is in a normal driving state, and the calculated driving direction of the vehicle is credible; if d < diagonal × δ, it can be considered that the current frame is in a state where the vehicle is parked or driving slowly, and the calculated driving direction of the vehicle is not credible. At this time, the credible driving direction of the nearest frame can be used as the driving direction of the current frame. Among them, diagonal is the diagonal length of the image frame, and δ is a preset distance coefficient, and its specific value can be set according to the actual situation, and the embodiments of the present application do not make specific limitations in this regard.
[0106] Traverse each frame of the video frame sequence in the above manner, and the driving direction of each frame can be obtained.
[0107] Step S103: Determine the target projection type corresponding to the driving direction of each frame respectively according to the preset projection type correspondence.
[0108] Among them, the projection type correspondence is the correspondence between various driving directions of the vehicle and various vehicle geometric projection types.
[0109] In a specific implementation of the embodiment of the present application, three different vehicle geometric projection types can be preset, which are respectively recorded as the first projection type, the second projection type and the third projection type. When the angle between the vehicle's driving direction and the horizontal direction is in the interval of (40°, 80°) or (100°, 140°), the corresponding target projection type is the first projection type; when the angle between the vehicle's driving direction and the horizontal direction is in the interval of [80°, 100°], the corresponding target projection type is the second projection type; when the angle between the vehicle's driving direction and the horizontal direction is in the interval of [0°, 40°] or [140°, 180°], the corresponding target projection type is the third projection type.
[0110] Step S104: Perform vehicle geometry projection in each frame according to the target projection type to obtain the vehicle geometry projection result of each frame.
[0111] Here, any frame (ie, the current frame) in the video frame sequence is still taken as an example to explain the vehicle geometry projection process in detail.
[0112] When the target projection type is the first projection type, the corresponding fitting point can be selected according to the vehicle driving direction of the current frame. Specifically, if the vehicle is driving to the upper right or lower left, the upper right corner of the vehicle target frame can be selected as the upper fitting point, and the lower left corner of the vehicle target frame can be selected as the lower fitting point; if the vehicle is driving to the upper left or lower right, the upper left corner of the vehicle target frame can be selected as the upper fitting point, and the lower right corner of the vehicle target frame can be selected as the lower fitting point.
[0113] like Figure 3 As shown, the vehicle is traveling to the lower right. After selecting the fitting point, a straight line passing through the upper fitting point (recorded as the first straight line) can be constructed, and the intersection of the first straight line and the lower boundary of the vehicle target frame (recorded as the first intersection) is determined, wherein the slope of the first straight line is proportional to the slope θ of the vehicle's driving direction, and its proportional coefficient k can be set according to actual conditions, and the embodiment of the present application does not make specific limitations on this. When the first intersection exceeds the line segment range of the lower boundary, the lower left corner point of the vehicle target frame can be determined as the first intersection point; similarly, a straight line passing through the lower fitting point (recorded as the second straight line) can be constructed, and the intersection of the second straight line and the upper boundary of the vehicle target frame (recorded as the second intersection point) is determined, wherein the slope of the second straight line is proportional to the slope of the vehicle's driving direction, and its proportional coefficient 1 / n can be set according to actual conditions, and the embodiment of the present application does not make specific limitations on this. When the second intersection exceeds the line segment range of the upper boundary, the upper right corner point of the vehicle target frame can be determined as the second intersection point. After the first intersection point and the second intersection point are determined, the quadrilateral formed by the upper fitting point, the first intersection point, the lower fitting point and the second intersection point can be used as the vehicle geometry projection result of the current frame.
[0114] When the target projection type is the second projection type, such as Figure 4 As shown, the vehicle geometric projection result of the current frame can be fitted into an isosceles trapezoid, wherein the lower boundary of the vehicle target frame is the lower base of the isosceles trapezoid, and the upper boundary of the vehicle target frame is the upper base of the isosceles trapezoid. The lower angle of the isosceles trapezoid can be set according to actual conditions. For example, it can be set to 80° or other values. The embodiments of the present application do not specifically limit this.
[0115] When the target projection type is the third projection type, the corresponding lower fitting point can be selected according to the vehicle driving direction of the current frame. Specifically, if the vehicle is driving to the upper right or lower left, the lower left corner of the vehicle target frame can be selected as the lower fitting point; if the vehicle is driving to the upper left or lower right, the lower right corner of the vehicle target frame can be selected as the lower fitting point.
[0116] like Figure 5 As shown, the vehicle is traveling to the lower left. After selecting the lower fitting point (i.e., point A in the figure), a straight line passing through the lower fitting point (recorded as the third straight line) can be constructed, and the intersection of the third straight line and the side boundary of the vehicle target frame (i.e., point B in the figure) is determined, wherein the slope of the third straight line is proportional to the slope of the vehicle's driving direction, and its proportional coefficient 1 / n can be set according to the actual situation. If point A is the lower left corner point, the side boundary here refers to the right side boundary, otherwise, if point A is the lower right corner point, then the side boundary here refers to the left side boundary. Then, point C can be selected on the line segment connecting point B and point E, so that the ratio of BC to CE is a preset specific ratio. The specific value of the ratio is set according to the actual situation, for example, it is set to 3:2 or other values, and the embodiment of the present application does not specifically limit this. Wherein, if point A is the lower left corner point, point E is the lower right corner point, otherwise, if point A is the lower right corner point, point E is the lower left corner point. Then, a straight line passing through point C (recorded as the fourth straight line) can be constructed, and the intersection of the fourth straight line and the lower boundary of the vehicle target frame (i.e., point D in the figure) can be determined, wherein the slope of the fourth straight line is proportional to the slope of the vehicle's driving direction, and its proportional coefficient k can be set according to actual conditions, and the embodiment of the present application does not specifically limit this. When point D exceeds the line segment range of the lower boundary, the lower left corner point of the vehicle target frame can be determined as point D. Finally, the quadrilateral formed by points A, B, C, and D can be used as the vehicle geometry projection result of the current frame.
[0117] By traversing each frame of the video frame sequence in the above manner, the vehicle geometry projection result of each frame can be obtained.
[0118] It should be noted that the above-mentioned various vehicle geometric projection types, and the correspondence between various vehicle driving directions and various vehicle geometric projection types are only examples. In actual applications, other vehicle geometric projection types and other projection type correspondences can be set according to specific circumstances.
[0119] Step S105: Perform vehicle line-crossing detection according to the vehicle geometric projection results of each frame to obtain a vehicle line-crossing detection result.
[0120] After obtaining the vehicle geometry projection results of each frame, the projection segmentation ratio of each frame can be calculated according to the vehicle geometry projection results of each frame, and the image frame whose projection segmentation ratio is greater than the preset ratio threshold is determined as the target image frame. Here, any frame (i.e., the current frame) of the video frame sequence is still taken as an example to explain the vehicle geometry projection process in detail. Specifically, the area of the smaller part of the vehicle geometry projection result of the current frame that is segmented by the lane line can be recorded as S small , and the total area of the vehicle geometric projection result of the current frame is recorded as S ABCD , S small With S ABCD The ratio between is the projection segmentation ratio of the current frame. The lane line can be manually input or detected by a preset lane line detection model. The specific value of the ratio threshold is set according to the actual situation, and the embodiment of the present application does not make specific restrictions on this.
[0121] In a specific implementation of the embodiment of the present application, as long as there is at least one frame that is a target image frame, it can be determined that the vehicle crossing the line detection result is the vehicle crossing the line.
[0122] In another specific implementation of the embodiment of the present application, in order to avoid false detection and improve detection accuracy, comprehensive consideration can be performed within multiple consecutive frames.
[0123] Specifically, the frame ratio of the target image frame in the L consecutive frames of the video frame sequence can be calculated, and the vehicle crossing line detection result can be determined according to the frame ratio. Wherein, L is a positive integer, and its specific value can be set according to the actual situation. For example, it can be set to 5, 8, 10 or other values, which is not specifically limited in the embodiment of the present application.
[0124] If the frame number ratio is less than or equal to the preset ratio threshold, it can be determined that the vehicle crossing the line detection result is that the vehicle does not cross the line. The specific value of the ratio threshold is set according to the actual situation. For example, it can be set to 80%, 90% or other values, and the embodiment of the present application does not specifically limit this.
[0125] If the frame rate is greater than the threshold, the vehicle crossing line detection result can be directly determined as the vehicle crossing line. Figure 6 The process shown in the figure further optimizes the vehicle's line-crossing strategy:
[0126] Step S1051, determining the outer tire point of the vehicle according to the target projection type.
[0127] Here, any frame (ie, the current frame) in the video frame sequence is still taken as an example to describe in detail the process of determining the tire outer side point.
[0128] First, the vehicle type of the vehicle can be determined, that is, whether the vehicle is a large vehicle or a small vehicle. In a specific implementation of an embodiment of the present application, the vehicle in the current frame can be classified by a preset vehicle type detection model to obtain the vehicle type. In another specific implementation of an embodiment of the present application, the vehicle type of the vehicle can be determined based on the aspect ratio of the vehicle target frame of the current frame. For example, according to experience, the target frame of a large vehicle is often much taller than the target frame of a small vehicle. If the aspect ratio is greater than the preset aspect ratio threshold, it can be determined that the vehicle is a large vehicle. Otherwise, it can be determined that the vehicle is a small vehicle. Among them, the aspect ratio threshold can be flexibly set according to actual conditions, and the embodiment of the present application does not specifically limit this.
[0129] Then, the tire outer point calculation coefficient corresponding to the vehicle type can be determined. The tire outer point calculation coefficient can include a first coefficient (denoted as μ1) and a second coefficient (denoted as μ2). For a small car, its corresponding tire outer point calculation coefficient is: μ1 = μ 11 , μ2=μ 21 ; For large vehicles, the corresponding calculation coefficient of the tire outer point is: μ1=μ 12 , μ2=μ 22 Among them, μ 11 , μ 21 , μ 12 and μ 22 The specific value of can be set according to the actual situation, and the embodiment of the present application does not make any specific limitation on this. Generally, μ 12 >μ 11 , μ 22 >μ 21 .
[0130] Finally, the outer point of the tire can be determined according to the target projection type and the coefficient of the outer point of the tire.
[0131] When the target projection type is the first projection type, such as Figure 7As shown, the first intersection point (i.e., point a' in the figure) can be used as a tire outer point, and a point on the line segment connecting point a and point b that satisfies the following conditions (i.e., point b' in the figure) can be used as another tire outer point: |b'b| = μ1 × |ab|, and line segment a'b' is the line connecting the tire outer points. Among them, point b is the lower fitting point. If point b is the lower left corner point, point a is the lower right corner point. Conversely, if point b is the lower right corner point, point a is the lower left corner point.
[0132] When the target projection type is the second projection type, such as Figure 8 As shown, two points on the line segment connecting point a and point b that meet the following conditions (i.e., point a' and point b' in the figure) can be used as two left-right symmetrical tire outer points: |a'a| = μ1 × |ab|, |b'b| = μ1 × |ab|, and line segment a'b' is the line connecting the tire outer points. Point a and point b are the lower left corner point and the lower right corner point, respectively.
[0133] When the target projection type is the third projection type, such as Fig. 9 As shown, point C and point D can be taken as two outer points of the tire, and a point on the line segment connecting point A and point D that satisfies the following conditions (i.e., point F in the figure) can be taken as the third outer point of the tire: |AF|=μ2×|AE|, and line segment CD and line segment DF are the lines connecting the outer points of the tire.
[0134] Step S1052: Determine the vehicle lane crossing detection result according to the positional relationship between the line connecting the outer points of the tire and the lane line.
[0135] Specifically, if the line connecting the outer points of the tire does not intersect the lane line, it can be determined that the vehicle crossing the lane detection result is that the vehicle does not cross the lane.
[0136] If the line connecting the outer points of the tire intersects with the lane line, in a specific implementation of the embodiment of the present application, it can be determined that the vehicle crossing the lane detection result is the vehicle crossing the lane.
[0137] However, considering that misjudgment is prone to occur when the vehicle body is incomplete, in another specific implementation of the embodiment of the present application, in order to avoid misdetection and improve the detection accuracy, the vehicle line-crossing detection result can be further determined in combination with the integrity of the vehicle body. Specifically, if the line connecting the outer points of the tire intersects with the lane line, and the vehicle is not in the boundary area, the vehicle line-crossing detection result is determined to be the vehicle line-crossing; if the line connecting the outer points of the tire intersects with the lane line, and the vehicle is in the boundary area, the vehicle line-crossing state is determined to be pending, and the processing of each frame after the current frame is continued, and the vehicle line-crossing detection result of the most recent frame when the vehicle is not in the boundary area is used.
[0138] In summary, the embodiments of the present application obtain a video frame sequence to be detected; determine the vehicle driving direction of each frame in the video frame sequence; determine the target projection type corresponding to the vehicle driving direction of each frame according to a preset projection type correspondence; wherein the projection type correspondence is the correspondence between various vehicle driving directions and various vehicle geometric projection types; perform vehicle geometric projection in each frame according to the target projection type to obtain the vehicle geometric projection result of each frame; perform vehicle line pressing detection according to the vehicle geometric projection result of each frame to obtain the vehicle line pressing detection result. Through the embodiments of the present application, the corresponding vehicle geometric projection type can be flexibly set according to different vehicle driving directions, ensuring accurate and stable line pressing detection effects in various complex scenes, thereby significantly improving the applicability and accuracy of line pressing detection.
[0139] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0140] Corresponding to the vehicle crossing line detection method described in the above embodiment, Fig.10 A structural diagram of an embodiment of a vehicle wire crossing detection device provided in an embodiment of the present application is shown.
[0141] In this embodiment, a vehicle line crossing detection device may include:
[0142] The video frame sequence acquisition module 1001 is used to acquire the video frame sequence to be detected;
[0143] The vehicle driving direction determination module 1002 is used to determine the vehicle driving direction of each frame in the video frame sequence;
[0144] The target projection type determination module 1003 is used to determine the target projection type corresponding to the vehicle driving direction of each frame according to a preset projection type correspondence relationship; wherein the projection type correspondence relationship is a correspondence relationship between various vehicle driving directions and various vehicle geometric projection types;
[0145] A vehicle geometry projection module 1004 is used to perform vehicle geometry projection in each frame according to the target projection type to obtain a vehicle geometry projection result for each frame;
[0146] The vehicle crossing line detection module 1005 is used to perform vehicle crossing line detection according to the vehicle geometric projection results of each frame to obtain the vehicle crossing line detection results.
[0147] In a specific implementation of the embodiment of the present application, the vehicle crossing line detection module may include:
[0148] The projection segmentation ratio calculation submodule 10051 is used to calculate the projection segmentation ratio of each frame according to the vehicle geometry projection result of each frame;
[0149] A target image frame determination submodule 10052 is used to determine an image frame whose projection segmentation ratio is greater than a preset ratio threshold as a target image frame;
[0150] The frame ratio calculation submodule 10053 is used to calculate the frame ratio of the target image frame in the continuous L frames of the video frame sequence; wherein L is a positive integer;
[0151] The vehicle crossing line detection submodule 10054 is used to determine the vehicle crossing line detection result according to the frame number ratio.
[0152] In a specific implementation of the embodiment of the present application, Fig.11 As shown, the vehicle line crossing detection submodule may include:
[0153] A tire outer point determination unit 100541 is configured to determine the tire outer point of the vehicle according to the target projection type if the frame number ratio is greater than a preset ratio threshold;
[0154] The vehicle crossing line detection unit 100542 is used to determine the vehicle crossing line detection result according to the positional relationship between the line connecting the outer side points of the tire and the lane line.
[0155] In a specific implementation of an embodiment of the present application, the tire outer point determination unit can be specifically used to: determine the vehicle type of the vehicle; determine the tire outer point calculation coefficient corresponding to the vehicle type; and determine the tire outer point based on the target projection type and the tire outer point calculation coefficient.
[0156] In a specific implementation of an embodiment of the present application, the vehicle crossing the line detection unit can be specifically used to: if the line connecting the outer points of the tire does not intersect with the lane line, determine that the vehicle does not cross the line; if the line connecting the outer points of the tire intersects with the lane line and the vehicle is in a boundary area, determine that the crossing status of the vehicle is pending; if the line connecting the outer points of the tire intersects with the lane line and the vehicle is not in the boundary area, determine that the vehicle crosses the line.
[0157] In a specific implementation of the embodiment of the present application, the vehicle driving direction determination module may include:
[0158] The vehicle target frame information determination submodule 10021 is used to detect and track the vehicle target in each frame of the video frame sequence to obtain the vehicle target frame information of each frame;
[0159] The vehicle target frame information completion submodule 10022 is used to complete the vehicle target frame information in the boundary area of each frame to obtain the complete vehicle target frame information of each frame;
[0160] The vehicle driving direction determination submodule 10023 is used to determine the vehicle driving direction of each frame according to the complete vehicle target frame information of each frame.
[0161] In a specific implementation method of an embodiment of the present application, the vehicle target frame information completion submodule can be specifically used to: calculate the shortest distance between the corner points of the vehicle target frame of the current frame and the image boundary based on the vehicle target frame information of the current frame; wherein the current frame is any frame of the video frame sequence; if the shortest distance is less than a preset distance threshold, obtain the complete vehicle target frame information of the most recent frame before the current frame; complete the vehicle target frame information of the current frame based on the complete vehicle target frame information of the most recent frame to obtain the complete vehicle target frame information of the current frame; if there is no complete vehicle target frame information in any frame before the current frame, complete the vehicle target frame information of the current frame according to a preset reference shape to obtain the complete vehicle target frame information of the current frame.
[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] Fig.12 A schematic block diagram of an electronic device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0165] like Fig.12 As shown, the electronic device 12 of this embodiment includes: a processor 120, a memory 121, and a computer program 122 stored in the memory 121 and executable on the processor 120. When the processor 120 executes the computer program 122, the steps in the above-mentioned vehicle line crossing detection method embodiments are implemented, for example Figure 1 Alternatively, when the processor 120 executes the computer program 122, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Fig.10 The functions of the video frame sequence acquisition module 1001 to the vehicle crossing line detection module 1005 are shown.
[0166] Exemplarily, the computer program 122 may be divided into one or more modules / units, which are stored in the memory 121 and executed by the processor 120 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 122 in the electronic device 12.
[0167] The electronic device 12 may include but is not limited to monitoring equipment, desktop computers, notebooks, PDAs, servers and other devices. Those skilled in the art will appreciate that Fig.12 It is only an example of the electronic device 12 and does not constitute a limitation of the electronic device 12. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 12 may also include input and output devices, network access devices, buses, etc.
[0168] The processor 120 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0169] The memory 121 may be an internal storage unit of the electronic device 12, such as a hard disk or memory of the electronic device 12. The memory 121 may also be an external storage device of the electronic device 12, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 12. Further, the memory 121 may also include both an internal storage unit of the electronic device 12 and an external storage device. The memory 121 is used to store the computer program and other programs and data required by the electronic device 12. The memory 121 may also be used to temporarily store data that has been output or is to be output.
[0170] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0171] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0172] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0173] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0174] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0176] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0177] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A vehicle line crossing detection method, characterized in that: include: Obtain a video frame sequence to be detected; Determining a vehicle driving direction for each frame of the video frame sequence; According to a preset projection type correspondence relationship, the target projection type corresponding to the vehicle driving direction of each frame is determined respectively; wherein the projection type correspondence relationship is a correspondence relationship between various vehicle driving directions and various vehicle geometric projection types; Performing vehicle geometry projection in each frame according to the target projection type to obtain a vehicle geometry projection result for each frame; The vehicle crossing line detection is performed according to the vehicle geometric projection results of each frame to obtain the vehicle crossing line detection result.
2. The vehicle line crossing detection method according to claim 1, characterized in that: The vehicle line-crossing detection is performed according to the vehicle geometric projection results of each frame to obtain the vehicle line-crossing detection result, including: According to the vehicle geometry projection results of each frame, the projection segmentation ratio of each frame is calculated respectively; Determine an image frame whose projection segmentation ratio is greater than a preset ratio threshold as a target image frame; Calculate the proportion of the target image frame in the L consecutive frames of the video frame sequence; where L is a positive integer; The vehicle crossing line detection result is determined according to the frame number ratio.
3. The vehicle line crossing detection method according to claim 2, characterized in that: The determining the vehicle line crossing detection result according to the frame number ratio includes: If the frame number ratio is greater than a preset ratio threshold, determining the outer tire point of the vehicle according to the target projection type; The vehicle lane crossing detection result is determined according to the positional relationship between the line connecting the outer side points of the tire and the lane line.
4. The vehicle line crossing detection method according to claim 3, characterized in that: Determining the outer side point of the tire of the vehicle according to the target projection type includes: determining a vehicle type of the vehicle; Determining a tire outer point calculation coefficient corresponding to the vehicle type; The tire outer point is determined according to the target projection type and the tire outer point calculation coefficient.
5. The vehicle line crossing detection method according to claim 3, characterized in that: The determining of the vehicle lane crossing detection result according to the positional relationship between the line connecting the outer side points of the tire and the lane line comprises: If the line connecting the outer points of the tires does not intersect the lane line, it is determined that the vehicle does not cross the lane; If the line connecting the outer points of the tires intersects the lane line, and the vehicle is in the boundary area, it is determined that the lane crossing state of the vehicle is pending; If the line connecting the outer points of the tires intersects the lane line and the vehicle is not in the boundary area, it is determined that the vehicle is crossing the lane.
6. The vehicle line crossing detection method according to any one of claims 1 to 5, characterized in that: Determining the vehicle driving direction of each frame in the video frame sequence includes: Performing vehicle target detection and tracking in each frame of the video frame sequence to obtain vehicle target frame information of each frame; The vehicle target frame information in the boundary area of each frame is completed to obtain the complete vehicle target frame information of each frame; According to the complete vehicle target frame information of each frame, the vehicle driving direction of each frame is determined respectively.
7. The vehicle line crossing detection method according to claim 6, characterized in that: The vehicle target frame information in the boundary area of each frame is completed to obtain the complete vehicle target frame information of each frame, including: According to the vehicle target frame information of the current frame, the shortest distance between the corner point of the vehicle target frame of the current frame and the image boundary is calculated; wherein the current frame is any frame of the video frame sequence; If the shortest distance is less than a preset distance threshold, obtaining the complete vehicle target frame information of the most recent frame before the current frame; Completing the vehicle target frame information of the current frame according to the complete vehicle target frame information of the most recent frame to obtain the complete vehicle target frame information of the current frame; If there is no complete vehicle target frame information in any frame before the current frame, the vehicle target frame information of the current frame is completed according to a preset reference shape to obtain the complete vehicle target frame information of the current frame.
8. A vehicle wire crossing detection device, characterized in that: include: A video frame sequence acquisition module, used to acquire a video frame sequence to be detected; A vehicle driving direction determination module, used to determine the vehicle driving direction of each frame in the video frame sequence; A target projection type determination module is used to determine the target projection type corresponding to the vehicle driving direction of each frame according to a preset projection type correspondence relationship; wherein the projection type correspondence relationship is a correspondence relationship between various vehicle driving directions and various vehicle geometric projection types; A vehicle geometry projection module, used to perform vehicle geometry projection in each frame according to the target projection type, and obtain a vehicle geometry projection result for each frame; The vehicle crossing line detection module is used to perform vehicle crossing line detection according to the vehicle geometric projection results of each frame to obtain the vehicle crossing line detection results.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the vehicle line crossing detection method according to any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the vehicle line crossing detection method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Vehicle endurance test method and device and storage medium
CN121026589A
Vehicle snapshot method, system and device and storage medium
CN121171037A