A vehicle state determination method and system based on image frame difference

CN117893576BActive Publication Date: 2026-10-27WUHAN JIMU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311850963.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2026-10-27
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

[0005]本发明第一方面提供了一种基于图像帧间差的车辆状态判断方法,以解决现有技术中判断车辆运动状态的方法灵敏度不高、且易受环境光及可移动目标干扰的技术问题

Benefits of technology

[0014]与现有技术相比,本说明书实施例采用的上述至少一个技术方案能够达到的有益效果至少包括:本发明采用了图像边缘信息做帧间差,使得对车辆的运动状态判断受光照影响和远处可移动目标漏检带来的干扰较小,采用历史图像特征统计信息,使得在缓慢启动或背景比较单一的情况能够及时识别到车辆的起步状态,实现了稳定、灵敏判断车辆运动状态的技术目的。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117893576B_ABST
    Figure CN117893576B_ABST
Patent Text Reader

Abstract

The application provides a vehicle state judgment method and system based on image frame difference, and relates to the technical field of intelligent driving, the method comprises the following steps: acquiring a current frame image and a previous frame motion state of a vehicle; performing mobile target detection on the current frame image through deep learning; obtaining a current edge image according to the current frame image, performing image frame difference calculation according to the current edge image and the mobile target detection result, and obtaining a state parameter used for judging the vehicle state; and obtaining the current frame motion state of the vehicle through a vehicle motion state judgment strategy based on the previous frame motion state and the state parameter. The application solves the technical problems that the method for judging the vehicle motion state in the prior art has low sensitivity and is easily disturbed by environmental light and movable targets, and achieves the technical effect of stably and sensitively judging the vehicle motion state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent driving technology, and in particular to a method and system for determining vehicle status based on image frame differences. Background Technology

[0002] Vehicle motion status assessment is a crucial function in driver assistance systems. Accurately identifying vehicle motion status helps the system make informed decisions, improving driving experience and safety. For example, when waiting at a traffic light, accurately determining that the vehicle is stationary while the vehicle in front is starting can alert the driver, allowing them to move their vehicle promptly and avoid congestion. In blind spot warning systems, when the vehicle is stationary, no target identification or warning is issued to avoid unnecessary interference; however, when the vehicle starts moving, the system accurately and promptly identifies the vehicle's starting state and activates the blind spot warning function, identifying and warning of targets in the danger zone. This is especially important for commercial vehicles with significant blind spots, where pedestrians may not be easily observed when starting. Timely detection of the vehicle starting and warnings to pedestrians in danger zones can prevent potential traffic accidents.

[0003] Existing methods for acquiring vehicle motion status include those relying on accelerometers. To achieve sensitive vehicle motion status assessment, high-precision sensors are required. Slight decreases in sensor sensitivity and accuracy, or malfunctions, can easily lead to misjudgments. Other methods determine vehicle motion status based on CAN bus or GPS speed, but these have inherent errors, low sensitivity during start-up, and significant delays when the vehicle is coasting slowly. Additionally, there are image-based methods, such as optical flow and inter-frame image difference methods using image feature points. While these methods can determine vehicle start-up status using only existing onboard cameras and are relatively sensitive in identifying start-up and stopping states, optical flow methods rely on the assumption of constant ambient light intensity, are susceptible to ambient light interference, and require the extraction of numerous feature points, potentially limiting real-time efficiency. Inter-frame image difference methods can improve real-time efficiency but are also susceptible to interference. For example, the method proposed in patent CN110717361A, which uses inter-frame image brightness difference to determine whether a vehicle is parked or moving, is easily affected by lens flicker, causing abrupt changes in inter-frame image brightness. Alternatively, when waiting at a red light, it is susceptible to the influence of numerous undetectable moving targets in the distance, resulting in significant inter-frame brightness differences and false alarms. It also suffers from low sensitivity in determining the vehicle's starting state in scenes with relatively simple backgrounds, few textures, and small brightness variations. Especially in such environments, when the vehicle is slowly starting, the brightness changes between image frames are small, leading to delayed recognition of the starting state.

[0004] Given the above problems in the existing technology, there is an urgent need for a more stable and sensitive image frame difference method to determine the vehicle motion state. Summary of the Invention

[0005] The first aspect of this invention provides a method for determining vehicle state based on image frame differences, thereby addressing the technical problems of low sensitivity and susceptibility to interference from ambient light and moving targets in existing methods for determining vehicle motion state. The method includes: Acquire the current frame image of the vehicle and the motion state of the vehicle in the previous frame; Perform moving target detection on the current frame image and obtain the moving target detection result; Edge information is calculated on the current frame image to obtain the current edge image. Based on the current edge image and the moving target detection result, the inter-frame difference of the image is calculated to obtain the state parameters used to determine the vehicle state. Based on the motion state of the previous frame and the state parameters, the motion state of the vehicle in the current frame is obtained through a vehicle motion state judgment strategy.

[0006] Furthermore, moving target detection is performed on the current frame image to obtain moving target detection results, including: Perform moving target detection on the current frame image to obtain a moving target detection box; A mask with a pixel value of 0 corresponding to the position of the moving target is generated in the moving target detection box.

[0007] Furthermore, based on the current edge image and the moving target detection result, image frame difference calculation is performed to obtain state parameters used to determine the vehicle state, including: Calculate the mean value of the current edge image and perform a linear transformation to obtain the vehicle state judgment threshold. ; The current edge image is updated to an edge image queue with a queue size of N. In the edge image queue, edge images of different frames are represented by N-1 to 0 respectively. The current edge image is updated to the edge image of the 0th frame of the edge image queue. The edge image of the current edge image and the edge image of the (N-1)th frame are subtracted, and the pixel values ​​of the edge image with a mask of 0 after subtraction are set to 0 to obtain the edge difference map. The mean of the edge difference map is calculated and smoothed using Gaussian filtering to obtain the current difference feature value. ; The current difference feature value Update the cached historical difference feature value queue with a queue size of M; The rate of change of the eigenvalues ​​is calculated based on the five most recently stored differential eigenvalues ​​in the historical differential eigenvalue queue. ; Calculate the mean of all difference feature values ​​in the updated historical difference feature value queue, and update the mean to the feature value mean queue with a cache size of M. Obtain the minimum mean of the feature values ​​in the feature value mean queue. .

[0008] Furthermore, obtaining the current frame motion state of the vehicle through the vehicle motion state determination strategy includes: If the vehicle was stationary in the previous frame's motion state, and If the vehicle is in motion, then its first state is determined to be moving; otherwise, its first state is determined to be stationary. If the vehicle was moving in the previous frame's motion state, and If the vehicle is in motion, then its first state is determined to be moving; otherwise, its first state is determined to be stationary. When the first state of the vehicle is stationary, and If the vehicle is in motion, then the motion state of the current frame is determined to be moving; otherwise, the motion state of the current frame is determined to be stationary. When the first state of the vehicle is vehicle movement, if the following conditions are met... and , or, satisfy If the vehicle is stationary in the current frame, it is determined that the vehicle is in motion; otherwise, it is determined that the vehicle is in motion in the current frame.

[0009] Furthermore, edge information calculation is performed on the current frame image to obtain the current edge image, including: performing mean filtering and Laplacian edge finding on the current frame image respectively, and calculating the gradient of erosion and dilation of the image obtained after Laplacian edge finding to obtain the current edge image.

[0010] Furthermore, the current frame image is taken from the Y channel data in YUV format.

[0011] A second aspect of this invention provides a vehicle state determination system based on image frame difference, which addresses the technical problems of low sensitivity and susceptibility to interference from ambient light and moving targets in existing methods for determining vehicle motion state. The system includes: The data acquisition module is used to acquire the current frame image of the vehicle and the previous frame motion state of the vehicle; The moving target detection module is used to perform moving target detection on the current frame image and obtain the moving target detection result; The image frame difference calculation module is used to calculate edge information of the current frame image to obtain the current edge image, and to calculate the image frame difference based on the current edge image and the moving target detection result to obtain state parameters for judging the vehicle state. The motion state determination module is used to obtain the current frame motion state of the vehicle based on the motion state of the previous frame and the state parameters, through a vehicle motion state determination strategy.

[0012] A third aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described methods for determining vehicle status based on inter-frame differences of images.

[0013] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that executes any of the above-described methods for determining vehicle status based on image frame differences.

[0014] Compared with the prior art, the beneficial effects that can be achieved by the above-mentioned at least one technical solution adopted in the embodiments of this specification include at least the following: the present invention uses image edge information to make inter-frame difference, so that the judgment of the vehicle's motion state is less affected by the influence of lighting and the interference caused by the missed detection of distant movable targets. It uses historical image feature statistical information, so that the starting state of the vehicle can be identified in a timely manner in the case of slow start or relatively simple background, thus achieving the technical objective of stable and sensitive judgment of the vehicle's motion state. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic flowchart of a vehicle state determination method based on image frame difference provided by an embodiment of the present invention; Figure 2 This is a schematic diagram of the vehicle motion state determination strategy provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a vehicle state determination system based on image frame difference provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a computer device provided in an embodiment of the present invention; In the figure, the reference numerals are as follows: 300, a vehicle state judgment system based on image frame difference; 301, data acquisition module; 302, moving target detection module; 303, image frame difference calculation module; 304, motion state judgment module; 401, memory; 402, processor. Detailed Implementation

[0017] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0018] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] This invention provides a vehicle state judgment method and system based on image frame difference. It uses image edge information for frame difference, which reduces the interference caused by lighting and missed detection of distant moving targets in judging the vehicle's motion state. It uses historical frame data for statistical analysis and compares the feature value of the current frame with the minimum feature value of historical frames, which helps to quickly identify the vehicle's starting state in cases of slow start or relatively simple background, thus achieving the technical goal of stable and sensitive judgment of vehicle motion state.

[0020] like Figure 1 As shown, the specific implementation steps of the vehicle state determination method based on image frame difference provided in this embodiment include: Step S100: Obtain the current frame image of the vehicle and the motion state of the vehicle in the previous frame; Furthermore, the current frame image is taken from the Y channel data in YUV format.

[0021] Specifically, the current frame image is used to detect moving targets; using the motion state data of the previous frame helps to use different strategies to determine the motion state of the vehicle in the current frame, achieving stable and sensitive state judgment.

[0022] Step S200: Perform moving target detection on the current frame image and obtain the moving target detection result; Furthermore, in step S200, moving target detection is performed on the current frame image to obtain the moving target detection result, including: Perform moving target detection on the current frame image to obtain a moving target detection box; A mask with a pixel value of 0 corresponding to the position of the moving target is generated in the moving target detection box.

[0023] Specifically, deep learning is used to detect moving targets in the current frame image, including vehicles, pedestrians, cyclists, etc. Based on the detected moving target bounding boxes, a mask with a pixel value of 0 is generated at the detected target location.

[0024] Step S300: Calculate edge information for the current frame image to obtain the current edge image; calculate the inter-frame difference based on the current edge image and the moving target detection result to obtain state parameters for judging the vehicle state. Furthermore, step S300 also includes: 1. Perform mean filtering and Laplacian edge finding on the current frame image respectively, and calculate the gradient of erosion and dilation on the image obtained after Laplacian edge finding to obtain the current edge image; 2. Calculate the mean value of the current edge image and perform a linear transformation to obtain the vehicle state judgment threshold. ; 3. Update the current edge image to an edge image queue with a queue size of N. In the edge image queue, N-1 to 0 represent edge images of different frames respectively. Update the current edge image to the edge image of the 0th frame of the edge image queue. In this embodiment, preferably, N is 8. 4. Perform a difference between the current edge image and the edge image of the (N-1)th frame, and set the pixel values ​​of the edge image with a mask of 0 after the difference to 0 in order to eliminate the interference of moving targets and obtain an edge difference map. 5. Calculate the mean of the edge difference map and perform Gaussian filtering to smooth it, reducing noise interference, and obtain the current difference feature value. ; 6. Set the current difference feature value The updated historical difference feature values ​​are added to a cache queue of M numbers. In this embodiment, M is preferably 20. 7. Calculate the rate of change of the eigenvalues ​​based on the 5 most recently stored differential eigenvalues ​​in the M queues of historical differential eigenvalues. ; 8. Calculate the mean of all difference feature values ​​in the updated historical difference feature value queue, update the mean to the feature value mean queue with a cache size of M, and obtain the minimum feature value mean in the feature value mean queue. .

[0025] Step S400: Based on the motion state of the previous frame and the state parameters, obtain the motion state of the vehicle in the current frame through a vehicle motion state judgment strategy.

[0026] Specifically, the threshold is determined based on the vehicle motion state and vehicle state of the previous frame. Current difference eigenvalues eigenvalue change rate and eigenvalue mean To determine the vehicle's motion state in the current frame, see the specific determination strategy. Figure 2 As shown.

[0027] Furthermore, such as Figure 2 As shown, in step S400, obtaining the current frame motion state of the vehicle through the vehicle motion state determination strategy further includes: If the vehicle was stationary in the previous frame's motion state, and If the vehicle is in motion, then its first state is determined to be moving; otherwise, its first state is determined to be stationary. If the vehicle was moving in the previous frame's motion state, and If the vehicle is in motion, then its first state is determined to be moving; otherwise, its first state is determined to be stationary. When the first state of the vehicle is stationary, and If the vehicle is in motion, then the motion state of the current frame is determined to be moving; otherwise, the motion state of the current frame is determined to be stationary. When the first state of the vehicle is vehicle movement, if the following conditions are met... and , or, satisfy If the vehicle is stationary in the current frame, it is determined that the vehicle is in motion; otherwise, it is determined that the vehicle is in motion in the current frame.

[0028] Specifically, in the vehicle motion state determination strategy, determining the vehicle's first state helps to identify the vehicle as moving when there is little environmental texture, rather than misidentifying it as stationary; determining the vehicle's motion state in the current frame based on the first state helps to quickly identify the vehicle as starting when it goes from stationary to starting, and quickly identify the vehicle as stationary when it goes from moving to stationary.

[0029] Based on the same inventive concept, this invention also provides a vehicle state determination system based on image frame difference, as described in the following embodiments. Since the principle of a vehicle state determination system based on image frame difference is similar to that of a vehicle state determination method based on image frame difference, the implementation of a vehicle state determination system based on image frame difference can refer to the implementation of a vehicle state determination method based on image frame difference; repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0030] Figure 3 This is a structural block diagram of a vehicle state determination system 300 based on image frame difference according to an embodiment of the present invention, such as... Figure 3 As shown, it includes: a data acquisition module 301, used to acquire the current frame image of the vehicle and the motion state of the vehicle in the previous frame; a moving target detection module 302, used to perform moving target detection on the current frame image and acquire the moving target detection result; an image frame difference calculation module 303, used to calculate edge information on the current frame image to obtain the current edge image, and perform image frame difference calculation based on the current edge image and the moving target detection result to obtain state parameters for judging the vehicle state; and a motion state judgment module 304, used to obtain the current frame motion state of the vehicle based on the motion state of the previous frame and the state parameters, through a vehicle motion state judgment strategy.

[0031] Furthermore, the moving target detection module 302 is also used to perform moving target detection on the current frame image and obtain moving target detection results, and further includes: Perform moving target detection on the current frame image to obtain a moving target detection box; A mask with a pixel value of 0 corresponding to the position of the moving target is generated in the moving target detection box.

[0032] Furthermore, the image frame difference calculation module 303 is also used to perform image frame difference calculation based on the current edge image and the moving target detection result to obtain state parameters for determining the vehicle state. The calculation method includes: Based on the current edge image and the moving target detection result, the image frame difference is calculated to obtain state parameters used to determine the vehicle state, including: Calculate the mean value of the current edge image and perform a linear transformation to obtain the vehicle state judgment threshold. ; The current edge image is updated to an edge image queue with a queue size of N. In the edge image queue, edge images of different frames are represented by N-1 to 0 respectively. The current edge image is updated to the edge image of the 0th frame of the edge image queue. The edge image of the current edge image and the edge image of the (N-1)th frame are subtracted, and the pixel values ​​of the edge image with a mask of 0 after subtraction are set to 0 to obtain the edge difference map. The mean of the edge difference map is calculated and smoothed using Gaussian filtering to obtain the current difference feature value. ; The current difference feature value Update the cached historical difference feature value queue with a queue size of M; The rate of change of the eigenvalues ​​is calculated based on the five most recently stored differential eigenvalues ​​in the historical differential eigenvalue queue. ; Calculate the mean of the updated historical difference feature value queue, and update the mean to the feature value mean queue with M cached queues; Obtain the minimum mean of the feature values ​​in the feature value mean queue. .

[0033] Furthermore, the motion state determination module 304 is also used to obtain the current frame motion state of the vehicle through the vehicle motion state determination strategy, including: If the vehicle was stationary in the previous frame's motion state, and If the vehicle is in motion, then its first state is determined to be moving; otherwise, its first state is determined to be stationary. If the vehicle was moving in the previous frame's motion state, and If the vehicle is in motion, then its first state is determined to be moving; otherwise, its first state is determined to be stationary. When the first state of the vehicle is stationary, and If the vehicle is in motion, then the motion state of the current frame is determined to be moving; otherwise, the motion state of the current frame is determined to be stationary. When the first state of the vehicle is vehicle movement, if the following conditions are met... and , or, satisfy If the vehicle is stationary in the current frame, it is determined that the vehicle is in motion; otherwise, it is determined that the vehicle is in motion in the current frame.

[0034] Furthermore, the image frame difference calculation module 303 is also used to calculate edge information of the current frame image to obtain the current edge image, including: performing mean filtering and Laplacian edge finding on the current frame image respectively, and calculating the gradient of erosion and dilation of the image obtained after Laplacian edge finding to obtain the current edge image.

[0035] Furthermore, the data acquisition module 301 is also used to extract the Y channel data in the YUV format of the current frame image.

[0036] In this embodiment, a computer device is also provided, such as... Figure 4 As shown, it includes a memory 401, a processor 402, and a computer program stored in the memory 401 and executable on the processor 402. When the processor 402 executes the computer program, it implements any of the above-mentioned vehicle state determination methods based on image frame difference.

[0037] Specifically, the computer device can be a computer terminal, a server, or a similar computing device.

[0038] In this embodiment, a computer-readable storage medium is provided, which stores a computer program that executes any of the above-described vehicle state determination methods based on image frame differences.

[0039] Specifically, computer-readable storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media does not include transient media, such as modulated data signals and carrier waves.

[0040] The embodiments of the present invention achieve the following technical effects: 1. This invention uses image edge information for inter-frame difference analysis, which reduces interference from lighting conditions and missed detections of distant moving targets in determining the vehicle's motion state; it also uses historical frame data for statistical analysis, and uses the feature values ​​of the current frame... The minimum eigenvalue of historical frames The comparison helps to quickly identify the vehicle's starting state in situations such as slow start-up or relatively simple background, achieving the technical goal of stable and sensitive judgment of the vehicle's motion state; 2. The method provided by the present invention can still identify a vehicle as moving when the environment has little texture, and not mistakenly identify it as stationary; it can quickly identify a vehicle as starting when it goes from stationary, and quickly identify a vehicle as stationary when it goes from moving to stationary.

[0041] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for determining vehicle status based on inter-frame difference in images, characterized in that, The method includes: Acquire the current frame image of the vehicle and the motion state of the vehicle in the previous frame; Perform moving target detection on the current frame image and obtain the moving target detection result; Edge information is calculated on the current frame image to obtain the current edge image. Based on the current edge image and the moving target detection result, the inter-frame difference of the image is calculated to obtain the state parameters used to determine the vehicle state. Based on the motion state of the previous frame and the state parameters, the motion state of the vehicle in the current frame is obtained through a vehicle motion state judgment strategy. The process of performing moving target detection on the current frame image and obtaining the moving target detection result includes: Perform moving target detection on the current frame image to obtain a moving target detection box; A mask with a pixel value of 0 corresponding to the position of the moving target is generated in the moving target detection box; Based on the current edge image and the moving target detection result, the image frame difference is calculated to obtain state parameters used to determine the vehicle state, including: The mean value of the current edge image is calculated, and a linear transformation is performed to obtain the vehicle state judgment threshold α; The current edge image is updated to an edge image queue with a queue size of N. In the edge image queue, edge images of different frames are represented by N-1 to 0 respectively. The current edge image is updated to the edge image of the 0th frame of the edge image queue. The edge image of the current edge image and the edge image of the (N-1)th frame are subtracted, and the pixel values ​​of the edge image with a mask of 0 after subtraction are set to 0 to obtain the edge difference map. The mean of the edge difference map is calculated and smoothed by Gaussian filtering to obtain the current difference feature value β; Update the current difference feature value β to the cached queue of historical difference feature values ​​with a queue size of M; The rate of change of the feature value η is calculated based on the five most recently stored difference feature values ​​in the historical difference feature value queue. Calculate the mean of all difference feature values ​​in the updated historical difference feature value queue, and update the mean to the feature value mean queue with a cache size of M. Obtain the minimum mean of the feature values ​​in the feature value mean queue. ; The method of obtaining the current frame motion state of the vehicle through the vehicle motion state determination strategy includes: If the vehicle is stationary in the previous frame motion state and β > α, then the first state of the vehicle is determined to be in motion; otherwise, the first state of the vehicle is determined to be stationary. If the vehicle was moving in the previous frame, and β > 0.5 When α is true, the first state of the vehicle is determined to be moving; otherwise, the first state of the vehicle is determined to be stationary. When the vehicle is in a stationary state, and β > 0.2 α+ If the vehicle is in motion, then the motion state of the current frame is determined to be moving; otherwise, the motion state of the current frame is determined to be stationary. When the first state of the vehicle is vehicle motion, if α > β > 0.5 α and η < -0.2 α, or, satisfying β <= 0.5 When α is true, the motion state of the vehicle in the current frame is determined to be stationary; otherwise, the motion state of the vehicle in the current frame is determined to be moving.

2. The vehicle state determination method based on image frame difference according to claim 1, characterized in that, The current frame image is used to calculate edge information to obtain the current edge image, including: The current frame image is subjected to mean filtering and Laplacian edge finding, and the gradient of erosion and dilation is calculated on the image obtained after Laplacian edge finding to obtain the current edge image.

3. The vehicle state determination method based on image frame difference according to claim 1, characterized in that, The current frame image is taken from the Y channel data in YUV format.

4. A vehicle state determination system based on image frame difference, characterized in that, include: The data acquisition module is used to acquire the current frame image of the vehicle and the previous frame motion state of the vehicle; The moving target detection module is used to perform moving target detection on the current frame image and obtain moving target detection results; the moving target detection module is used to perform moving target detection on the current frame image and obtain moving target detection boxes; A mask with a pixel value of 0 corresponding to the position of the moving target is generated in the moving target detection box; The image frame difference calculation module is used to calculate edge information of the current frame image to obtain the current edge image, and to calculate the image frame difference based on the current edge image and the moving target detection result to obtain state parameters for judging the vehicle state. Based on the current edge image and the moving target detection result, the image frame difference is calculated to obtain state parameters used to determine the vehicle state, including: The mean value of the current edge image is calculated, and a linear transformation is performed to obtain the vehicle state judgment threshold α; The current edge image is updated to an edge image queue with a queue size of N. In the edge image queue, edge images of different frames are represented by N-1 to 0 respectively. The current edge image is updated to the edge image of the 0th frame of the edge image queue. The edge image of the current edge image and the edge image of the (N-1)th frame are subtracted, and the pixel values ​​of the edge image with a mask of 0 after subtraction are set to 0 to obtain the edge difference map. The mean of the edge difference map is calculated and smoothed by Gaussian filtering to obtain the current difference feature value β; Update the current difference feature value β to the cached queue of historical difference feature values ​​with a queue size of M; The rate of change of the feature value η is calculated based on the five most recently stored difference feature values ​​in the historical difference feature value queue. Calculate the mean of all difference feature values ​​in the updated historical difference feature value queue, and update the mean to the feature value mean queue with a cache size of M. Obtain the minimum mean of the feature values ​​in the feature value mean queue. ; A motion state determination module is used to obtain the current frame motion state of the vehicle based on the motion state of the previous frame and the state parameters, using a vehicle motion state determination strategy; obtaining the current frame motion state of the vehicle using the vehicle motion state determination strategy includes: If the vehicle is stationary in the previous frame motion state and β > α, then the first state of the vehicle is determined to be in motion; otherwise, the first state of the vehicle is determined to be stationary. If the vehicle was moving in the previous frame, and β > 0.5 When α is true, the first state of the vehicle is determined to be moving; otherwise, the first state of the vehicle is determined to be stationary. When the vehicle is in a stationary state, and β > 0.2 α+ If the vehicle is in motion, then the motion state of the current frame is determined to be moving; otherwise, the motion state of the current frame is determined to be stationary. When the first state of the vehicle is vehicle motion, if α > β > 0.5 α and η < -0.2 α, or, satisfying β <= 0.5 When α is true, the motion state of the vehicle in the current frame is determined to be stationary; otherwise, the motion state of the vehicle in the current frame is determined to be moving.

5. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a vehicle state determination method based on image frame difference as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that executes a vehicle state determination method based on image frame difference according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Vehicle parking detection method, preceding vehicle starting reminding method and storage medium

    CN110717361A

  • Vehicle behavior recognition method

    CN103996028A

  • Vehicle speed detection method based on video detection

    CN106781536A