A method, device and storage medium for detecting a flower screen

By segmenting and linear analysis of video images, combined with Hoffmann detection method, the problem of low accuracy of flower screen detection in the prior art is solved, and more efficient flower screen detection is achieved.

CN114998240BActive Publication Date: 2025-07-04SHENZHEN ZHENYOU SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210583599.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2025-07-04
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

In the prior art, the accuracy of the screen detection method is low, and it is impossible to accurately detect whether there is a screen detection problem with the camera shooting function.

Method used

By performing segmentation processing on the video image to be detected, a first pixel point in the target column pixel of the image block that meets the preset color parameter conditions, a first straight line is formed based on these pixel points, and a flower screen detection is performed according to the number of pixel points contained in the first straight line, and a secondary detection is performed in conjunction with the Hoffmann straight line detection method.

Benefits of technology

It improves the accuracy and efficiency of screen detection, and can accurately identify screen problems under complex conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114998240B_ABST
    Figure CN114998240B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention discloses a method, device, and storage medium for detecting a flower screen. Among them, the method includes: performing segmentation processing on a video image to be detected to obtain a plurality of image blocks; determining first pixel points that meet a preset color parameter condition among the target column pixels of each of the image blocks; obtaining a first straight line corresponding to each target column pixel based on each of the first pixel points in each of the target column pixels; the first straight line includes a plurality of consecutive first pixel points; determining a target first straight line based on each of the first straight lines and the number of first pixel points included in each of the first straight lines; performing flower screen detection based on the number of the target first straight lines to obtain a detection result. The method in this embodiment can accurately perform flower screen detection and improve the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multimedia data detection, and particularly to a method, device and storage medium for detecting a screen freeze. Background Art

[0002] With the development of smart city services, it has become increasingly popular to use cameras to shoot videos for monitoring. The detection of abnormal camera operation has also become crucial, especially the detection of screen freeze. By detecting screen freeze, cameras with abnormal operation can be discovered in a timely manner, thus providing a guarantee for obtaining clear video images. However, existing screen freeze detection methods have a low accuracy rate and cannot accurately detect cameras with abnormal working states.

[0003] Therefore, there is an urgent need for a screen freeze detection method to solve the problem in the prior art that it is impossible to accurately detect whether there is a screen freeze in the camera shooting function. Summary of the Invention

[0004] In view of this, the present invention provides a method, device and storage medium for detecting a screen freeze, which are used to solve the problem of inaccurate detection results in the prior art. To achieve one or part or all of the above purposes or other purposes, the present invention proposes a method for detecting a screen freeze, including:

[0005] Performing segmentation processing on a video image to be detected to obtain a plurality of image blocks;

[0006] Determining first pixel points that meet a preset color parameter condition in the target column pixels of each of the image blocks;

[0007] Based on each of the first pixel points in each of the target column pixels, obtaining a first straight line corresponding to each target column pixel; the first straight line includes a plurality of consecutive first pixel points;

[0008] Based on each of the first straight lines and the number of first pixel points included in each of the first straight lines, determining a target first straight line;

[0009] Performing screen freeze detection based on the number of the target first straight lines to obtain a detection result.

[0010] Optionally, the determining first pixel points that meet a preset color parameter condition in the target column pixels of each of the image blocks specifically includes:

[0011] Obtaining the HSV color parameter values of each pixel point in each of the target column pixels;

[0012] Based on the HSV color parameter values of each pixel point in each of the target column pixels, calculating the average HSV color parameter corresponding to each of the target column pixels;

[0013] Calculate the color parameter difference corresponding to each pixel point based on the HSV color parameter values of each pixel point and the average HSV color parameter of the pixels in the target column where each pixel point is located;

[0014] Compare the color parameter difference of each pixel point with a preset color parameter threshold, and determine that the pixel point with a color parameter difference less than the color parameter threshold is the first pixel point.

[0015] Optionally, the determining the first straight line corresponding to each target column pixel based on each first pixel point in each of the target column pixels specifically includes:

[0016] Draw a number of pixel point straight lines corresponding to the target column pixels based on each first pixel point in each of the target column pixels;

[0017] Select the straight line with the longest length among each of the pixel point straight lines as the first straight line.

[0018] Optionally, the determining the target first straight line based on each of the first straight lines and the number of first pixel points included in each of the first straight lines specifically includes:

[0019] Determine the proportion of the first pixel points corresponding to the first straight line based on the number of first pixel points in the first straight line and the total number of pixel points in the target column pixels where the first straight line is located;

[0020] Compare each of the proportions of the first pixel points with a predetermined proportion threshold, and when it is determined that the proportion of the first pixel points is greater than the predetermined proportion threshold, determine the first straight line corresponding to the proportion of the first pixel points as the target first straight line.

[0021] Optionally, the performing a screen flickering detection based on the number of the target first straight lines to obtain a detection result specifically includes:

[0022] Compare the number of the target first straight lines with a first predetermined number;

[0023] When it is determined that the number of the target first straight lines is less than or equal to the first predetermined number, determine that the video image to be detected is a non-screen flickering image;

[0024] When it is determined that the number of the target first straight lines is greater than the first predetermined number, perform a detection using the Hough line detection method on the video frame image to be detected to obtain a number of second straight lines, and perform a screen flickering detection based on each of the second straight lines to obtain the detection result.

[0025] Optionally, before performing a detection using the Hough line detection method on the video frame image to be detected to obtain a number of second straight lines, the method further includes:

[0026] Divide the video image to be detected to obtain a number of first images;

[0027] Perform image conversion on each of the first images to obtain a converted first grayscale image;

[0028] Delete the black holes in the white areas of the converted first grayscale image to obtain a second image for performing the Huffman line detection.

[0029] Optionally, before performing image conversion on each of the first images, the method further includes:

[0030] Calculate a first standard deviation corresponding to the first image based on the pixel values of each pixel point in the first image;

[0031] Compare the first standard deviation of each first image with a predetermined standard deviation; in the case where it is determined that the first standard deviation is less than the predetermined standard deviation, perform histogram equalization processing on the first image corresponding to the first standard deviation to obtain a processed first image for performing image conversion.

[0032] Optionally, the performing the screen freeze detection based on each of the second lines to obtain the detection result specifically includes:

[0033] Filter each of the second lines based on a preset filtering condition to obtain a number of target second lines;

[0034] Compare the number of the target second lines with a second predetermined number;

[0035] In the case where it is determined that the number of the target second lines is less than or equal to the second predetermined number, determine that the video image to be detected is a non-screen freeze image;

[0036] In the case where it is determined that the number of the target second lines is greater than the second predetermined number, determine that the video image to be detected is a screen freeze image.

[0037] To solve the above problems, the present application provides a screen freeze detection device, including:

[0038] A segmentation module, configured to perform segmentation processing on a video image to be detected to obtain a number of image blocks;

[0039] A first determination module, configured to determine first pixel points in the target column pixels of each of the image blocks that satisfy a preset color parameter condition;

[0040] An obtaining module, configured to obtain a first line corresponding to each target column pixel based on each of the first pixel points in each of the target column pixels; the first line includes a number of consecutive first pixel points;

[0041] A second determination module, configured to determine a target first straight line based on each of the first straight lines and the number of first pixel points included in each of the first straight lines;

[0042] A detection module, configured to perform a screen color distortion detection based on the number of the target first straight lines to obtain a detection result.

[0043] To solve the above problems, the present application provides a storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the screen color distortion detection method described in any one of the above are implemented.

[0044] Implementing the embodiments of the present invention will have the following beneficial effects:

[0045] By determining, from each pixel point of the target column pixels in each image block, a first pixel point that satisfies a preset color parameter condition, that is, determining a first pixel point with a relatively large color parameter difference, then connecting the consecutive first pixel points with a relatively large color difference into a straight line, and selecting the longest straight line in each image block as the first straight line, screening to obtain a target straight line based on the number of pixel points included in the first straight line, that is, screening out a target straight line with more pixel points than a predetermined number from the longest straight lines of each image block, and finally determining whether there is a screen color distortion according to the number of target straight lines, that is, there is a screen color distortion problem when the number of target straight lines is greater than a predetermined value. Thus, the detection result can be made more accurate and the detection efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.

[0047] Among them:

[0048] Figure 1 is a flowchart of a screen color distortion detection method in an embodiment;

[0049] Figure 2 is a flowchart of a screen color distortion detection method in another embodiment of the present application;

[0050] Figure 3 is a structural block diagram of a screen color distortion detection device in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0051] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0052] This embodiment provides a method for detecting a flower screen. The method for detecting a flower screen in this embodiment can be specifically applied to electronic devices such as terminals and servers. As Figure 1 shown, the method in this embodiment includes the following steps:

[0053] Step S101, perform segmentation processing on the video image to be detected to obtain a plurality of image blocks;

[0054] In the specific implementation process of this step, the video image to be detected can be specifically segmented into 20 image blocks. The specific number of image blocks can also be adjusted according to actual needs.

[0055] Step S102, determine the first pixel points that meet the preset color parameter conditions among the target column pixels of each of the image blocks;

[0056] In this step, the target column pixels can be specifically selected according to actual needs. For example, a column in the middle sequence of the image block is selected as the target column pixel. In the specific implementation process of this step, the preset color parameter condition can be specifically: the difference between the HSV color parameter value of the pixel point and the HSV color average value is less than a predetermined color parameter threshold.

[0057] Step S103, based on each of the first pixel points in each of the target column pixels, obtain a first straight line corresponding to each target column pixel; the first straight line includes a plurality of consecutive first pixel points;

[0058] In the specific implementation process of this step, the consecutive first pixel points can be specifically connected into a straight line, and then the longest straight line is selected as the first straight line.

[0059] Step S104, determine the target first straight line based on each of the first straight lines and the number of first pixel points included in each of the first straight lines;

[0060] In the specific implementation of this step, specifically, the proportion of the first pixel points can be determined according to the number of the first pixel points in the first straight line and the total number of pixel points in the target column pixels, and then the straight lines with a proportion greater than a predetermined proportion threshold are screened out based on the proportion of the first pixel points as the target first straight lines. For example, if the proportion of the first pixel points in the first straight line is greater than 1 / 11, then this first straight line can be determined as the target first straight line. This lays a foundation for accurately detecting the screen freeze problem based on the number of the target first straight lines in the subsequent process.

[0061] Step S105: Perform screen freeze detection based on the number of the target first straight lines to obtain a detection result.

[0062] In the method of this embodiment, by determining the first pixel points that meet the preset color parameter conditions from each pixel point of the target column pixels in each image block, that is, determining the first pixel points with relatively large color parameter differences, then connecting the consecutive first pixel points with relatively large color differences into a straight line, and selecting the longest straight line in each image block as the first straight line, screening out the target straight lines with pixel points greater than a predetermined number based on the number of pixel points included in the first straight line, that is, screening out the target straight lines with pixel points greater than a predetermined number from the longest straight lines of each image block, and finally determining whether there is a screen freeze according to the number of the target straight lines, that is, there is a screen freeze problem when the number of the target straight lines is greater than a predetermined value. Thus, the detection result can be made more accurate and the detection efficiency can be improved.

[0063] Another embodiment of the present application provides a method for detecting screen freeze, including the following steps:

[0064] Step S201: Obtain a video image to be detected;

[0065] In the implementation of this step, specifically, an image with a pixel of 1920×1080 can be obtained as the video image to be detected.

[0066] Step S202: Perform segmentation processing on the video image to be detected to obtain a plurality of image blocks;

[0067] Step S203: Obtain the HSV color parameter values of each pixel point in the target column pixels of each of the image blocks;

[0068] Step S204: Calculate the average HSV color parameter corresponding to each of the target column pixels based on the HSV color parameter values of each pixel point in the target column pixels;

[0069] Step S205: Calculate the color parameter difference corresponding to each pixel point based on the HSV color parameter value of each pixel point and the average HSV color parameter of the target column pixel where each pixel point is located;

[0070] Step S206: Compare the color parameter differences of each pixel with a preset color parameter threshold, and determine that the pixels with color parameter differences less than the color parameter threshold are the first pixels;

[0071] Step S207: Based on each of the first pixels in each of the target column pixels, draw a number of pixel lines corresponding to the target column pixels; select the line with the longest length among each of the pixel lines as the first line;

[0072] Step S208: Based on the number of first pixels in the first line and the total number of pixels in the target column pixels where the first line is located, determine the proportion of the first pixels corresponding to the first line; compare each of the first pixel proportions with a predetermined proportion threshold, and when it is determined that the first pixel proportion is greater than the predetermined proportion threshold, determine the first line corresponding to the first pixel proportion as the target first line;

[0073] Step S209: Compare the number of the target first lines with a first predetermined number; when it is determined that the number of the target first lines is less than or equal to the first predetermined number, execute Step S210; when it is determined that the number of the target first lines is greater than the first predetermined number, execute Step S211;

[0074] Step S210: Determine that the video image to be tested is a non - distorted image;

[0075] Step S211: Divide the video image to be detected to obtain a number of first images; perform image conversion on each of the first images respectively to obtain the converted first grayscale images; delete the black holes in the white areas of the converted first grayscale images to obtain second images for performing the Hough line detection; perform detection on each of the second images respectively using the Hough line detection method to obtain the number of second lines.

[0076] In the specific implementation process of this step, before performing image conversion on each of the first images respectively, it further includes: calculating a first standard deviation corresponding to the first image based on the pixel values of each pixel in the first image; comparing the first standard deviation of each first image with a predetermined standard deviation; when it is determined that the first standard deviation is less than the predetermined standard deviation, perform histogram equalization processing on the first image corresponding to the first standard deviation to obtain a processed first image for performing image conversion.

[0077] Step S212: Screen each of the second lines based on a preset screening condition to obtain a number of target second lines;

[0078] Step S213: Compare the number of the target second straight lines with a second predetermined number; in the case where it is determined that the number of the target second straight lines is less than or equal to the second predetermined number, execute Step S210; in the case where it is determined that the number of the target second straight lines is greater than the second predetermined number, execute Step S214;

[0079] Step S214: Determine that the video image to be detected is a mosaic image.

[0080] In the mosaic detection method of this embodiment, in the case where it is determined that the number of the target first straight lines is greater than the first predetermined number, the second detection is performed on the image to be detected by using the Hough straight line detection to obtain a plurality of second straight lines, and then the determination of the mosaic is further performed based on the second straight lines, so that the final detection result can be more accurate and the accuracy of the detection result can be improved.

[0081] On the basis of the above embodiment, another embodiment of the present application provides a mosaic detection method, as Figure 2 shown including:

[0082] Step 1: Read the picture into the memory and determine whether the reading is successful; in the case of successful reading, obtain the video image to be detected;

[0083] Step 2: Divide the video image to be detected into 20 blocks to obtain 20 image blocks; then perform the following operations on the 20 image blocks respectively;

[0084] (a) Select an unprocessed image block; in this block, select the middle vertical column of pixels as the target column pixels, and calculate the average HSV of all pixel points in this column, HSV.

[0085] (b) Calculate the absolute value of the difference between each pixel in the target column pixels and the average value HSV, compare the color parameter differences of each pixel point with a preset color parameter threshold of 58; determine the pixel points with an absolute value less than 58 as the first pixel points; connect the determined first pixel points into a straight line, calculate the length of this straight line, and select the longest one as the first straight line.

[0086] (c) Based on the number of the first pixel points in the first straight line and the total number of pixel points in the target column pixels where the first straight line is located, determine the proportion of the first pixel points corresponding to the first straight line; compare each of the first pixel point proportions with a predetermined proportion threshold, and in the case where it is determined that the first pixel point proportion is greater than the predetermined proportion threshold, determine the first straight line corresponding to the first pixel point proportion as the target first straight line.

[0087] In this step, the predetermined ratio threshold can specifically be 1 / 11, or it can be adjusted according to actual needs. That is, when it is determined that the number of first pixel points in the first straight line is greater than 1 / 11 of the total number of all pixel points in this column, then this first straight line is determined as the target first straight line, and then the total count for counting is incremented by 1.

[0088] Step 3: After separately performing the above steps (a) - (c) in Step 2 on 20 image blocks, determine the number of target first straight lines, that is, determine the total count, and then compare this total count with the first predetermined number 4; if it is greater than 4, then perform Step 4; if it is less than or equal to 4, then determine that the video image to be detected is a non - flower - screen image.

[0089] Step 4: Divide the video image to be detected into left and right parts to obtain two first images; respectively calculate the first standard deviation corresponding to the first image based on the pixel values of each pixel point in the first image; compare the first standard deviation of each first image with the predetermined standard deviation 92; in the case where it is determined that the first standard deviation is less than the predetermined standard deviation, perform histogram equalization processing on the first image corresponding to the first standard deviation to obtain the processed first image for image conversion;

[0090] In this step, by comparing the first image with the predetermined standard deviation 92, it is possible to accurately determine the images that need to be subjected to histogram equalization processing, laying a foundation for accurate image conversion in the subsequent steps. That is, if the standard deviations of both images are greater than 92, then no histogram equalization operation is performed; conversely, if both are less than 92, then histogram equalization processing is performed on both. In this step, the cv::equalizeHist function in opencv can specifically be used to perform histogram equalization processing.

[0091] Step 5: Perform the following operations on the above two first images in sequence:

[0092] (a) Perform image conversion on the first image to obtain the converted first grayscale image;

[0093] In the specific implementation process of this step, the cv::cvtColor function in the opencv library can specifically be used to convert the color image to a grayscale image (all functions starting with cv below are opencv library functions).

[0094] (b) Delete the black holes within the white area in the converted first grayscale image to obtain a second image;

[0095] In the specific implementation of this step, first, the cv::getStructuringElement function of the opencv library can be used to create a kernel (the kernel can also be understood as a structuring element), and then the cv::morphologyEx function of the opencv library is used for morphological closing operation to delete the small black holes in the closed white areas in the first grayscale image.

[0096] (c) Perform binarization processing on the second image to obtain the binarized second image;

[0097] In this step, specifically, the image processed in step (b) can be binarized using the cv::threshold function of the opencv library to obtain the binarized second image.

[0098] (d) Perform edge detection processing on the binarized second image to obtain the edge-detected second image;

[0099] In this step, specifically, the image processed in step (c) can be edge-detected using the cv::Canny function of the opencv library to obtain the edge-detected second image.

[0100] (e) Detect using the Hough line detection method based on the edge-detected second image to obtain a number of second lines;

[0101] In this step, specifically, the image processed in step (d) can be line-detected using the cv::HoughLinesP Hough line detection function of the opencv library to obtain a number of second lines.

[0102] Step Six: Calculate the number of target second lines that meet the preset screening conditions, and compare the number of the target second lines with the second predetermined number 23; when it is determined that the number of the target second lines is less than or equal to 23, determine that the video image to be tested is a non-screen-flickering image;

[0103] When it is determined that the number of the target second lines is greater than 23, determine that the video image to be tested is a screen-flickering image.

[0104] In the specific implementation of this step, the preset screening conditions include the following two conditions:

[0105] *) The line is perpendicular to the horizontal plane.

[0106] *) The line length is greater than three-tenths of the image width;

[0107] That is, when the second straight line meets the above screening conditions, the second straight line is determined as the target second straight line, and then it is further determined whether the number of target second straight lines is greater than 23. If it is greater than 23, it is determined that the video image to be detected is a mosaic screen.

[0108] The mosaic screen detection method in this embodiment can complete the detection under adverse conditions such as inconsistent image sizes, inconsistent image types, and inconsistent image contents. And through two detections, that is, first perform mosaic screen detection based on the first straight line, and then further combine the Huffman straight line detection method to detect and obtain the second straight line, and then perform secondary detection based on the second straight line. Thus, the final detection result can be made more accurate and reliable, and the detection efficiency is high and the speed is fast.

[0109] Another embodiment of this application provides a mosaic screen detection device, as Figure 3 shown, including:

[0110] The segmentation module 1 is used to perform segmentation processing on the video image to be detected to obtain a plurality of image blocks;

[0111] The first determination module 2 is used to determine the first pixel points that meet the preset color parameter conditions among the target column pixels of each of the image blocks;

[0112] The obtaining module 3 is used to obtain a first straight line corresponding to each target column pixel based on each of the first pixel points in each of the target column pixels; the first straight line includes a plurality of consecutive first pixel points;

[0113] The second determination module 4 is used to determine the target first straight line based on each of the first straight lines and the number of first pixel points included in each of the first straight lines;

[0114] The detection module 5 is used to perform mosaic screen detection based on the number of the target first straight lines to obtain a detection result.

[0115] In the specific implementation process of this example, the first determination module is specifically used for: obtaining the HSV color parameter values of each pixel point in each of the target column pixels; calculating the average HSV color parameter value corresponding to each of the target column pixels based on the HSV color parameter values of each pixel point in each of the target column pixels; calculating the color parameter difference corresponding to each pixel point based on the HSV color parameter value of each pixel point and the average HSV color parameter value of the target column pixel where each pixel point is located; comparing the color parameter difference of each pixel point with a preset color parameter threshold, and determining the pixel points with the color parameter difference less than the color parameter threshold as the first pixel points.

[0116] In the specific implementation process of this example, the obtaining module is specifically configured to: draw and obtain a plurality of pixel point straight lines corresponding to the target column pixels based on each of the first pixel points in each of the target column pixels; select the straight line with the longest length among each of the pixel point straight lines as the first straight line.

[0117] In the specific implementation process of this embodiment, the second determination module is configured to: determine the proportion of the first pixel points corresponding to the first straight line based on the number of the first pixel points in the first straight line and the total number of pixel points in the target column pixel where the first straight line is located; compare each of the proportions of the first pixel points with a predetermined proportion threshold, and in the case of determining that the proportion of the first pixel points is greater than the predetermined proportion threshold, determine the first straight line corresponding to the proportion of the first pixel points as the target first straight line.

[0118] In the specific implementation process of this embodiment, the screen freeze detection device further includes a straight line detection module; the detection module is configured to: compare the number of the target first straight lines with a first predetermined number; in the case of determining that the number of the target first straight lines is less than or equal to the first predetermined number, determine that the video image to be detected is a non-screen freeze image; the straight line detection module is configured to: in the case of determining that the number of the target first straight lines is greater than the first predetermined number, perform detection using the Huffman straight line detection method based on the video frame image to be detected, and obtain a plurality of second straight lines; the detection module is further configured to: perform screen freeze detection based on each of the second straight lines to obtain a detection result.

[0119] In the specific implementation process of this embodiment, the screen freeze detection device further includes a division module, an image conversion module, and a deletion module; the division module is configured to: divide the video image to be detected to obtain a plurality of first images before performing detection using the Huffman straight line detection method based on the video frame image to be detected to obtain a plurality of second straight lines; the image conversion module is configured to perform image conversion on each of the first images respectively to obtain a converted first grayscale image; the deletion module is configured to perform deletion processing on the black holes in the white areas of the converted first grayscale image to obtain a second image for performing Huffman straight line detection.

[0120] In the specific implementation process of this embodiment, the screen freeze detection device further includes a comparison module and a processing module, the comparison module is configured to: calculate a first standard deviation corresponding to the first image based on the pixel values of each pixel point in the first image before performing image conversion on each of the first images respectively; compare the first standard deviation of each first image with a predetermined standard deviation; the processing module is configured to: in the case of determining that the first standard deviation is less than the predetermined standard deviation, perform histogram equalization processing on the first image corresponding to the first standard deviation to obtain a processed first image for performing image conversion.

[0121] In the specific implementation process of this embodiment, the detection module is specifically configured to: screen each of the second straight lines based on a preset screening condition to obtain a number of target second straight lines; compare the number of the target second straight lines with a second predetermined number; when it is determined that the number of the target second straight lines is less than or equal to the second predetermined number, determine that the video image to be detected is a non-snowy image; when it is determined that the number of the target second straight lines is greater than the second predetermined number, determine that the video image to be detected is a snowy image.

[0122] In the device of this embodiment, by determining, from each pixel point of the target column pixels in each image block, a first pixel point that satisfies a preset color parameter condition, that is, determining a first pixel point with a relatively large color parameter difference, then connecting the continuous first pixel points with a relatively large color difference into a straight line, and selecting the longest straight line in each image block as the first straight line, screening and obtaining a target straight line based on the number of pixel points included in the first straight line, that is, screening out a target straight line with a number of pixel points greater than a predetermined number from the longest straight lines of each image block, and finally determining whether there is a snowy screen according to the number of target straight lines, that is, when the number of target straight lines is greater than a predetermined value, there is a snowy screen problem, thereby enabling the detection result to be more accurate and improving the detection efficiency.

[0123] Another embodiment of the present application provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:

[0124] Step 1: Perform segmentation processing on the video image to be detected to obtain a number of image blocks;

[0125] Step 2: Determine a first pixel point that satisfies a preset color parameter condition among the target column pixels of each of the image blocks;

[0126] Step 3: Based on each of the first pixel points in each of the target column pixels, obtain a first straight line corresponding to each target column pixel; the first straight line includes a number of continuous first pixel points;

[0127] Step 4: Based on each of the first straight lines and the number of first pixel points included in each of the first straight lines, determine a target first straight line;

[0128] Step 5: Perform snowy screen detection based on the number of the target first straight lines to obtain a detection result.

[0129] For the specific implementation process of the above method steps, reference can be made to the embodiments of any of the above snowy screen detection methods, and this embodiment will not be repeated here.

[0130] In this embodiment, the storage medium determines the first pixel points that meet the preset color parameter conditions from each pixel point of the target column pixels in each image block, that is, determines the first pixel points with relatively large color parameter differences. Then, the continuous first pixel points with relatively large color differences are connected into a straight line, and the longest straight line in each image block is selected as the first straight line. The target straight line is obtained by screening based on the number of pixel points included in the first straight line, that is, the target straight line with the number of pixel points greater than a predetermined number is screened out from the longest straight lines of each image block. Finally, whether there is a screen freeze is determined according to the number of target straight lines, that is, there is a screen freeze problem when the number of target straight lines is greater than a predetermined value. This can make the detection result more accurate and improve the detection efficiency.

[0131] The above-disclosed are only the preferred embodiments of the present invention. Of course, the scope of the rights of the present invention cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope covered by the present invention.

Claims

1. A method for detecting a screen with color distortion, characterized in that, Including: Segment the video image to be detected to obtain a number of image blocks; Obtain the HSV color parameter values of each pixel point in the target column pixels of each of the image blocks; Based on the HSV color parameter values of each pixel point in each of the target column pixels, calculate the average HSV color parameter corresponding to each of the target column pixels; based on the HSV color parameter values of each pixel point and the average HSV color parameter of the target column pixel where each pixel point is located, calculate the color parameter difference corresponding to each pixel point; compare the color parameter difference of each pixel point with a preset color parameter threshold, and determine that the pixel point with a color parameter difference less than the color parameter threshold is the first pixel point; Based on each of the first pixel points in the target column pixels, draw a number of pixel point lines corresponding to the target column pixels; select the line with the longest length among each of the pixel point lines as the first line; the first line contains a number of consecutive first pixel points; Based on the number of first pixel points in the first line and the total number of pixel points in the target column pixel where the first line is located, determine the proportion of the first pixel points corresponding to the first line; Compare each first pixel point proportion with a predetermined proportion threshold, and in the case where it is determined that the first pixel point proportion is greater than the predetermined proportion threshold, determine the first line corresponding to the first pixel point proportion as the target first line; Compare the number of the target first lines with a first predetermined number; in the case where it is determined that the number of the target first lines is greater than the first predetermined number, perform detection on the video frame image to be detected using the Hough line detection method to obtain a number of second lines; screen each of the second lines based on a preset screening condition to obtain a number of target second lines; compare the number of the target second lines with a second predetermined number; in the case where it is determined that the number of the target second lines is less than or equal to the second predetermined number, determine that the video image to be detected is a non - mosaic image; in the case where it is determined that the number of the target second lines is greater than the second predetermined number, determine that the video image to be detected is a mosaic image, and the preset screening condition includes the following two conditions: the line is perpendicular to the horizontal plane; the line length is greater than three - tenths of the image width.

2. The method according to claim 1, wherein The method further includes: In the case where it is determined that the number of the target first lines is less than or equal to the first predetermined number, determine that the video image to be detected is a non - mosaic image.

3. The method according to claim 2, wherein Before performing detection on the video frame image to be detected using the Hough line detection method to obtain a number of second lines, the method further includes: Divide the video image to be detected to obtain a number of first images; Perform image conversion on each of the first images respectively to obtain the converted first grayscale image; Delete the black holes in the white area of the converted first grayscale image to obtain a second image for performing Hough line detection.

4. The method according to claim 3, wherein Before performing image conversion on each of the first images respectively, the method further includes: Based on the pixel values of each pixel point in the first image, calculate the first standard deviation corresponding to the first image; Compare the first standard deviation of each first image with a predetermined standard deviation; when it is determined that the first standard deviation is less than the predetermined standard deviation, perform histogram equalization processing on the first image corresponding to the first standard deviation to obtain a processed first image for image conversion.

5. A screen distortion detection device, characterized in that, Comprising: A segmentation module for performing segmentation processing on a video image to be detected to obtain a plurality of image blocks; A first determination module for obtaining the HSV color parameter values of each pixel point in the target column pixels of each of the image blocks; calculating the average HSV color parameter corresponding to each of the target column pixels based on the HSV color parameter values of each pixel point in each of the target column pixels; calculating a color parameter difference corresponding to each pixel point based on the HSV color parameter value of each pixel point and the average HSV color parameter of the target column pixel where each pixel point is located; comparing the color parameter difference of each pixel point with a preset color parameter threshold, and determining that the pixel point with a color parameter difference less than the color parameter threshold is a first pixel point; An obtaining module for drawing a plurality of pixel point lines corresponding to the target column pixels based on each of the first pixel points in the target column pixels; selecting the line with the longest length among each of the pixel point lines as a first line; the first line includes a plurality of consecutive first pixel points; A second determination module for determining the proportion of the first pixel points corresponding to the first line based on the number of first pixel points in the first line and the total number of pixel points in the target column pixel where the first line is located; Compare each first pixel point proportion with a predetermined proportion threshold, and when it is determined that the first pixel point proportion is greater than the predetermined proportion threshold, determine the first line corresponding to the first pixel point proportion as the target first line; A detection module for comparing the number of the target first lines with a first predetermined number; when it is determined that the number of the target first lines is greater than the first predetermined number, perform detection using the Hough line detection method based on the video frame image to be detected to obtain a plurality of second lines; screening each of the second lines based on a preset screening condition to obtain a plurality of target second lines; comparing the number of the target second lines with a second predetermined number; when it is determined that the number of the target second lines is less than or equal to the second predetermined number, determine that the video image to be detected is a non-snowy screen image; when it is determined that the number of the target second lines is greater than the second predetermined number, determine that the video image to be detected is a snowy screen image, and the preset screening condition includes the following two conditions: the line is perpendicular to the horizontal plane; the line length is greater than three-tenths of the image width.

6. A storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the snowy screen detection method according to any one of claims 1-4 are implemented.

Citation Information

Patent Citations

  • Image mosaic detection method and image mosaic detection device

    CN106971399A

  • Detection method and device, equipment, storage medium and program product

    CN112907518A