Video picture quality detection method and device and medium
Through the video picture quality detection method, single frame images in the video stream are collected, abnormal detection dimensions are identified, and abnormal detection is performed through sub-threads, which solves the problem of poor detection results in the existing technology, and achieves comprehensive coverage and efficient detection of various picture quality problems.
Patent Information
- Application Number
- CN202411893381.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-02
AI Technical Summary
Existing video quality inspection products are difficult to fully cover various possible picture quality problems, and the integration of detection algorithms lacks systematicity, resulting in unsatisfactory detection results.
A video picture quality detection method is proposed. By collecting a single frame to be detected in a video stream, calling the main program for identification, determining the abnormal detection dimension, and pre-processing and abnormal detection through matching child threads, the detection results are uniformly managed using the global cache pool.
Detection from multiple abnormal detection dimensions can achieve comprehensive coverage of multiple picture quality problems, improve the comprehensiveness and accuracy of detection, make full use of multi-threaded processing to improve efficiency, and ensure the coordination and consistency of detection results.
Smart Images

Figure CN119922296A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video recognition technology, and in particular to a method, device and medium for detecting video picture quality. Background Art
[0002] In the field of video surveillance, video quality is an important factor affecting the monitoring effect. High-quality surveillance images can ensure the effectiveness and reliability of security monitoring, traffic supervision, employee supervision, and public safety. In the actual monitoring process, various problems often occur in video image quality, such as blur, freeze, color distortion, etc. Therefore, screening and testing of video image quality is particularly important. However, the video quality detection products currently on the market are difficult to fully cover all possible image quality problems, and lack of systematicity in the integration of detection algorithms, resulting in unsatisfactory detection results. Summary of the invention
[0003] In order to solve the above problems, the present application proposes a video picture quality detection method, comprising:
[0004] Collect a single frame of the to-be-detected picture in the video stream, call the main program to identify the to-be-detected picture, and determine the abnormality detection dimension corresponding to the to-be-detected picture;
[0005] Calling a subthread matching the anomaly detection dimension to preprocess the image to be detected to obtain a target detection image, and performing anomaly detection on the target detection image using a detection algorithm corresponding to the anomaly detection dimension to obtain detection results corresponding to the target detection image in each anomaly detection dimension;
[0006] The detection result corresponding to each sub-thread is written into the global cache pool, and the target abnormality type existing in the to-be-detected picture is determined through the detection result in the global cache pool.
[0007] In one implementation of the present application, anomaly detection is performed on the target detection image by using a detection algorithm corresponding to the anomaly detection dimension to obtain a detection result corresponding to each detection dimension of the target detection image, specifically including:
[0008] According to the abnormal attributes corresponding to the abnormality detection dimension, the abnormality detection dimension is divided into several abnormality types; wherein the abnormality type includes an image quality abnormality type and an image content abnormality type;
[0009] In the case where the abnormality type corresponding to the abnormality detection dimension is the image quality abnormality type, image quality detection is performed on the target detection image by using a first detection algorithm corresponding to the abnormality detection dimension to obtain a first detection result; wherein the image quality abnormality type includes image blur, brightness abnormality, contrast abnormality, image color cast and noise abnormality;
[0010] When the abnormality type corresponding to the abnormality detection dimension is the image content abnormality type, image content detection is performed on the target detection image by using a second detection algorithm corresponding to the abnormality detection dimension to obtain a second detection result; wherein, the image content abnormality types include black and white images, signal loss and screen occlusion.
[0011] In one implementation of the present application, image quality detection is performed on the target detection image using a first detection algorithm corresponding to the abnormality detection dimension to obtain a first detection result, which specifically includes:
[0012] Performing a Laplace transform on the target detection image by using the first detection algorithm corresponding to the image blur, calculating the average value and standard deviation between the pixel values corresponding to each pixel point in the target detection image after the transform, and determining the image blur score corresponding to the target detection image according to the standard deviation;
[0013] And / or, initializing the brightness of the target detection image by using a first detection algorithm corresponding to the brightness anomaly, traversing all pixels in the target detection image, calculating the brightness features corresponding to the pixels, and determining the brightness score corresponding to the target detection image according to the brightness features;
[0014] And / or, using a first detection algorithm corresponding to the contrast anomaly, traversing all pixels in the target detection image, calculating a pixel deviation value between each pixel and its adjacent pixel, and determining an image contrast corresponding to the target detection image based on the pixel deviation value;
[0015] And / or, performing color gamut separation on the target detection image by using a first detection algorithm corresponding to the image color cast, calculating a global pixel deviation value corresponding to the target detection image according to pixel values in the separated specified color channel, and determining a color cast anomaly score corresponding to the target detection image according to the global pixel deviation value;
[0016] And / or, dividing the target detection image into a plurality of image blocks by using a first detection algorithm corresponding to the noise anomaly, calculating pixel variances in the image blocks, and determining a signal-to-noise ratio corresponding to the target detection image based on a ratio between a maximum pixel variance and a minimum pixel variance in the pixel variances;
[0017] The image blur score and / or the brightness score and / or the image contrast and / or the color cast abnormality score and / or the signal-to-noise ratio are mapped to the confidence of the corresponding abnormality detection dimension to obtain a first detection result.
[0018] In one implementation of the present application, performing image content detection on the target detection image by using a second detection algorithm corresponding to the anomaly detection dimension to obtain a second detection result specifically includes:
[0019] Obtaining pixel values corresponding to each pixel point of each color channel in the target detection image by using a second detection algorithm corresponding to the black-and-white image, calculating a pixel mean value of the color channel according to the pixel values, and calculating a pixel difference between the corresponding pixel value and the pixel mean value for all pixel points in the color channel, so as to obtain a black-and-white anomaly score corresponding to the target detection image according to the pixel difference value;
[0020] And / or, by using the second signal loss detection algorithm, pixel values corresponding to all pixels in the target detection image are obtained, and according to the number of pixels corresponding to each pixel value, a first occurrence frequency of the pixel value is calculated, and the target pixel value with the largest first occurrence frequency is selected, and according to the ratio between the target pixel value and the number of pixels in the target detection image, a signal loss anomaly score corresponding to the target detection image is determined;
[0021] And / or, performing edge extraction on the target detection image through the second detection algorithm for screen occlusion to obtain a corresponding edge image, and calculating pixel standard deviations between all pixel points contained in a pre-divided window based on the edge image and the target detection image, so as to obtain a screen occlusion anomaly score corresponding to the target detection image based on the pixel standard deviation;
[0022] The black-and-white anomaly score and / or the signal loss anomaly score and / or the screen occlusion anomaly score are mapped to confidences of corresponding anomaly detection dimensions to obtain a second detection result.
[0023] In one implementation of the present application, calculating the brightness feature corresponding to the pixel point to determine the brightness score corresponding to the target detection image according to the brightness feature specifically includes:
[0024] The brightness feature includes the brightness value, the brightness mean and the second occurrence frequency of the pixel point;
[0025] Obtaining a brightness value and a brightness mean corresponding to the pixel point, and determining a second occurrence frequency of each brightness value in the target detection image;
[0026] For each pixel, calculate a brightness difference between the brightness value of the pixel and the brightness mean, and multiply the brightness difference by its corresponding second occurrence frequency to obtain a corresponding brightness characteristic value;
[0027] The mean value of the brightness characteristic values corresponding to all pixels is calculated, and the mean value is used as the brightness score corresponding to the target detection image.
[0028] In one implementation of the present application, determining the image contrast corresponding to the target detection image according to the pixel deviation value specifically includes:
[0029] For each pixel point, calculating the sum of squares of pixel deviation values corresponding to the pixel point;
[0030] The square sums corresponding to each pixel are added to obtain a corresponding sum result, and the image contrast corresponding to the target detection image is determined according to the ratio between the sum result and the number of pixels in the target detection image.
[0031] In one implementation of the present application, according to the pixel values in the separated designated color channel, the pixel deviation value corresponding to the target detection image is calculated, and according to the pixel deviation value, the color cast anomaly score corresponding to the target detection image is determined, specifically including:
[0032] For each pixel value in the separated designated color channel, determine a pixel deviation value of the pixel value relative to a standard pixel value, and a histogram feature corresponding to the pixel value; wherein the histogram feature represents the quantity distribution of the pixel value in the target detection image;
[0033] A color cast anomaly score corresponding to the target detection image is determined according to the pixel deviation value and the histogram feature.
[0034] In one implementation of the present application, obtaining a screen occlusion anomaly score corresponding to the target detection image according to the pixel standard deviation specifically includes:
[0035] Determine whether the pixel standard deviations respectively corresponding to the edge image and the target detection image are greater than a preset threshold;
[0036] If so, the window is used as a screen occlusion block in the target detection image until all windows are traversed, and the number of the screen occlusion blocks is used as the screen occlusion anomaly score corresponding to the target detection image.
[0037] The present application provides a video quality detection device, the device comprising:
[0038] at least one processor;
[0039] and, a memory communicatively coupled to the at least one processor;
[0040] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a video picture quality detection method as described in any one of the above items.
[0041] The embodiment of the present application provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0042] A video picture quality detection method as described in any one of the above items.
[0043] The video picture quality detection method proposed in this application can bring the following beneficial effects:
[0044] By performing anomaly detection on the images to be detected from multiple anomaly detection dimensions, it is possible to achieve comprehensive coverage of various image quality issues from multiple levels, thus improving the comprehensiveness and accuracy of image quality detection. By calling sub-threads that match the anomaly detection dimensions for preprocessing and anomaly detection, the parallel processing capabilities of multiple threads are fully utilized to improve detection efficiency. At the same time, multiple detection algorithms are integrated to perform anomaly detection on the same image to be detected, ensuring the coordination and consistency between the anomaly detection dimensions and avoiding conflicts and redundancies between detection algorithms. The use of a global cache pool enables unified management and efficient aggregation of detection results, facilitating subsequent accurate judgment of target anomaly types. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0046] Figure 1 A flowchart of a video picture quality detection method provided in an embodiment of the present application;
[0047] Figure 2 A schematic diagram of the structure of a video picture quality detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0049] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0050] like Figure 1 As shown, a video picture quality detection method provided in an embodiment of the present application includes:
[0051] S101: Collect a single frame of a to-be-detected picture in a video stream, and call a main program to identify the to-be-detected picture to determine an abnormality detection dimension corresponding to the to-be-detected picture.
[0052] After acquiring continuous image data of the area to be monitored, other video acquisition devices such as cameras transmit these image data to the monitoring center in the form of a video stream. According to the abnormal detection requirements, the frame interval of each screen extraction is set, and according to the above frame interval, a single frame of the screen to be detected is extracted from the acquired video stream. Compared with multi-frame detection, quality detection of a single frame of the screen is faster to execute, and is suitable for scenes with a high signal-to-noise ratio, which can effectively improve the accuracy of the detection results. The extracted single frame of the screen to be detected needs to be identified and processed by the main program, which is mainly used to parse and identify the screen to be detected, and determine the abnormal detection dimension required for screening the screen to be detected. Among them, the abnormal detection dimension can be determined according to the detection rules customized by the user in advance, that is, before identifying the abnormality of the screen, the user can configure the detection items to be identified through the relevant operation interface, and the detection items will constitute the corresponding detection rules. Before the main program parses and identifies the screen to be detected, it first determines the abnormal detection dimension required to be detected according to the detection rules. In the embodiment of the present application, the abnormal detection dimension includes nine types: image blur, brightness abnormality, contrast abnormality, image color cast, noise abnormality, black and white image, signal loss and screen occlusion.
[0053] S102: Call a sub-thread that matches the anomaly detection dimension to pre-process the image to be detected to obtain a target detection image, and perform anomaly detection on the target detection image using a detection algorithm corresponding to the anomaly detection dimension to obtain detection results corresponding to the target detection image in each anomaly detection dimension.
[0054] The picture quality detection is performed by multiple threads. For each abnormality detection dimension, a subthread is assigned to it to handle the specific type of picture abnormality detection. Each subthread is responsible for preprocessing the picture to be detected to obtain the target detection image. At the same time, it is also responsible for executing the detection algorithm that matches the abnormality detection dimension, so as to realize the abnormality detection of the target detection image through the detection algorithm and obtain the corresponding detection result. It should be noted that the detection result matches the abnormality detection dimension that needs to be screened for the picture to be detected.
[0055] It should be noted that the preprocessing process needs to map the YUV data stream collected in the production environment to the BGR color space to achieve the color space transformation of the picture. At the same time, the BGR image obtained after the color space transformation needs to be transformed into a grayscale image. Among them, for the special abnormal type of black and white image, there is no need to transform its color space in the preprocessing process. The target detection image obtained after the final preprocessing is the BGR image obtained after the color space transformation.
[0056] In one embodiment, the anomaly detection dimension is divided into several different anomaly types according to its anomaly attributes, namely, image quality anomaly type and image content anomaly type. Image quality anomaly mainly focuses on the visual performance of the image, including clarity, brightness, contrast, color accuracy and noise level, including image blur, brightness abnormality, contrast abnormality, image color cast and noise abnormality. For the image quality anomaly type, it is necessary to detect the target detection image through the first detection algorithm corresponding to the above anomaly detection dimension to obtain the corresponding first detection result. The image content anomaly type focuses on the actual content in the image, including color, signal integrity and whether it is blocked, including black and white images, signal loss and screen occlusion. For the image content anomaly type, it is necessary to detect the target detection image through the second detection algorithm corresponding to the anomaly detection dimension to obtain the second detection result.
[0057] Specifically, image quality anomaly detection needs to be implemented through the following process:
[0058] Through the first detection algorithm corresponding to the image blur, the target detection image is Laplace transformed. The Laplace operator can highlight the edge and detail information in the image, while the edges and details of the blurred image will become relatively smooth. Based on this principle, the Laplace convolution kernel can be applied to transform the target detection image, thereby highlighting the edges and details in the image. The transformed target detection image contains the pixel value of each pixel point, and these transformed pixel values reflect the edge strength of the original target detection image at the pixel point. For the transformed target detection image, the average value and standard deviation between the corresponding pixel values of each pixel point in the target detection image are calculated. The size of the standard deviation can be used as an evaluation standard for image blur. The larger the standard deviation, the more obvious the edges and details in the image to be detected, and the clearer the image; conversely, the smaller the standard deviation, the more blurred the image. Based on this, according to the standard deviation, the image blur score corresponding to the target detection image can be determined, wherein the image blur score can be obtained according to a linear calculation method (for example, calculating the ratio between the standard deviation and a fixed value), or based on a nonlinear function calculation. The specific calculation method can be determined according to the actual calculation accuracy.
[0059] And / or, the target detection image is initialized for brightness through the first detection algorithm corresponding to the brightness anomaly, all pixels in the target detection image are traversed, and the brightness features corresponding to the pixels are calculated. Among them, the brightness features include the brightness value (grayscale value) of the pixel, the brightness mean and the second occurrence frequency (the frequency of each brightness value in the entire target detection image). When calculating the second occurrence frequency, the number of occurrences of each brightness value can be found by constructing a histogram of the brightness value, which is more intuitive and convenient. For each pixel, the difference between its brightness value and the brightness mean is calculated. This difference reflects the degree of deviation of the pixel from the overall brightness. Multiply the brightness difference by the second occurrence frequency of the brightness value in the image to obtain the brightness feature value of the pixel. The brightness feature value takes into account both the degree of brightness deviation and the universality of this deviation in the image. Calculate the mean between the brightness feature values of all pixels, and the mean is the brightness score of the target detection image. The higher the score, the more uneven the brightness distribution in the image may be, or there is a significant brightness anomaly.
[0060] And / or, through the first detection algorithm corresponding to the contrast anomaly, traverse all the pixels in the target detection image, and calculate the pixel deviation value between each pixel and its adjacent pixel. The adjacent pixel here refers to the adjacent row pixel and the adjacent column pixel of the pixel, that is, the pixel in the up, down, left and right directions. After obtaining the pixel deviation value corresponding to each pixel, determine the image contrast corresponding to the target detection image according to the pixel deviation value. Specifically, for each pixel, calculate the square sum of the pixel deviation values between it and all adjacent pixels. The square sum reflects the degree of fluctuation of the pixel values around the pixel, that is, a local measure of contrast. Add the square sum corresponding to each pixel to obtain the corresponding sum result, and the sum result reflects the contrast level in the entire target detection image. Calculate the ratio between the sum result and the number of pixels in the target detection image, and the ratio is the image contrast of the target detection image.
[0061] And / or, by using a first detection algorithm corresponding to the image color cast, the target detection image is subjected to color gamut separation, thereby transforming the target detection image from the BGR space to the Lab space. Since the lightness and color in the color space of the Lab image are separated, the L channel has no color information, and the a channel and the b channel only have color information, which can reflect the color balance of the image. Therefore, after the color gamut separation, it is only necessary to determine whether the target detection image has color cast based on the image information in the separated specified color channels (i.e., the a channel and the b channel).
[0062] Specifically, according to each pixel value in the separated designated color channel, the pixel deviation value of the pixel value relative to the standard pixel value and the histogram feature corresponding to the pixel value are determined. Among them, the standard pixel value refers to the median of the pixel value in the entire target detection image, and the histogram feature represents the quantitative distribution of the pixel value in the target detection image, that is, the number of occurrences of each pixel value in the target detection image. According to the pixel deviation value of each pixel value and its corresponding histogram feature, the color cast abnormality score corresponding to the target detection image can be determined. First, the pixel deviation value and the histogram feature need to be multiplied, and the product operation results obtained for each pixel value in each designated color channel are summed to obtain the corresponding cumulative result. The above operation needs to be performed on the pixel values in each designated color channel, and the cumulative results of each designated color channel are squared and summed, and then the summed results are squared again. The final calculation result is the color cast abnormality score corresponding to the target detection image.
[0063] And / or, by using the first detection algorithm corresponding to the noise anomaly, the target detection image is divided into a number of image blocks, which can be rectangular areas of fixed size or areas of other shapes or sizes, depending on the characteristics of the image and the needs of noise detection. For each image block, the pixel variance in the image block is calculated, and the pixel variance can be obtained by calculating the average of the squares of the differences between all pixel values in the block and the average pixel value of the block. Among the pixel variances of all image blocks, the maximum pixel variance and the minimum pixel variance are found. The ratio between the maximum pixel variance and the minimum pixel variance in the pixel variance is calculated, and the ratio reflects the relative difference in the noise level in the image, that is, the degree of contrast between the noisiest area and the calmest area. Therefore, the ratio can be directly determined as the signal-to-noise ratio corresponding to the target detection image.
[0064] For each anomaly detection dimension, first determine its possible scoring range, which can be a continuous numerical value, such as 0-100. Then, define one or more confidence levels for each scoring range, and according to the correspondence between the preset scoring range and the confidence level, the scores corresponding to the anomaly detection dimensions such as image blur score and / or brightness score and / or image contrast and / or color cast abnormality score and / or signal-to-noise ratio can be mapped to the corresponding confidence level, thereby obtaining the first detection result.
[0065] For image content anomaly detection, the following process is required:
[0066] Since black and white images have the characteristic of high similarity of pixel values in the three BGR channels, it is necessary to focus on comparing the differences between the pixel values of the three color channels and the pixel mean, so as to use this as a standard for determining whether the image is black and white or not. Specifically, through the second detection algorithm corresponding to the black and white image, the pixel values corresponding to each pixel point of each color channel in the target detection image are obtained, the pixel mean of the color channel is calculated according to the pixel value, and the pixel difference between the corresponding pixel value and the pixel mean is calculated for all the pixels in the color channel, so as to obtain the black and white anomaly score corresponding to the target detection image according to the pixel difference. When calculating the black and white anomaly score, it is necessary to add the pixel differences corresponding to all the pixels in each color channel, and divide the result obtained after the addition by the image area (i.e., the number of pixels) of the target detection image. The final ratio is the black and white anomaly score after normalization.
[0067] And / or, by using the second signal loss detection algorithm, the pixel values corresponding to all the pixels in the target detection image are obtained, and the first occurrence frequency of the pixel value is calculated according to the number of pixels corresponding to each pixel value, which can be achieved by drawing a pixel histogram of the target detection image. The target pixel value with the largest first occurrence frequency in the histogram is selected, and the signal loss anomaly score corresponding to the target detection image is determined according to the ratio between the target pixel value and the number of pixels in the target detection image.
[0068] And / or, the target detection image is subjected to edge extraction through a second detection algorithm for screen occlusion to obtain a corresponding edge image. The size of the target detection image is H*W, and the target detection image and the edge image are divided into a number of windows of fixed size according to the size of (H / 4)*(W / 4), and then based on the edge image and the target detection image, the pixel standard deviation between all the pixels contained in the pre-divided windows is calculated respectively, so as to obtain the screen occlusion anomaly score corresponding to the target detection image according to the pixel standard deviation. Specifically, it is determined whether the pixel standard deviation corresponding to the edge image and the target detection image is greater than a preset threshold. It should be noted that the preset thresholds corresponding to the edge image and the target detection image are different. If both are greater than the preset threshold, the window is used as a screen occlusion block in the target detection image. After traversing all windows, the number of screen occlusion blocks is used as the screen occlusion anomaly score corresponding to the target detection image.
[0069] Based on the correspondence between the preset score range and the confidence level, the black and white anomaly score and / or the signal loss anomaly score and / or the screen occlusion anomaly score are mapped to the confidence level of the corresponding anomaly detection dimension, thereby obtaining a second detection result.
[0070] S103: writing the detection result corresponding to each sub-thread into the global buffer pool, and determining the target abnormality type existing in the to-be-detected screen through the detection results in the global buffer pool.
[0071] After each child thread completes the detection task, it writes its detection results to the global cache pool. The global cache pool is a shared data structure used to store the detection results of all child threads. After all child threads complete the detection task and write to the global cache pool, the main program will read all the detection results from the global cache pool and determine the target anomaly type in the image to be detected based on the summarized detection results.
[0072] The above are embodiments of the method proposed in this application. Based on the same idea, some embodiments of this application also provide devices and non-volatile computer storage media corresponding to the above methods.
[0073] Figure 2 The structure diagram of a video picture quality detection device provided in the embodiment of the present application is shown in FIG. Figure 2 As shown, including:
[0074] at least one processor; and,
[0075] at least one processor is communicatively connected to a memory; wherein,
[0076] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute a video picture quality detection method as described in any one of the above items.
[0077] The embodiment of the present application provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0078] A video picture quality detection method as described in any one of the above items.
[0079] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0080] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0081] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0082] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0083] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0085] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0086] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0087] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0088] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0089] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A video picture quality detection method, characterized in that: The method comprises: Collect a single frame of the to-be-detected picture in the video stream, call the main program to identify the to-be-detected picture, and determine the abnormality detection dimension corresponding to the to-be-detected picture; Calling a subthread matching the anomaly detection dimension to preprocess the image to be detected to obtain a target detection image, and performing anomaly detection on the target detection image using a detection algorithm corresponding to the anomaly detection dimension to obtain detection results corresponding to the target detection image in each anomaly detection dimension; The detection result corresponding to each sub-thread is written into the global cache pool, and the target abnormality type existing in the to-be-detected picture is determined through the detection result in the global cache pool.
2. A video picture quality detection method according to claim 1, characterized in that: The method of performing anomaly detection on the target detection image by using the detection algorithm corresponding to the anomaly detection dimension to obtain the detection result corresponding to each detection dimension of the target detection image specifically includes: According to the abnormal attributes corresponding to the abnormality detection dimension, the abnormality detection dimension is divided into several abnormality types; wherein the abnormality type includes an image quality abnormality type and an image content abnormality type; In the case where the abnormality type corresponding to the abnormality detection dimension is the image quality abnormality type, image quality detection is performed on the target detection image by using a first detection algorithm corresponding to the abnormality detection dimension to obtain a first detection result; wherein the image quality abnormality type includes image blur, brightness abnormality, contrast abnormality, image color cast and noise abnormality; When the abnormality type corresponding to the abnormality detection dimension is the image content abnormality type, image content detection is performed on the target detection image by using a second detection algorithm corresponding to the abnormality detection dimension to obtain a second detection result; wherein, the image content abnormality types include black and white images, signal loss and screen occlusion.
3. A video picture quality detection method according to claim 2, characterized in that: Performing image quality detection on the target detection image by using a first detection algorithm corresponding to the abnormality detection dimension to obtain a first detection result specifically includes: Performing a Laplace transform on the target detection image by using the first detection algorithm corresponding to the image blur, calculating the average value and standard deviation between the pixel values corresponding to each pixel point in the target detection image after the transform, and determining the image blur score corresponding to the target detection image according to the standard deviation; And / or, initializing the brightness of the target detection image by using a first detection algorithm corresponding to the brightness anomaly, traversing all pixels in the target detection image, calculating the brightness features corresponding to the pixels, and determining the brightness score corresponding to the target detection image according to the brightness features; And / or, using a first detection algorithm corresponding to the contrast anomaly, traversing all pixels in the target detection image, calculating a pixel deviation value between each pixel and its adjacent pixel, and determining an image contrast corresponding to the target detection image based on the pixel deviation value; And / or, performing color gamut separation on the target detection image by using a first detection algorithm corresponding to the image color cast, calculating a pixel deviation value corresponding to the target detection image according to pixel values in the separated specified color channel, and determining a color cast anomaly score corresponding to the target detection image according to the pixel deviation value; And / or, dividing the target detection image into a plurality of image blocks by using a first detection algorithm corresponding to the noise anomaly, calculating pixel variances in the image blocks, and determining a signal-to-noise ratio corresponding to the target detection image based on a ratio between a maximum pixel variance and a minimum pixel variance in the pixel variances; The image blur score and / or the brightness score and / or the image contrast and / or the color cast abnormality score and / or the signal-to-noise ratio are mapped to the confidence of the corresponding abnormality detection dimension to obtain a first detection result.
4. A video picture quality detection method according to claim 2, characterized in that: Performing image content detection on the target detection image by using a second detection algorithm corresponding to the anomaly detection dimension to obtain a second detection result specifically includes: Obtaining pixel values corresponding to each pixel point of each color channel in the target detection image by using a second detection algorithm corresponding to the black-and-white image, calculating a pixel mean value of the color channel according to the pixel values, and calculating a pixel difference between the corresponding pixel value and the pixel mean value for all pixel points in the color channel, so as to obtain a black-and-white anomaly score corresponding to the target detection image according to the pixel difference value; And / or, by using the second signal loss detection algorithm, pixel values corresponding to all pixels in the target detection image are obtained, and according to the number of pixels corresponding to each pixel value, a first occurrence frequency of the pixel value is calculated, and the target pixel value with the largest first occurrence frequency is selected, and according to the ratio between the target pixel value and the number of pixels in the target detection image, a signal loss anomaly score corresponding to the target detection image is determined; And / or, performing edge extraction on the target detection image through the second detection algorithm for screen occlusion to obtain a corresponding edge image, and calculating pixel standard deviations between all pixel points contained in a pre-divided window based on the edge image and the target detection image, so as to obtain a screen occlusion anomaly score corresponding to the target detection image based on the pixel standard deviation; The black-and-white anomaly score and / or the signal loss anomaly score and / or the screen occlusion anomaly score are mapped to confidences of corresponding anomaly detection dimensions to obtain a second detection result.
5. A video picture quality detection method according to claim 3, characterized in that: Calculating the brightness feature corresponding to the pixel point to determine the brightness score corresponding to the target detection image according to the brightness feature, specifically including: The brightness feature includes the brightness value, the brightness mean and the second occurrence frequency of the pixel point; Obtaining a brightness value and a brightness mean corresponding to the pixel point, and determining a second occurrence frequency of each brightness value in the target detection image; For each pixel, calculate a brightness difference between the brightness value of the pixel and the brightness mean, and multiply the brightness difference by its corresponding second occurrence frequency to obtain a corresponding brightness characteristic value; The mean value of the brightness characteristic values corresponding to all pixels is calculated, and the mean value is used as the brightness score corresponding to the target detection image.
6. A video picture quality detection method according to claim 3, characterized in that: Determining the image contrast corresponding to the target detection image according to the pixel deviation value specifically includes: For each pixel point, calculating the sum of squares of pixel deviation values corresponding to the pixel point; The square sums corresponding to each pixel are added to obtain a corresponding sum result, and the image contrast corresponding to the target detection image is determined according to the ratio between the sum result and the number of pixels in the target detection image.
7. A video picture quality detection method according to claim 3, characterized in that: Calculating a pixel deviation value corresponding to the target detection image according to the pixel value in the separated designated color channel, and determining a color cast anomaly score corresponding to the target detection image according to the pixel deviation value, specifically including: For each pixel value in the separated designated color channel, determine a pixel deviation value of the pixel value relative to a standard pixel value, and a histogram feature corresponding to the pixel value; wherein the histogram feature represents the quantity distribution of the pixel value in the target detection image; A color cast anomaly score corresponding to the target detection image is determined according to the pixel deviation value and the histogram feature.
8. A video picture quality detection method according to claim 4, characterized in that: According to the pixel standard deviation, the screen occlusion anomaly score corresponding to the target detection image is obtained, specifically including: Determine whether the pixel standard deviations respectively corresponding to the edge image and the target detection image are greater than a preset threshold; If so, the window is used as a screen occlusion block in the target detection image until all windows are traversed, and the number of the screen occlusion blocks is used as the screen occlusion anomaly score corresponding to the target detection image.
9. A video picture quality detection device, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a video picture quality detection method as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to: A video picture quality detection method as described in any one of claims 1 to 8.