Video jitter detection method, detection device, electronic device and readable storage medium

By extracting the foreground and background areas of the video frame and calculating the inter-frame offset value, the problem of low video jitter detection accuracy is solved, the detection accuracy and robustness are improved, and the impact of the viewing angle movement of the monitoring equipment is reduced.

CN114339395BActive Publication Date: 2024-10-22ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111529901.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-10-22
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

It is difficult to accurately detect video jitter with existing technology, especially in massive video data, and it is difficult for human review to identify sudden video jitter in a timely and accurate manner.

Method used

By extracting adjacent video frames from video data, determining the foreground area and background area, calculating the image offset value between frames, and determining the video jitter detection result based on multiple offset values, reducing the impact of foreground object movement and improving detection accuracy Rate.

Benefits of technology

It improves the accuracy and robustness of video jitter detection, reduces the impact of monitoring equipment viewing angle movement on detection results, and enhances the ability to mine the changing patterns of image offset values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114339395B_ABST
    Figure CN114339395B_ABST
Patent Text Reader

Abstract

The present application discloses a video jitter detection method, detection device, electronic device and readable storage medium, the method comprising: extracting at least two adjacent first video frames from video data, determining the foreground area in each first video frame; obtaining the background area outside the foreground area in each first video frame; determining the image offset value between each two adjacent first video frames based on the background area in each two adjacent first video frames; and determining the video jitter detection result of the video data based on multiple image offset values. The above scheme can improve the accuracy of jitter detection of video data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of video image processing, and in particular to a video jitter detection method, a detection device, an electronic device and a readable storage medium. Background Art

[0002] As the role of monitoring equipment in urban security, people's livelihood control, industrial construction and other aspects continues to increase, anomaly detection in video data has gradually attracted attention. Among them, abnormal conditions such as video jitter are very difficult to detect due to their suddenness and short duration. In the face of massive video data, it is difficult to make accurate feedback on sudden video jitter based on manual review. In view of this, how to improve the accuracy of jitter detection in video data has become an urgent problem to be solved. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a video jitter detection method, a detection device, an electronic device and a readable storage medium, which can improve the accuracy of jitter detection on video data.

[0004] To solve the above technical problems, the first aspect of the present application provides a video jitter detection method, comprising: extracting at least two adjacent first video frames from video data, and determining a foreground area in each of the first video frames; obtaining a background area outside the foreground area in each of the first video frames; based on the background area in each two adjacent first video frames, determining an image offset value between each two adjacent first video frames; and determining a video jitter detection result of the video data based on multiple image offset values.

[0005] To solve the above technical problems, the second aspect of the present application provides a video jitter detection device, including: a foreground area determination module, a background area extraction module, an offset value determination module and a result determination module, wherein the foreground area determination module is used to extract at least two adjacent first video frames from video data and determine the foreground area in each of the first video frames; the background area extraction module is used to obtain the background area other than the foreground area in each of the first video frames; the offset value determination module is used to determine the image offset value between every two adjacent first video frames based on the background area in every two adjacent first video frames; and the result determination module is used to determine the video jitter detection result of the video data based on multiple image offset values.

[0006] To solve the above technical problems, the third aspect of the present application provides an electronic device, which includes: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method described in the first aspect above.

[0007] In order to solve the above technical problem, the fourth aspect of the present application provides a computer storage medium on which program data is stored, and when the program data is executed by a processor, the method described in the first aspect is implemented.

[0008] The above scheme extracts at least two adjacent first video frames from the video data, determines the foreground area therein from the first video frames, obtains the background area outside the foreground area, reduces the influence of the movement of the object itself in the foreground area on the video jitter detection, thereby determining the image offset value between every two adjacent first video frames based on the background area in every two adjacent first video frames, and determines the video jitter detection result in the corresponding time period based on the multiple image offset values, so that the law of the change of the image offset value can be mined with more samples, the accuracy of jitter detection of the video data is improved, the influence of the movement of the viewing angle of the monitoring device on the detection result is reduced, and the robustness of the detection result is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0010] Figure 1 It is a flowchart of an implementation method of a video jitter detection method of the present application;

[0011] Figure 2 It is a flowchart of another implementation method of the video jitter detection method of the present application;

[0012] Figure 3 It is a structural schematic diagram of an implementation method of a video jitter detection device of the present application;

[0013] Figure 4 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0014] Figure 5 It is a structural schematic diagram of an implementation method of a computer storage medium of the present application. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0016] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0017] See also Figure 1 , Figure 1 : is a flow chart of an implementation method of a video jitter detection method of the present application, the method comprising:

[0018] S101: extract at least two adjacent first video frames from video data, and determine a foreground area in each first video frame.

[0019] Specifically, video data collected by a monitoring device is obtained, at least two adjacent video frames are extracted from the video data as first video frames, the first video frames are parsed, and a foreground area in each first video frame is determined.

[0020] In one application, at least a portion of the first video frame is extracted from the video data, and the extracted first video frames are continuous video frames. Foreground object detection is performed on each first video frame to determine the foreground object in each first video frame. The area corresponding to the foreground object is used as the foreground area, thereby determining the foreground area in the first video frame.

[0021] In another application method, a starting video frame is determined from video data, and continuous first video frames are extracted with the starting video frame as the starting point. Foreground object detection is performed on the extracted first video frames to determine the foreground objects in each first video frame, and the area corresponding to the foreground object is used as the foreground area, thereby determining the foreground area in the first video frame.

[0022] In a specific application scenario, a foreground object detection model is used to perform foreground object detection on a first video frame, wherein the foreground object detection model is pre-trained to recognize foreground objects of preset categories, and the first video frame is input into the foreground object detection model so that the foreground object detection model outputs the foreground object in the first video frame, and the area corresponding to the foreground object in the first video frame is used as the foreground area.

[0023] S102: Obtain a background area other than the foreground area in each first video frame.

[0024] Specifically, a background area outside the foreground area is obtained from the first video frame, so as to determine a background object with a very low probability of motion in the first video frame.

[0025] In one application, pixels corresponding to the foreground area in each first video frame are eliminated to obtain the background area in the first video frame.

[0026] S103: Determine an image offset value between every two adjacent first video frames based on the background area in every two adjacent first video frames.

[0027] Specifically, the background areas in every two adjacent first video frames are compared to determine the image offset value after the background area changes between every two adjacent first video frames, thereby reducing the influence of the movement of the object in the foreground area on the video jitter detection.

[0028] In one application, a first video frame is converted into a second video frame, wherein the second video frame only retains a background area, a transformation matrix between adjacent video frames is generated based on every two adjacent second video frames, the changes in the horizontal and vertical directions between the two adjacent second video frames are represented by the transformation matrix, and an image offset value between a later video frame in time sequence relative to an earlier video frame in time sequence is determined based on the transformation matrix and the corresponding second video frame.

[0029] S104: Determine a video jitter detection result of the video data based on the multiple image offset values.

[0030] Specifically, it is determined whether there is a periodic change in the image offset value between a plurality of adjacent video frames, so as to count the frequency of the periodic change, and based on the frequency of the periodic change, the jitter detection result corresponding to the video data in the corresponding time period is determined.

[0031] In one application, the image offset value of each two adjacent video frames in a continuous video frame within a period of time is obtained. For the video frames without jitter or displacement, the horizontal and vertical offsets are basically 0. If the image offset value is greater than the offset threshold, the change segment from the starting point to the end point of the change is intercepted, and it is determined whether there is a periodic change in the change segment and the frequency of occurrence is counted. When the frequency of occurrence is greater than the frequency threshold, it is determined that the video data in the corresponding change segment has jittered, otherwise the video data is normal, thereby reducing the probability of judging the viewing angle movement of the monitoring device as video jitter, thereby improving the robustness and accuracy of the detection result.

[0032] The above scheme extracts at least two adjacent first video frames from the video data, determines the foreground area therein from the first video frames, obtains the background area outside the foreground area, reduces the influence of the movement of the object itself in the foreground area on the video jitter detection, thereby determining the image offset value between every two adjacent first video frames based on the background area in every two adjacent first video frames, and determines the video jitter detection result in the corresponding time period based on the multiple image offset values, so that the law of the change of the image offset value can be mined with more samples, the accuracy of jitter detection of the video data is improved, the influence of the movement of the viewing angle of the monitoring device on the detection result is reduced, and the robustness of the detection result is improved.

[0033] See also Figure 2 , Figure 2 : is a flow chart of another embodiment of the video jitter detection method of the present application, the method comprising:

[0034] S201: extract at least two adjacent first video frames from video data, and determine a foreground area in each first video frame.

[0035] Specifically, video data captured by a monitoring device is obtained, at least two adjacent first video frames are extracted from the video data, and a foreground area in each first video frame is determined, wherein the foreground area is an area corresponding to a foreground object, and the foreground object includes but is not limited to objects that actually move, such as people, animals, and vehicles.

[0036] In one application, the step of determining the foreground area in each first video frame includes: inputting each first video frame into a foreground segmentation model so that the foreground segmentation model determines the foreground area and the background area in the first video frame based on pixels on the first video frame.

[0037] Specifically, the foreground area includes pixels corresponding to the foreground object in the first video frame, and the background area includes pixels corresponding to background objects other than the foreground object in the first video frame. In addition, the foreground segmentation model is obtained after pre-training based on multiple second training images, and the multiple second training images include multiple foreground objects.

[0038] Furthermore, each first video frame is input into a foreground segmentation model, the foreground segmentation model detects the first video frame, determines the foreground object in the first video frame, and uses the pixels corresponding to the foreground object as the foreground area. The foreground area in the first video frame is judged in batches through the trained foreground segmentation model, thereby determining the foreground area therein, so as to reduce the influence of the displacement of the foreground object on the accuracy of jitter detection.

[0039] In one application scenario, the training process of the foreground segmentation model includes: obtaining a second training image including multiple categories and marking labels corresponding to foreground objects on the second training image, wherein the categories of foreground objects include pedestrians, vehicles and animals, inputting the second training image into the foreground segmentation model to be trained so that the foreground segmentation model outputs the segmentation result for the foreground object, using the cross entropy loss function to determine the prediction loss between the segmentation result and the label on the second training image, adjusting the parameters in the foreground segmentation model based on the prediction loss until the prediction loss converges, and obtaining the trained foreground segmentation model. The above loss function is expressed by the formula as follows:

[0040]

[0041] Among them, M represents the number of foreground categories, y c is the category corresponding to the pixel, p c is the probability that the predicted sample belongs to category c.

[0042] In a specific application scenario, the trained foreground segmentation model is used to determine the pixel categories corresponding to the pixels on the image, wherein the pixel categories include foreground and background. The step of determining the foreground area and the background area in the first video frame based on the pixels on the first video frame includes: determining the pixel category corresponding to the pixels of the foreground object as foreground, and determining the pixel category corresponding to the pixels of the background object as background, thereby determining the foreground area and the background area in the first video frame.

[0043] Specifically, the pixel categories are divided into foreground and background, and at least two first video frames are input into the foreground segmentation model so that the foreground segmentation model determines the pixel category of each pixel in the first video frame, and based on the pixel category, the pixel category corresponding to the pixel of the foreground object is determined as foreground, and the foreground area in the first video frame is determined, and the pixel category corresponding to the pixel of the background object is determined as background, and the background area in the first video frame is determined, so that the pixels in the first video frame are inevitably divided into foreground or background, so that the foreground and background in the first video frame are clearly distinguished.

[0044] S202: Setting pixels in an area outside the foreground area in the first video frame to a preset value or clearing them to obtain a background area.

[0045] Specifically, the foreground pixels in the first video frame are set to a preset value or eliminated to determine the background area in the first video frame, wherein the pixels in the foreground area of ​​the background area are set to a preset value or eliminated.

[0046] In one application, the pixels corresponding to the foreground area in the first video frame are filled with zero values ​​to eliminate the pixels corresponding to the foreground area in the first video frame, thereby retaining only the pixels corresponding to the background area to determine the background area in the first video frame. The above process is expressed by the following formula:

[0047]

[0048] Among them, IR represents the result image, C is the pixel type of the foreground object, and c i,j is the pixel at position i,j in the image, I i,j is the pixel of the original image, when c i,j When it does not belong to the foreground C, it is the background, and the pixel at this position is equal to the pixel of the original image. i,j When it belongs to foreground C, it is the foreground, and the pixels at that position are filled with zero values.

[0049] Optionally, the pixels corresponding to the foreground area in the first video frame are set to preset values, so as to clearly distinguish the foreground area from the background area in the first video frame, determine the background area in the first video frame, turn the target that can be focused on in the first video frame into a background object, and reduce the impact of the foreground object movement on the jitter detection result.

[0050] S203: Inputting each two adjacent background regions into the registration model respectively, so that the registration model outputs the affine transformation matrix corresponding to each two adjacent background regions.

[0051] Specifically, the registration model is obtained after pre-training based on a plurality of first training images, and the plurality of first training images include a plurality of groups of adjacent video frames. The trained registration model can output corresponding affine transformation matrices of two input video frames based on the two input video frames.

[0052] Furthermore, the training process of the registration model includes: obtaining a plurality of first training images, wherein the first training images are at least partially adjacent video frames extracted from the video data, annotating the label matrix corresponding to the adjacent first training images, wherein the label matrix is ​​an affine transformation matrix, inputting the first training images into the registration model to be trained so that the registration model outputs a prediction matrix, adjusting the parameters in the registration model based on the error between the prediction matrix and the label matrix until the error converges, and obtaining the trained registration model. The affine transformation matrix is ​​expressed by the formula as follows:

[0053]

[0054] Among them, a 11 ,a 12 ,a 21 ,a 22Represents the affine transformation parameters, which are used to feedback whether the image is rotated. x ,t y Represents the translation transformation parameter, x, y represent the horizontal and vertical translation ratios respectively, and are used to feedback whether the image is translated.

[0055] Specifically, the affine transformation maintains the flatness and parallelism of the two-dimensional image, where straightness means that a straight line remains a straight line after an affine transformation, and an arc remains an arc after an affine transformation. Parallelism means that the relative position relationship between straight lines remains unchanged, and parallel lines remain parallel lines after an affine transformation, and the position order of points on the straight lines does not change. The registration network can mine the deep features between video frames and generate an affine transformation matrix between two adjacent video frames, so that the image offset value subsequently generated based on the affine transformation matrix is ​​more accurate, and the detection result obtained based on the image offset is more robust.

[0056] S204: Determine an image offset value between every two adjacent video frames based on each affine transformation matrix and the corresponding background area.

[0057] Specifically, after obtaining the affine transformation matrix corresponding to every two adjacent background areas, the image offset value between every two adjacent video frames can be determined based on the affine transformation matrix and the corresponding background area.

[0058] In one application scenario, the background area that comes earlier in time between two adjacent background areas is multiplied by the corresponding affine transformation matrix to obtain the image offset value of the background area that comes later in time relative to the background area that comes earlier in time; and every two adjacent background areas are traversed to determine the image offset value between every two adjacent video frames.

[0059] Specifically, since the jitter of the monitoring equipment is approximately similar to a rigid body transformation, the horizontal and vertical offsets of the affine transformation matrix are the displacement ratios of the video picture jitter. By multiplying the affine transformation matrix with the width and height of the corresponding background area in the previous time sequence, the horizontal and vertical displacements of the background area in the later time sequence relative to the background area in the previous time sequence can be obtained, thereby determining the image offset value between two adjacent video frames. When multiple background areas are included, every two adjacent background areas are traversed to determine the image offset value between every two adjacent video frames within a period of time.

[0060] In a specific application scenario, when there is no jitter between two adjacent video frames, the affine transformation matrix is When jitter occurs between two adjacent video frames, the affine transformation matrix will inevitably change. Therefore, the affine transformation matrix can feedback the changes in depth features between adjacent video frames. Based on the affine transformation matrix and the corresponding background area, the image offset value between two adjacent video frames can be accurately obtained.

[0061] S205: Obtain multiple image offset values ​​corresponding to at least two adjacent first video frames.

[0062] Specifically, the image offset value corresponding to each two adjacent video frames in at least two adjacent first video frames extracted from the video data is obtained to obtain multiple image offset values, thereby reducing the influence of random value on the jitter detection result.

[0063] S206: Generate a change trend graph based on the multiple image offset values, wherein the distribution of signal points in the change trend graph is related to the timing of the first video frame.

[0064] Specifically, a change trend graph is generated according to the image offset value of each later video frame in the continuous video frames relative to the earlier video frame in the sequential order, wherein the change trend graph changes with time, and the signal point distribution in the change trend graph is related to the timing of the first video frame.

[0065] In one application scenario, multiple image offset values ​​of consecutive adjacent video frames changing with time within a preset time period are obtained, and a signal graph of the image offset values ​​changing with time is generated. For adjacent video frames without jitter or displacement, the offset of adjacent video frames in the horizontal and vertical directions is basically 0, and the offset on the signal graph is 0.

[0066] S207: Determine a video jitter detection result of the video data based on the multiple image offset values, the change trend graph, and the offset thresholds corresponding to the image offset values.

[0067] Specifically, the position where the image offset value exceeds the offset threshold is determined in the change trend graph, and the change frequency is counted. When the change frequency exceeds the frequency threshold, the video jitter detection result is determined to be jitter occurs. When the change frequency does not exceed the frequency threshold, the video jitter detection result is determined to be no jitter occurs. At this time, the change of the image in the video data is usually caused by the movement of the viewing angle.

[0068] In one application, the step of determining the video jitter detection result of video data based on multiple image offset values, a change trend graph and an offset threshold value corresponding to the image offset value includes: extracting at least one change segment from the change trend graph in time sequence; wherein the starting point of each change segment is a signal point where the image offset value is greater than the offset threshold value, and the ending point of each change segment is the first signal point where the image offset value is less than the offset threshold value after the corresponding starting point; determining the change frequency corresponding to the image offset value based on each change segment; and determining the video jitter detection result within a preset time period based on the change frequency and its corresponding frequency threshold value.

[0069] Specifically, a starting point corresponding to an image offset value greater than an offset threshold and an ending point corresponding to an image offset value less than or equal to the offset threshold are determined in a change trend graph in a time sequence from front to back, and a period between the starting point and the ending point is taken as a change segment, thereby obtaining at least one change segment in the change trend graph, an image offset value corresponding to a starting point of each change segment exceeds the offset threshold, and an ending point of each change segment is a signal point whose first image offset value obtained from the starting point backward in time sequence is less than the offset threshold, and whether there is periodic change in the image offset value in each change segment is determined based on an autocorrelation function and the frequency of occurrence of the periodic change is counted; when the frequency of occurrence exceeds the frequency threshold, it is determined that a video jitter detection result in the change segment is that jitter occurs; and when the frequency of occurrence does not exceed the frequency threshold, it is determined that a video jitter detection result in the change segment is that jitter does not occur.

[0070] In a specific application scenario, multiple image offset values ​​of consecutive adjacent video frames changing with time within a preset time period are obtained, and a signal graph of the image offset value changing with time is generated, wherein the preset time period is the time period corresponding to the first consecutive video frame. If the signal offset is greater than the offset threshold, the change segment between the start point and the end point of the change is intercepted, and the autocorrelation function is used to determine whether there is a periodic change in the change segment and the frequency of occurrence is counted. If the frequency is greater than the frequency threshold, it is determined that the video frame corresponding to the change segment has video jitter, otherwise it is normal. The autocorrelation function formula is as follows:

[0071]

[0072] Among them, E is the expected value, X i is the value of the random variable at time t(i), μ i is the expected value at time series t(i), X i+k is the value of the random variable at time series t(i+k), μ i+k is the expected value of the time series at t(i+k), σ 2 is the variance, and the range of the obtained autocorrelation value R(k) is [-1,1], 1 is the maximum positive correlation value, -1 is the maximum negative correlation value, and 0 is irrelevant. The autocorrelation function in signal processing reflects the correlation between the values ​​of the same signal at different times. If the signal is periodic, then when k takes the corresponding periodic value, the autocorrelation function can reach the maximum value. Therefore, the autocorrelation function can analyze the periodicity of the signal. The autocorrelation function is used to count the horizontal and vertical offset periods when jitter occurs, so as to avoid the influence of non-jitter states such as unidirectional movement of monitoring equipment on the detection results.

[0073] In this embodiment, by extracting the background areas of adjacent video frames, and then using the registration model to perform deep feature matching to obtain an affine transformation matrix, the horizontal and vertical offsets between adjacent video frames are obtained based on the affine transformation matrix, and the image offset values ​​between adjacent video frames are obtained. A change trend graph is generated based on the multiple image offset values, and a more accurate video jitter detection result is determined in the change trend graph based on the autocorrelation function.

[0074] See also Figure 3 , Figure 3 It is a structural schematic diagram of an embodiment of a video jitter detection device of the present application, and the video jitter detection device 30 includes a foreground area determination module 301, a background area extraction module 302, an offset value determination module 303 and a result determination module 304. Among them, the foreground area determination module 301 is used to extract at least two adjacent first video frames from the video data and determine the foreground area in each first video frame; the background area extraction module 302 is used to obtain the background area other than the foreground area in each first video frame; the offset value determination module 303 is used to determine the image offset value between each two adjacent first video frames based on the background area in each two adjacent first video frames; the result determination module 304 is used to determine the video jitter detection result of the video data based on multiple image offset values.

[0075] It should be noted that the video jitter detection device in this embodiment is applied to the video jitter detection method in any of the above embodiments, wherein the foreground area determination module 301, the background area extraction module 302, the offset value determination module 303 and the result determination module 304 are applicable to the video jitter detection method in any of the above embodiments.

[0076] In the above scheme, the foreground area determination module 301 extracts at least two adjacent first video frames from the video data, determines the foreground area from the first video frame, and the background area extraction module 302 obtains the background area outside the foreground area, thereby reducing the influence of the movement of the object itself in the foreground area on the video jitter detection, so that the offset value determination module 303 determines the image offset value between every two adjacent first video frames based on the background area in every two adjacent first video frames, and the result determination module 304 determines the video jitter detection result in the corresponding time period based on multiple image offset values, so that the law of the change of the image offset value can be mined with more samples, thereby improving the accuracy of jitter detection of video data, reducing the influence of the monitoring device's viewing angle on the detection result, and improving the robustness of the detection result.

[0077] See also Figure 4 , Figure 41 is a schematic diagram of the structure of an embodiment of an electronic device of the present application, wherein the electronic device 40 includes a memory 401 and a processor 402 coupled to each other, wherein the memory 401 stores program data (not shown), and the processor 402 calls the program data to implement the video jitter detection method in any of the above embodiments. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.

[0078] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of an embodiment of a computer storage medium of the present application. The computer storage medium 50 stores program data 500. When the program data 500 is executed by a processor, the video jitter detection method in any of the above embodiments is implemented. For the description of the relevant contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.

[0079] It should be noted that the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present implementation scheme.

[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0082] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A video jitter detection method, characterized in that: The method comprises: Extracting at least two adjacent first video frames from the video data, and determining a foreground area in each of the first video frames; Obtaining a background area outside the foreground area in each of the first video frames; Based on the background areas in every two adjacent first video frames, determining the image offset value between every two adjacent first video frames; specifically comprising: inputting every two adjacent background areas into a registration model respectively, so that the registration model outputs an affine transformation matrix corresponding to each of the two adjacent background areas; based on each of the affine transformation matrices and the corresponding background areas, determining the image offset value between every two adjacent video frames; wherein the registration model is obtained after pre-training based on a plurality of first training images, and the plurality of first training images include a plurality of groups of adjacent video frames; Determine a video jitter detection result of the video data based on the plurality of image offset values; The method of determining the image offset value between every two adjacent video frames based on each of the affine transformation matrices and the corresponding background areas comprises: multiplying the background area that is earlier in time sequence among the two adjacent background areas by the corresponding affine transformation matrix to obtain the image offset value of the background area that is later in time sequence relative to the background area that is earlier in time sequence; wherein, the affine transformation matrix is ​​multiplied by the width and height of the corresponding background area that is earlier in time sequence to obtain the displacement of the background area that is later in time sequence relative to the background area that is earlier in time sequence in the horizontal and vertical directions, thereby determining the image offset value between two adjacent video frames; and traversing every two adjacent background areas to determine the image offset value between every two adjacent video frames.

2. The video jitter detection method according to claim 1, characterized in that: The step of obtaining the background area outside the foreground area in each of the first video frames comprises: The pixels in the foreground area in the first video frame are set to a preset value or cleared to obtain the background area.

3. The video jitter detection method according to claim 1, characterized in that: The step of determining the video jitter detection result of the video data based on the multiple image offset values ​​comprises: Acquire a plurality of image offset values ​​corresponding to the at least two adjacent first video frames; Generate a change trend graph based on the plurality of image offset values; wherein the distribution of signal points in the change trend graph is related to the timing of the first video frame; Based on the plurality of image offset values, the change trend graph and offset thresholds corresponding to the image offset values, a video jitter detection result of the video data is determined.

4. The video jitter detection method according to claim 3, characterized in that: The step of determining the video jitter detection result of the video data based on the plurality of image offset values, the change trend graph and the offset thresholds corresponding to the image offset values ​​comprises: Extracting at least one change segment from the change trend graph in time sequence; wherein the starting point of each change segment is a signal point at which the image offset value is greater than the offset threshold, and the ending point of each change segment is the first signal point at which the image offset value is less than the offset threshold after the corresponding starting point; Determine the change frequency corresponding to the image offset value based on each of the change segments; Based on the change frequency and its corresponding frequency threshold, a video jitter detection result within a preset time period is determined.

5. The video jitter detection method according to claim 1, characterized in that: The step of determining the foreground area in each of the first video frames comprises: Inputting each of the first video frames into a foreground segmentation model so that the foreground segmentation model determines a foreground area and a background area in the first video frame based on pixels on the first video frame; Among them, the foreground area includes pixels corresponding to the foreground object in the first video frame, and the background area includes pixels corresponding to background objects other than the foreground object in the first video frame; the foreground segmentation model is obtained after pre-training based on multiple second training images, and the multiple second training images include multiple foreground objects.

6. The video jitter detection method according to claim 5, characterized in that: The trained foreground segmentation model is used to determine the pixel categories corresponding to the pixels on the image, wherein the pixel categories include foreground and background; The step of determining the foreground area and the background area in the first video frame based on the pixels in the first video frame comprises: The pixel category corresponding to the pixels of the foreground object is determined as foreground, and the pixel category corresponding to the pixels of the background object is determined as background, so as to determine the foreground area and the background area in the first video frame.

7. A video jitter detection device, characterized in that: The detection device comprises: A foreground area determination module, used to extract at least two adjacent first video frames from the video data, and determine a foreground area in each of the first video frames; A background area extraction module, used for obtaining a background area outside the foreground area in each of the first video frames; The offset value determination module is used to determine the image offset value between every two adjacent first video frames based on the background area in every two adjacent first video frames; specifically comprising: inputting every two adjacent background areas into a registration model respectively, so that the registration model outputs an affine transformation matrix corresponding to each of the two adjacent background areas; based on each of the affine transformation matrices and the corresponding background area, determining the image offset value between every two adjacent video frames; wherein the registration model is obtained after pre-training based on a plurality of first training images, and the plurality of first training images include a plurality of groups of adjacent video frames; A result determination module is used to determine the video jitter detection result of the video data based on the multiple image offset values; wherein, based on each of the affine transformation matrices and the corresponding background areas, the image offset value between every two adjacent video frames is determined, including: multiplying the background area that is earlier in time sequence among the two adjacent background areas with the corresponding affine transformation matrix to obtain the image offset value of the background area that is later in time sequence relative to the background area that is earlier in time sequence; wherein, multiplying the affine transformation matrix with the width and height of the corresponding background area that is earlier in time sequence to obtain the displacement of the background area that is later in time sequence relative to the background area that is earlier in time sequence in the horizontal and vertical directions, thereby determining the image offset value between two adjacent video frames; traversing every two adjacent background areas to determine the image offset value between every two adjacent video frames.

8. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the method according to any one of claims 1 to 6 is implemented.