CN117041666A - Abnormality detection method and device for digital video, electronic equipment and storage medium - Google Patents

Abnormality detection method and device for digital video, electronic equipment and storage medium Download PDF

Info

Publication number
CN117041666A
CN117041666A CN202311042914.XA CN202311042914A CN117041666A CN 117041666 A CN117041666 A CN 117041666A CN 202311042914 A CN202311042914 A CN 202311042914A CN 117041666 A CN117041666 A CN 117041666A
Authority
CN
China
Prior art keywords
image
video signal
comparison
channel video
main channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311042914.XA
Other languages
Chinese (zh)
Inventor
陈志强
惠新标
王相锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Baibei Science And Technology Development Co ltd
Original Assignee
Shanghai Baibei Science And Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Baibei Science And Technology Development Co ltd filed Critical Shanghai Baibei Science And Technology Development Co ltd
Priority to CN202311042914.XA priority Critical patent/CN117041666A/en
Publication of CN117041666A publication Critical patent/CN117041666A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44209Monitoring of downstream path of the transmission network originating from a server, e.g. bandwidth variations of a wireless network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/631Multimode Transmission, e.g. transmitting basic layers and enhancement layers of the content over different transmission paths or transmitting with different error corrections, different keys or with different transmission protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

The application provides an anomaly detection method and device for digital video, electronic equipment and a storage medium, and relates to the technical field of broadcast television. The method comprises the following steps: dividing each frame of image of the main channel video signal by using an Ojin method to obtain a division result, wherein the division result comprises an abnormal image containing an abnormal region and/or a normal image without the abnormal region, and the main channel video signal is a digital video signal accessed into a main channel; when the segmentation result has normal images, comparing the normal images in the main channel video signals with corresponding comparison images in the standby channel video signals to obtain comparison results, wherein the standby channel video signals are digital video signals accessed into the standby channels; and obtaining an abnormality detection result when the segmentation result and/or the comparison result reach an abnormality detection condition. By implementing the technical scheme provided by the application, the accuracy of the detection result is greatly improved through twice detection by the Ojin method and video comparison.

Description

Abnormality detection method and device for digital video, electronic equipment and storage medium
Technical Field
The application provides an anomaly detection method and device for digital video, electronic equipment and a storage medium, and belongs to the technical field of broadcast television.
Background
With the increasing popularity of multimedia, it has become an important means for us to obtain information. At the same time, the situation of video safety broadcasting is also more serious. The broadcasting link of the digital video is much more complex than that of the analog video, various abnormal states are often generated in the broadcasting, and the increasing of the number of programs makes the traditional manual monitoring broadcasting method more prone to overlooking.
Therefore, the digital video signal must be processed by technical means to ensure safe broadcasting of the digital video. However, in the prior art, currently mainstream black field static frame detection devices generally adopt a binarization or boolean value judgment mode to divide images into two categories through thresholds to determine anomalies.
However, in the case of complex images, the judgment capability of abnormal conditions such as black fields, static frame areas and the like in local areas of the complex images is deviated, the detection accuracy is poor, and the condition of missing report is easy to occur.
Disclosure of Invention
The application provides an anomaly detection method, an anomaly detection device, electronic equipment and a storage medium for digital video, which greatly improve the accuracy of detection results through detection by the Ojin method and detection by video comparison and detection twice.
In a first aspect, the present application provides a method for detecting anomalies in a digital video, including:
Dividing each frame of image of the main channel video signal by using an Ojin method to obtain a division result, wherein the division result comprises an abnormal image containing an abnormal region and/or a normal image without the abnormal region, and the main channel video signal is a digital video signal accessed into a main channel;
when a normal image exists in the segmentation result, comparing the normal image in the main channel video signal with a corresponding comparison image in the standby channel video signal to obtain a comparison result, wherein the standby channel video signal is a digital video signal accessed to a standby channel, and the main channel video signal and the standby channel video signal are the same video signal accessed to different channels;
and obtaining an abnormality detection result when the segmentation result and/or the comparison result reach an abnormality detection condition.
By adopting the technical scheme, each frame of image of the main channel video signal input through the main channel and each frame of image of the standby channel video signal input through the standby channel are subjected to threshold segmentation through the Ojin method, the abnormal image with an abnormal area is determined, then the comparison image corresponding to the normal image and the standby channel video signal in the main channel video signal is compared again to determine whether the comparison abnormal image exists or not, and the accuracy of the abnormality detection is improved and the condition of missing report is reduced through the two-time detection.
Optionally, dividing each frame image of the main channel video signal by using an oxford method to obtain a division result, where the division result includes an abnormal image including an abnormal region and/or a normal image not including an abnormal region, and the main channel video signal is a digital video signal accessed into the main channel, and includes:
converting each frame image of the main channel video signal into a gray level image and counting a gray level histogram of each frame image;
calculating a cumulative distribution function and a normalized histogram of the gray level histogram according to the gray level histogram;
determining an optimal segmentation threshold according to the cumulative distribution function and the normalized histogram;
and dividing each frame of image of the main channel video signal according to the dividing threshold value to obtain a dividing result.
By adopting the technical scheme, each frame of image of the main channel video signal is segmented by using the Ojin method to obtain a segmentation result, wherein the segmentation result comprises an abnormal image containing an abnormal region and/or a normal image without the abnormal region, each frame of image of the main channel video signal is subjected to preliminary detection by using the Ojin method, and the abnormal image is screened out to reduce the workload of subsequent comparison.
Optionally, determining the optimal segmentation threshold according to the cumulative distribution function and the normalized histogram includes:
Calculating a cumulative distribution function of the normalized histogram;
calculating the inter-class variance of the gray level image under the condition of different segmentation thresholds according to the cumulative distribution function and the normalized histogram;
traversing all possible segmentation thresholds, and finding the segmentation threshold with the largest inter-class variance as the optimal segmentation threshold.
By adopting the technical scheme, the probability of erroneous segmentation is determined to be reduced to the minimum by determining the optimal segmentation threshold.
Optionally, when the segmentation result includes a normal image, comparing the normal image in the main channel video signal with a corresponding comparison image in the standby channel video signal to obtain a comparison result, including:
when a normal image exists in the segmentation result, determining fitting characteristic values of comparison primitives of the images according to the image characteristic values of each frame image of the main channel video signal and each pixel point of each frame image of the standby channel video signal, wherein each comparison primitive is obtained by dividing one frame image into areas with preset numbers;
determining whether fitting characteristic values of each comparison primitive on each frame image in the main channel video signal are the same as those of each comparison primitive on each frame image in the standby channel video signal or not so as to determine video synchronization points of the main channel video signal and the standby channel video signal;
Determining a comparison image corresponding to a normal image in the images of the standby channel video signals according to the video synchronization points, comparing each frame image of the normal image with each frame image of the corresponding comparison image, determining a difference value between a fitting characteristic value of a current comparison image element of the normal image and a fitting characteristic value of the current frame comparison image element of the corresponding comparison image, when the difference value is larger than a preset first threshold value, indicating that the current comparison image element is inconsistent, and when the difference value is smaller than the preset first threshold value, indicating that the current comparison image element is consistent;
when the number of the inconsistent comparison primitives in the current frame image of the normal image and the corresponding comparison primitives in the current frame image of the comparison image is larger than a preset second threshold, the current frame comparison is inconsistent, and when the number of the inconsistent comparison primitives in the current frame image of the normal image and the corresponding comparison primitives in the current frame image of the comparison image is smaller than the preset second threshold, the current frame comparison is consistent;
when the number of inconsistent continuous frames is greater than a preset third threshold, determining that the video comparison result is abnormal, determining an abnormal image, and when the number of inconsistent continuous frames is less than the preset third threshold, determining that the video comparison result is normal.
By adopting the technical scheme, the normal image in the main channel video signal and the corresponding standby channel video signal image are compared, whether the images with abnormal comparison exist or not is detected again, and the two video signals are subjected to the comparison analysis of the video signals, so that whether the video signals to be broadcasted are abnormal or not can be monitored more accurately; and dividing the area of each frame of image of the video signal to obtain at least one comparison primitive, and analyzing the consistency of each frame of image by adopting the fitting characteristic value of the comparison primitive, so as to effectively identify whether each frame of image of the video signal is abnormal.
Optionally, determining the fitting feature value of each alignment primitive of the image according to the image feature value of each pixel point of each frame image of the main channel video signal and each frame image of the standby channel video signal includes:
determining pixel points at N adjacent positions of each frame image of the main channel video signal and each frame image of the standby channel video signal as a comparison primitive;
and determining fitting characteristic values of the comparison primitives according to the image characteristic values of the pixel points in the comparison primitives.
By adopting the technical scheme, the characteristic information in the image can be more accurately described by comparing a plurality of pixel points in the graphic primitive for analysis.
Optionally, determining whether the fitting feature value of each aligned primitive on each frame image in the main channel video signal is the same as the fitting feature value of each aligned primitive on each frame image in the standby channel video signal to determine a video synchronization point of the main channel video signal and the standby channel video signal includes:
determining fitting characteristic values of each comparison primitive on each frame image in the main channel video signal and whether the fitting characteristic values of each comparison primitive on each frame image in the standby channel video signal are the same or not so as to determine whether each comparison primitive on each frame image of the main channel video signal and each comparison primitive on each frame image of the standby channel video signal are the same or not, and simultaneously determining different block numbers of the comparison primitives on each frame image of the main channel video signal and each comparison primitive on each frame image of the standby channel video signal;
and when the number of blocks of the main channel video signal and the standby channel video signal, which are different from each other in each frame image of the continuous X frame images, is smaller than a first threshold value, determining that frames after the X frames are video synchronization points.
By adopting the technical scheme, the video synchronization point can be effectively searched by utilizing the characteristic analysis of the comparison graphic element and the different block numbers of the comparison graphic element, and the accuracy and the efficiency of video processing and analysis are improved.
Optionally, determining the fitting eigenvalue of the comparison primitive according to the eigenvalue of the comparison primitive includes:
and weighting according to the characteristic values of the comparison primitives to obtain fitting characteristic values of the comparison primitives.
By adopting the technical scheme, the characteristic information in the image can be better described by carrying out weighting processing on the characteristic values of the graphic primitives, and the subsequent comparison is convenient.
By adopting the technical scheme, in a second aspect of the application, an abnormality detection device for digital video is provided, comprising:
the image segmentation module 1 is used for segmenting each frame of image of the main channel video signal by using an Ojin method to obtain a segmentation result, wherein the segmentation result comprises an abnormal image containing an abnormal region and/or a normal image without the abnormal region, and the main channel video signal is a digital video signal accessed into a main channel;
the image comparison module 2 is used for comparing the normal image in the main channel video signal with the corresponding standby channel video signal image when the normal image exists in the segmentation result, so as to obtain a comparison result, wherein the standby channel video signal is a digital video signal accessed into a standby channel, and the main channel video signal and the standby channel video signal are the same video signal accessed into different channels;
And the detection result acquisition module 3 is used for acquiring an abnormal detection result when the segmentation result and/or the comparison result reach an abnormal detection condition.
In a third aspect the application provides a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to carry out the above-described method steps.
In a fourth aspect of the application there is provided an electronic device comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps described above.
In summary, one or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
1. according to the application, each frame of image of the main channel video signal input through the main channel and each frame of image of the standby channel video signal input through the standby channel are subjected to threshold segmentation through an Ojin method, an abnormal image with an abnormal area is determined, then the comparison image corresponding to the normal image and the standby channel video signal in the main channel video signal is compared again to determine whether the comparison abnormal image exists or not, and the accuracy of the abnormality detection is improved and the condition of missing report is reduced through the two-time detection.
2. According to the application, the segmentation result of the abnormal image containing the abnormal region and the normal image without the abnormal region is obtained by segmenting each frame image of the main channel video signal by using an oxford method, and the workload of subsequent comparison is reduced by primarily detecting each frame image of the main channel video signal by using the oxford method and screening out the abnormal image.
3. According to the application, the normal images of the main channel video signal and the standby channel video signal are subjected to video comparison again to determine whether the images with abnormal comparison exist, and the two video signals are subjected to video signal comparison and analysis, so that whether the video signals to be broadcasted are abnormal or not can be monitored more accurately; and dividing the area of each frame of image of the video signal to obtain at least one comparison primitive, and analyzing the consistency of each frame of image by adopting the fitting characteristic value of the comparison primitive, so as to effectively identify whether each frame of image of the video signal is abnormal or not.
Drawings
FIG. 1 is a flow chart of an anomaly detection method for a digital video according to an embodiment of the present application;
fig. 2 is a diagram of an anomaly detection device according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of an electronic device according to the disclosure.
Reference numerals illustrate: 1. an image segmentation module; 2. an image comparison module; 3. the detection result acquisition module; 300. an electronic device; 301. a processor; 302. a communication bus; 303. a user interface; 304. a network interface; 305. a memory.
Detailed Description
In order that those skilled in the art will better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments.
In describing embodiments of the present application, words such as "for example" or "for example" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "such as" or "for example" in embodiments of the application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "or" for example "is intended to present related concepts in a concrete fashion.
In the description of embodiments of the application, the term "plurality" means two or more. For example, the plurality of devices means two or more devices, and the plurality of screen terminals means two or more screen terminals. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating an indicated technical feature. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In order to facilitate understanding of the method and apparatus provided by the embodiments of the present application, a background of the embodiments of the present application is described before the embodiments of the present application are described.
The continuous popularity of multimedia has become an important means for us to obtain information. At the same time, the situation of video safety broadcasting is also more serious. The broadcasting link of the digital video is much more complex than that of the analog video, various abnormal states are often generated in the broadcasting, and the increasing of the number of programs makes the traditional manual monitoring broadcasting method more prone to overlooking.
Therefore, the digital video signal must be processed by technical means to ensure safe broadcasting of the digital video. Black fields, static frames are common anomalies in video play-out that are caused by a number of causes, such as anomalies in code stream transmission, faults in receivers, attacks of illegal signals, etc.
At present, main stream detection equipment can only judge the Boolean value of the black field, the static frame and other conditions, and has poor detection accuracy and easy occurrence of missing report due to the deviation of judging capability of the non-black field and the static frame region of the local region of the image.
In view of the foregoing background description, those skilled in the art will appreciate that the problems underlying the prior art are solved by the following detailed description of the preferred embodiments of the present application, which is to be read in connection with the accompanying drawings, wherein it is to be understood that the embodiments described are merely some, but not all embodiments of the present application.
On the basis of the background art, further, referring to fig. 1, fig. 1 is a schematic flow chart of a method for detecting an anomaly of a digital video in an embodiment of the present application, where the method may be implemented by a computer program or may be implemented as an independent tool application, and specifically, the method includes steps 101 to 103, where the steps are as follows:
Step 101, dividing each frame of image of a main channel video signal by using an oxford method to obtain a division result, wherein the division result comprises an abnormal image containing an abnormal region and/or a normal image without the abnormal region, and the main channel video signal is a digital video signal accessed into a main channel;
in the television station broadcasting device, video signals are often transmitted in the form of SDI, ASI or IP, meanwhile, in order to ensure broadcasting safety, an n+1 backup mode is generally adopted, and meanwhile, a plurality of sets of identical devices are used as backups of a main channel, so that switching is performed when the main channel video signals are in a problem, and the finally broadcasted signals can be ensured to be recovered to be normal at the highest speed, wherein the main channel video signals are digital video signals accessed to the main channel, and the standby channel video signals are digital video signals accessed to the standby channel.
Specifically, each frame of image of the main channel video signal is segmented by an oxford method, and whether an abnormal region exists in the image is determined.
Referring to fig. 2, fig. 2 is a schematic flow chart of image segmentation in an embodiment of the present application, in one possible implementation, step 101 may specifically include the following steps:
Step 201: converting each frame image of the main channel video signal and each frame image of the standby channel video signal into gray images and counting gray histograms of each frame image;
specifically, each frame image of the main channel video signal and each frame image of the standby channel video signal are converted into gray images, a video file may be loaded using a cv2.Video capture () function in the OpenCV library, a capturing object is created to read video frames frame by frame, and then video frames are read frame by frame using a cap. Read () function in the OpenCV library, and in each frame image, the following operations may be performed, specifically including:
converting each frame image into a gray image using a cv2.cvtdcolor () function in the OpenCV library and acquiring a pixel value of the gray image; the gray histogram is calculated using the np.history () function in the numpy library, and the pixel value of the gray image is input to the np.history () function to obtain the gray histogram of each frame image.
Step 202: carrying out normalization processing on the gray level histogram to obtain a normalized histogram;
specifically, the np-histogram () function in the numpy library is used to calculate the gray histogram, and then divided by the total number of pixels of the image to obtain a normalized histogram, where the normalized histogram may divide each bin value of the gray histogram by the total number of pixels to make the sum of the bin values be 1, so that histograms of different images may be better compared.
Step 203: determining an optimal segmentation threshold according to the normalized histogram;
specifically, an optimal segmentation threshold is determined according to the normalized histogram by a maximum inter-class variance method.
Step 204: and dividing each frame of image of the main channel video signal according to the dividing threshold value to obtain a dividing result of the abnormal image containing the abnormal region and the normal image without the abnormal region.
Specifically, each frame of image of the main channel video signal is segmented according to a segmentation threshold value to obtain an abnormal image containing an abnormal region and a normal image containing no abnormal region, in a specific embodiment, segmentation can be performed through a cv2.Threshold () function in an OpenCV library, the threshold value is set to determine the segmentation threshold value according to a normalized histogram, segmentation is performed, and after segmentation, a binary image can be obtained, wherein the abnormal region is white, and the normal region is black. The segmentation results may in particular also be visualized, for example with the abnormal areas marked with red rectangular boxes for better observation and analysis.
As an alternative embodiment, determining the segmentation threshold from the cumulative distribution function and the normalized histogram may specifically further comprise the steps of:
Step 302: calculating a cumulative distribution function of the normalized histogram;
specifically, the gray level histogram is normalized to obtain a normalized histogram P (i), i=0, 1, & L-1, where L is the number of gray levels, and the cumulative distribution function CDF (i) is calculated from the normalized histogram.
Step 303: calculating the inter-class variance of the gray level image under the condition of different segmentation thresholds according to the cumulative distribution function and the normalized histogram;
step 304: traversing all possible segmentation thresholds, and finding the segmentation threshold with the largest inter-class variance as the optimal segmentation threshold.
Specifically, all possible segmentation thresholds T are traversed, and the inter-class variance is calculated: g (T), wherein the specific calculation formula is as follows:
u=w 0 (T)*u 0 (T)+w 1 (T)*u 1 (T)(1)
g=w 0 (T)*(u 0 (T)-u(T)) 2 +w 1 (T)*(u 1 (T)-u(T)) 2 (2)
the simultaneous formulas (1) (2) can be obtained:
g=w 0 (T)*w 1 (T)*(u 0 (T)-u 1 (T)) 2
wherein w is 0 (T) is the pixel proportion of the foreground under the threshold T, u 0 (T) is the average gray level of the foreground under the threshold value T, w 1 (T) is the pixel proportion of the background under the threshold T, u 1 And (T) is the average gray level of the background under the threshold value T, u (T) is the total average gray level value, the threshold value T which minimizes the inter-class variance g (T) is found as the optimal segmentation threshold value T, and the image is segmented by using the threshold value T.
W is as follows 0 (T) and w 1 (T) can be obtained from CDF (i), where the CDF (i) determines that when the segmentation threshold is T, u 0 (T)、u 1 (T) and u (T) can be derived from the normalized histogram.
102, when a normal image exists in the segmentation result, comparing the normal image in the main channel video signal with a corresponding comparison image in the standby channel video signal to obtain a comparison result, wherein the standby channel video signal is a digital video signal accessed to a standby channel, and the main channel video signal and the standby channel video signal are the same video signal accessed to different channels;
specifically, the normal image in the main channel video signal and the corresponding standby channel video signal image are compared and analyzed, so that whether the video signal to be played is abnormal or not can be more accurately monitored.
Based on the above embodiment, as an alternative embodiment, step 102 may specifically include the following steps:
step 401: when a normal image exists in the segmentation result, determining fitting characteristic values of comparison primitives of the images according to the image characteristic values of each frame image of the main channel video signal and each pixel point of each frame image of the standby channel video signal, wherein each comparison primitive is obtained by dividing one frame image into areas with preset numbers;
for a normal image in a main channel video signal, dividing each frame of image into a preset number of areas according to each frame of image of the normal image in the main channel video signal, and dividing each frame of image into a preset number of comparison primitives, namely, each area is a comparison primitive; the image characteristic value of one pixel point comprises a Y characteristic value, a U characteristic value and a V characteristic value; the Y, U and V eigenvalues are obtained according to the color coding method in the prior art, wherein the Y, U and V eigenvalues refer to eigenvalues corresponding to Y, U and V components in YUV color coding, Y represents a luminance component, and U and V represent chrominance components.
Similarly, the same is true for the processing of the image corresponding to the standby channel video signal, and the description thereof is omitted.
Step 402: determining whether fitting characteristic values of each comparison primitive on each frame image in the main channel video signal are the same as those of each comparison primitive on each frame image in the standby channel video signal or not so as to determine video synchronization points of the main channel video signal and the standby channel video signal;
specifically, the image characteristic values comprise Y characteristic values, U characteristic values and V characteristic values, and the fitting characteristic values are obtained by weighting the image characteristic values of all pixel points.
And then comparing the video signal with the fitting characteristic values of each comparison primitive on each frame image of the standby channel video signal to determine whether the fitting characteristic values are the same or not, and searching for a video synchronization point of the main channel video signal and the standby channel video signal.
Step 403: determining a comparison image corresponding to a normal image in the images of the standby channel video signals according to the video synchronization points, comparing each frame image of the normal image with each frame image of the corresponding comparison image, determining a difference value between a fitting characteristic value of a current comparison image element of the normal image and a fitting characteristic value of the current frame comparison image element of the corresponding comparison image, when the difference value is larger than a preset first threshold value, indicating that the current comparison image element is inconsistent, and when the difference value is smaller than the preset first threshold value, indicating that the current comparison image element is consistent;
Exemplary, the video synchronization point represents the ith of the slave main channel video signal 1 Frame image, ith of spare channel video signal 2 Starting frame image, synchronizing main channel video signal and standby channel video signal, determining video synchronization point to determine corresponding comparison image of normal image, and when current frame in normal image in main channel video signal is ith 1 A frame, the corresponding comparison image is the ith in the standby channel video signal 2 Frame image, ith of main channel video signal 1 Each alignment primitive of the frame image, for the ith of the main channel video signal 1 The current comparison primitive of the frame image calculates the ith 1 Fitting characteristic value of current comparison primitive of frame image and ith of standby channel video signal 2 The difference between the fitting characteristic values of the comparison primitive corresponding to the current comparison primitive on the frame image and then the ith with respect to the main channel video signal 1 Each of the comparison primitives for the +1 frame image, a fitting characteristic value of the current comparison primitive for the i+1th frame image of the main channel video signal,calculating the current comparison primitive of the (i+1) -th frame image and the (i) th of the standby channel video signal 2 The difference between the fitting characteristic values of the comparison primitive corresponding to the current comparison primitive on the +1 frame image is also processed by other comparison primitives, and the description is omitted here.
Based on the above embodiment, as an optional embodiment, step 403 specifically includes the following steps:
step 501: determining fitting characteristic values of each comparison primitive on each frame image in the main channel video signal and whether the fitting characteristic values of each comparison primitive on each frame image in the standby channel video signal are the same or not so as to determine whether each comparison primitive on each frame image of the main channel video signal and each comparison primitive on each frame image of the standby channel video signal are the same or not, and simultaneously determining different block numbers of the comparison primitives on each frame image of the main channel video signal and each comparison primitive on each frame image of the standby channel video signal;
step 502: and when the number of blocks of the main channel video signal and the standby channel video signal, which are different from each other in each frame image of the continuous X frame images, is smaller than a first threshold value, determining that frames after the X frames are video synchronization points.
Specifically, video synchronization points of the main channel video signal and the standby channel video signal are determined. Firstly, the fitting characteristic value of each comparison picture element of the main channel video signal on each frame image is compared with the fitting characteristic value of each comparison picture element of the standby channel video signal on each frame image to confirm whether the fitting characteristic values are the same or not, and then whether each comparison picture element of the main channel video signal and the standby channel video signal on each frame image is the same or not is determined, for example, the first frame image, the second frame image, … and the N of the main channel video signal are 2 Frame image, first frame image, second frame image, … of standby channel video signal, nth 1 Comparing and analyzing the frame images; fitting characteristic values of each comparison primitive of the first frame image of the main channel video signal and fitting characteristic values of each comparison primitive of the first frame image and each comparison primitive of the second frame image of the standby channel video signal, … and N 2 Simulation of each aligned primitive of frame imageComparing the combined characteristic values; fitting characteristic values of each comparison primitive of the second frame image of the main channel video signal, fitting characteristic values of each comparison primitive of the first frame image of the second channel video signal, fitting characteristic values of each comparison primitive of the second frame image, … and N 2 Comparing fitting characteristic values of each comparison primitive of the frame image; and so on. After determining whether each of the comparison primitives of the main channel video signal and the standby channel video signal on each frame of image is the same, counting the different block numbers of the comparison primitives of the main channel video signal and the standby channel video signal on each frame of image. Then, when determining that the number of blocks of the main channel video signal and the spare channel video signal, which are different from each other in each of the consecutive X-frame images, is smaller than the first threshold, it is possible to determine that the frame following the X-frame is the video synchronization point.
Step 404: when the number of the inconsistent comparison primitives in the current frame image of the normal image and the corresponding comparison primitives in the current frame image of the comparison image is larger than a preset second threshold, the current frame comparison is inconsistent, and when the number of the inconsistent comparison primitives in the current frame image of the normal image and the corresponding comparison primitives in the current frame image of the comparison image is smaller than the preset second threshold, the current frame comparison is consistent;
for each comparison primitive of the ith frame image of the main channel video signal, calculating a fitting characteristic value of the current comparison primitive of the ith frame image of the main channel video signal and a difference value between the fitting characteristic value of the comparison primitive corresponding to the current comparison primitive on the jth frame image of the corresponding standby channel video signal, if n comparison primitives exist, n difference values can be determined, and if the difference value is zero, the comparison primitive corresponding to the difference value is determined to be consistent; if the number of the consistent comparison primitives is smaller than a preset second threshold value for the current frame image, the ith frame image of the main channel video signal and the jth frame image of the standby channel video signal can be determined to be consistent, otherwise, the ith frame image of the main channel video signal and the jth frame image of the standby channel video signal are determined to be inconsistent.
Step 405: when the inconsistent frame number is greater than a preset third threshold, determining that the video comparison result is abnormal, determining an abnormal image, and when the inconsistent frame number is less than the preset third threshold, determining that the video comparison result is normal.
Specifically, when the inconsistent frame number is greater than a preset third threshold, the video comparison result is abnormal, otherwise, the video comparison result is normal.
On the basis of the above embodiment, as an optional embodiment, determining, according to the image feature value of each pixel point of the normal image, the fitting feature value of each aligned primitive of the normal image specifically includes:
determining N adjacent pixel points of the normal image as a comparison primitive;
and determining fitting characteristic values of the comparison primitives according to the image characteristic values of the pixel points in the comparison primitives.
On the basis of the above embodiment, as an optional embodiment, determining the fitting eigenvalue of the aligned primitive according to the eigenvalue of the aligned primitive specifically includes:
and weighting according to the characteristic values of the comparison primitives to obtain fitting characteristic values of the comparison primitives.
Specifically, the image characteristic values comprise a Y characteristic value, a U characteristic value and a V characteristic value, and the fitting characteristic values are based on the image characteristic values of all pixel points, and are obtained by weighting processing based on preset weighting coefficients.
And 103, obtaining an abnormality detection result when the segmentation result and/or the comparison result reach an abnormality detection condition.
Specifically, a segmentation result and a comparison result are respectively obtained through two times of detection, and based on the segmentation result and the comparison result, when an abnormal image containing an abnormal region exists in the segmentation result or the comparison result is abnormal, an abnormal detection condition is triggered to obtain an abnormal detection result.
Referring to fig. 2, fig. 2 is a schematic diagram of an anomaly detection device for digital video according to an embodiment of the present application, where the anomaly detection device for digital video may include: the detection system comprises a monitoring area dividing module 1, a detection mode matching module 2 and a detection module 3, wherein:
the image segmentation module 1 is used for segmenting each frame of image of the main channel video signal by using an Ojin method to obtain a segmentation result, wherein the segmentation result comprises an abnormal image containing an abnormal region and/or a normal image without the abnormal region, and the main channel video signal is a digital video signal accessed into a main channel;
when a normal image exists in the segmentation result, the image comparison module 2 compares the normal image in the main channel video signal with a corresponding comparison image in the standby channel video signal to obtain a comparison result, wherein the standby channel video signal is a digital video signal accessed into a standby channel, and the main channel video signal and the standby channel video signal are the same video signal accessed into different channels;
And the detection result acquisition module 3 is used for acquiring an abnormal detection result when the segmentation result and/or the comparison result reach an abnormal detection condition.
It should be noted that: in the device provided in the above embodiment, when implementing the functions thereof, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the embodiments of the apparatus and the method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the embodiments of the method are detailed in the method embodiments, which are not repeated herein.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executed by a processor, and the specific execution process may refer to the specific description of the embodiment shown in fig. 1, and is not repeated herein.
Referring to fig. 3, the application also discloses an electronic device. Fig. 3 is a schematic structural diagram of an electronic device according to the disclosure. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, at least one communication bus 302.
Wherein the communication bus 302 is used to enable connected communication between these components.
The user interface 303 may include a Display screen (Display), a Camera (Camera), and the optional user interface 303 may further include a standard wired interface, and a wireless interface.
The network interface 304 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 301 may include one or more processing cores. The processor 301 utilizes various interfaces and lines to connect various portions of the overall server, perform various functions of the server and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and invoking data stored in the memory 305. Alternatively, the processor 301 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 301 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem etc. Wherein, the CPU mainly processes the operation device, the user interface, the application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 301 and may be implemented by a single chip.
The Memory 305 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 305 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 305 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating device, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like involved in the above respective method embodiments. Memory 305 may also optionally be at least one storage device located remotely from the aforementioned processor 301. Referring to fig. 3, an operating device, a network communication module, a user interface module, and an application program for abnormality detection of digital video may be included in the memory 305 as a computer storage medium.
In the electronic device 300 shown in fig. 3, the user interface 303 is mainly used for providing an input interface for a user, and acquiring data input by the user; and processor 301 may be used to invoke an application program in memory 305 that stores anomaly detection for digital video, which when executed by one or more processors 301, causes electronic device 300 to perform a method as in one or more of the embodiments described above. It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all of the preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as division of units, merely a logical function division, and there may be additional divisions in actual implementation, such as multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. And the aforementioned memory includes: various media capable of storing program codes, such as a U disk, a mobile hard disk, a magnetic disk or an optical disk.
The above are merely exemplary embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure.
This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (10)

1. A method for anomaly detection of a digital video, the method comprising:
dividing each frame of image of a main channel video signal by using an Ojin method to obtain a division result, wherein the division result comprises an abnormal image containing an abnormal region and/or a normal image without the abnormal region, and the main channel video signal is a digital video signal accessed into a main channel;
when the normal image exists in the segmentation result, comparing the normal image in the main channel video signal with a corresponding comparison image in the standby channel video signal to obtain a comparison result, wherein the standby channel video signal is a digital video signal accessed to a standby channel, and the main channel video signal and the standby channel video signal are the same video signal accessed to different channels;
And obtaining an abnormality detection result when the segmentation result and/or the comparison result reach an abnormality detection condition.
2. The method for detecting anomalies in digital video according to claim 1, wherein each frame of image of the main channel video signal is segmented by using an oxford method to obtain a segmentation result, the segmentation result includes an anomaly image including an anomaly region and/or a normal image not including an anomaly region, and the main channel video signal is a digital video signal accessed into a main channel, and the method comprises:
converting each frame image of the main channel video signal into a gray level image and counting a gray level histogram of each frame image;
calculating a cumulative distribution function and a normalized histogram of the gray level histogram according to the gray level histogram;
determining an optimal segmentation threshold according to the cumulative distribution function and the normalized histogram;
and dividing each frame of image of the main channel video signal according to the dividing threshold value to obtain a dividing result.
3. The abnormality detection method of a digital video according to claim 2, characterized in that said determining an optimal segmentation threshold from said cumulative distribution function and said normalized histogram includes:
Calculating a cumulative distribution function of the gray level histogram;
carrying out normalization processing on the gray level histogram to obtain a normalized histogram;
calculating the inter-class variance of the gray level image under the condition of different segmentation thresholds according to the cumulative distribution function and the normalized histogram;
traversing all possible segmentation thresholds, and finding the segmentation threshold with the largest inter-class variance as the optimal segmentation threshold.
4. The method for detecting an abnormality of a digital video according to claim 1, wherein when the normal image is present in the division result, comparing the normal image in the main channel video signal with a corresponding comparison image in the standby channel video signal to obtain a comparison result, comprising:
when the normal image exists in the segmentation result, determining fitting characteristic values of comparison primitives of the images according to the image characteristic values of each pixel point of each frame image of the main channel video signal and each frame image of the standby channel video signal, wherein each comparison primitive is obtained by dividing one frame image into a preset number of areas;
determining whether fitting characteristic values of each comparison primitive on each frame image in the main channel video signal are the same as those of each comparison primitive on each frame image in the standby channel video signal or not so as to determine video synchronization points of the main channel video signal and the standby channel video signal;
Determining a comparison image corresponding to the normal image in the image of the standby channel video signal according to the video synchronization point, comparing each frame image of the normal image with each frame image of the corresponding comparison image, determining a difference value between a fitting characteristic value of the current comparison image element of the normal image and a fitting characteristic value of the current frame comparison image element of the corresponding comparison image, and indicating that the current comparison image element is inconsistent when the difference value is greater than a preset first threshold value, and indicating that the current comparison image element is consistent when the difference value is less than the preset first threshold value;
when the quantity of the inconsistent comparison graphic elements in the current frame image of the normal image and the corresponding comparison graphic elements in the current frame image of the comparison image is larger than a preset second threshold, the inconsistent comparison of the current frame is indicated, and when the quantity of the inconsistent comparison graphic elements in the current frame image of the normal image and the corresponding comparison graphic elements in the current frame image of the comparison image is smaller than the preset second threshold, the consistent comparison of the current frame is indicated;
when the number of inconsistent continuous frames is greater than a preset third threshold, determining that the video comparison result is abnormal, determining an abnormal image, and when the number of inconsistent continuous frames is less than the preset third threshold, determining that the video comparison result is normal.
5. The method for detecting anomalies according to claim 4, wherein the determining fitting eigenvalues of the aligned primitives of the image according to the image eigenvalues of each pixel point of each frame image of the main channel video signal and each frame image of the standby channel video signal, comprises:
determining pixel points at N adjacent positions of each frame image of the main channel video signal and each frame image of the standby channel video signal as a comparison primitive;
and determining fitting characteristic values of the comparison primitive according to the image characteristic values of the pixel points in the comparison primitive.
6. The method for anomaly detection of digital video according to claim 4, wherein determining whether the fitting characteristic value of each of the aligned pixels on each of the frame images in the main channel video signal is the same as the fitting characteristic value of each of the aligned pixels on each of the frame images in the standby channel video signal to determine the video synchronization point of the main channel video signal and the standby channel video signal comprises:
determining whether fitting characteristic values of each comparison primitive on each frame image in the main channel video signal are the same as those of each comparison primitive on each frame image in the standby channel video signal or not so as to determine whether each comparison primitive on each frame image of the main channel video signal and the standby channel video signal are the same or not, and simultaneously determining different block numbers of the comparison primitives on each frame image of the main channel video signal and the standby channel video signal;
And when the number of blocks, which are different from the number of the compared pixels, of each frame image of the continuous X frame images of the main channel video signal and the standby channel video signal is determined to be smaller than a first threshold value, determining frames after the X frames as the video synchronization points.
7. The method for anomaly detection in a digital video according to claim 5, wherein the determining fitting eigenvalues of the aligned primitives based on the eigenvalues of the aligned primitives comprises:
and weighting according to the characteristic values of the comparison primitives to obtain fitting characteristic values of the comparison primitives.
8. An abnormality detection apparatus for digital video, comprising:
the image segmentation module (1) is used for segmenting each frame of image of the main channel video signal by using an oxford method to obtain a segmentation result, wherein the segmentation result comprises an abnormal image containing an abnormal region and/or a normal image without the abnormal region, and the main channel video signal is a digital video signal accessed into a main channel;
and obtaining an abnormality detection result when the segmentation result and/or the comparison result reach an abnormality detection condition.
The image comparison module (2) is used for comparing the normal image in the main channel video signal with the corresponding standby channel video signal image when the normal image exists in the segmentation result, so as to obtain a comparison result, wherein the standby channel video signal is a digital video signal accessed into a standby channel;
And the detection result acquisition module (3) is used for acquiring an abnormal detection result when the segmentation result and/or the comparison result reach an abnormal detection condition.
9. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method of any one of claims 1 to 7.
10. An electronic device comprising a processor, a memory for storing instructions, and a transceiver for communicating with other devices, the processor for executing instructions stored in the memory to cause the electronic device to perform the method of any one of claims 1-7.
CN202311042914.XA 2023-08-17 2023-08-17 Abnormality detection method and device for digital video, electronic equipment and storage medium Pending CN117041666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311042914.XA CN117041666A (en) 2023-08-17 2023-08-17 Abnormality detection method and device for digital video, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311042914.XA CN117041666A (en) 2023-08-17 2023-08-17 Abnormality detection method and device for digital video, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117041666A true CN117041666A (en) 2023-11-10

Family

ID=88637018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311042914.XA Pending CN117041666A (en) 2023-08-17 2023-08-17 Abnormality detection method and device for digital video, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117041666A (en)

Similar Documents

Publication Publication Date Title
CN108933935B (en) Detection method and device of video communication system, storage medium and computer equipment
CN116188821B (en) Copyright detection method, system, electronic device and storage medium
CN103873852A (en) Multi-mode parallel video quality fault detection method and device
CN110120039B (en) Screen detection method, screen detection device, electronic equipment and readable storage medium
EP4090036B1 (en) Privacy shielding processing method and apparatus, electronic device, and monitoring system
CN108364282B (en) Image mosaic detection method and image mosaic detection system
CN112788329A (en) Video static frame detection method and device, television and storage medium
US6707943B2 (en) Method of monitoring the quality of distributed digital images by detecting false contours
CN113657434A (en) Human face and human body association method and system and computer readable storage medium
CN115423795A (en) Static frame detection method, electronic device and storage medium
CN108900895B (en) Method and device for shielding target area of video stream
CN114332672A (en) Video analysis method and device, electronic equipment and storage medium
CN110310341B (en) Method, device, equipment and storage medium for generating default parameters in color algorithm
CN117041666A (en) Abnormality detection method and device for digital video, electronic equipment and storage medium
CN107507214A (en) The method and apparatus for obtaining goods image
CN111369591A (en) Method, device and equipment for tracking moving object
Chang et al. Image Quality Evaluation Based on Gradient, Visual Saliency, and Color Information
CN116228861A (en) Probe station marker positioning method, probe station marker positioning device, electronic equipment and storage medium
CN113613024B (en) Video preprocessing method and device
CN115439660A (en) Detection method, detection device, electronic equipment and medium
CN111882536A (en) Method for monitoring quantity of bulk cargo based on picture comparison
CN110662023B (en) Method and device for detecting video data loss and storage medium
CN111145219A (en) Efficient video moving target detection method based on Codebook principle
CN112528717B (en) Intelligent computer video content identification platform, method and storage medium
CN118348016A (en) LED panel defect detection method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination