A method and system for monitoring the closed state of a muck truck compartment based on short video
Through the closed state monitoring method of the dump truck car compartment based on short video, the short video is intercepted by one-way road monitoring video and light uniformity analysis is performed, and the problems of low detection efficiency and lack of timeliness in the existing technology are solved, and the fast and accurate detection of the closed state of the dump truck car compartment is achieved.
Patent Information
- Application Number
- CN202411910287.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-24
AI Technical Summary
In the prior art, the closed state detection efficiency of the slag truck car compartment is low and lacks timeliness, and it is easy to cause the slag to be thrown out due to wind and body vibration, affecting urban sanitation and road safety.
The monitoring method based on short video is adopted, short video is intercepted through one-way road monitoring video, target detection of dump trucks and determination of the enclosed state of the car, and light uniformity analysis is used to determine the enclosed state of the car.
It realizes rapid and accurate detection of the closed state of the dump truck car, improves the inspection efficiency, reduces labor costs, and ensures timeliness, avoiding the impact of dumping on urban sanitation and road safety.
Smart Images

Figure CN119339340B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle monitoring, and in particular to a method and system for monitoring the closed state of a muck truck compartment based on short videos. Background Art
[0002] At present, if the muck truck compartment is not sealed and travels in the city, it is easy for the muck in the compartment to be affected by wind, body vibration and other factors, causing the muck to be thrown out, thus causing a certain impact on urban hygiene and causing safety hazards to other vehicles on the road. However, the existing technology mainly sets up inspection stations on the road, and the staff intercepts the muck trucks at the inspection stations and conducts manual inspections on the muck trucks. This method is inefficient and not timely enough. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for monitoring the closed state of a muck truck compartment based on short videos. The method for monitoring the closed state of a muck truck compartment mainly applies the one-way road monitoring currently installed on roads, and based on the one-way road monitoring, short videos of the monitoring videos of the muck truck are captured, and light uniformity analysis is performed on effective data in the short video, thereby quickly and accurately determining the closed state of the muck truck compartment.
[0004] In order to solve the above technical problems, the present invention adopts the following solutions:
[0005] A method for monitoring the closed state of a muck truck compartment based on short videos, the method comprising the following steps:
[0006] S1. Obtaining a one-way road monitoring video of a muck truck through one-way road monitoring;
[0007] The one-way road monitoring video is a continuous frame sequence consisting of a first frame of a vehicle body image of a muck truck entering a one-way road monitoring range and a last frame of a vehicle body image of a muck truck exiting a one-way road monitoring range;
[0008] S2, sequentially perform target detection of a muck truck on each frame of the vehicle body image in the one-way road monitoring video to obtain a target detection frame of the muck truck, and obtain the vehicle body ratio of the target area of the muck truck on the corresponding vehicle body image and the vehicle head direction of the muck truck on the corresponding vehicle body image according to the target detection frame;
[0009] S3, judging the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion and the vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video, and performing short video interception of the one-way road monitoring video according to the judgment result to obtain the short video to be identified;
[0010] S4. Convert each frame of the vehicle body image in the short video to be identified into a grayscale image, process the compartment area of the muck truck according to the grayscale value of the pixel point in each frame of the grayscale image to obtain the light uniformity corresponding to the compartment area of the muck truck, and determine the closed state of the compartment of the muck truck by the light uniformity of the compartment area of the muck truck.
[0011] Furthermore, the step S1 includes the following steps:
[0012] S11, performing vehicle type recognition on the vehicle body picture collected in real time by one-way road monitoring, and determining whether the type of the vehicle in the current vehicle body picture is a muck truck, if so, taking the current vehicle body picture as the first frame of the vehicle body picture, and obtaining the vehicle information of the muck truck in the first frame of the vehicle body picture, and then proceeding to step S12;
[0013] S12, identifying and tracking the muck truck according to the vehicle information of the muck truck in the first frame of the body picture, and obtaining the last frame of the body picture of the muck truck collected by the one-way road monitoring;
[0014] S13, extracting the one-way road monitoring video corresponding to the muck truck from the one-way road monitoring according to the first frame body image and the last frame body image of the muck truck.
[0015] Furthermore, the process of detecting the target of the muck truck is as follows:
[0016] Performing a muck truck target detection on each frame of the vehicle body image in the one-way road monitoring video in turn, obtaining a target detection frame of the muck truck, and obtaining a muck truck area in each frame of the vehicle body image through the target detection frame;
[0017] According to the location of the muck truck area, the area ratio of the target area of the muck truck on the corresponding body image is obtained, which is recorded as the body ratio of the muck truck;
[0018] At the same time, the front of the muck truck in the muck truck area is identified to obtain the front area of the muck truck, and the front direction of the muck truck is determined and recorded according to the front area of the muck truck.
[0019] Furthermore, S3 specifically includes the following steps:
[0020] S31, obtaining the vehicle body proportion and vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video;
[0021] S32, performing curve fitting on multiple vehicle proportions according to a continuous frame sequence corresponding to the one-way road monitoring video to form a vehicle proportion curve to obtain a corresponding vehicle proportion change trend;
[0022] S33, determining the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion change trend and the vehicle head direction corresponding to the one-way road monitoring video, wherein the relative driving state refers to the driving direction of the muck truck relative to the one-way road monitoring, including the muck truck driving forward and the muck truck driving backward;
[0023] S34, capturing the short video based on the corresponding short video capture starting point matched with the determination result, the first frame of the vehicle body image can be selected as the short video capture starting point and pushed back a preset time, or the last frame of the vehicle body image can be selected as the short video capture starting point and pushed forward a preset time to form a short video to be identified.
[0024] Further, in S33, the process of determining the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion change trend and the vehicle head direction corresponding to the one-way road monitoring video is as follows:
[0025] The vehicle head direction includes the vehicle head facing forward and the vehicle head facing backward;
[0026] The change trend of the body proportion includes from small to large and from large to small;
[0027] When the vehicle body proportion corresponding to the one-way road monitoring video changes from small to large and the vehicle head is facing forward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving forward;
[0028] When the vehicle body proportion corresponding to the one-way road monitoring video changes from small to large and the vehicle head is facing backward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving in from the back;
[0029] When the vehicle body proportion corresponding to the one-way road monitoring video changes from large to small and the vehicle head is facing forward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving in from the back;
[0030] When the vehicle body proportion corresponding to the one-way road monitoring video changes from large to small and the front of the vehicle is facing backward, it is determined that the relative driving state between the current dump truck and the one-way road monitoring is that the dump truck is driving forward.
[0031] Furthermore, the process of performing short video capture according to the determination result matching the corresponding short video capture starting point is as follows:
[0032] When the determination result is that the muck truck is driving forward, the last frame of the vehicle body picture is selected as the starting point of the short video capture and pushed forward by a preset time to form a short video to be identified;
[0033] When the determination result is that the dump truck is driving in from the back, the first frame of the vehicle body image is selected as the starting point of the short video capture and pushed forward by a preset time to form a short video to be identified.
[0034] Furthermore, the step S4 includes the following steps:
[0035] S41, processing each frame of the vehicle body image in the short video to be identified and converting it into a grayscale image;
[0036] S42, dividing the pixel points in the vehicle body image into columns according to the pixel coordinates to obtain a plurality of columns of continuous pixel data, wherein a column of pixel data is composed of pixel points with the same horizontal coordinate;
[0037] S43, obtaining the grayscale values of all pixels in the pixel data, calculating each column of pixel data, calculating the average value of the grayscale values of the pixels in the pixel data, and taking the average value as the corresponding light uniformity;
[0038] S44, determining the closed state of the muck truck compartment according to the light uniformity between two adjacent columns of pixel data in the muck truck compartment area.
[0039] Further, in S44, the process of determining the sealed state of the muck truck compartment according to the light uniformity between two adjacent columns of pixel data in the muck truck compartment area is as follows:
[0040] Obtain the light uniformity of the muck truck compartment area and each column of pixel data in the muck truck compartment area in the grayscale image, and determine whether the light uniformity between two adjacent columns of pixel data exceeds a threshold. If so, record the area composed of the current two columns of pixels, and determine that the muck truck compartment is not sealed.
[0041] Furthermore, the pixel coordinates are based on the upper left corner of the vehicle body image as the origin (0, 0), the horizontal direction as the abscissa, and the vertical direction as the ordinate.
[0042] A system for monitoring the closed state of a muck truck compartment based on short videos, using a method for monitoring the closed state of a muck truck compartment based on short videos, comprising:
[0043] One-way road monitoring video acquisition module: obtain one-way road monitoring video of muck trucks through one-way road monitoring;
[0044] The one-way road monitoring video is a continuous frame sequence consisting of a first frame of a vehicle body image of a muck truck entering a one-way road monitoring range and a last frame of a vehicle body image of a muck truck exiting a one-way road monitoring range;
[0045] Muck truck target detection module: perform muck truck target detection on each frame of the vehicle body image in the one-way road monitoring video in turn, obtain the target detection frame of the muck truck, and obtain the vehicle body ratio of the target area of the muck truck on the corresponding vehicle body image and the vehicle head direction of the muck truck on the corresponding vehicle body image according to the target detection frame;
[0046] The module for obtaining the short video to be identified is used to determine the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion and the vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video, and to intercept the short video of the one-way road monitoring video according to the determination result to obtain the short video to be identified;
[0047] Muck truck compartment closed state judgment module: convert each frame of the car body image in the short video to be identified into a grayscale image, process the muck truck compartment area according to the grayscale value of the pixel point in each grayscale image frame to obtain the light uniformity corresponding to the muck truck compartment area, and judge the closed state of the muck truck compartment by the light uniformity of the muck truck compartment area.
[0048] Beneficial effects of the present invention:
[0049] The present invention provides a method and system for monitoring the closed state of a muck truck compartment based on short videos. The method mainly obtains muck truck related videos by setting up more one-way road monitoring above the road. While saving manpower costs, it can also ensure the timeliness of detecting the closed state of the muck truck compartment.
[0050] In addition, the method for monitoring the closed state of the muck truck compartment is also based on the one-way road monitoring video of the muck truck obtained by one-way road monitoring to perform short video capture, and then perform light uniformity analysis on each frame of the car body image in the short video, which can not only reduce the amount of data processing, but also ensure the accuracy of the light uniformity analysis, thereby quickly and accurately determining the closed state of the muck truck compartment. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 Schematic diagram of the process of monitoring the closed state of a muck truck compartment in Embodiment 1 of the present invention;
[0052] Figure 2 This is a schematic diagram of fixed shooting toward the left side of the road for one-way road monitoring in Example 1 of the present invention;
[0053] Figure 3 This is a schematic diagram of fixed shooting toward the right side of the road for one-way road monitoring in Embodiment 1 of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] The relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0056] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0057] Additionally, descriptions of well-known structures, functions, and configurations may be omitted for clarity and conciseness.One of ordinary skill in the art will recognize that various changes and modifications may be made to the examples described herein without departing from the spirit and scope of the present disclosure.
[0058] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0059] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0060] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments:
[0061] Example 1
[0062] In this embodiment, a method for monitoring the closed state of a muck truck compartment based on a short video is provided. Figure 1 As shown, the method for monitoring the closed state of a muck truck compartment mainly includes the following steps:
[0063] S1. Obtaining a one-way road monitoring video of a muck truck through one-way road monitoring;
[0064] S2, sequentially perform target detection of a muck truck on each frame of the vehicle body image in the one-way road monitoring video to obtain a target detection frame of the muck truck, and obtain the vehicle body ratio of the target area of the muck truck on the corresponding vehicle body image and the vehicle head direction of the muck truck on the corresponding vehicle body image according to the target detection frame;
[0065] S3, judging the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion and the vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video, and performing short video interception of the one-way road monitoring video according to the judgment result to obtain the short video to be identified;
[0066] S4. Convert each frame of the vehicle body image in the short video to be identified into a grayscale image, process the compartment area of the muck truck according to the grayscale value of the pixel point in each frame of the grayscale image to obtain the light uniformity corresponding to the compartment area of the muck truck, and determine the closed state of the compartment of the muck truck by the light uniformity of the compartment area of the muck truck.
[0067] Among them, the one-way road monitoring refers to a monitoring device installed on the road facing one side of the road for fixed shooting. This monitoring device is generally used to detect vehicle violations. Therefore, in actual scenarios, a monitoring device is usually installed on a road section, so that it is widely distributed in urban roads to ensure urban safety.
[0068] Based on one-way road monitoring, vehicle-related videos can be obtained. In the process of analyzing the closed state of the muck truck compartment by obtaining vehicle-related videos through one-way road monitoring, the present invention chooses to convert the muck truck compartment image into a grayscale image, and reflects the closed state of the muck truck compartment through the grayscale values of all pixels in the grayscale image. At this time, when the compartment is not closed, the grayscale image taken is muck, and various gravel are commonly present in the muck and are not evenly spread, so the grayscale values of all pixels in the grayscale image show a kind of unevenness; when the compartment is closed, the grayscale image taken is a top cover that fully covers the compartment, so the grayscale values of all pixels in the grayscale image show uniformity. It can be seen that the current closed state of the muck truck compartment can be determined by performing light uniformity analysis on the compartment image in the vehicle-related video.
[0069] Moreover, since the one-way road monitoring range of the one-way road monitoring is fixed, when vehicles from different directions enter the one-way road monitoring range, the vehicles will show different change trends in the images captured by the one-way road monitoring, such as Figure 2 As shown, the one-way road monitoring is fixedly filmed toward the left side of the road. When the vehicle drives toward the one-way road monitoring from the left side, that is, the vehicle drives forward, it can be seen that after entering the one-way road monitoring range, the front of the vehicle is closer to the one-way road monitoring than the car body, that is, the front of the vehicle faces forward. At this time, in the one-way road monitoring video shot by the one-way road monitoring, the vehicle moves from far to near, and the body ratio changes from small to large. When the vehicle drives toward the one-way road monitoring from the right side, the head direction and the body ratio change trends are opposite to the above; and, as shown in FIG. Figure 3As shown, the one-way road monitoring is fixedly shot toward the right side of the road. When the vehicle travels toward the one-way road monitoring from the left side, that is, the vehicle drives in with its back to the road, it can be seen that after entering the one-way road monitoring range, the vehicle's cabin is closer to the one-way road monitoring than the cabin, that is, the front of the vehicle is facing backwards. At this time, in the one-way road monitoring video shot by the one-way road monitoring, the vehicle moves from near to far, and the body proportion changes from large to small. When the vehicle travels from the right side to the one-way road monitoring, the front direction and the body proportion change trends are opposite to the above.
[0070] It can be seen that different vehicle driving states can produce different vehicle body proportions and vehicle head directions in the one-way road monitoring video, and the vehicle body proportions and vehicle head directions in the images captured by the one-way road monitoring will also affect the accuracy of the light uniformity analysis. Therefore, the present invention also performs short video capture on the vehicle-related videos obtained by the one-way road monitoring, and then performs light uniformity analysis on each frame of the vehicle body image in the short video, which can not only reduce the amount of data processing, but also ensure the accuracy of the light uniformity analysis, thereby quickly and accurately determining the closed state of the muck truck compartment.
[0071] Preferably, the step S1 includes the following steps:
[0072] S11, performing vehicle type recognition on the vehicle body picture collected in real time by one-way road monitoring, and determining whether the type of the vehicle in the current vehicle body picture is a muck truck, if so, taking the current vehicle body picture as the first frame of the vehicle body picture, and obtaining the vehicle information of the muck truck in the first frame of the vehicle body picture, and then proceeding to step S12;
[0073] S12, identifying and tracking the muck truck according to the vehicle information of the muck truck in the first frame of the body picture, and obtaining the last frame of the body picture of the muck truck collected by the one-way road monitoring;
[0074] S13, extracting the one-way road monitoring video corresponding to the muck truck from the one-way road monitoring according to the first frame body image and the last frame body image of the muck truck.
[0075] In S11, the vehicle type recognition can identify and analyze the type of vehicle in the body picture through the vehicle type recognition model. The training data of the vehicle type recognition model is mainly training pictures obtained through one-way road monitoring, and data enhancement operation is performed on them. After that, data labeling is performed to label the cars, heavy vehicles, special vehicles, and muck trucks that appear in the picture. Among them, the muck truck label can be target_truck, and the labels of other vehicles can be others. The purpose is to identify and analyze the muck truck through the vehicle type recognition model.
[0076] In one embodiment, the vehicle model recognition model is built based on YOLOv8, the overall data set is divided into a training set and a validation set in a ratio of 9:1, the model selects the adam optimizer to adjust the learning rate during training, and the batch_size and initial learning rate are modified multiple times to determine the optimal model.
[0077] In one embodiment, in S11, the license plate of the muck truck can also be recognized by the license plate recognition model, which consists of two parts: YOLOv8+OCR. The frame image of the muck truck recognized by the vehicle model recognition model will be input into the license plate number recognition model based on YOLOv8+OCR. After the license plate number area of the muck truck is detected, the OCR model will output the license plate number. The purpose is to associate the one-way road monitoring video of the muck truck with the license plate number of the muck truck. When it is detected that the compartment of the muck truck is not sealed, the vehicle information such as the license plate number can be associated through the one-way road monitoring video as an alarm evidence.
[0078] It can be obtained that the one-way road monitoring video obtained in step S1 is a continuous frame sequence consisting of the first frame body picture of the muck truck entering the one-way road monitoring range and the last frame body picture of the muck truck leaving the one-way road monitoring range. The one-way road monitoring video is a full-course video of the vehicle traveling within the one-way road monitoring range. If frame processing is performed on the full-course video, the amount of data to be processed is large, and the accuracy of the light uniformity analysis will be affected.
[0079] Preferably, the process of detecting the target of the muck truck is as follows:
[0080] Performing a muck truck target detection on each frame of the vehicle body image in the one-way road monitoring video in turn, obtaining a target detection frame of the muck truck, and obtaining a muck truck area in each frame of the vehicle body image through the target detection frame;
[0081] According to the location of the muck truck area, the area ratio of the target area of the muck truck on the corresponding body image is obtained, which is recorded as the body ratio of the muck truck; the purpose is to reflect the distance of the vehicle compared to the one-way road monitoring and the size of the vehicle presented in the monitoring picture through the body ratio;
[0082] At the same time, the front of the muck truck in the muck truck area is identified to obtain the front area of the muck truck, and the front direction of the muck truck is determined and recorded according to the front area of the muck truck.
[0083] Preferably, S3 specifically includes the following steps:
[0084] S31, obtaining the vehicle body proportion and vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video;
[0085] S32, performing curve fitting on multiple vehicle proportions according to a continuous frame sequence corresponding to the one-way road monitoring video to form a vehicle proportion curve to obtain a corresponding vehicle proportion change trend;
[0086] S33, determining the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion change trend and the vehicle head direction corresponding to the one-way road monitoring video, wherein the relative driving state refers to the driving direction of the muck truck relative to the one-way road monitoring, including the muck truck driving forward and the muck truck driving backward;
[0087] S34, capturing the short video based on the corresponding short video capture starting point matched with the determination result, the first frame of the vehicle body image can be selected as the short video capture starting point and pushed back a preset time, or the last frame of the vehicle body image can be selected as the short video capture starting point and pushed forward a preset time to form a short video to be identified.
[0088] Preferably, in S33, the process of determining the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion change trend and the vehicle head direction corresponding to the one-way road monitoring video is as follows:
[0089] The vehicle head direction includes the vehicle head facing forward and the vehicle head facing backward;
[0090] The change trend of the body proportion includes from small to large and from large to small;
[0091] When the vehicle body proportion corresponding to the one-way road monitoring video changes from small to large and the vehicle head is facing forward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving forward;
[0092] When the vehicle body proportion corresponding to the one-way road monitoring video changes from small to large and the vehicle head is facing backward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving in from the back;
[0093] When the vehicle body proportion corresponding to the one-way road monitoring video changes from large to small and the vehicle head is facing forward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving in from the back;
[0094] When the vehicle body proportion corresponding to the one-way road monitoring video changes from large to small and the front of the vehicle is facing backward, it is determined that the relative driving state between the current dump truck and the one-way road monitoring is that the dump truck is driving forward.
[0095] Preferably, the process of performing short video capture according to the determination result matching the corresponding short video capture starting point is:
[0096] When the determination result is that the muck truck is driving forward, the last frame of the vehicle body picture is selected as the starting point of the short video capture and pushed forward by a preset time to form a short video to be identified;
[0097] When the determination result is that the dump truck is driving in from the back, the first frame of the vehicle body image is selected as the starting point of the short video capture and pushed forward by a preset time to form a short video to be identified.
[0098] Preferably, the step S4 includes the following steps:
[0099] S41, processing each frame of the vehicle body image in the short video to be identified and converting it into a grayscale image;
[0100] S42. Divide the pixel points in the vehicle body image into columns according to the pixel coordinates to obtain multiple columns of continuous pixel data, where a column of pixel data is composed of pixel points with the same horizontal coordinate; wherein the pixel coordinates take the upper left corner of the vehicle body image as the origin (0,0), the horizontal direction is the horizontal coordinate, and the vertical direction is the vertical coordinate.
[0101] S43, obtaining the grayscale values of all pixels in the pixel data, calculating each column of pixel data, calculating the average value of the grayscale values of the pixels in the pixel data, and taking the average value as the corresponding light uniformity;
[0102] S44, determining the closed state of the muck truck compartment according to the light uniformity between two adjacent columns of pixel data in the muck truck compartment area.
[0103] Preferably, in S44, the process of determining the closed state of the muck truck compartment according to the light uniformity between two adjacent columns of pixel data in the muck truck compartment area is as follows:
[0104] Obtain the light uniformity of the muck truck compartment area and each column of pixel data in the muck truck compartment area in the grayscale image, and determine whether the light uniformity between two adjacent columns of pixel data exceeds a threshold. If so, record the area composed of the current two columns of pixels, and determine that the muck truck compartment is not sealed.
[0105] Example 2
[0106] A system for monitoring the closed state of a muck truck compartment based on short videos, using a method for monitoring the closed state of a muck truck compartment based on short videos, comprising:
[0107] One-way road monitoring video acquisition module: obtain one-way road monitoring video of muck trucks through one-way road monitoring;
[0108] The one-way road monitoring video is a continuous frame sequence consisting of a first frame of a vehicle body image of a muck truck entering a one-way road monitoring range and a last frame of a vehicle body image of a muck truck exiting a one-way road monitoring range;
[0109] Muck truck target detection module: perform muck truck target detection on each frame of the vehicle body image in the one-way road monitoring video in turn, obtain the target detection frame of the muck truck, and obtain the vehicle body ratio of the target area of the muck truck on the corresponding vehicle body image and the vehicle head direction of the muck truck on the corresponding vehicle body image according to the target detection frame;
[0110] The module for obtaining the short video to be identified is used to determine the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion and the vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video, and to intercept the short video of the one-way road monitoring video according to the determination result to obtain the short video to be identified;
[0111] Muck truck compartment closed state judgment module: convert each frame of the car body image in the short video to be identified into a grayscale image, process the muck truck compartment area according to the grayscale value of the pixel point in each grayscale image frame to obtain the light uniformity corresponding to the muck truck compartment area, and judge the closed state of the muck truck compartment by the light uniformity of the muck truck compartment area.
[0112] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. According to the technical essence of the present invention, within the spirit and principles of the present invention, any simple modification, equivalent replacement and improvement made to the above embodiment still falls within the protection scope of the technical solution of the present invention.
Claims
1. A method for monitoring the closed state of a muck truck compartment based on short videos, characterized in that: The method comprises the following steps: S1. Obtaining a one-way road monitoring video of a muck truck through one-way road monitoring; The one-way road monitoring video is a continuous frame sequence consisting of a first frame of a vehicle body image of a muck truck entering a one-way road monitoring range and a last frame of a vehicle body image of a muck truck exiting a one-way road monitoring range; S2, sequentially perform target detection of a muck truck on each frame of the vehicle body image in the one-way road monitoring video to obtain a target detection frame of the muck truck, and obtain the vehicle body ratio of the target area of the muck truck on the corresponding vehicle body image and the vehicle head direction of the muck truck on the corresponding vehicle body image according to the target detection frame; S3, judging the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion and the vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video, and performing short video interception of the one-way road monitoring video according to the judgment result to obtain the short video to be identified; S4. Convert each frame of the vehicle body image in the short video to be identified into a grayscale image, process the compartment area of the muck truck according to the grayscale value of the pixel point in each frame of the grayscale image to obtain the light uniformity corresponding to the compartment area of the muck truck, and determine the closed state of the compartment of the muck truck by the light uniformity of the compartment area of the muck truck.
2. According to the method for monitoring the closed state of a muck truck compartment based on short video according to claim 1, it is characterized in that: The step S1 includes the following steps: S11, performing vehicle type recognition on the vehicle body picture collected in real time by one-way road monitoring, and determining whether the type of the vehicle in the current vehicle body picture is a muck truck, if so, taking the current vehicle body picture as the first frame of the vehicle body picture, and obtaining the vehicle information of the muck truck in the first frame of the vehicle body picture, and then proceeding to step S12; S12, identifying and tracking the muck truck according to the vehicle information of the muck truck in the first frame of the body picture, and obtaining the last frame of the body picture of the muck truck collected by the one-way road monitoring; S13, extracting the one-way road monitoring video corresponding to the muck truck from the one-way road monitoring according to the first frame body image and the last frame body image of the muck truck.
3. The method for monitoring the closed state of a muck truck compartment based on short video according to claim 1 is characterized in that: The process of the muck truck target detection is as follows: Performing a muck truck target detection on each frame of the vehicle body image in the one-way road monitoring video in turn, obtaining a target detection frame of the muck truck, and obtaining a muck truck area in each frame of the vehicle body image through the target detection frame; According to the location of the muck truck area, the area ratio of the target area of the muck truck on the corresponding body image is obtained, which is recorded as the body ratio of the muck truck; At the same time, the front of the muck truck in the muck truck area is identified to obtain the front area of the muck truck, and the front direction of the muck truck is determined and recorded according to the front area of the muck truck.
4. The method for monitoring the closed state of a muck truck compartment based on short video according to claim 1 is characterized in that: The S3 specifically includes the following steps: S31, obtaining the vehicle body proportion and vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video; S32, performing curve fitting on multiple vehicle proportions according to a continuous frame sequence corresponding to the one-way road monitoring video to form a vehicle proportion curve to obtain a corresponding vehicle proportion change trend; S33, determining the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion change trend and the vehicle head direction corresponding to the one-way road monitoring video, wherein the relative driving state refers to the driving direction of the muck truck relative to the one-way road monitoring, including the muck truck driving forward and the muck truck driving backward; S34, performing short video capture according to the corresponding short video capture starting point matched by the determination result, selecting the first frame of the vehicle body image as the short video capture starting point and pushing it back a preset time or the last frame of the vehicle body image as the short video capture starting point and pushing it forward a preset time to form a short video to be identified.
5. The method for monitoring the closed state of a muck truck compartment based on short video according to claim 4 is characterized in that: In S33, the process of determining the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion change trend and the vehicle head direction corresponding to the one-way road monitoring video is as follows: The vehicle head direction includes the vehicle head facing forward and the vehicle head facing backward; The change trend of the body proportion includes from small to large and from large to small; When the vehicle body proportion corresponding to the one-way road monitoring video changes from small to large and the vehicle head is facing forward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving forward; When the vehicle body proportion corresponding to the one-way road monitoring video changes from small to large and the vehicle head is facing backward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving in from the back; When the vehicle body proportion corresponding to the one-way road monitoring video changes from large to small and the vehicle head is facing forward, it is determined that the relative driving state between the current muck truck and the one-way road monitoring is that the muck truck is driving in from the back; When the vehicle body proportion corresponding to the one-way road monitoring video changes from large to small and the front of the vehicle is facing backward, it is determined that the relative driving state between the current dump truck and the one-way road monitoring is that the dump truck is driving forward.
6. The method for monitoring the closed state of a muck truck compartment based on short video according to claim 4 is characterized in that: The process of capturing short videos according to the judgment result matching the corresponding short video capture starting point is as follows: When the determination result is that the muck truck is driving forward, the last frame of the vehicle body picture is selected as the starting point of the short video capture and pushed forward by a preset time to form a short video to be identified; When the determination result is that the dump truck is driving in from the back, the first frame of the vehicle body image is selected as the starting point of the short video capture and pushed forward by a preset time to form a short video to be identified.
7. The method for monitoring the closed state of a muck truck compartment based on short video according to claim 1 is characterized in that: The step S4 includes the following steps: S41, processing each frame of the vehicle body image in the short video to be identified and converting it into a grayscale image; S42, dividing the pixel points in the vehicle body image into columns according to the pixel coordinates to obtain a plurality of columns of continuous pixel data, wherein a column of pixel data is composed of pixel points with the same horizontal coordinate; S43, obtaining the grayscale values of all pixels in the pixel data, calculating each column of pixel data, calculating the average value of the grayscale values of the pixels in the pixel data, and taking the average value as the corresponding light uniformity; S44, determining the closed state of the muck truck compartment according to the light uniformity between two adjacent columns of pixel data in the muck truck compartment area.
8. The method for monitoring the closed state of a muck truck compartment based on short video according to claim 7 is characterized in that: In S44, the process of determining the sealed state of the muck truck compartment according to the light uniformity between two adjacent columns of pixel data in the muck truck compartment area is as follows: Obtain the light uniformity of the muck truck compartment area and each column of pixel data in the muck truck compartment area in the grayscale image, and determine whether the light uniformity between two adjacent columns of pixel data exceeds a threshold. If so, record the area composed of the current two columns of pixels, and determine that the muck truck compartment is not sealed.
9. The method for monitoring the closed state of a muck truck compartment based on short video according to claim 7 is characterized in that: The pixel coordinates are based on the upper left corner of the vehicle body image as the origin (0,0), the horizontal direction as the abscissa, and the vertical direction as the ordinate.
10. A short video-based closed state monitoring system for a muck truck compartment, characterized in that: A method for monitoring the closed state of a muck truck compartment based on short video as described in any one of claims 1 to 9 is applied, comprising: One-way road monitoring video acquisition module: obtain one-way road monitoring video of muck trucks through one-way road monitoring; The one-way road monitoring video is a continuous frame sequence consisting of a first frame of a vehicle body image of a muck truck entering a one-way road monitoring range and a last frame of a vehicle body image of a muck truck exiting a one-way road monitoring range; Muck truck target detection module: perform muck truck target detection on each frame of the vehicle body image in the one-way road monitoring video in turn, obtain the target detection frame of the muck truck, and obtain the vehicle body ratio of the target area of the muck truck on the corresponding vehicle body image and the vehicle head direction of the muck truck on the corresponding vehicle body image according to the target detection frame; The module for obtaining the short video to be identified is used to determine the relative driving state between the current muck truck and the one-way road monitoring according to the vehicle body proportion and the vehicle head direction recorded in each frame of the vehicle body image in the one-way road monitoring video, and to intercept the short video of the one-way road monitoring video according to the determination result to obtain the short video to be identified; Muck truck compartment closed state judgment module: convert each frame of the car body image in the short video to be identified into a grayscale image, process the muck truck compartment area according to the grayscale value of the pixel point in each grayscale image frame to obtain the light uniformity corresponding to the muck truck compartment area, and judge the closed state of the muck truck compartment by the light uniformity of the muck truck compartment area.
Citation Information
Patent Citations
Vehicle throwing object detection method and device, electronic equipment and storage medium
CN113076934A
Video data and GIS mapping for traffic monitoring, event detection and change prediction
WO2018081670A1