A vehicle double flash detection method and device based on power spectrum analysis
By combining target detection and multi-target tracking with power spectrum analysis, the problems of positioning error and large computational load in vehicle hazard detection are solved, achieving efficient and accurate hazard detection that is adaptable to various road scenarios.
Patent Information
- Application Number
- CN202310625003.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2043-05-30
AI Technical Summary
Existing vehicle hazard light detection methods suffer from problems such as difficulty in locating the headlight outline area, high computational load, poor robustness, and insufficient threshold adaptability in real-world road scenarios, resulting in low detection accuracy and efficiency.
A target detector and multi-target tracking algorithm are used to ensure vehicle identification and localization. A vehicle time series pipeline is constructed, and the power spectrum of vehicle hazard lights is calculated by Fourier analysis. The periodic characteristics of vehicle hazard lights are extracted, and hazard light discrimination is performed by power spectrum analysis.
It does not require locating the outline area of the vehicle lights. The threshold is set according to the relative magnitude of the power spectrum. It is highly adaptable, has high computational efficiency and high accuracy. It can identify the flashing of vehicle front and rear lights and handle complex scenarios such as when a vehicle temporarily turns on its hazard lights and then leaves.
Smart Images

Figure CN116645648B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle driving safety detection, and particularly relates to a vehicle double flash detection method. BACKGROUND
[0002] Traffic accidents are one of the important threats to road traffic safety. A large number of traffic accidents occur on the road every year, which can include collision, crushing, scraping, rollover and the like. Once a traffic accident occurs, if the traffic management department intervenes in time, the traffic pressure will be greatly relieved and the traffic will be ensured. With the gradual increase of road vehicles and the gradual strictness of motor vehicle driving license examination, the safety and standard awareness of drivers is continuously enhanced. Generally, after an abnormality occurs, the vehicle owner will park nearby and turn on the double flash, and even some vehicles will automatically turn on the double flash after a traffic accident occurs without manual operation. Therefore, quickly identifying double flash vehicles is crucial for traffic safety warning and processing.
[0003] In the prior art, the vehicle double flash detection method mainly includes the following:
[0004] Luminance difference discrimination method: Chinese patent application 201710593280.5, a double flash identification and vehicle obstacle avoidance method and system. First, at least two groups of vehicle camera information perception data are obtained, the information perception data are images of the same vehicle taken along a time interval, marked as a first image group and a second image group, the time interval is less than the vehicle double flash frequency, and the time interval is the same time value. The images in the information perception data are preprocessed and then the vehicle light contour is recognized and the luminance value of the vehicle light is determined. At least three images are extracted from the first image group, and the luminance value of the vehicle in the three images is at least one of the luminance difference greater than the luminance difference threshold value. Then at least three images are extracted from the second image group, and the luminance value of the vehicle light in the three images is at least one of the luminance difference greater than the luminance difference threshold value. If the above relationship is established, the vehicle is in a double flash state, otherwise it is in a non-double flash state.
[0005] This method needs to first locate the light contour area, and then realize double flash judgment according to the luminance difference. In the actual road scene, due to the influence of vehicle movement and surrounding environmental conditions, it is difficult to extract the light contour area, which leads to the failure to accurately locate the light position, and on this basis, it is difficult to realize double flash discrimination. And the light change area of different vehicles is different when double flashing, and even the difference is large. If the luminance difference is compared with a unified threshold value, it is not friendly to the actual performance of multiple scenes.
[0006] Contrastive learning method: Chinese patent application 202210904131.7, a vehicle double flash light recognition method and device. After vehicle detection and multi-target tracking, the input video stream data is processed through vehicle light detection to extract vehicle light samples. The vehicle light state feature extraction network is used to extract the vehicle light state features of the vehicle light samples. The Euclidean distance between the current frame and the previous frame of each vehicle is calculated as the feature distance. According to the relationship between the feature distance and the feature distance threshold, it is determined whether the vehicle light state has changed. If it has changed, the number of state changes of all vehicle lights of the same vehicle within a preset time T is counted and compared with the change number threshold. If it exceeds the change number threshold, it is determined that the vehicle is turned on double flash, otherwise it is not turned on double flash.
[0007] This method uses a contrastive learning method to realize double flash judgment through a vehicle light state feature extraction network. However, after target detection and multi-target tracking, the vehicle light detection and vehicle light state feature extraction network still need to be connected externally, and four parts are needed to realize double flash detection. Each video frame data passes through multiple network structures, and the calculation amount is large. If each frame of the video stream is operated as described above, the efficiency is low.
[0008] Deep learning method: Chinese patent ZL202210983816.5, a vehicle abnormal stop monitoring method based on deep learning. The vehicle target frame image of the current frame and the previous continuous multiple historical frames is intercepted, totaling 20 target frame images. The 20 consecutive target frame images are sent to the vehicle double flash detection model to detect the double flash light state. If the number of target frame images in the 20 consecutive frames that are in the double flash light state is within the range of [6, 14], it is determined that the vehicle is in the double flash state, otherwise it is in the non-double flash state.
[0009] This method uses a vehicle light bright and dark detection model to realize double flash discrimination through certain detection logic. At present, there is no public data set of double flash vehicles. If a private data set is used, it is easy to cause model overfitting in the case of complex image classification model. The test result is very good on the private data set, but the model robustness is poor in the actual scene, and it is not friendly to various actual scenes, and it also lacks comparability.
[0010] Pixel mean difference discrimination method: Chinese patent ZL202110614866.1, a traffic accident warning sign placing system and method based on unmanned aerial vehicle. First, the tail light of the faulty vehicle is positioned, then the HSV color model is constructed, the RGB image is converted to HSV color space, the image is segmented according to the image threshold, and the pixel dynamic threshold of the left and right side lights is set. The pixel mean of the tail light area is extracted for three consecutive seconds. Compare the difference between the pixel means of the adjacent two seconds. If the difference between the pixel means of the left and right tail lights is greater than the threshold, it is determined that the vehicle is in the double flash state, otherwise it is determined that the vehicle is in the non-double flash state.
[0011] The method compares the split color pixel mean difference with a fixed threshold by positioning the vehicle light to distinguish double flashing. The vehicle light is positioned by extracting the light contour, but the light positioning is easily affected by the environment. Then the light positioning is positioned to the vehicle, and finally the result is compared with the threshold, which is manually set by experience and cannot meet the needs of various actual scenes. SUMMARY
[0012] In order to overcome the problems existing in the prior art, the present application provides a vehicle double flashing detection method based on power spectrum analysis, and the basic idea is: first, using a target detector and a multi-target tracking algorithm to ensure accurate identification and positioning of the vehicle, then constructing a vehicle time sequence pipeline, and finally calculating the power spectrum of the vehicle double flashing by using Fourier analysis to extract the periodic characteristics of the vehicle double flashing.
[0013] To achieve the above purpose, the present application provides the following technical scheme:
[0014] A vehicle double flashing detection method based on power spectrum analysis, comprising:
[0015] Step S1: video acquisition, that is, inputting video stream information and setting the prohibited parking area of the video stream;
[0016] Step S2: vehicle target detection, that is, performing target detection on all vehicles in the video stream, and the result of the target detection is a series of vehicle detection frames;
[0017] Step S3: tracking target vehicles, that is, performing multi-target tracking on the vehicles in each frame of the video stream, and the tracking result is that each vehicle is assigned an identity ID;
[0018] Step S4: obtaining the vehicle state, that is, obtaining the motion state of each vehicle and recording the stationary time;
[0019] Step S5: double flashing end recognition, that is, performing stationary judgment on the vehicle which has been determined to be in the double flashing state;
[0020] Step S6: potential double flashing vehicle judgment, that is, screening out the vehicle whose stationary time exceeds the stop judgment time and taking it as a potential double flashing vehicle;
[0021] Step S7: double flashing judgment on the stationary vehicle, that is, constructing a vehicle time sequence pipeline, converting the potential double flashing vehicle information from the RGB color space to the HSV color space, then constructing a vehicle double flashing information pipeline, performing power spectrum analysis on the vehicle double flashing information pipeline, finally performing double flashing threshold judgment on the vehicle, outputting the double flashing judgment result and saving the double flashing vehicle ID.
[0022] Further,
[0023] The parking prohibition area in step S1 is set as the entire video picture or a position area in the video;
[0024] In step S2, the target detection and recognition vehicle model is PPYOLOEplus (PaddlePaddle You Only Look Once), the data set for training the target detection and recognition vehicle model adopts BDD100K (Berkeley Deep Drive 100K), the trained target detection and recognition vehicle model is used to detect all vehicles in the video stream, and vehicle position information is obtained;
[0025] In step S3, OC-SORT (Observation-Centric Simple Online and Realtime Tracking) is used for multi-target tracking of the vehicle, and the vehicle identity ID, the left upper corner coordinates of the vehicle detection rectangle, and the width and height of the vehicle detection rectangle are returned;
[0026] In step S5, the vehicle ID of the current frame is first obtained by using step S4, and then it is inquired whether the ID of the previously recognized double-flash vehicle is still in a static state in the current frame, that is, whether the double-flash vehicle ID sequence is in the static vehicle ID sequence, if yes, it is proved that the double-flash vehicle is still in a static state, otherwise, it is proved that the static state of the double-flash vehicle ends, and the double-flash vehicle ID is deleted from the double-flash vehicle ID sequence.
[0027] Further,
[0028] In step S1, the position area in the video is a self-defined polygon area;
[0029] In step S2, the training set of 70,000 pictures and the verification set of 10,000 pictures in BDD100K are used to train the target detection and recognition vehicle model, the structure of the PPYOLOEplus model is divided into three parts of a backbone network, a neck network and a detection head, and the vehicle position information includes the left upper corner coordinates and the right lower corner coordinates of the vehicle detection rectangle and the detection frame score;
[0030] In step S3, the maximum tracking threshold frame number is set to 30 in OC-SORT, and if a vehicle loses tracking for more than the maximum tracking threshold frame number, the vehicle ID is added to the deleted track.
[0031] Further,
[0032] In step S1, the self-defined polygon area is composed of at least three points, and the polygon area is connected in a clockwise order to form a closed area;
[0033] In step S2 of training the target detection and recognition vehicle model, the BDD100K dataset data is read into the memory in advance, and then the BDD100K dataset data is randomly flipped for data enhancement. The random horizontal direction flipping and random vertical direction flipping are performed in an online or offline data enhancement manner. Finally, the target detection and recognition vehicle model is trained using the dataset subjected to random flipping data enhancement.
[0034] Further,
[0035] The closed area in step S1 is a rectangular area.
[0036] Step S4 includes:
[0037] Step S4-1: Calculate the IOSA (Intersection Over Small Area) of the front and rear frame detection boxes, and then compare it with the IOSA threshold value, output 1 or 0;
[0038] Step S4-2: Calculate the pixel distance between the center coordinates of the front and rear frame detection boxes, and then compare it with the threshold value of the distance between the center coordinates of the vehicle front and rear frame detection boxes, output 1 or 0;
[0039] Step S4-3: Accumulate the pixel movement distance, and then compare it with the threshold value of the accumulated pixel movement distance, output 1 or 0;
[0040] Step S4-4: Calculate the vehicle state.
[0041] Further,
[0042] In step S4-1, the IOSA is calculated between two detection boxes, i.e. the intersection between the two detection boxes divided by the area of the small detection box. The small detection box refers to the detection box with smaller area among the two detection boxes. If the areas of the two detection boxes are the same, return any one of the two detection boxes;
[0043] In step S4-2, the pixel distance between the center coordinates of the front and rear frame detection boxes of the same target vehicle is calculated, and then normalized. The normalized calculation method is 200*pixel distance / (current frame vertical coordinate+1);
[0044] In step S4-3, the pixel movement distance of the center point of the same target vehicle detection box in the static state is calculated.
[0045] In step S4-4, when the output of step S4-1 is 1 and the output of step S4-3 is 1, or the output of step S4-2 is 1 and the output of step S4-3 is 1, the vehicle is in a static state, otherwise the vehicle is in a moving state.
[0046] When the vehicle is in a static state, the start time and the end time of each vehicle static state are recorded, the history frame information of the vehicle in the static state is recorded, the history frame information of the vehicle which is in the static state before but the static state duration is less than Ts and the vehicle history frame information which has lost tracking for more than a maximum tracking threshold frame number at present is deleted.
[0047] Further,
[0048] The step S7 comprises:
[0049] Step S7-1: constructing a vehicle time sequence pipe, that is, intercepting the history frame information of the vehicle by using the current frame potential double flash vehicle coordinates to construct a vehicle time sequence pipe;
[0050] Step S7-2: converting the potential double flash vehicle information from the RGB color space to the HSV color space, wherein H represents the hue, S represents the saturation, and V represents the brightness;
[0051] Step S7-3: constructing a vehicle double flash information pipe, that is, taking the yellow color pixel information as the vehicle double flash information extracted from the vehicle time sequence pipe, and constructing the vehicle time sequence pipe into a vehicle double flash information pipe;
[0052] Step S7-4: performing power spectrum analysis on the vehicle double flash information pipe;
[0053] Step S7-5: performing double flash threshold judgment on the vehicle;
[0054] Step S7-6: saving the double flash vehicle ID, that is, saving the double flash vehicle ID information into a double flash vehicle ID sequence, and then entering step S2 to detect the target of the next frame.
[0055] Further,
[0056] After the vehicle double flash information of the vehicle time sequence pipe is extracted in step S7-3, the static vehicle history frame information is emptied;
[0057] In step S7-4, the Fourier transform is performed on the extracted vehicle double flash information pipe, or the periodogram method, the autoregressive model, the smoothing resampling method and the like are adopted to obtain the power spectrum of the double flash information.
[0058] In step S7-4, when the power spectrum of the double flash information is greater than a power spectrum threshold threshold, it is judged that the static vehicle is in a double flash state, and the double flash information power spectrum threshold is set to 0.15.
[0059] The application also provides a vehicle double flash detection device based on power spectrum analysis, comprising:
[0060] A video acquisition module is used to acquire input video stream information and set the prohibited parking area of the video stream.
[0061] a vehicle target detection module for target detection of all vehicles in the video stream, the result of the target detection being a series of vehicle detection boxes;
[0062] a tracking target vehicle module for multi-target tracking of vehicles in each frame of the video stream, the tracking result being the assignment of an identity ID to each vehicle;
[0063] a vehicle state acquisition module for acquiring the motion state of each vehicle and recording the stationary time;
[0064] a double flash end recognition module for stationary determination of a vehicle that has been previously determined to be in a double flash state;
[0065] a potential double flash vehicle judgment module for acquiring the stop time of all tracked vehicles in the current frame of the video stream, finding vehicles with stop time exceeding Ts, and acquiring the historical frame information of the stationary vehicle;
[0066] a double flash determination module for double flash determination of the stationary vehicle;
[0067] In the double flash determination module, a vehicle time sequence pipeline is first constructed, the potential double flash vehicle information is converted from the RGB color space to the HSV color space, then a vehicle double flash information pipeline is constructed, power spectrum analysis is performed on the vehicle double flash information pipeline, finally, threshold judgment is performed on the vehicle to output the double flash judgment result and save the double flash vehicle ID.
[0068] Further,
[0069] The video acquisition module is a Hikvision DS-2CD2120F-I, the vehicle target detection module and the tracking target vehicle module are implemented in an NVIDIA Geforce RTX3090Ti, and the vehicle state acquisition module, the double flash end recognition module, and the double flash determination module are implemented on a computer configured with an Xeon(R) Silver4210 CPU.
[0070] Compared with the prior art, the present application has the advantages that: the positioning of the vehicle lamp contour area is not required, and the influence of positioning error is avoided; the threshold value in the present application is set according to the relative size of the power spectrum, and is not an absolute threshold value set according to the brightness difference or the pixel mean difference, which does not reflect the relativity, so the threshold value set by the present application is not sensitive to the video scene, and has strong adaptability to the road scene of the video; when the vehicle in the double flashing state is detected by the method, the double flashing vehicle can be conveniently positioned without repositioning the double flashing vehicle according to the position of the vehicle lamp; compared with the methods of contrast learning and deep learning, although the present application is based on target detection and multi-target tracking to perform double flashing discrimination, the target detection and multi-target tracking algorithm adopted by the present application has high calculation efficiency and good effect; the method of the present application does not need to pass through a multi-layer network structure, and has small calculation amount; the method of the present application fully considers the periodic information of the double flashing vehicle, and does not make a double flashing conclusion according to several frames of detection results in the video, thereby reducing the misjudgment of the double flashing vehicle and improving the accuracy of double flashing detection; the present application can not only identify the flashing of the rear lamp of the double flashing vehicle, but also can identify the flashing of the front lamp of the double flashing vehicle, and if the front and rear lamp flashing can be observed at the same time, for example, three flashing lamps appear at the same time, the double flashing vehicle can also be identified; the present application even considers the scene that the vehicle temporarily turns on the double flashing and then stops and the scene that the vehicle overturns and then automatically turns on the double flashing, and has strong practicability. BRIEF DESCRIPTION OF DRAWINGS
[0071] Figure 1 The method of the present application is realized by the step flow chart;
[0072] Figure 2 The vehicle picture with a double flashing frequency of 1.25 Hz;
[0073] Figure 3 The vehicle picture with a double flashing frequency of 1.38 Hz;
[0074] Figure 4 The frequency spectrum obtained by using the method of the present application to detect a double flashing vehicle in an actual video;
[0075] Figure 5 The power spectrum obtained by using the method of the present application to detect a double flashing vehicle in an actual video;
[0076] Figure 6 The detection result of one vehicle when the method of the present application is used to detect a double flashing vehicle in a night scene video;
[0077] Figure 7 The detection result of another vehicle when the method of the present application is used to detect a double flashing vehicle in a night scene video. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical method and advantages of the present application more clear, the content of the present application will be further described in detail below in combination with the drawings and examples.
[0079] Attached Figure 1 The method of the present application realizes the step flow chart.
[0080] In a specific embodiment of the present application.
[0081] Step S1: video acquisition. That is, input video stream information, set the prohibited parking area of the video stream, and in a specific embodiment of the present application, the prohibited parking area is set as the entire video picture, which is convenient for analyzing all vehicles in the video;
[0082] The actual road scene video frame information is obtained through the camera, and the video prohibited parking area coordinates are labeled. The prohibited parking area is set as the entire video picture, and the prohibited parking area coordinates can also be modified to a certain position area in the video. The prohibited parking area can be set as a user-defined polygonal area composed of at least three points, that is, at least three pairs of coordinates. The polygonal area is connected in a clockwise order to form a closed area. For example, in a rectangular area, the prohibited parking area coordinates are set as (x1, y1), (x2, y2), (x3, y3), and (x4, y4), which respectively represent the coordinates of the upper left corner, the upper right corner, the lower right corner, and the lower left corner of the prohibited parking area. For the position of the road in the image, the effective area is selected, which can reduce the calculation amount in the future.
[0083] Step S2: vehicle target detection. That is, target detection is performed on all vehicles in the video stream, and the result of target detection is a series of vehicle detection boxes representing the position coordinates of the vehicles in the video.
[0084] The vehicle model recognized by target detection is PPYOLOEplus (PaddlePaddle You Only Look Once), which is a single-stage target detection algorithm in the target detection series and belongs to a variant of the YOLO series. The data set for training the vehicle model recognized by target detection in the present application uses BDD100K (Berkeley Deep Drive 100K), which is an open driving video data set for computer vision research published by the AI Institute of the University of California, Berkeley. In BDD100K, 100,000 images are labeled using two-dimensional rectangular boxes. 70,000 training images and 10,000 validation images are used. The vehicle model recognized by target detection is trained, and the trained vehicle model recognized by target detection is used to detect all vehicles in the video stream to obtain vehicle position information, which includes the left upper corner coordinates and the right lower corner coordinates of the vehicle detection rectangle and the detection box score.
[0085] The structure of the PPYOLOEplus model is divided into three parts: a backbone network, a neck network, and a detection head. The input dimension of the PPYOLOEplus model is [*, 3, image_height, image_width], where * is the number of input images, 3 represents an RGB 3-channel image, image_height represents the image height, and image_width represents the image width. The output dimension of the model is [*, 8400, 5], where 8400 represents 8400 prediction boxes for each input image, and 5 represents 5 values, corresponding to the left upper corner coordinates and right lower corner coordinates of the vehicle detection rectangle, and the detection box score. After target detection, post-processing such as non-maximum suppression is performed to filter out detection boxes with very high overlap, and the final detection result of each image is obtained.
[0086] The improved method for target detection of a double-flash vehicle overturned due to a collision is as follows:
[0087] When training the target detection and recognition vehicle model, the BDD100K dataset data is read into memory in advance, and then the BDD100K dataset data is randomly flipped for data augmentation. Random horizontal flipping and random vertical flipping are performed in an online or offline data augmentation manner. Finally, the target detection and recognition vehicle model is trained using the dataset that has undergone random flipping data augmentation, so that the target detection and recognition vehicle model learns the features of normal vehicles while learning the features of overturned vehicles, ensuring that the target detection accurately identifies the overturned vehicles as much as possible.
[0088] Step S3: Track the target vehicle. That is, multiple target tracking is performed on the vehicles in each frame of the video stream, and the tracking result is to assign an ID to each vehicle, which represents the identity of each vehicle in the video;
[0089] The method of multiple target tracking of vehicles uses OC-SORT (Observation-Centric Simple Online and Realtime Tracking), which is an observation-centric simple online and real-time tracking algorithm. This method assigns an identity ID to each vehicle in the video and continuously tracks the same vehicle in the video, ensuring that the identity ID of the same vehicle in the video stream remains unchanged. After multiple target tracking, the vehicle identity ID, vehicle detection rectangle left upper corner coordinates, and vehicle detection box width and height are returned.
[0090] During multiple target tracking, if a vehicle loses tracking for more than the maximum tracking threshold frame number, which is set to 30 in OC-SORT, the vehicle ID will be added to the deleted track, and it will not be matched in the subsequent multiple target tracking.
[0091] If the time of losing tracking is less than the maximum tracking threshold frame number, then in this time, as long as the target detection re-detects the vehicle, the vehicle and the original vehicle ID can be matched through the multi-target tracking algorithm, thereby reducing the ID jump,
[0092] Step S4: Obtain the vehicle state. That is, obtain the motion state of each vehicle, such as motion or stillness, and record the stillness time.
[0093] Step S4-1: Calculate the IOSA (Intersection Over Small Area) of the detection boxes of the front and rear frames. The IOSA is calculated between two detection boxes, that is, the intersection between the detection boxes divided by the area of a small detection box. The small detection box refers to the detection box with a smaller area among the two detection boxes. If the areas of the two detection boxes are the same, return any one of the two detection boxes. The IOSA threshold is set to 0.96. When the IOSA between the two detection boxes is greater than 0.96, it is judged that the two detection boxes have not moved substantially, that is, the vehicle is in a still state, and the output is 1, otherwise, the output is 0.
[0094] Step S4-2: Calculate the pixel distance of the center coordinates of the detection boxes of the front and rear frames. That is, calculate the pixel distance of the center coordinates of the detection boxes of the same target vehicle of the front and rear frames, and then perform normalization processing. The calculation method of the normalization processing is 200*pixel distance / (current frame vertical coordinate+1), that is, considering that the near is large and the far is small. The center coordinate distance threshold of the detection boxes of the front and rear frames of the vehicle is set to 0.6. If the calculated center coordinate distance of the detection boxes of the front and rear frames of the vehicle is less than the threshold, it is considered that the vehicle is in a still state, and the output is 1, otherwise, the output is 0.
[0095] Step S4-3: Accumulate the pixel movement distance. Calculate the accumulated pixel movement distance of the center point of the detection box of the same target vehicle in the still state. The accumulated pixel movement distance threshold is set to 45. When the accumulated pixel movement distance of the center point coordinate of the same still vehicle detection box is less than the accumulated pixel movement distance threshold, it is considered that the vehicle is in a still state, and the output is 1, otherwise, the output is 0.
[0096] Step S4-4: Calculate the vehicle state. That is, calculate the IOSA of the target vehicle detection box, and calculate the pixel movement distance and the accumulated pixel movement distance of the same target vehicle of the front and rear frames. Compare the three parameters with the corresponding thresholds respectively. When the first parameter or the second parameter and the third parameter meet the threshold requirement at the same time, that is, ((the first parameter is greater than the corresponding threshold) | (the second parameter is less than the corresponding threshold)) & (the third parameter is less than the corresponding threshold), the vehicle is judged to be in a still state; otherwise, it is judged to be in a motion state.
[0097] When the vehicle meets the above conditions, the vehicle is in a stationary state, the start time of the stationary vehicle is recorded, and the stationary vehicle can move after a period of time. When the stationary vehicle is identified as being in a moving state, the stationary state ends, and the start time and end time of each stationary vehicle are recorded, so as to calculate the stop duration of the stationary vehicle. The historical frame information of the vehicle in the stationary state is recorded, and the historical frame information of the vehicle which was in the stationary state before but the duration of the stationary state is less than Ts, Ts is the stop judgment time, and the vehicle historical frame information which has lost tracking for more than a maximum tracking threshold frame number is deleted. The lost tracking means that the vehicle ID disappears from the video. The operation prevents memory explosion.
[0098] The reason for deleting the historical frame information is that after the target tracking is completed in step S3, a stationary vehicle in the historical frame can be blocked by other vehicles in the current frame, so that the vehicle cannot be restored as the ID in the historical frame. Because it cannot be restored, the vehicle is assigned a new ID, and the new ID records the information of the vehicle. The historical frame information of the old ID of the vehicle still exists in the memory. If the historical frame information is not deleted, the memory will gradually increase, and memory overflow will occur. Because the ID jump of the stationary vehicle is a common phenomenon, even if the OC-SORT advanced multi-target tracking algorithm is used, the problem still exists.
[0099] For example, a stationary vehicle is stationary for 8s, but the ID jumps at the 9th second, for example, the original ID of the vehicle is 9, and the ID jumps to 10. The information of the ID 9 saves the information of the vehicle for the previous 8s. Because the ID is not full 10s, the information cannot be used, so it will always be in the memory. At this time, the information needs to be deleted to prevent memory overflow caused by occupying memory.
[0100] Step S5: double flash end recognition. If the stationary vehicle is identified as a double flash vehicle at Ts, the stationary vehicle turns off the double flash and drives away at a time after Ts, such as Ts~2Ts. At this time, the vehicle previously identified as a double flash vehicle needs to be compared with the stationary vehicle in the current frame. If the double flash vehicle changes from a stationary state to a moving state, the double flash state of the vehicle is eliminated.
[0101] The still vehicle judgment is performed on the double flash vehicle after the stop judgment time, i.e. the vehicle which has been judged to be in the double flash state before, if the still vehicle is converted into the moving state, the double flash state of the double flash vehicle ends. Specifically, the still vehicle ID of the current frame is obtained by using step S4 first, and then it is inquired whether the ID of the double flash vehicle which has been identified before is still in the still state in the current frame, i.e. whether the double flash vehicle ID sequence is in the still vehicle ID sequence, if yes, it is proved that the double flash vehicle is still in the still state, otherwise, it is proved that the still state of the double flash vehicle ends, the still state ends, the double flash state is considered to end, the double flash vehicle ID is deleted from the double flash vehicle ID sequence, so that the current double flash state of the double flash vehicle ends, and the double flash vehicle returns to the normal vehicle, which ensures that the double flash vehicle can be accurately identified when it is in the double flash state, and can also be accurately identified after the double flash state ends.
[0102] Step S6: potential double flash vehicle judgment. The stop time of all tracked vehicles in the current frame of the video stream is obtained, and the vehicle with the stop time exceeding Ts is found, and the historical frame information of the still vehicle is obtained.
[0103] The vehicle with the still time exceeding Ts is screened out and is taken as the potential double flash vehicle, and then step S7 is entered.
[0104] Specifically, for the vehicle with the still time exceeding Ts, the historical frame information is obtained, the historical frame information corresponds to the video frame information of the potential double flash vehicle in the previous Ts, the historical frame information is retained for at most Ts, if the video frame rate is 25fps, the historical frame information is retained for at most 25*Ts frames, and the historical frame information is represented in the memory as [frame 1, frame 2, frame 3, …, frame 25*Ts].
[0105] If the potential double flash vehicle is not found, the step S2 is jumped to start the target detection of the next frame.
[0106] Step S7: double flash judgment on the still vehicle.
[0107] Step S7-1: construction of vehicle time sequence pipe. That is, the historical frame information of the vehicle is intercepted by using the coordinates of the potential double flash vehicle in the current frame, the vehicle time sequence pipe is constructed, the width and height of the vehicle time sequence pipe depend on the width and height detected by the potential double flash vehicle in the current frame, the vehicle time sequence pipe contains the change of the still vehicle in Ts, and implicitly contains the potential double flash vehicle information, and the vehicle time sequence pipe is represented in the memory as [car_frame 1, car_frame 2, car_frame 3, …, car_frame 25*Ts].
[0108] Step S7-2: conversion of the potential double flash vehicle information from the RGB color space to the HSV color space, wherein H represents the hue, S represents the saturation, and V represents the brightness, the HSV color space is a relatively intuitive color model, which is convenient for image color extraction and processing.
[0109] When the vehicle is double flashing, the color of the double flashing light includes yellow pixel information, and the yellow pixel information in the HSV color space is obtained according to an HSV color threshold interval.
[0110] Specifically, for the yellow color pixel information:
[0111] yellow_H_lower_threshold < H < yellow_H_upper_threshold
[0112] yellow_S_lower_threshold < S < yellow_S_upper_threshold
[0113] yellow_V_lower_threshold < V < yellow_V_upper_threshold
[0114] wherein
[0115] yellow_H_lower_threshold = 26
[0116] yellow_H_upper_threshold = 34
[0117] yellow_S_lower_threshold = 43
[0118] yellow_S_upper_threshold = 255
[0119] yellow_V_lower_threshold = 46
[0120] yellow_V_upper_threshold = 255
[0121] wherein yellow_H_lower_threshold is a hue lower limit, yellow_H_upper_threshold is a hue upper limit,
[0122] yellow_S_lower_threshold is a saturation lower limit, yellow_S_upper_threshold is a saturation upper limit, yellow_V_lower_threshold is a lightness lower limit, and yellow_V_upper_threshold is a lightness upper limit.
[0123] Step S7-3: constructing a vehicle double flash information pipeline. After the threshold filtering, the yellow color pixel information of each frame of the vehicle time series pipeline is extracted, and then the proportion of the yellow color pixel information of each frame of the vehicle to the pixel information of the frame of the vehicle is calculated. The proportion is the double flash information extracted from each frame of the static vehicle.
[0124] The yellow color pixel information is taken as the double flash information of the vehicle extracted from the vehicle time series pipeline, that is, the vehicle time series pipeline is constructed into a vehicle double flash information pipeline, and the double flash information extracted from each frame of the vehicle historical frame is contained in the vehicle double flash information pipeline.
[0125] After the double flash information of the vehicle time series pipeline is extracted, the static vehicle historical frame information is emptied. This is also to save memory overhead. For example, a certain static vehicle is static for 10s, and the double flash determination is performed at the 10*25=250th frame. If the vehicle is still static at the 251th frame, the double flash determination will be performed again at the 251th frame, and the same operation will be performed in the subsequent historical frames, which is a waste of time. Therefore, the historical frame information of the static vehicle after exceeding Ts is emptied.
[0126] Step S7-4: power spectrum analysis of the vehicle double flash information pipeline. That is, the Fourier transform is performed on the extracted vehicle double flash information pipeline, or the periodogram method, the autoregressive model, the smoothing resampling method, etc. are used to obtain the power spectrum of the double flash information, the frequency characteristics of the double flash information in the vehicle double flash information pipeline are extracted, and the frequency characteristics of the double flash information contain a plurality of frequency components, such as low frequency components, medium frequency components, and high frequency noise components. These frequency components contain the frequency components of the double flash information. Through the analysis of the actual video, the flicker frequency of the actual double flash vehicle is not a fixed frequency. As shown in FIGS. 8, 9, 10, and 11, FIGS. 8 and 9 are time-continuous double flash vehicle pictures taken from actual videos, the video frame rate is 25fps, FIG. 10 shows that the double flash frequency is 1.25Hz, and FIG. 11 shows that the double flash frequency is 1.38Hz. Therefore, the double flash frequency of the vehicle is generally within 1Hz-2Hz, and the amplitude information of the frequency characteristics in the frequency band is extracted to determine whether the vehicle has double flash. Figure 2 and FIGS. 10 and 11, FIGS. 8 and 9 are time-continuous double flash vehicle pictures taken from actual videos, the video frame rate is 25fps, FIG. 10 shows that the double flash frequency is 1.25Hz, and FIG. 11 shows that the double flash frequency is 1.38Hz. Therefore, the double flash frequency of the vehicle is generally within 1Hz-2Hz, and the amplitude information of the frequency characteristics in the frequency band is extracted to determine whether the vehicle has double flash. Figure 3 and FIGS. 10 and 11, FIGS. 8 and 9 are time-continuous double flash vehicle pictures taken from actual videos, the video frame rate is 25fps, FIG. 10 shows that the double flash frequency is 1.25Hz, and FIG. 11 shows that the double flash frequency is 1.38Hz. Therefore, the double flash frequency of the vehicle is generally within 1Hz-2Hz, and the amplitude information of the frequency characteristics in the frequency band is extracted to determine whether the vehicle has double flash. Figure 2 and FIGS. 10 and 11, FIGS. 8 and 9 are time-continuous double flash vehicle pictures taken from actual videos, the video frame rate is 25fps, FIG. 10 shows that the double flash frequency is 1.25Hz, and FIG. 11 shows that the double flash frequency is 1.38Hz. Therefore, the double flash frequency of the vehicle is generally within 1Hz-2Hz, and the amplitude information of the frequency characteristics in the frequency band is extracted to determine whether the vehicle has double flash. Figure 3 and FIGS. 10 and 11, FIGS. 8 and 9 are time-continuous double flash vehicle pictures taken from actual videos, the video frame rate is 25fps, FIG. 10 shows that the double flash frequency is 1.25Hz, and FIG. 11 shows that the double flash frequency is 1.38Hz. Therefore, the double flash frequency of the vehicle is generally within 1Hz-2Hz, and the amplitude information of the frequency characteristics in the frequency band is extracted to determine whether the vehicle has double flash. Figure 2 Figure 3 The periodicity information of the double flash reflected by the double flash frequency amplitude information is not obvious compared with the non-double flash periodicity information, that is, other frequency components. As shown in FIGS. 12, 13, 14, and 15, FIG. 12 is the frequency spectrum of a certain double flash vehicle in an actual video, FIG. 13 shows that the double flash frequency is 1.25Hz, and FIG. 14 shows that the double flash frequency is 1.38Hz.
[0127] The periodicity information of the double flash reflected by the double flash frequency amplitude information is not obvious compared with the non-double flash periodicity information, that is, other frequency components. As shown in FIGS. 12, 13, 14, and 15, FIG. 12 is the frequency spectrum of a certain double flash vehicle in an actual video, FIG. 13 shows that the double flash frequency is 1.25Hz, and FIG. 14 shows that the double flash frequency is 1.38Hz. Figure 4 Figure 5 The periodicity information of the double flash reflected by the double flash frequency amplitude information is not obvious compared with the non-double flash periodicity information, that is, other frequency components. As shown in FIGS. 12, 13, 14, and 15, FIG. 12 is the frequency spectrum of a certain double flash vehicle in an actual video, FIG. 13 shows that the double flash frequency is 1.25Hz, and FIG. 14 shows that the double flash frequency is 1.38Hz. Figure 4 Figure 5 The power spectrum obtained for the same double flash vehicle is shown in Fig. 6 Figure 4 and Fig. 7 Figure 5 It is found that the power spectrum not only enlarges the difference between the double flash information and other frequency components, but also smoothes the influence of high frequency noise. Therefore, the relative size of the power spectrum of the double flash information of the vehicle in the actual video at different frequencies can reflect the proportion of the double flash frequency component in all frequency components. If the vehicle is in the double flash state, the proportion of the power spectrum in 1Hz-2Hz is larger.
[0128] Step S7-5: Double flash threshold judgment for the vehicle. After the power spectrum of the double flash information of the vehicle is extracted, the power spectrum of the double flash information of the vehicle in 1Hz-2Hz is compared with the power spectrum threshold power_threshold respectively. When the power spectrum of the double flash information is greater than the power spectrum threshold, it is judged that the stationary vehicle is in the double flash state. The double flash information power spectrum threshold power_threshold is set to 0.15. The power spectrum threshold can also be adjusted up and down according to the actual situation, but the adjustment will not be too large in general.
[0129] It is very necessary to extract periodic characteristics using yellow pixel information here. In one specific embodiment of the present application, when double flash vehicles are detected in a certain night scene video, the video contains two double flash vehicles, both of which turn on the double flash after the accident. The extraction of double flash results is shown in Fig. 8 Figure 6 and Fig. 9 Figure 7 It can be seen that even in the night scene, the double flash information can still be clearly extracted.
[0130] Step S7-6: Save the double flash vehicle ID. Save the double flash vehicle ID information to the double flash vehicle ID sequence, and then enter step S2 to detect the target of the next frame.
[0131] Compared with the traditional method, such as the brightness difference discrimination method and the pixel mean difference discrimination method, the present application does not need to locate the vehicle lamp contour area, avoiding the influence of positioning error; the threshold value in the present application is set according to the relative size of the power spectrum, and is not an absolute threshold value set according to the brightness difference or the pixel mean difference which does not reflect the relativity, so the threshold value set by the present application is not sensitive to the video scene and has strong adaptability to the video road scene; when the present method detects a vehicle in the double flash state, the double flash vehicle can be conveniently located without the need to reposition the double flash vehicle according to the position of the vehicle lamp. Compared with the contrast learning and deep learning method, although the present scheme is based on target detection and multi-target tracking for double flash discrimination, the target detection and multi-target tracking algorithm used in the present scheme has high calculation efficiency and good effect; the present application method does not need to pass through a multi-layer network structure, and the calculation amount is small; the present application method fully considers the periodicity information of the vehicle double flash, and does not make a double flash conclusion according to a few frames of detection results in the video, thereby reducing the misjudgment of the double flash vehicle and improving the accuracy of double flash detection. The present application can not only identify the flashing of the rear lamp of the double flash vehicle, but also identify the flashing of the front lamp of the double flash vehicle, and if the front and rear lamps are observed to flash at the same time, for example, three flashing lamps appear at the same time, the double flash vehicle can also be identified; the present application even considers the scene that the vehicle temporarily turns on the double flash and then leaves, and the scene that the vehicle overturns and then automatically turns on the double flash, and has strong practicability.
[0132] For the average decision delay of the present application from constructing the vehicle double flash information pipeline to identifying all double flash vehicles, the experimental equipment CPU is Intel(R) Xeon(R) Silver4210 CPU@2.20GHz, the video acquisition equipment is Hikvision DS-2CD2120F-I, which provides a resolution of 1920x1080 and a frame rate of 25fps, can output real-time images under this resolution, is also equipped with infrared night vision function, can capture clear images under low light conditions, the programming language is python, the programming software is VSCODE, the delay calculation uses the time method under the python time module, and the target detection model inference can use CPU inference or GPU inference. In an embodiment of the present application, GPU inference is used, and the GPU model is NVIDIA Geforce RTX3090Ti. The calculation result is 7.41ms, and it can be seen that the double flash judgment time of the present application method is very fast and has high calculation efficiency.
[0133] Based on the same inventive concept, the present application provides a vehicle double flash detection device based on power spectrum analysis, comprising:
[0134] A video acquisition module is used to acquire input video stream information and set a prohibited parking area of the video stream.
[0135] a vehicle target detection module for target detection of all vehicles in the video stream, the result of the target detection being a series of vehicle detection boxes;
[0136] a tracking target vehicle module for multi-target tracking of vehicles in each frame of the video stream, the tracking result being the assignment of an identity ID to each vehicle;
[0137] a vehicle state acquisition module for acquiring the motion state of each vehicle and recording the stationary time;
[0138] a double flash end recognition module for stationary determination of vehicles that have been previously determined to be in a double flash state;
[0139] a double flash determination module for double flash determination of stationary vehicles.
[0140] In the double flash determination module, a vehicle time sequence pipeline is first constructed, potential double flash vehicle information is converted from the RGB color space to the HSV color space, then a vehicle double flash information pipeline is constructed, power spectrum analysis is performed on the vehicle double flash information pipeline, finally, a double flash threshold value is determined for the vehicle, the double flash determination result is output and the double flash vehicle ID is saved.
[0141] The video acquisition module is a Hikvision DS-2CD2120F-I, the vehicle target detection module and the tracking target vehicle module are implemented in an NVIDIA Geforce RTX3090Ti, and the vehicle state acquisition module, the double flash end recognition module and the double flash determination module are implemented on a computer configured with an Xeon(R) Silver4210 CPU.
Claims
1. A vehicle double flash detection method based on power spectrum analysis, comprising: Step S1: video acquisition, i.e. inputting video stream information, setting a no-parking area for the video stream; Step S2: vehicle target detection, i.e. performing target detection on all vehicles in the video stream, the result of the target detection being a series of vehicle detection boxes; Step S3: tracking target vehicles, i.e. performing multi-target tracking on vehicles in each frame of the video stream, the tracking result being the assignment of an identity ID to each vehicle; Step S4: obtaining vehicle state, i.e. obtaining the motion state of each vehicle and recording the stationary time; Step S5: double flash end identification, i.e. performing stationary determination on vehicles that have been determined to be in a double flash state; Step S6: potential double flash vehicle judgment, i.e. screening out vehicles with stationary time exceeding the stop judgment time and taking them as potential double flash vehicles; Step S7: double flash determination on stationary vehicles, i.e. constructing a vehicle time sequence pipeline, converting the potential double flash vehicle information from an RGB color space to an HSV color space, then constructing a vehicle double flash information pipeline, taking the yellow color pixel information as the vehicle double flash information extracted from the vehicle time sequence pipeline, constructing the vehicle time sequence pipeline into a vehicle double flash information pipeline, performing power spectrum analysis on the vehicle double flash information pipeline, finally performing double flash threshold judgment on the vehicle, outputting the double flash judgment result and saving the double flash vehicle ID; In step S1, the no-parking area is set as the entire video picture or a certain position area in the video; In step S2, the vehicle model recognized by the target detection is PPYOLOE plus (Paddle Paddle You Only Look Once), the data set for training the target detection vehicle model uses BDD100K (Berkeley DeepDrive 100K), and the trained target detection vehicle model is used to detect all vehicles in the video stream to obtain vehicle position information; In step S3, OC-SORT (Observation-Centric Simple Online and Realtime Tracking) is used to perform multi-target tracking on the vehicles, returning the vehicle identity ID, the top-left corner coordinates of the vehicle detection rectangle, and the width and height of the vehicle detection rectangle; In step S1, the closed area is a rectangular area; step S4 includes: calculating the IOSA (Intersection Over Small Area) of the detection boxes of the previous and subsequent frames, then comparing it with the IOSA threshold value, outputting 1 or 0; calculating the pixel distance between the center coordinates of the detection boxes of the previous and subsequent frames, then comparing it with the center coordinate distance threshold value of the previous and subsequent frame detection boxes, outputting 1 or 0; accumulating the pixel movement distance, then comparing it with the accumulated pixel movement distance threshold value, outputting 1 or 0; and calculating the vehicle state; In step S5, the ID of the stationary vehicle in the current frame is first obtained by using step S4, and then it is inquired whether the ID of the double-flashing vehicle identified before is still in the stationary state in the current frame, that is, whether the ID sequence of the double-flashing vehicle is in the ID sequence of the stationary vehicle. If yes, it is proved that the double-flashing vehicle is still in the stationary state, otherwise, it is proved that the stationary state of the double-flashing vehicle ends, and the ID of the double-flashing vehicle is deleted from the ID sequence of the double-flashing vehicle.
2. The vehicle double-flashing detection method based on power spectrum analysis according to claim 1, wherein: In step S1, the position region in the video is a self-defined polygon region; In step S2, 70,000 pictures in the training set and 10,000 pictures in the verification set in BDD100K are used to train the target detection and identification vehicle model. The structure of the PPYOLOE plus model is divided into three parts: backbone, neck, and head. The vehicle position information includes the left upper corner coordinate and the right lower corner coordinate of the vehicle detection rectangle frame and the detection frame score. In step S3, the maximum tracking threshold frame number is set to 30 in OC-SORT. If the vehicle loses tracking for more than the maximum tracking threshold frame number, the vehicle ID is added to the deleted track.
3. The vehicle double-flashing detection method based on power spectrum analysis according to claim 2, wherein: In step S1, the self-defined polygon region is composed of at least three points, and the polygon region is connected in a clockwise order to form a closed region; In step S2, when training the target detection and identification vehicle model, the BDD100K dataset data is read into the memory in advance, and then the BDD100K dataset data is randomly flipped for data enhancement. The random horizontal direction flipping and random vertical direction flipping are performed in an online or offline data enhancement manner. Finally, the target detection and identification vehicle model is trained using the dataset after random flipping data enhancement.
4. The vehicle double-flashing detection method based on power spectrum analysis according to claim 3, wherein: In step S4-1, the IOSA is calculated between two detection frames, that is, the intersection between the two detection frames divided by the area of the smaller detection frame. If the areas of the two detection frames are the same, any one of the two detection frames is returned; In step S4-2, the pixel distance between the center coordinates of the detection frames of the same target vehicle in the front and rear frames is calculated, and then normalized. The normalized calculation method is 200*pixel distance / (current frame vertical coordinate+1); In step S4-3, the pixel moving distance of the center point of the detection frame of the same target vehicle in the stationary state is calculated; In step S4-4, when the output of step S4-1 is 1 and the output of step S4-3 is 1, or the output of step S4-2 is 1 and the output of step S4-3 is 1, the vehicle is in the stationary state, otherwise, the vehicle is in the moving state. When the vehicle is in a static state, the start time and end time of each vehicle static state are recorded, the history frame information of the vehicle in the static state is recorded, and the history frame information of the vehicle which has been in a static state but the static state duration is less than Ts, Ts being a stop judgment time, and has lost tracking for more than a maximum tracking threshold frame number is deleted. 5.The vehicle double flash detection method based on power spectrum analysis according to claim 1, characterized in that: Step S7 comprises: Step S7-1: constructing a vehicle time sequence pipe, that is, using the potential double flash vehicle coordinate of the current frame to intercept the history frame information of the vehicle, and constructing a vehicle time sequence pipe; Step S7-2: converting the potential double flash vehicle information from an RGB color space to an HSV color space, wherein H represents hue, S represents saturation, and V represents brightness; Step S7-3: constructing a vehicle double flash information pipe, that is, using the yellow color pixel information as the vehicle double flash information extracted from the vehicle time sequence pipe, and constructing the vehicle time sequence pipe into a vehicle double flash information pipe; Step S7-4: performing power spectrum analysis on the vehicle double flash information pipe; Step S7-5: performing double flash threshold judgment on the vehicle; Step S7-6: saving the double flash vehicle ID, that is, saving the double flash vehicle ID information to a double flash vehicle ID sequence, and then entering step S2 to perform target detection on the next frame. 6.The vehicle double flash detection method based on power spectrum analysis according to claim 5, characterized in that: After the vehicle double flash information of the vehicle time sequence pipe is extracted in step S7-3, the history frame information of the static vehicle is emptied; In step S7-4, Fourier transform is performed on the extracted vehicle double flash information pipe, or a periodogram method, an autoregressive model, or a smoothing resampling method is used to obtain the power spectrum of the double flash information; In step S7-4, when the power spectrum of the double flash information is greater than a power spectrum threshold threshold, it is judged that the static vehicle is in a double flash state, and the double flash information power spectrum threshold is set to 0.
15. 7.A vehicle double flash detection device based on power spectrum analysis, using a vehicle double flash detection method based on power spectrum analysis according to any one of claims 1 to 6, comprising: a video acquisition module for acquiring input video stream information and setting a prohibited parking area of the video stream; a vehicle target detection module for performing target detection on all vehicles in the video stream, and the result of the target detection being a series of vehicle detection boxes; a tracking target vehicle module for performing multi-target tracking on the vehicles in each frame of the video stream, and the tracking result being that each vehicle is assigned an identity ID; an acquired vehicle state module for acquiring the motion state of each vehicle and recording the static time; a double flash end identification module for performing static judgment on the vehicle which has been judged to be in a double flash state; a potential double flash vehicle judgment module for acquiring the stop time of all tracked vehicles in the current frame of the video stream, finding the vehicle whose stop time is more than Ts, and acquiring the history frame information of the static vehicle; a double flash judgment module for performing double flash judgment on the static vehicle. Its characterized in that: the double flash judgment module first constructs the vehicle time sequence pipeline, converts the potential double flash vehicle information from the RGB color space to the HSV color space, then constructs the vehicle double flash information pipeline, does power spectrum analysis on the vehicle double flash information pipeline, finally judges the vehicle double flash threshold, outputs the double flash judgment result and saves the double flash vehicle ID; OC-SORT (Observation-Centric Simple Online and Realtime Tracking) is used for multi-target tracking of vehicles, and the vehicle identity ID, the upper left corner coordinates of the vehicle detection rectangle, and the width and height of the vehicle detection box are returned; First, the current frame static vehicle ID is obtained, and then it is inquired whether the ID of the double flash vehicle identified before is still in the static state in the current frame, that is, whether the double flash vehicle ID sequence is in the static vehicle ID sequence, if yes, it is proved that the double flash vehicle is still in the static state, otherwise, it is proved that the static state of the double flash vehicle ends, and the double flash vehicle ID is deleted from the double flash vehicle ID sequence.
8. A vehicle double flash detection apparatus based on power spectral analysis as claimed in claim 7, wherein: The video acquisition module is Hikvision DS-2CD2120F-I, the vehicle target detection module and the tracking target vehicle module are realized in NVIDIA Geforce RTX 3090 Ti, the vehicle state acquisition module, the double flash end identification module and the double flash judgment module are realized on a computer configured with Xeon(R) Silver 4210 CPU.
Citation Information
Patent Citations
A method and system for dual-flash recognition and vehicle obstacle avoidance.
CN107463886B
Method and device for identifying double flashing lights of vehicle
CN115294549A
Traffic accident warning board placement system and method based on unmanned aerial vehicle
CN113421438A
Vehicle abnormal stop monitoring method based on deep learning
CN115049993A
Vehicle detection device, vehicle detection system, and vehicle detection method
JP2009157492A