Image frame anomaly detection method and program product

By selecting a first random number with linear distribution in the video image frame and detecting a small number of continuous pixel points, the problem of poor green screen recognition effect in the prior art is solved, and efficient image frame abnormality detection is achieved.

CN119815204APending Publication Date: 2025-04-11HANGZHOU ROBAM APPLIANCES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411996924.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art has poor green screen recognition effect in video image frames, which makes it difficult to achieve effective recognition of computing power.

Method used

By selecting a first random number with a linear distribution, a small number of pixel points in the image frame to be processed are detected, and anomaly detection is performed using continuous pixel points to reduce the calculation amount.

Benefits of technology

While ensuring the accuracy of abnormal detection of image frames, the calculation amount of abnormal detection is reduced and the green screen recognition effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815204A_ABST
    Figure CN119815204A_ABST
Patent Text Reader

Abstract

The invention discloses an image frame anomaly detection method and a program product. The method comprises the following steps: based on the resolution of a to-be-processed image frame, determining a plurality of first random numbers which meet a linear distribution state and have numerical values not exceeding the resolution, so as to determine elements corresponding to the first random numbers in a pixel sequence of the to-be-processed image frame as candidate elements; and target color detection is carried out on the pixel points corresponding to the candidate elements in the to-be-processed image frame, and target pixel points conforming to the image abnormal display color are determined, so that an abnormal detection result of the to-be-processed image frame is determined based on the number of the target pixel points. By selecting the first random numbers in linear distribution to detect a small number of pixel points, image frame anomaly (such as a green screen problem) detection can be performed based on a small number of pixel points, and in addition, the pixel points corresponding to the first random numbers in linear distribution are continuous, so that the image frame anomaly detection accuracy is improved. According to the invention, the calculation amount of anomaly detection is reduced while the accuracy of image frame anomaly detection is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the field of image display, and more particularly to an image frame anomaly detection method and a program product. Background Art

[0002] With the continuous development of digital technology, video has been widely used as a digital media form that can transmit dynamic image data through continuous image frames and sound waveforms. Currently, the image frames included in the video stream can be obtained by decoding the video stream, and the video stream can be played by rendering the image frames.

[0003] However, in the process of decoding the video stream, if there is a graphics card failure or display driver failure, the video stream decoding will fail, and the display will be abnormal. For example, a green screen image will be displayed, or part of the image frame will be displayed in green. In this regard, it is necessary to realize the recognition of the green screen image by calculating and processing the pixels in each video image frame.

[0004] In this regard, the existing technology can detect the pixels in each video image frame to identify abnormal green screen situations. However, as the display clarity of video image frames increases, the number of pixels that need to be calculated in each image is also increasing, which makes it difficult to recognize green screen images with the existing computing power, resulting in poor recognition of green screen images.

[0005] Therefore, the poor green screen recognition effect in video image frames has become a problem that needs to be solved. Summary of the invention

[0006] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide an image frame anomaly detection method and a program product, which can detect image frame anomalies (for example, green screen problems) based on a smaller number of pixels by selecting a first random number with a linear distribution to detect a small number of pixels. In addition, the pixels corresponding to the first random number with a linear distribution are continuous. The present application reduces the amount of abnormality detection calculations while ensuring the accuracy of image frame anomaly detection.

[0007] In a first aspect, the present invention provides an image frame anomaly detection method, the method comprising:

[0008] Determine a plurality of first random numbers based on the resolution of the image frame to be processed, and determine candidate elements corresponding to the first random numbers in a pixel sequence of the image frame to be processed; the pixel sequence includes M elements, the M elements correspond one-to-one to the M pixels of the image frame to be processed, the plurality of first random numbers satisfy a linear distribution state, the numerical values ​​of the first random numbers do not exceed the resolution, and the number of the first random numbers is lower than the pixel operation amount limited by the computing power of the device;

[0009] Detect the target color of the pixel points corresponding to the candidate elements in the image frame to be processed, and determine the target pixel points that meet the target color; the target color is the color displayed by the image abnormality;

[0010] If the number of target pixel points exceeds the first threshold, the image frame to be processed is determined to be an abnormal image frame.

[0011] In a second aspect, a computer program product is provided. The computer program product includes instructions. When the instructions are executed, any method described in the first aspect is executed.

[0012] In a third aspect, a device for detecting anomalies in an image frame is provided, the device comprising:

[0013] The first processing unit is used to determine a plurality of first random numbers based on the resolution of the image frame to be processed, and determine candidate elements corresponding to the first random numbers in a pixel sequence of the image frame to be processed; the pixel sequence includes M elements, the M elements correspond one-to-one to the M pixels of the image frame to be processed, the plurality of first random numbers satisfy a linear distribution state, the numerical values ​​of the first random numbers do not exceed the resolution, and the number of the first random numbers is lower than the pixel operation amount limited by the computing power of the device;

[0014] The second processing unit is used to detect the target color of the pixel points corresponding to the candidate elements in the image frame to be processed, and determine the target pixel points that meet the target color; the target color is the color displayed abnormally in the image;

[0015] The determination unit is used to determine that the image frame to be processed is an abnormal image frame if the number of target pixel points exceeds a first threshold.

[0016] In a fourth aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of the above-mentioned first aspects is implemented.

[0017] In a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, the method described in any one of the first aspects is implemented.

[0018] Compared with the prior art in which the detection result of the image frame to be processed is determined by color detection of all pixels in the image frame to be processed, which leads to higher computing power requirements for image frame anomaly detection, the image frame anomaly detection method and program product provided in the embodiments of the present application, on the one hand, by selecting a first random number with a linear distribution, the randomly selected pixel points that need to be detected for the target color in the image frame to be processed (that is, in the pixel sequence of the image frame to be processed, the candidate element corresponding to the first random number corresponds to the pixel point in the image frame to be processed) can be a pixel point in a continuous state, so as to meet the continuous characteristics of the abnormal pixel points in the abnormal image frame, thereby ensuring the accuracy of the image frame anomaly detection result; on the other hand, by judging the number of pixel points that meet the target color in the randomly selected pixel points, the detection result of the image frame to be processed is determined, thereby using less computing power to achieve anomaly detection of the image frame to be processed, so as to ensure the accuracy of the image frame anomaly detection result while reducing the computing power requirements for image frame anomaly detection.

[0019] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0021] Figure 1 A schematic diagram of the implementation environment architecture of an embodiment of the present application;

[0022] Figure 2 A schematic diagram of a flow chart of an image frame anomaly detection method provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of generating a pixel sequence provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram for determining candidate elements provided in an embodiment of the present application;

[0025] Figure 5 A schematic diagram for determining pixel points corresponding to candidate elements provided in an embodiment of the present application;

[0026] Figure 6 A schematic diagram of a method for determining a verification pixel point provided in an embodiment of the present application;

[0027] Figure 7 A schematic diagram of another method for determining a verification pixel point provided in an embodiment of the present application;

[0028] Figure 8A schematic diagram of an abnormality detection mode selection interface provided in an embodiment of the present application;

[0029] Fig. 9 Another schematic diagram of a flow chart of an image frame anomaly detection method provided in an embodiment of the present application;

[0030] Fig.10 A block diagram of an image frame anomaly detection device provided in an embodiment of the present application;

[0031] Fig.11 A schematic diagram of the structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0032] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0033] It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. In addition, the term "and / or" herein is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of objects.

[0034] Currently, the poor recognition effect of the green screen problem in video image frames has become a problem that needs to be solved.

[0035] Based on this, an embodiment of the present application provides an image frame anomaly detection method, which selects a first random number with a linear distribution so that the pixel points for target color detection are pixel points in a continuous state in the image frame to be processed, so as to adapt to the continuous characteristics of abnormal pixel points in the abnormal image frame. Secondly, image frame anomaly detection can be performed based on a smaller number of pixel points, so as to ensure the accuracy of the image frame anomaly detection results while reducing the computing power requirements for image frame anomaly detection.

[0036] Figure 1 Schematic diagram of the implementation environment architecture of the image frame anomaly detection method provided in the embodiment of the present application. Figure 1 As shown, the implementation environment architecture includes: a computer device 10. The computer device 10 includes a display unit 101 and a processing unit 102.

[0037] In a specific implementation, the processing unit 102 is used to decode the video stream to obtain image frames, and the display unit 101 is used to display the image frames. When the video stream decoding fails, the display unit 101 displays abnormal image frames, for example, the display unit 101 displays a green screen.

[0038] In the present application, the processing unit 101 determines the resolution of the image frame to be processed, and determines a first random number for randomly selecting pixels based on the resolution of the image frame to be processed, thereby determining a candidate element corresponding to the first random number in a pixel sequence of the image frame to be processed, and performs color detection on the pixel points corresponding to the candidate elements in the image frame to be processed to determine the detection result of the image frame to be processed.

[0039] Exemplarily, the computer device 10 may be a terminal device in various application scenarios, such as a smart TV, a smart phone, a tablet computer, a TV, a laptop computer, a desktop computer, etc.

[0040] Exemplarily, the image frame to be processed may be a real-time display image of the computer device 10, or an image captured by a camera component and transmitted to the computer device 10; for example, the camera component is a surveillance camera. It should be noted that the present application does not specifically limit the method for generating the image frame to be processed.

[0041] Figure 2 A flowchart of an image frame anomaly detection method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method comprises the following steps:

[0042] Step S201, determining a plurality of first random numbers based on the resolution of the image frame to be processed, and determining candidate elements corresponding to the first random numbers in a pixel sequence of the image frame to be processed; the pixel sequence includes M elements, the M elements correspond one-to-one to the M pixels of the image frame to be processed, the plurality of first random numbers satisfy a linear distribution state, the numerical values ​​of the first random numbers do not exceed the resolution, and the number of the first random numbers is lower than the pixel operation amount limited by the computing power of the device;

[0043] In an embodiment of the present application, based on the continuous characteristics of abnormal pixels in the abnormal display image frame, multiple first random numbers that satisfy the linear distribution state are selected, so that the pixels in the display frame to be processed that are subsequently determined based on the first random numbers (i.e., the pixels used for abnormality detection in the image frame to be processed) are in a continuous state. By using random numbers to select a small number of pixels for abnormality detection, the computing power of the device can be saved while ensuring the accuracy of the detection.

[0044] In a possible implementation, the value range of the first random number may be determined based on the resolution of the image frame to be processed, so as to determine a plurality of first random numbers within the value range of the first random number using a linear random algorithm.

[0045] Exemplarily, the number of pixels of the image frame to be processed can be determined based on the resolution of the image frame to be processed, so that the value range of the first random number is determined by the number of pixels of the image frame to be processed; wherein the value of the first random number does not exceed the number of pixels of the image frame to be processed.

[0046] For example, when the resolution of the image frame to be processed is 1080*1920, the number of pixels of the image frame to be processed is 2073600, and the value range of the first random number is [0, 2073600].

[0047] Exemplarily, the number of first random numbers may be determined based on the computing power of the device; wherein the computing power of the device is positively correlated with the number of selected first random numbers, and the higher the computing power of the device, the more first random numbers are selected.

[0048] Specifically, based on the computing power of the device, the pixel computing amount limited by the computing power of the device can be determined first, and the number of first random numbers can be determined based on the pixel computing amount limited by the computing power of the device; wherein the number of first random numbers is lower than the pixel computing amount limited by the computing power of the device.

[0049] For example, when the computing power of the device is higher, the pixel computing amount limited by the computing power of the device is larger, and a larger number of first random numbers can be determined at this time; when the computing power of the device is lower, the calculation based on the first random number cannot affect the normal display of the video stream.

[0050] For example, the number of the first random numbers can be determined based on the device computing power required for normal display of the video stream. The device computing power required for normal display of the video stream is first determined, the remaining computing power is determined based on the device computing power limit and the device computing power required for normal display of the video stream, and the number of the first random numbers is determined based on the remaining computing power.

[0051] In a possible implementation, the parameter "number of detection pixels" is maintained to characterize the size of the first random number. Exemplarily, the "number of detection pixels" may be a ratio of the number of first random numbers to the number of pixels of the image frame to be processed, for example, the number of first random numbers is x% of the number of pixels of the image frame to be processed, and the number of first random numbers selected when detecting image frames of different resolutions is different. Alternatively, the "number of detection pixels" may be a fixed value, and the number of first random numbers selected when detecting image frames of different resolutions is the same.

[0052] Correspondingly, the number of the first random numbers can be changed by adjusting the above-mentioned proportional relationship with the number of pixels of the image frame to be processed. For example, when the computing power of the device is high, the number of the first random numbers can be determined to be 10% of the number of pixels of the image frame to be processed; when the computing power of the device is low, the number of the first random numbers can be determined to be 1% of the number of pixels of the image frame to be processed.

[0053] Exemplarily, the linear random algorithm may be a pseudo-random number generation algorithm.

[0054] In a possible implementation manner, a pixel sequence of the image frame to be processed may be formed based on pixels in the image frame to be processed.

[0055] Exemplarily, all pixels in the image frame to be processed may be numbered to generate a pixel sequence of the image frame to be processed according to the numbers of all pixels, wherein each element in the pixel sequence is the number of each pixel in the image frame to be processed.

[0056] For example, Figure 3 is a schematic diagram of generating a pixel sequence provided in an embodiment of the present application, such as Figure 3 As shown in (a), the resolution of the image frame to be processed is 8*8. According to the numbering method of row order first and column order second, numbering all the pixels in the image frame to be processed can produce the following Figure 3 (b) shows the pixel sequence. It can be seen that the pixel points in the first row of the image frame to be processed are numbered 1...8 (i.e., the elements of the pixel sequence in the first row include 1...8), and the pixel points in the eighth row of the image frame to be processed are numbered 57...64 (i.e., the elements of the pixel sequence in the eighth row include 57...64).

[0057] In a possible implementation manner, an element in the pixel sequence corresponding to the first random number may be determined as a candidate element.

[0058] Correspondingly, refer to Figure 3 The pixel sequence shown, when the first random number includes 6, 52, 61, Figure 4 is a schematic diagram for determining candidate elements provided in the embodiments of the present application, such as Figure 4 As shown, it can be determined that the element 6 in the 1st row and 6th column, the element 52 in the 7th row and 4th column, and the element 61 in the 8th row and 5th column in the pixel sequence are candidate elements corresponding to the first random number.

[0059] Step S202, detecting the target color of the pixel points corresponding to the candidate elements in the image frame to be processed, and determining the target pixel points that meet the target color; the target color is the color of the abnormal image display;

[0060] Compared with the prior art of color detection on all pixels of the image frame to be processed, the random selection of pixels in the display frame to be processed and the color detection of the randomly selected pixels can preliminarily determine the detection result of the display frame to be processed and determine the pixels with abnormal display while utilizing less computing power.

[0061] Compared with the prior art of detecting the target color of all pixels of the image frame to be processed, in the embodiment of the present application, by detecting the color of the pixels corresponding to the candidate elements obtained in step S201 in the image frame to be processed, the pixels with abnormal display can be determined with less computing power.

[0062] In a possible implementation, by detecting the colors of pixels corresponding to the candidate elements in the image frame to be processed, a pixel displayed as a target color is determined as a target pixel.

[0063] For example, see Figure 4 The candidate elements shown, when the first random number includes 6, 52, 61, Figure 5 is a schematic diagram of determining the pixel points corresponding to the candidate elements provided in the embodiment of the present application, such as Figure 5 As shown, it can be determined that the pixel point in the 1st row and 6th column, the pixel point in the 7th row and 4th column, and the pixel point in the 8th row and 5th column are the pixel points corresponding to the candidate elements 6, 52, and 61 respectively.

[0064] Exemplarily, the target color may be the color of the abnormal image display. For example, when a video stream decoding abnormality occurs and the color of the abnormal image display may be green, the target color is green.

[0065] Step S203: if the number of target pixel points exceeds a first threshold, it is determined that the image frame to be processed is an abnormal image frame.

[0066] In the embodiment of the present application, based on the characteristic that abnormal pixels account for a relatively large proportion in the abnormal image frame, the abnormality detection result of the image frame to be processed is obtained by determining the number of target pixels in the pixels corresponding to the candidate elements.

[0067] Exemplarily, when the number of target pixels among the pixels corresponding to the candidate elements is greater than a first threshold, the image frame to be processed can be determined to be an abnormal image frame, wherein the first threshold is expressed as a specific value or ratio.

[0068] Specifically, when the first threshold is expressed as a specific numerical value, it can be determined whether the number of target pixel points exceeds the first threshold by comparing the number of target pixel points with the first threshold.

[0069] When the first threshold is expressed as a ratio, whether the number of target pixels exceeds the first threshold can be determined by comparing the proportion of the target pixels in the pixels corresponding to the candidate elements with the first threshold.

[0070] For example, the first threshold may be a ratio of 0.5 (ie, the target pixel accounts for 50% of the pixel points corresponding to the candidate element).

[0071] It should be noted that the first threshold may be set based on the number of target pixels in the determined abnormal image frame, or the proportion of target pixels in the determined abnormal image frame to the corresponding pixels of the candidate elements.

[0072] In another embodiment of the present application, a specific method for determining the first random number is also provided.

[0073] In a possible implementation manner, the value range of the first random number may be determined based on the resolution of the image frame to be processed, and a linear random operation may be performed based on the value range to obtain a plurality of first random numbers.

[0074] Exemplarily, when the pseudo-random number generation algorithm is a linear congruential method (Linear Congruential Generator, LCG for short) that generates pseudo-random numbers through a linear recursive relationship, the linear random algorithm can be expressed by the following formula:

[0075] Xi=(Xi-1*A+C)mod M

[0076] Among them, Xi can be used to represent the i-th pseudo-random number, Xi-1 can be used to represent the i-1-th pseudo-random number, A can be used to represent the multiplier, C can be used to represent the increment, M can represent the selection range of pseudo-random numbers (i.e., 0 to M-1), and in this application can be taken as the resolution of the image frame to be processed; among them, A and C can be constants (generally prime numbers).

[0077] Based on the above formula, we can first use Xi-1*A+C in the formula to obtain a pseudo-random number sequence that conforms to the uniform distribution, and then limit the value range of the pseudo-random number sequence to between 0 and M-1 by performing a modulo operation on M in the formula.

[0078] Exemplarily, the value range of the first random number can be specified by defining M in the above formula.

[0079] Specifically, when the selection range of the first random number is determined to be a random integer within a certain range based on the resolution of the image frame to be processed, M can be expressed as the following formula:

[0080] a+rand()%n

[0081] Among them, a can be used to represent the starting value, and n can be used to represent the range of integers.

[0082] Correspondingly, when the selection range of the first random number is determined to be a random integer in [a, b), M is expressed as (rand()%(ba))+a; when the selection range of the first random number is determined to be a random integer in [a, b], M is expressed as (rand()%(b-a+1))+a; when the selection range of the first random number is determined to be a random integer in (a, b], M is expressed as (rand()%(ba))+a+1.

[0083] Optionally, when the selection range of the first random number is determined to be a random integer between a and b based on the resolution of the image frame to be processed, M can be expressed as the following formula:

[0084] a+(int)b*rand() / (RAND_MAX+1)

[0085] Specifically, when the selection range of the first random number is determined to be a floating point number between 0 and 1 based on the resolution of the image frame to be processed, M can be expressed as the following formula:

[0086] rand() / double(RAND_MAX)

[0087] It should be noted that when C is 0, the above-mentioned linear congruential method can also be called the multiplication congruential method. At this time, X0 (that is, the first pseudo-random number) can be obtained based on the above formula, and then the above-mentioned M is modulo operation is performed in sequence based on X0 to obtain subsequent pseudo-random numbers; secondly, the above-mentioned rand() can be analogous to the preprocessing instruction RAND_MAX in the C language to define the numerical range of the first random number that can be obtained.

[0088] In another possible implementation, the value range of the first random number may be determined based on the format of the image frame to be processed and the resolution of the image. For example, an image sub-region whose color channel component is not zero in the image frame to be processed is determined, and the value range of the first random number is determined based on the resolution of the image sub-region, so as to perform a linear random operation based on the value range to obtain multiple first random numbers.

[0089] Exemplarily, the format of the image frame to be processed may include YUV image components for representing brightness and chrominance information of the image, wherein the Y component is used to represent image brightness, and the U component and the V component are used to represent image color.

[0090] That is, the rough outline of the image can be determined by the Y component, and the color information of the image can be determined by the U and V components.

[0091] Based on this, the region where the U component and the V component in the image frame to be processed are not zero can be determined as the image sub-region, and the selection range of the first random number can be determined according to the resolution of the image sub-region.

[0092] Specifically, the resolutions of all image sub-regions in the image frame to be processed may be summed up, so as to determine the selection range of the first random number based on the summed up result.

[0093] For example, when an image sub-region A with a resolution of 180P and an image sub-region B with a resolution of 360P are obtained based on the distribution of U components and V components in the image frame to be processed, by adding the resolutions of image sub-region A and image sub-region B, it can be determined that the selection range of the first random number is [0,230400].

[0094] Optionally, for each image sub-region, a selection range of the first random number within the image sub-region may be determined based on the resolution of the image sub-region, that is, each image sub-region may correspond to a set of first random numbers.

[0095] For example, when an image sub-region A with a resolution of 180P and an image sub-region B with a resolution of 360P are obtained based on the distribution of U components and V components in the image frame to be processed, a first random number can be selected in the image sub-region A with a selection range of [0,57600]; or a first random number can be selected in the image sub-region B with a selection range of [0,172800].

[0096] In another embodiment of the present application, a specific verification method for the initial detection result of the image frame to be processed is also provided, wherein the initial detection result is a result obtained by abnormality detection based on the first random number.

[0097] In an embodiment of the present application, when the image frame to be processed is determined to be an abnormal display frame based on the number of target pixels, the initial detection result of the image frame to be processed can be verified using verification pixels, thereby avoiding erroneous detection of the image frame to be processed.

[0098] In a possible implementation, the target color of the verification pixel point may be detected to determine the detection result of the image frame to be processed based on the detection result of the verification pixel point.

[0099] Exemplarily, the verification pixel point may be a valid pixel point used to verify the initial detection result; wherein the valid pixel point may include a pixel point having a display effect consistent with the target pixel point.

[0100] It should be noted that, since the abnormal display of the abnormal area in the abnormal image frame has a continuous characteristic, all pixels in each abnormal display area are likely to display abnormally. Based on this, the consistency of the display effect can be characterized as follows: the pixels in the same display area have the same display effect.

[0101] In this case, the pixel point having display effect consistency with the target pixel point is a pixel point having display continuity with the target pixel point with the target pixel point as the center. It can be known that the verification pixel point determined in this manner is completely different from the target pixel point.

[0102] Optionally, the valid pixel point is a pixel point at a different position from the target pixel point.

[0103] It should be noted that, since abnormally displayed pixels in an abnormal image frame have a relatively large proportion, when the number of abnormally displayed pixels in an image frame to be processed is large, it can be determined that the image frame to be processed is an abnormal image frame.

[0104] In this case, a verification pixel point that is different from the target pixel point can be determined to achieve color detection of more pixels in the image frame to be processed except the target pixel point, so as to determine the detection result of the image frame to be processed. It can be known that the verification pixel point determined in this way is partially different from or completely different from the target pixel point.

[0105] The following is an introduction to the specific method of determining the verification pixel points:

[0106] In the first method, the value range of the second random number can be determined based on the resolution of the image frame to be processed, and a nonlinear random operation is performed based on the value range to obtain multiple second random numbers; the number of second random numbers is greater than the number of first random numbers; the pixel points indicated by the candidate elements corresponding to the second random numbers in the pixel sequence are used as verification pixel points; the target color is detected for the verification pixel points, and if the number of pixel points in the verification pixel points that meet the target color exceeds a first threshold, the image frame to be processed is determined to be an abnormal image frame, otherwise, the image frame to be processed is determined to be a normal image frame.

[0107] In the embodiment of the present application, based on the characteristic that abnormal pixels account for a large proportion in the abnormal image frame, the detection result of the image frame to be processed can be obtained by performing a secondary color detection on more pixels, further ensuring the accuracy of the detection result. Based on this, the number of verification pixels used for verification is greater than the number of the first random number.

[0108] It should be noted that the process of determining the second random number value range based on the resolution of the image frame to be processed is similar to the process of determining the first random number value range based on the resolution of the image frame to be processed, and will not be described in detail here.

[0109] Exemplarily, in the process of determining the second random numbers using a nonlinear random algorithm, the number of the second random numbers may be increased by improving the proportional relationship with the number of pixels of the image frame to be processed, so as to obtain a larger number of second random numbers.

[0110] Correspondingly, when the number of the first random numbers is x% of the number of pixels of the image frame to be processed, the number of the second random numbers can be set to y% of the number of pixels of the image frame to be processed, where x is <y。

[0111] Exemplary, reference Figure 3 , a pixel sequence can be determined by numbering each pixel in the image frame to be processed, and the pixel indicated by the candidate element corresponding to the second random number in the pixel sequence is used as the verification pixel.

[0112] For example, Figure 6 is a schematic diagram of a method for determining a verification pixel point provided in an embodiment of the present application, such as Figure 6 As shown in (a), the resolution of the image frame to be processed is 6*6, and the pixel points indicated by the candidate elements corresponding to the first random numbers 9, 18, 35, and 36 in the image frame to be processed can be used as the pixel points for preliminarily obtaining the detection result of the image frame to be processed;

[0113] like Figure 6 As shown in (b), the target color is detected for the pixel points A, B, C, and D indicated by the candidate elements corresponding to the first random numbers 9, 18, 35, and 36, respectively, and the pixel points B, C, and D are determined to be target pixel points that meet the target color (when the first threshold is 50%, it can be determined that the number of target pixel points reaches the first threshold). At this time, it can be preliminarily determined that the image frame to be processed is an abnormal image frame;

[0114] like Figure 6 As shown in (c), the proportion of pixels determined based on the first random number in the image frame to be processed is 1 / 9 (i.e., the ratio of the number of first random numbers to the number of pixels in the image frame to be processed is 1 / 9). By adjusting the ratio of the number of second random numbers to the number of pixels in the image frame to be processed to 1 / 6 which is greater than 1 / 9, the number of verification pixels determined based on the second random number (i.e., 6) can be made greater than the number of pixels determined based on the first random number (i.e., 4), so that a larger number of verification pixels can be used to verify the abnormal detection results of the image frame to be processed; specifically, using a nonlinear random algorithm, it can be determined that the second random numbers are 1, 4, 16, 17, 22, and 35, respectively. At this time, the pixels E, F, G, H, I, and C indicated by the candidate elements corresponding to the second random numbers can be determined as verification pixels.

[0115] Exemplarily, the target color is detected for the verification pixel points determined based on the second random number, and if the number of pixel points that meet the target color among the verification pixel points exceeds a first threshold, the image frame to be processed is determined to be an abnormal image frame.

[0116] Specifically, when the first threshold is expressed as a specific value, it can be determined whether the image frame to be processed is abnormal by comparing the number of pixels that meet the target color among the verified pixels with the first threshold;

[0117] When the first threshold is expressed as a ratio, whether the image frame to be processed is abnormal can be determined by comparing the proportion of pixels in the verification pixels that meet the target color in all verification pixels with the first threshold.

[0118] In one possible implementation, when the number of pixel points that meet the target color in the above-mentioned verification pixel points does not exceed the first threshold, the size of the random number quantity parameter is increased. The random number quantity parameter is used to characterize the number of first random numbers, and the size of the random number quantity parameter is positively correlated with the number of first random numbers.

[0119] In an embodiment of the present application, when the initial detection result of the image frame to be processed is an abnormal image frame (i.e., the number of target pixels in the pixels determined based on the first random number exceeds the first threshold), but the number of pixels that meet the target color in the verification pixels does not exceed the first threshold (i.e., the verification result is inconsistent with the initial detection result), it means that the number of target pixels corresponding to the abnormal image frame during the initial detection process is set too low, resulting in a certain error in the detection result of the initial detection of the image frame to be processed, thereby increasing unnecessary calculation amount. At this time, the accuracy of the initial detection result of the image frame to be processed can be ensured by increasing the required number of target pixels when determining that the image frame to be processed is an abnormal image frame.

[0120] Exemplarily, when the required number of target pixels when determining that the image frame to be processed is an abnormal image frame is the above-mentioned first threshold, the accuracy of the initial detection result of the image frame to be processed can be guaranteed by increasing the first threshold.

[0121] Specifically, the first threshold may be increased based on the number of pixel points that meet the target color among the verification pixels.

[0122] For example, the first threshold is increased to the number of pixels in the verification pixels that match the target color, or the first threshold is increased to the proportion of pixels in the verification pixels that match the target color in all the verification pixels.

[0123] In the second method, for each target pixel, a verification display area corresponding to the target pixel can be determined, where the verification display area is a display area centered on the target pixel; and a verification pixel is selected from the verification display area.

[0124] In an embodiment of the present application, based on the continuous characteristics of the pixels in the abnormal area of ​​the abnormal image frame, it is possible to quickly determine whether the display area where the target pixel is located is abnormal based on the color detection results of the pixels located near the target pixel, thereby achieving abnormality detection of each display area with less computing power, and quickly determining the detection results of the image frame to be processed based on the detection results of each display area.

[0125] Exemplarily, the shape of the verification display area corresponding to the target pixel point may be a rectangle or a circle, and the shape of the verification display area is not specifically limited herein.

[0126] Exemplarily, a pixel point at the edge of the verification display area corresponding to the target pixel point may be determined as the verification pixel point.

[0127] For example, Figure 7 is a schematic diagram of another method for determining verification pixels provided in an embodiment of the present application, such as Figure 7 As shown in (a), based on the resolution of the image frame to be processed being 6*6, a linear random algorithm is used to determine the first random number to be, for example, 9 or 18. At this time, it can be determined that the pixel points corresponding to the candidate elements corresponding to the first random numbers 9 or 18 in the image frame to be processed are pixel points A and pixel point B respectively;

[0128] like Figure 7 As shown in (b), the target color is detected for pixel A and pixel B, and pixel B is determined to be a target pixel that meets the target color (when the first threshold is 50%, it is determined that the number of target pixels reaches the first threshold). At this time, it can be preliminarily determined that the image frame to be processed is an abnormal image frame;

[0129] like Figure 7 As shown in (c), with pixel point B as the center and the length of two pixels as the radius, the verification display area is determined to be a circular display area with pixel point B as the center. At this time, pixel points C, D, E, F, G, H, and I at the edge of the circular display area are determined as verification pixels.

[0130] In a possible implementation, the detection result of the image frame to be processed may be determined based on the color detection result of the verification pixel point.

[0131] In the first manner, the abnormality detection result of the image frame to be processed may be determined based on the number of verification display areas in the image frame to be processed that are in an abnormal state.

[0132] Specifically, by detecting the target color of the verification pixel points in each verification display area, if the pixel points that meet the target color among the verification pixel points in the verification display area exceed the second threshold, the verification display area is determined to be an abnormal verification display area. Based on this, if the number of abnormal verification display areas exceeds the third threshold, the image frame to be processed is determined to be an abnormal image frame.

[0133] Exemplarily, the second threshold may be set based on the number of pixels displaying abnormal colors in the determined verification abnormality display area, or the proportion of pixels displaying abnormal colors in the verification abnormality display area.

[0134] It should be noted that the second threshold is similar to the first threshold and can be expressed as a specific value or a ratio; and the specific values ​​of the second threshold and the first threshold can be the same or different.

[0135] Correspondingly, when the second threshold is expressed as a specific numerical value, the number of verification pixels that meet the target color in the verification display area can be compared with the size of the second threshold to determine whether the verification display area is an abnormal verification display area; when the second threshold is expressed as a ratio, the proportion of verification pixels that meet the target color in all verification pixels in the verification display area can be compared with the size of the second threshold to determine whether the verification display area is an abnormal verification display area.

[0136] Exemplarily, the third threshold may be set based on the number of abnormal verification display areas in the determined abnormal image frame, or the proportion of abnormal verification display areas in all areas of the abnormal image frame. Correspondingly, the third threshold is expressed as a specific value or ratio.

[0137] Specifically, when the third threshold is expressed as a specific numerical value, the number of abnormal verification display areas can be compared with the size of the third threshold to determine whether the image frame to be processed is an abnormal image frame; when the third threshold is expressed as a ratio, the proportion of the abnormal verification display area in all areas of the image frame to be processed can be compared with the size of the third threshold to determine whether the image frame to be processed is an abnormal image frame.

[0138] Exemplarily, it may be determined whether the number of abnormal verification display areas exceeds the third threshold by obtaining verification display area detection results one by one or cumulatively obtaining verification display area detection results.

[0139] Specifically, for each verification display area corresponding to a target pixel point, a judgment is made one by one as to whether the verification display area is abnormal, so as to determine the total number of abnormal verification display areas based on the judgment results of all verification display areas, and thus determine whether the number of abnormal verification display areas reaches the third threshold by comparing the total number of abnormal verification display areas with the third threshold.

[0140] Optionally, by randomly detecting or detecting one by one the verification display areas corresponding to the target pixel points, when the total number of abnormal verification display areas reaches a third threshold, the determination of the remaining verification display areas is stopped.

[0141] In the second manner, the abnormality detection result of the image frame to be processed may be determined based on the number of pixels displaying abnormal colors among all verification pixels in all verification display areas.

[0142] Specifically, by detecting the target color of all verification pixels in all verification display areas, if the number of verification pixels that meet the target color exceeds a first threshold, it is determined that the image frame to be processed is an abnormal image frame.

[0143] Exemplarily, similar to the method of determining the number of abnormal verification display areas mentioned above, it is possible to determine whether the number of verification pixels that meet the target color among all verification pixels in all verification display areas exceeds a first threshold by determining whether the verification pixels are displayed as the target color one by one or by accumulating the number of verification pixels that are displayed as the target color.

[0144] Specifically, for each verification pixel, the display color of the verification pixel is judged one by one to determine whether the number of pixels that meet the target color among all the verification pixels exceeds a first threshold.

[0145] Optionally, by randomly detecting or detecting the verification pixels one by one, when the number of pixels that meet the target color exceeds a first threshold, the color judgment of the remaining verification pixels is stopped.

[0146] In another embodiment of the present application, a specific implementation method for determining an abnormality detection mode before performing abnormality detection on an image frame to be processed is also provided.

[0147] In a possible implementation, the abnormality detection mode may be determined according to the current computing power, so that the verification pixel point may be determined using different determination methods based on the selection result of the abnormality detection mode, wherein the abnormality detection mode includes the first mode or the second mode.

[0148] Exemplarily, the computing power requirement of the first mode is higher than the computing power requirement of the second mode, and the number of verified pixels in the first mode is greater than the number of verified pixels in the second mode.

[0149] Specifically, in the first mode, firstly, a large number of first random numbers may be selected, and secondly, the verification pixel may be determined based on the verification display area corresponding to the target pixel (ie, the first mode is a high computing power mode);

[0150] In the second mode, firstly, without affecting the normal display of the above-mentioned video stream, the number of first random numbers can be determined based on the pixel calculation amount limited by the device computing power, and secondly, the verification pixel point can be determined based on the second random number (that is, the second mode is a low computing power mode).

[0151] In an embodiment of the present application, based on the above two abnormality detection modes, when determining the verification pixel points used to verify the detection results of the image frame to be processed, any abnormality detection mode can be flexibly selected, thereby improving the flexibility of the abnormality detection process.

[0152] Exemplarily, when the above-mentioned computer device 10 is used to implement abnormality detection of the image frame to be processed, the computer device 10 can automatically run the first mode / the second mode according to the computing power of its own CPU.

[0153] Optionally, the anomaly detection mode may be determined according to user configuration.

[0154] Exemplarily, a mode selection instruction of a user may be received through a mode selection interface to determine an abnormality detection mode based on the mode selection instruction; wherein the mode selection interface includes a selection item for a first mode and a selection item for a second mode.

[0155] Specifically, the computer device 10 may display a mode selection interface at any detection stage of the image frame to be processed for the user to select. It should be noted that any stage of the detection frame to be processed may include a reception stage of the detection frame to be processed (i.e., not yet displayed on the computer device 10), a start display stage (i.e., the computer device 10 successfully receives and is ready to display), and a display stage (i.e., has been displayed on the computer device 10 for a period of time), etc.

[0156] For example, Figure 8 is a schematic diagram of an abnormality detection mode selection interface provided in an embodiment of the present application, such as Figure 8 As shown, the user can generate a mode selection instruction corresponding to a selection item by clicking on the selection item in the mode selection interface.

[0157] Exemplarily, the mode selection instruction may also correspond to parameter configuration involved in the abnormality detection process of the image frame to be processed.

[0158] That is to say, when a mode selection instruction is received from the user, not only the abnormality detection mode of the image frame to be processed can be clarified, but also the parameters to be applied in the process of detecting the image frame to be processed can be obtained.

[0159] Correspondingly, refer to Figure 8When the mode selection instruction corresponds to the first mode, the first random number, the shape of the verification display area during verification, and the size of different thresholds can be obtained; when the mode selection instruction corresponds to the second mode, the first random number, the second random number, and the size of different thresholds can be obtained.

[0160] In another embodiment of the present application, another specific implementation method for verifying the detection results of the image frame to be processed is also provided. Exemplarily, the method also includes: if the number of target pixels determined based on step S202 does not exceed the first threshold, then the target color is detected for all pixels in the verification display area corresponding to the determined target pixels; if the number of pixels that meet the target color among all pixels exceeds the second threshold, then the verification display area is determined to be an abnormal verification display area; if the number of abnormal verification display areas in the image frame to be processed exceeds the third threshold, then the image frame to be processed is determined to be abnormal.

[0161] In an embodiment of the present application, based on the abnormal detection mode being the above-mentioned first mode, when the number of target pixel points in the image frame to be processed does not exceed the first threshold value, the detection result of the verification display area is determined by color detection of all pixel points in the verification display area corresponding to the target pixel points, so as to further verify the preliminary detection result of the image frame to be processed based on the number of abnormal verification display areas in the image frame to be processed, thereby avoiding erroneous judgment of the image frame detection result.

[0162] Exemplarily, whether the detection result of the image frame to be processed needs to be verified may be determined based on the number of target pixels.

[0163] Specifically, when the number of target pixel points is 0, it is determined that the detection result of the image frame to be processed is normal; otherwise, the number of target pixel points is further determined.

[0164] Specifically, when the number of target pixel points is a non-zero value but does not exceed the first threshold, the image frame to be processed may be determined as a suspicious abnormal frame.

[0165] Correspondingly, when the image frame to be processed is determined to be a suspected abnormal frame, for each target pixel point, a verification display area is constructed with the target pixel point as the center, and by judging the number of pixels that meet the target color in each verification display area, it is determined whether the verification display area is an abnormal verification display area, thereby determining the detection result of the image frame to be processed based on the number of abnormal verification display areas in the image frame to be processed.

[0166] Exemplarily, when the number of pixels in the verification display area exceeds a second threshold, the verification display area is determined to be an abnormal verification display area.

[0167] Exemplarily, if the number of abnormal verification display areas in the image frame to be processed exceeds a third threshold, it is determined that the image frame to be processed is abnormal.

[0168] It should be noted that the method of determining the number of abnormal verification display areas here is similar to the method of determining the number of abnormal verification display areas described in the above embodiment. It can be determined whether the number of abnormal verification display areas exceeds the third threshold by obtaining the verification display area detection results one by one or accumulating the verification display area detection results. It will not be elaborated here.

[0169] In another embodiment of the present application, another image frame anomaly detection method is provided. Exemplarily, Fig. 9 Another flowchart of the image frame anomaly detection method provided in the embodiment of the present application is as follows: Fig. 9 As shown, the method comprises the following steps:

[0170] Step S901, determining an abnormality detection mode, so as to determine a detection condition of the image frame to be processed based on the abnormality detection mode, wherein the abnormality detection mode includes a high computing power mode and a low computing power mode;

[0171] In one possible implementation, the anomaly detection mode may be determined according to current computing power or user configuration.

[0172] Step S902, determining a plurality of first random numbers based on the resolution of the image frame to be processed, wherein the plurality of first random numbers satisfy a linear distribution state, the numerical values ​​of the first random numbers do not exceed the resolution, and the number of the first random numbers is lower than the pixel operation amount limited by the computing power of the device;

[0173] In a possible implementation, the number of first random numbers may be determined based on the abnormality detection mode determined in step S901.

[0174] Exemplarily, when the anomaly detection mode is a low computing power mode, the number of first random numbers can be determined based on the required computing power when the video stream corresponding to the image frame to be processed is displayed and the current overall computing power.

[0175] Specifically, the number of the first random numbers may be determined based on the difference between the current overall computing power and the computing power required when the video stream is displayed.

[0176] That is to say, by controlling the number of the first random numbers, the computing power consumed in the subsequent determination of the pixel points based on the first random numbers and the target color detection will not affect the normal display of the video stream corresponding to the image frame to be processed.

[0177] Optionally, compared to the number of first random numbers in the low computing power mode, when the anomaly detection mode is the high computing power mode, the number of first random numbers may be increased accordingly.

[0178] Step S903, determining a candidate element corresponding to the first random number in a pixel sequence of the image frame to be processed, detecting a target color for the pixel points corresponding to the candidate element in the image frame to be processed, and determining a target pixel point that meets the target color;

[0179] Exemplarily, the pixel sequence includes M elements, and the M elements correspond one-to-one to the M pixels of the image frame to be processed.

[0180] Exemplarily, the target color may be the color of the abnormal display; for example, when the abnormal image frame is a green screen image, the target color is green.

[0181] Step S904, determining whether the image frame to be processed is an abnormal image frame based on the number of target pixels;

[0182] Exemplarily, when the anomaly detection mode is the high computing power mode, step S9051 is directly executed.

[0183] Optionally, when the abnormality detection mode is the low computing power mode, if the detection result of the image frame to be processed is an abnormal image frame, step S9052 is executed, otherwise step S9053 is executed.

[0184] Step S9051, determining the abnormality degree of the image frame to be processed based on the number of target pixels;

[0185] Exemplarily, when the number of target pixel points exceeds a first threshold, the abnormality degree of the image frame to be processed is determined to be a first abnormality level; when the number of target pixel points does not exceed the first threshold, the abnormality degree of the image frame to be processed is determined to be a second abnormality level; wherein, the abnormality degree corresponding to the first abnormality level is higher than the abnormality degree corresponding to the second abnormality level.

[0186] Correspondingly, if the abnormality level of the image frame to be processed is the first abnormality level, step S9061 is executed; if the abnormality level of the image frame to be processed is the second abnormality level, step S9062 is executed.

[0187] Step S9052, determining a plurality of second random numbers based on the resolution of the image frame to be processed, taking the pixel points indicated by the candidate elements corresponding to the second random numbers in the pixel sequence as verification pixel points, and detecting the target color of the verification pixel points;

[0188] Exemplarily, the value range of the second random number can be determined based on the resolution of the image frame to be processed, and a nonlinear random operation can be performed based on the value range to obtain multiple second random numbers, wherein the number of the second random numbers is greater than the number of the first random numbers.

[0189] Exemplarily, if the number of pixel points that match the target color among the verification pixel points determined in step S9052 exceeds the first threshold, step S9085 is executed; otherwise, step S9086 is executed.

[0190] Step S9053, determining that the detection result of the image frame to be processed is normal;

[0191] Step S9061, for each target pixel, determining the pixel in the verification display area corresponding to the target pixel as the verification pixel, and if the number of verification pixels in the verification display area that match the target color exceeds a second threshold, determining that the verification display area is abnormal;

[0192] Exemplarily, after completing the determination of whether the verification display area is abnormal, step S9071 is executed.

[0193] Step S9062, determining whether the number of target pixels is 0;

[0194] Exemplarily, if the number of target pixels is 0, execute step S9072, otherwise execute step S9073.

[0195] Step S9071, counting the number of abnormal verification display areas, and determining whether the number of abnormal verification display areas reaches a third threshold;

[0196] Exemplarily, if the number of abnormal verification display areas reaches the third threshold, step S9081 is executed, otherwise step S9082 is executed.

[0197] Step S9072, determining that the detection result of the image frame to be processed is normal;

[0198] Step S9073, detecting the target color of all pixels in the verification display area corresponding to the target pixel, determining the abnormal verification display area based on the number of pixels that meet the target color in each verification display area, and determining whether the number of abnormal verification display areas in the image frame to be processed exceeds a third threshold;

[0199] Exemplarily, if the number of pixel points that match the target color among all the pixel points in the verification display area reaches a second threshold, the verification display area is determined to be an abnormal verification display area.

[0200] Exemplarily, if the number of abnormal verification display areas in the image frame to be processed reaches a third threshold, step S9083 is executed, otherwise step S9084 is executed.

[0201] Step S9081, determining that the detection result of the image frame to be processed is abnormal;

[0202] Exemplarily, when the detection result of the image frame to be processed is abnormal, the image frame to be processed may be discarded or displayed as a black screen.

[0203] Step S9082, determining that the detection result of the image frame to be processed is normal, and increasing the first threshold.

[0204] Step S9083, determining that the image frame to be processed is an abnormal image frame;

[0205] Step S9084, determining that the image frame to be processed is a normal image frame;

[0206] Step S9085, determining that the detection result of the image frame to be processed is abnormal;

[0207] Step S9086, determining that the detection result of the image frame to be processed is normal, and increasing the first threshold.

[0208] In the above-mentioned embodiment, a specific process of another complete image frame detection method is introduced. Fig.10 Schematic diagram of a block diagram of an image frame detection device according to an embodiment of the present application. Fig.10 The device includes a first processing unit 1001, a second processing unit 1002 and a determining unit 1003.

[0209] The first processing unit 1001 is used to determine a plurality of first random numbers based on the resolution of the image frame to be processed, and determine candidate elements corresponding to the first random numbers in a pixel sequence of the image frame to be processed; the pixel sequence includes M elements, the M elements correspond one-to-one to the M pixels of the image frame to be processed, the plurality of first random numbers satisfy a linear distribution state, the numerical values ​​of the first random numbers do not exceed the resolution, and the number of the first random numbers is lower than the pixel operation amount limited by the computing power of the device;

[0210] The second processing unit 1002 is used to detect the target color of the pixel points corresponding to the candidate elements in the image frame to be processed, and determine the target pixel points that meet the target color; the target color is the color of the abnormal image display;

[0211] The determination unit 1003 is configured to determine that the image frame to be processed is an abnormal image frame if the number of target pixel points exceeds a first threshold.

[0212] Compared with the prior art in which the detection result of the image frame to be processed is determined by color detection of all pixels in the image frame to be processed, which results in higher computing power requirements for image frame anomaly detection, the image frame anomaly detection device 1000 provided in the embodiment of the present application, on the one hand, by selecting a first random number with a linear distribution, the randomly selected pixel points that need to be detected in the image frame to be processed (that is, in the pixel sequence of the image frame to be processed, the candidate element corresponding to the first random number corresponds to the pixel point in the image frame to be processed) is a continuous pixel point, so as to adapt to the continuous characteristics of the abnormal pixel points in the abnormal image frame, thereby ensuring the accuracy of the image frame anomaly detection result; on the other hand, by judging the number of pixel points that meet the target color in the randomly selected pixel points, the detection result of the image frame to be processed is determined, thereby using less computing power to achieve anomaly detection of the image frame to be processed, so as to ensure the accuracy of the image frame anomaly detection result while reducing the computing power requirements for image frame anomaly detection.

[0213] Reference below Fig.11 , Fig.11 A schematic diagram of the structure of a computer device suitable for implementing the embodiments of the present application is shown. Fig.11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1109 to the random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation instructions of the system are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0214] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage section 1108 as needed.

[0215] In particular, according to an embodiment of the present application, the above reference flow chart Figure 2The described process can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, the above-mentioned functions defined in the system of the present application are executed.

[0216] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium such as a computer-readable storage medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0217] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operating instructions of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the aforementioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operating instruction, or can be implemented with a combination of dedicated hardware and computer instructions.

[0218] The units or modules involved in the embodiments described in the present application may be implemented by software or by hardware. The described units or modules may also be provided in a processor, for example, may be described as: a processor including a semantic extraction unit, a weight allocation unit, and a determination unit. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.

[0219] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the computer device described in the above embodiment, or may exist independently without being installed in the computer device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the method described in the present application. For example, it can be executed Figure 2 The individual steps of the method are shown.

[0220] The present application embodiment provides a computer program product, which includes instructions. When the instructions are executed, the method described in the present application embodiment is executed. For example, Figure 2 The individual steps of the method are shown.

[0221] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A method for detecting anomalies in image frames, characterized in that: The method comprises: Determine a plurality of first random numbers based on the resolution of the image frame to be processed, and determine candidate elements corresponding to the first random numbers in a pixel sequence of the image frame to be processed; the pixel sequence includes M elements, the M elements correspond one-to-one to the M pixels of the image frame to be processed, the plurality of first random numbers satisfy a linear distribution state, the values ​​of the first random numbers do not exceed the resolution, and the number of the first random numbers is lower than the pixel operation amount limited by the computing power of the device; Detecting the target color of the pixel points corresponding to the candidate elements in the image frame to be processed, and determining the target pixel points that meet the target color; the target color is the color of the abnormal image display; If the number of the target pixel points exceeds a first threshold, the image frame to be processed is determined to be an abnormal image frame.

2. The method according to claim 1, characterized in that The step of determining a plurality of first random numbers based on the resolution of the image frame to be processed comprises: Determine a value range of the first random number based on the resolution of the image frame to be processed, and perform a linear random operation based on the value range to obtain a plurality of the first random numbers; or, Based on the format of the image frame to be processed, an image sub-region in which the color channel component of the image frame to be processed is not zero is determined, based on the resolution of the image sub-region, a value range of the first random number is determined, and a linear random operation is performed based on the value range to obtain multiple first random numbers.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: All pixels in the image frame to be processed are numbered, and a pixel sequence of the image frame to be processed is generated according to the numbers of all pixels, wherein the elements of the pixel sequence are the numbers of the respective pixels.

4. The method according to claim 1, characterized in that: The method further comprises: Determine a verification pixel point, detect the target color on the verification pixel point, and determine the detection result of the image frame to be processed based on the detection result of the verification pixel point; Among them, the verification pixel points are different from the target pixel points, the number of the verification pixel points is greater than the number of the target pixel points or the number of the verification pixel points is greater than the number of the first random numbers.

5. The method according to claim 4, characterized in that The determining of the verification pixel point, detecting the target color of the verification pixel point, and determining the detection result of the image frame to be processed based on the detection result of the verification pixel point includes: Determining a value range of a second random number based on the resolution of the image frame to be processed, performing a nonlinear random operation based on the value range, and obtaining a plurality of second random numbers; the number of the second random numbers is greater than the number of the first random numbers; Using a pixel point indicated by a candidate element corresponding to the second random number in the pixel sequence as the verification pixel point; The target color is detected for the verification pixel points. If the number of pixel points in the verification pixel points that meet the target color exceeds the first threshold, the image frame to be processed is determined to be an abnormal image frame. Otherwise, the image frame to be processed is determined to be a normal image frame.

6. The method according to claim 5, characterized in that The method further comprises: If the number of pixel points in the verification pixel points that match the target color does not exceed the first threshold, the size of the first threshold is increased.

7. The method according to claim 4, characterized in that The step of determining the verification pixel point comprises: For each of the target pixels, determining a verification display area corresponding to the target pixel, the verification display area being a display area centered on the target pixel; The verification pixel point is selected from the verification display area.

8. The method according to claim 7, characterized in that The determining the detection result of the image frame to be processed based on the detection result of the verification pixel point includes: If the number of verification pixels in the verification display area that meet the target color exceeds a second threshold, the verification display area is determined to be abnormal; if the number of abnormal verification display areas exceeds a third threshold, the image frame to be processed is determined to be an abnormal image frame; Alternatively, if the number of verification pixels that meet the target color among all verification pixels in all verification display areas exceeds the first threshold, the image frame to be processed is determined to be an abnormal image frame, otherwise, the image frame to be processed is determined to be a normal image frame.

9. The method according to claim 4, characterized in that The method further comprises: Determine an abnormality detection mode according to the current computing power; the abnormality detection mode includes a first mode or a second mode; Among them, in the first mode: the verification pixel point is determined based on the verification display area corresponding to the target pixel point; in the second mode: the verification pixel point is determined based on a second random number; the computing power requirement of the first mode is higher than the computing power requirement of the second mode, and the number of the verification pixel points in the first mode is greater than the number of the verification pixel points in the second mode.

10. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed, the method according to any one of claims 1 to 9 is performed.