Black screen detection method, device, electronic device and readable storage medium supporting multi-split screen
Through the combination of multiple judgment methods such as grayscale values, edges and connectivity diagrams, the problem of low black screen detection accuracy in multi-split screen display devices is solved, and intelligent detection of multiple split screen methods is realized, which improves the accuracy and adaptability of detection.
Patent Information
- Application Number
- CN202210828280.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-07-13
AI Technical Summary
The prior art cannot effectively detect black screen failures in multi-split screen display devices, especially in various split screen modes such as single split screen, dual split screen, three split screen and four split screens. The black screen detection accuracy is low and cannot adapt to multi-split screen scenes. Manual detection is time-consuming and not real-time.
Using various judgment methods such as grayscale value, edge detection and connected images, the image is segmented into multiple split-screen images, and grayscale and edge detection are performed, and abnormal image recognition is recognized using data training.
It improves the accuracy of black screen detection and can intelligently adapt to a variety of split-screen methods, including single split-screen, dual split-screen, three split-screen and four split-screen, realizing intelligent detection of multi-split-screen abnormalities.
Smart Images

Figure CN115239653B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of digitalization and information technology, and in particular relates to a black screen detection method, device, electronic device and readable storage medium supporting multi-split screen. Background Art
[0002] Multi-screen displays are becoming increasingly common. When a device is operating in a split-screen mode, a malfunction often causes one screen to go black or display abnormally, while the other screens maintain normal display. Conventional black screen or distorted screen detection programs are inadequate for this scenario. Manual detection consumes significant manpower and is difficult to guarantee 24 / 7 real-time monitoring. Furthermore, multi-screen modes vary, ranging from single, dual, triple, or quad splits. Therefore, conventional intelligent fault detection programs for black screens and other issues are not suitable for multi-screen detection scenarios, and their accuracy is low. Summary of the Invention
[0003] The purpose of the embodiments of this specification is to provide a black screen detection method, device, electronic device and readable storage medium that support multiple split screens, so as to solve the problem that the existing black screen detection accuracy is low and the detection of a single split screen black screen does not support multiple split screens.
[0004] To solve the above technical problems, the embodiments of the present application are implemented in the following ways:
[0005] In the first aspect, the present application provides a black screen detection method that supports multiple split screens, the method comprising: performing vertical edge detection and horizontal edge detection on an image to obtain an edge matrix of the image; performing split screen processing on the image according to the edge matrix to obtain multiple split screen images; performing grayscale detection and / or edge detection on any split screen image among the multiple split screen images; if the result of the grayscale detection and / or the result of the edge detection meets the conditions, determining that the split screen image is an abnormal image.
[0006] In one possible implementation, grayscale detection is performed on any split-screen image among the multiple split-screen images, including: obtaining pixel points in the split-screen image whose pixel values are lower than a first threshold, and calculating the ratio P of pixel points whose pixel values are lower than the first threshold to the total pixel points of the split-screen image; edge detection is performed on any split-screen image among the multiple split-screen images, including: obtaining an edge matrix of the split-screen image, obtaining the number of edge pixel points in the edge matrix of the split-screen image, and calculating the ratio L of the number of edge pixel points to the total number of pixel points of the split-screen image; obtaining the number of connected graphs included in the split-screen image, and calculating the ratio K of the number of connected graphs to the total number of pixel points of the split-screen image.
[0007] In one possible implementation, the grayscale detection result meets a condition that the ratio P is greater than a grayscale threshold; the edge detection result meets a condition that the weighted sum of the ratio L and the ratio K is less than a second threshold, where the second threshold is used to characterize the edges and internal connectivity of the split-screen image. The grayscale detection result and the edge detection result meet a condition that the weighted sum of the ratio L and the ratio K and the processed ratio P is less than a black screen threshold.
[0008] In a possible implementation, the method further includes: obtaining the first threshold, the grayscale threshold, the second threshold, and the black screen threshold by using a data training method.
[0009] In one possible implementation, the image is split-screen processed according to the edge matrix to obtain multiple split-screen images, including: matching a matrix according to a preset ratio with the edge matrix; if the matrix of the preset ratio coincides with the edge matrix, and the number of overlapping pixels is greater than a preset threshold, determining that the image corresponding to the matrix of the preset ratio in the image is a split-screen image; expanding the matrix of the preset ratio to a matrix of a first ratio, and if the matrix of the first ratio coincides with the edge matrix, and the number of overlapping pixels is greater than a preset threshold, determining that the image corresponding to the matrix of the first ratio in the image is a split-screen image.
[0010] In a possible implementation, the multiple split-screen images include any one of single-split screen, double-split screen, three-split screen, four-split screen and picture-in-picture.
[0011] In one possible implementation, performing vertical edge detection and horizontal edge detection on an image to obtain an edge matrix of the image includes: performing vertical edge detection on the image using a Soble edge detection method to obtain a vertical edge matrix, and performing horizontal edge detection on the image to obtain a horizontal edge matrix; and synthesizing the vertical edge matrix and the horizontal edge matrix to obtain the edge matrix of the image.
[0012] In the second aspect, the present application provides a black screen detection device that supports multiple split screens, and the device includes: an edge processing module, which is used to perform vertical edge detection and horizontal edge detection on an image to obtain an edge matrix of the image; a split screen module, which is used to perform split screen processing on the image according to the edge matrix to obtain multiple split screen images; a detection module, which is used to perform grayscale detection and / or edge detection on any split screen image among the multiple split screen images; if the result of the grayscale detection and / or the result of the edge detection meets the conditions, the split screen image is determined to be an abnormal image.
[0013] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the manual calibration method for a camera lidar as described in the first aspect is implemented.
[0014] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the camera lidar manual calibration method as in the first aspect.
[0015] It can be seen from the technical solution provided in the above embodiments of this specification that the solution adopts multiple determination methods such as grayscale value, edge, and connectivity graph for the black screen determination method, abandoning the previous single grayscale value determination method, thereby improving the accuracy of the determination. At the same time, the method described in this application can not only realize intelligent detection of multi-split screen anomalies, but also intelligently adapt to multiple split screen methods, including but not limited to single split screen, double split screen, three split screen, four split screen and picture-in-picture, thereby improving the accuracy of the determination. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] Figure 1 A flowchart of a black screen detection method supporting multi-split screen provided by this application;
[0018] Figure 2 A flowchart of another black screen detection method supporting multi-split screen provided by this application;
[0019] Figure 3 A schematic diagram of the structure of a black screen detection device 300 supporting multi-split screen provided by this application;
[0020] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION
[0021] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.
[0022] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0023] Various modifications and variations may be made to the specific embodiments of the present disclosure without departing from the scope or spirit of the present application, as will be apparent to those skilled in the art. Other embodiments will be apparent to those skilled in the art from the present disclosure. The present disclosure and examples are intended to be illustrative only. As used herein, the terms "comprising," "including," "having," "containing," and the like are intended to be open-ended and include, but are not limited to, the foregoing.
[0024] In order to solve the technical problems mentioned in the background technology, the embodiment of the present application proposes a method for intelligently detecting display screen anomalies for multi-split-screen electronic devices. The method mainly includes: first calculating the edge matrix of the image displayed on the display screen, dividing the image displayed on the display screen into multiple split-screen images according to the edge matrix, and for each split-screen image, performing anomaly detection according to one or more judgment methods such as grayscale value, edge, connectivity graph, etc., such as performing black screen and / or blue screen detection. In this way, in the embodiment of the present application, multiple judgment methods such as grayscale value, edge, connectivity graph, etc. are adopted for the black screen judgment method, and the previous single grayscale value judgment method is abandoned, thereby improving the accuracy of the judgment. At the same time, the method described in the present application can not only realize the intelligent detection of multi-split-screen anomalies but also intelligently adapt to multiple split-screen methods, including but not limited to single split screen, double split screen and three-split screen and four-split screen and picture-in-picture, thereby improving the accuracy of the judgment.
[0025] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0026] Reference Figure 1 , which shows a flow chart of a method for detecting a black screen supporting multiple split screens provided by an embodiment of the present application. The method is used to detect whether the image displayed on the display screen of an electronic device is abnormal. The method is executed by a black screen detection device supporting multiple split screens, such as a server managed by a detection personnel, such as Figure 1 As shown, the method includes:
[0027] S110 , performing vertical edge detection and horizontal edge detection on an image displayed by the electronic device to obtain an edge matrix of the image.
[0028] The image is an image displayed on a display screen by an electronic device in a split-screen manner. The image includes multiple pixels, and each pixel corresponds to a coordinate information, and the coordinate information is used to characterize the position of the pixel in the image. The image includes an image obtained by a single split-screen manner, or an image obtained by a dual split-screen manner, or an image obtained by a three-split screen manner, or a four-split screen and a picture-in-picture manner, etc. This application does not limit the number of split screens.
[0029] In one possible implementation, the image in S110 may be an original image, that is, an unprocessed image directly displayed on a display screen of the electronic device. In another possible implementation, the image in S110 may be an image obtained by performing data preprocessing on the original image.
[0030] The data preprocessing process described in this application is performed before S110. For example, to improve processing accuracy and efficiency, data preprocessing is performed on the original image to remove invalid pixels in the image and retain valid pixels in the image. Exemplarily, the data preprocessing of the original image may include grayscale the original image, performing Gaussian smoothing on the grayscaled image to remove noise, filter out useless / invalid pixels, and retain useful / valid pixels for subsequent processing.
[0031] Specifically, the grayscale process described in the embodiment of the present application may include: grayscale each pixel in the image, determining the three color values of each pixel: R value, G value, and B value, and performing a weighted summation of the R value, G value, and B value to obtain the grayscale value of the pixel. For example, as shown in the following formula (1):
[0032] GrayImg=0.299*R+0.587*G+0.114*B Formula (1)
[0033] GrayImg represents the grayscale value of the pixel, 0.299 is the weight of the R value, 0.587 is the weight of the G value, and 0.114 is the weight of the B value. It should be noted that the weights can be set as needed and are not limited.
[0034] It should be noted that this application is not limited to grayscaling images in RGB format. It can also grayscale images in other formats. For example, for YUV format images, the YUV values of the pixels in the image are first determined, and then the YUV values are weighted and summed to obtain the grayscale values of the pixels in the image. In addition, other grayscaling methods can also be used, such as maximum grayscaling, average grayscaling, gamma correction grayscaling, etc. The specific grayscaling method can be selected and adjusted according to the application scenario of the video source that generates the image.
[0035] Specifically, the Gaussian smoothing process described in the embodiments of the present application may include "blurring" the image to remove noise and fine details, such as performing a Gaussian smoothing two-dimensional convolution operation on each pixel of the image to remove details and noise. Gaussian smoothing can retain the edge information of the image while removing high-frequency noise. The retained edge information can be used for subsequent vertical edge detection and horizontal edge detection. Exemplarily, the Gaussian smoothing process formula is shown in the following formula (2).
[0036]
[0037] Where y in formula (2) is the vertical coordinate of a pixel point in the image, x is the horizontal coordinate of the pixel point, and G(x,y) is the Gaussian smoothing filter result of the pixel point.
[0038] Exemplarily, the Soble edge detection method can be used to perform vertical edge detection on the image to obtain a vertical edge matrix and to perform horizontal edge detection on the image to obtain a horizontal edge matrix, and the vertical edge matrix and the horizontal edge matrix are synthesized to obtain an edge matrix of the image.
[0039] The vertical edge detection includes: finding the X-direction gradient based on the Sobel operator, i.e. vertical edge detection. Specifically, the vertical edge matrix of the image can be obtained by convolving the image with the three-dimensional operator according to the following formula (3):
[0040]
[0041] Where G in formula (3) x is the vertical edge matrix, G x The included elements correspond to the X-direction gradients of the pixels in the image, and I is the matrix corresponding to the image. The elements in the matrix correspond to the pixels of the image, such as the pixels obtained after data preprocessing in the corresponding image. The * in formula (3) represents the convolution calculation. Among them, the matrix in formula (3) is a three-dimensional operator (or called a three-dimensional vertical operator).
[0042] Furthermore, the vertical edge matrix can also be processed. If the vertical edge matrix G x If the X-direction gradient of a pixel (x,y) in the image is greater than a threshold, the pixel (x,y) is considered a vertical edge point and its value is retained. Furthermore, the vertical edge matrix can be tested for continuity. For example, when performing noise reduction on the vertical edge matrix, if a pixel is an isolated point, meaning there are no related edge points around it in the vertical direction, the pixel is considered discontinuous and is removed for noise reduction.
[0043] Horizontal edge detection can include: finding the Y-direction gradient based on the Sobel operator, i.e., horizontal edge detection. Specifically, the horizontal edge matrix of the image can be obtained by convolving the image with a three-dimensional operator according to the following formula (4):
[0044]
[0045] Where G in formula (4) y is the horizontal edge matrix, G y The included elements correspond to the Y-direction gradient of the pixel points in the image, I is the matrix corresponding to the image, and the elements in the matrix correspond to the pixel points of the image, such as the pixel points obtained after data preprocessing in the corresponding image. The * in formula (4) represents the convolution calculation. Among them, the matrix in formula (4) is a three-dimensional operator (or called a three-dimensional horizontal operator).
[0046] Furthermore, the horizontal edge matrix can also be processed. If the horizontal edge matrix G y If the Y-direction gradient of a pixel (x,y) in the image is greater than a threshold, the pixel (x,y) is considered a horizontal edge point and its value is retained. Furthermore, the horizontal edge matrix can be tested for continuity. For example, when performing noise reduction on the horizontal edge matrix, if a pixel is an isolated point, meaning there are no related edge points around it in the horizontal direction, the pixel is considered discontinuous and is removed for noise reduction.
[0047] Furthermore, the edge matrix of the image can be obtained by performing a weighted summation of the horizontal edge matrix and the vertical edge matrix. The edge matrix can be referred to as a vertical edge matrix. For example, the edge matrix of an image = a * the vertical edge matrix of the image + b * the horizontal edge matrix of the image, where a and b are weighting coefficients. The values of a and b can be set as needed and are not limited.
[0048] S120 , performing split-screen processing on the image according to the edge matrix to obtain a plurality of split-screen images.
[0049] The process may include matching a matrix of a preset ratio with an edge matrix; if the matrix of the preset ratio overlaps with the edge matrix and the number of overlapping pixels is greater than a preset threshold, determining that the split-screen ratio of the image is the preset ratio, and segmenting the image according to the preset ratio to obtain multiple split-screen images. For example: matching a matrix of a preset ratio with the edge matrix; if the matrix of the preset ratio overlaps with the edge matrix and the number of overlapping pixels is greater than a preset threshold, determining that the image corresponding to the matrix of the preset ratio in the image is a split-screen image; expanding the matrix of the preset ratio to a matrix of a first ratio; if the matrix of the first ratio overlaps with the edge matrix and the number of overlapping pixels is greater than a preset threshold, determining that the image corresponding to the matrix of the first ratio in the image is another split-screen image, and continuing to expand until the matrix is expanded to the same size as the original image and the expanded matrix does not overlap with the edge matrix and / or overlaps but the number of overlapping pixels does not meet the requirement, then ending.
[0050] The preset ratios may include multiple types, such as 16:9, 4:3, 32:18, etc. The preset ratio may also be referred to as the original ratio. For example, image signals all have inherent ratios, and the ratios for split screens are consistent. The split screen image ratio is X:Y. Currently, the current image ratio is mostly 16:9, so the split screen edges of the split screen also conform to the 16:9 principle. This method can also be replaced with 4:3, so each split screen is also in the X:Y ratio. The image is expanded for the edge of the edge matrix until it touches the edge, and the edge of the expanded area is recorded. When the edge pixel points that meet the ratio are higher than the threshold, it is determined to be a split screen matrix, and the area is determined as a split screen area, and the next round of split screen area determination is performed. Taking the preset ratio of 16:9 as an example, a matrix with a length of 16 and a width of 9 is used to match the edge matrix to determine whether there is a small matrix with a length of 16 and a width of 9 in the edge matrix. If there are overlapping pixels and the number of overlapping pixels is greater than a certain threshold, the image area corresponding to the overlapping matrix is determined as the split-screen area, and the image displayed in the split-screen area is the split-screen image. At the same time, the overlapping matrix is recorded, such as the coordinate information of the pixel points in the upper left corner and the lower right corner of the overlapping matrix.
[0051] Further, the expansion is performed in steps of 16:9, for example, in equal proportion to obtain a 32:18 matrix, and the 32:18 matrix is used to match the edge matrix to determine whether there is a small 32:18 matrix in the edge matrix. If there are overlapping pixels, and the number of overlapping pixels is greater than a certain threshold, the image area corresponding to the overlapping matrix is determined as the split-screen area, and the image displayed in the split-screen area is the split-screen image. At the same time, the overlapping matrix is recorded, such as the coordinate information of the pixel points in the upper left and lower right corners of the overlapping matrix. The next round of split-screen calculation is further performed according to the above-mentioned expansion method (the expansion described in this application may refer to equal proportion expansion) until a certain proportion of the expanded matrix does not overlap with the edge matrix and / or even if it overlaps, the amount of overlap is less than the threshold, for example, the expansion ends when it is the same size as the original image and there is still no split screen that meets the conditions.
[0052] For example, the coordinate information of the pixel points at the upper left and lower right corners of the overlapping matrices can be recorded in a rectangular dictionary, such as the rectangular dictionary shown in Table 1 below. As shown in Table 1, each row records the coordinate information of the pixel points at the upper left and lower right corners of a split-screen matrix. Based on the coordinate information of the pixel points at the upper left and lower right corners, a split-screen area can be obtained, and the image in the split-screen area is determined as a split-screen image. As shown in Table 1, the upper left corner (x1, y1) and the lower right corner (x2, y2) constitute a region, and the image corresponding to this region is a split-screen image.
[0053] Table 1
[0054] Split screen location information 1 <![CDATA[((x1,y1),(x2,y2))]]> 2 <![CDATA[((x′1,y′1),(x′2,y′2))]]>
[0055] S130. Perform an abnormality detection on any split-screen image, where the abnormality detection includes black screen detection and / or blue screen detection. For example, grayscale detection and / or edge detection are performed on any split-screen image among the multiple split-screen images. If the grayscale detection result and / or the edge detection result meet a condition, the split-screen image is determined to be an abnormal image.
[0056] It should be noted that, for multiple split-screen images, S130 may be executed in parallel, sequentially, or cyclically, without limitation.
[0057] Specifically, performing anomaly detection on any split-screen image may include one or more of the following processes:
[0058] 1) Grayscale detection.
[0059] For each split-screen image, obtain the pixel points with pixel values lower than M in the split-screen image, where the pixel points with pixel values lower than M are dark pixels. Calculate the ratio of pixel points with pixel values lower than M to the total number of pixels in the split-screen image. If the ratio is greater than or equal to the grayscale threshold, the split-screen image is determined to be black. Otherwise, the split-screen image is determined to be non-black. The following formula (5) is used to determine the percentage P of dark grayscale values:
[0060]
[0061] Where M*N is the total pixel value of the split-screen image. The threshold M here can be called the first threshold, and M can be set as needed. The M value can be pre-configured or obtained by data training, and can be manually modified and set later as needed. For example, the black screen and non-black screen can be trained to obtain the proportion of pixels with dark grayscale values to the total value, and the black screen grayscale ratio threshold can be obtained. After further obtaining the total value of the dark pixels, refer to formula (5) to calculate P. If P>=grayscale threshold DarkThres, it is determined to be a black screen, where the grayscale threshold DarkThres can be obtained by data training, or it can be considered to be manually modified and set without restriction.
[0062] It should be noted that the data training described in this application may refer to: obtaining a large number of sample images, some of which are black screen images and some are not black screen images, using the samples to train a preset model, and using image classification methods to optimize the grayscale threshold, and finally obtaining a reasonable grayscale threshold, such as a grayscale threshold with an accuracy higher than 90%.
[0063] It should be noted that when executing the above 1), if the image has been grayscaled when edge detection is performed in S101, then when performing the above grayscale detection, it is not necessary to calculate the grayscale value of each pixel in the split-screen image. Otherwise, the split-screen image needs to be grayscaled, and the grayscale detection described in the above 1) (or called black screen detection) must be performed after grayscale.
[0064] 2) Marginalization Detection
[0065] Edge detection is performed based on the canny operator and matrix calculation and connected graph number calculation are performed. The edge detection includes: using the canny operator to perform edge processing on the grayscale split-screen image to obtain the edge matrix of the split-screen image, and further processing the edge matrix of the split-screen image calculated by the canny operator: for the edge matrix of the split-screen image, obtain its edge pixel number, and calculate the ratio of the number of edge pixel points to the total number of pixel points. It can be understood that in the case of signal loss or abnormality such as black screen and blue screen, the proportion of the number of edge pixel values in the edge matrix is much smaller than the proportion of edge pixel points in normal images. For example, as shown in the following formula (6), the proportion L of the number of edge pixel values is:
[0066]
[0067] Wherein M*N is the total pixel value of the split-screen image.
[0068] Since the number of connected graphs contained in the image is almost 0 in abnormal situations such as black screen and blue screen, the calculation of the number of connected graphs can also be used as one of the black screen and blue screen detection criteria. Based on this, in an embodiment of the present application, for each split-screen image, the number of connected graphs included is obtained, and the ratio of the number of connected graphs to the total number of pixels is calculated. It can be understood that in the case of missing or abnormal signals such as black screen and blue screen, the ratio of the number of connected graphs to the total number of pixels is much smaller, almost 0. For example, as shown in the following formula (7), the ratio K of the number of connected graphs to the total number of pixels is:
[0069]
[0070] Wherein M*N is the total pixel value of the split-screen image.
[0071] Furthermore, a weighted summation of the connectivity graph and the edge pixel ratios obtained by edge detection is performed to obtain the edge and internal connectivity of the split-screen image. Specifically, the edge and internal connectivity of the split-screen image is μ = α*L + β*K, where α and β are weighted values and can be set without restriction.
[0072] If μ is smaller than the second threshold, it indicates that the split-screen image is an abnormal image such as a black screen or a blue screen.
[0073] It is also possible to combine the above detection results to determine whether the split screen image is abnormal. For example, the results P and μ obtained in 1) and 2) above are further processed, and the processed values are Compared with the preset threshold, if It is considered to be a black screen, that is, the larger the P value is (the higher the proportion of gray value), and if the μ value is smaller when the proportion of gray value is higher, it indicates that the probability of black screen is higher. It can be identified as a black screen.
[0074] Where γ is a trained threshold or a manually set threshold. For example, a black screen determination threshold γ can be obtained through data training. It should be noted that the data training described in this application can refer to data training using an artificial intelligence image classification method, and the threshold is continuously optimized to ultimately obtain a relatively accurate threshold.
[0075] based on Figure 1 The method adopts multiple determination methods such as grayscale value, edge, and connectivity graph for black screen determination, abandons the previous single grayscale value determination method, and improves the accuracy of determination. At the same time, the method described in this application can not only realize intelligent detection of multi-split screen anomalies but also intelligently adapt to multiple split screen methods, including but not limited to single split screen, double split screen, three split screen, four split screen and picture-in-picture, thereby improving the accuracy of determination.
[0076] The following combination Figure 2 ,right Figure 1 The following method is introduced in detail:
[0077] (1) Initially, an image displayed on an electronic device is acquired. If the image is a screen, the image is corrected in parallel and then processed to the next step. If the image is a direct signal display, the next step is directly processed.
[0078] (2) Perform Gaussian smoothing on the image, retaining valid pixels in the image and filtering out invalid pixels in the image.
[0079] (3) Execute the method shown in S110 to perform horizontal edge detection and vertical edge detection on the image to obtain an edge matrix.
[0080] (4) Execute the method shown in S120 to split the image according to the edge matrix to obtain multiple split-screen images.
[0081] (5) For multiple split-screen images, if no segmentation matrix that meets the conditions exists, the detection ends. Otherwise, grayscale detection and edge detection (such as connectivity graph detection and edge value detection) are performed on each split-screen image. Based on the detection results, it is determined whether the conditions are met, such as whether the black screen threshold r is met. If so, the abnormal split screen is marked. Each split-screen image is traversed until each split-screen image is detected.
[0082] Reference Figure 3 , which shows a schematic structural diagram of a black screen detection device 300 supporting multi-split screen according to an embodiment of the present invention. Figure 3 As shown, the black screen detection device 300 supporting multi-split screen may include:
[0083] The edge processing module 301 is configured to perform vertical edge detection and horizontal edge detection on an image to obtain an edge matrix of the image.
[0084] The screen splitting module 302 is configured to perform screen splitting processing on the image according to the edge matrix to obtain a plurality of split-screen images.
[0085] The detection module 303 is used to perform grayscale detection and / or edge detection on any split-screen image among the multiple split-screen images; if the result of the grayscale detection and / or the result of the edge detection meets the conditions, the split-screen image is determined to be an abnormal image.
[0086] Optionally, the detection module 303 is specifically used to: obtain pixel points in the split-screen image whose pixel values are lower than a first threshold, and calculate the ratio P of pixel points whose pixel values are lower than the first threshold to the total pixel points of the split-screen image; perform edge detection on any split-screen image among the multiple split-screen images, including: obtaining the edge matrix of the split-screen image, obtaining the number of edge pixel points in the edge matrix of the split-screen image, and calculating the ratio L of the number of edge pixel points to the total number of pixel points in the split-screen image; obtaining the number of connected graphs included in the split-screen image, and calculating the ratio K of the number of connected graphs to the total number of pixel points in the split-screen image.
[0087] Optionally, the grayscale detection result meets a condition that the ratio P is greater than a grayscale threshold; the edge detection result meets a condition that the weighted sum of the ratio L and the ratio K is less than a second threshold, where the second threshold is used to characterize the edges and internal connectivity of the split-screen image. The grayscale detection result and the edge detection result meet a condition that the weighted sum of the ratio L and the ratio K and the processed ratio P is less than a black screen threshold.
[0088] Optionally, the split-screen module 302 is specifically used to: match a matrix according to a preset ratio with the edge matrix; if the matrix of the preset ratio coincides with the edge matrix and the number of overlapping pixels is greater than a preset threshold, then determine that the image corresponding to the matrix of the preset ratio in the image is a split-screen image; expand the matrix of the preset ratio to a matrix of a first ratio, and if the matrix of the first ratio coincides with the edge matrix and the number of overlapping pixels is greater than a preset threshold, then determine that the image corresponding to the matrix of the first ratio in the image is a split-screen image.
[0089] Optionally, the multiple split-screen images include any one of single-split screen, double-split screen, three-split screen, four-split screen and picture-in-picture.
[0090] Optionally, the edge processing module 301 is specifically used to: perform vertical edge detection on the image using the Soble edge detection method to obtain a vertical edge matrix and perform horizontal edge detection on the image to obtain a horizontal edge matrix; and synthesize the vertical edge matrix and the horizontal edge matrix to obtain an edge matrix of the image.
[0091] The present invention provides a black screen detection device that supports multi-split screens and can execute an embodiment of the above method. Its implementation principle and technical effects are similar and will not be repeated here.
[0092] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 , which shows a structural diagram of an electronic device 400 suitable for implementing an embodiment of the present application.
[0093] like Figure 4 As shown, electronic device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage portion 408 into a random access memory (RAM) 403. Various programs and data required for the operation of device 400 are also stored in RAM 403. CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0094] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 408 including a hard disk; and a communication section 409 including a network interface card such as a LAN card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read therefrom can be installed into the storage section 408 as needed.
[0095] In particular, according to the embodiments of the present disclosure, the above reference Figure 1 The described process can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for executing the above-described method for detecting a black screen supporting multiple split screens. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 409 and / or installed from a removable medium 411.
[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the aforementioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The units or modules involved in the embodiments described in this application may be implemented by software or hardware. The units or modules described may also be provided in a processor. The names of these units or modules do not, in certain circumstances, constitute limitations on the units or modules themselves.
[0098] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or physical devices, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a mobile phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0099] As another aspect, the present application further provides a storage medium, which may be the storage medium included in the aforementioned apparatus in the above-mentioned embodiment; or a storage medium that exists independently and is not assembled into the device. The storage medium stores one or more programs, which are used by one or more processors to execute the black screen detection method supporting multi-split screen described in the present application.
[0100] Storage 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 disc read-only memory (CD-ROM), digital versatile disc (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 transitory media such as modulated data signals and carrier waves.
[0101] It should be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0102] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
Claims
1. A method for black screen detection supporting multi-split screen, characterized in that: The method comprises: Performing vertical edge detection and horizontal edge detection on the image to obtain an edge matrix of the image; Performing split-screen processing on the image according to the edge matrix to obtain a plurality of split-screen images; performing edge detection on any split-screen image among the multiple split-screen images, and determining that the split-screen image is an abnormal image if a result of the edge detection meets a condition; or, performing grayscale detection and edge detection on any split-screen image among the multiple split-screen images, and determining that the split-screen image is an abnormal image if a result of the grayscale detection and a result of the edge detection meet conditions; The step of performing edge detection on any split-screen image among the multiple split-screen images includes: Obtain an edge matrix of the split-screen image, obtain the number of edge pixels in the edge matrix of the split-screen image, and calculate a ratio L of the number of edge pixels to the total number of pixels in the split-screen image; Obtaining the number of connected graphs included in the split-screen image, and calculating a ratio K of the number of connected graphs to the total number of pixels in the split-screen image; The result of the edge detection is a weighted sum of the ratio L and the ratio K.
2. The method according to claim 1, characterized in that Performing grayscale detection on any split-screen image among the multiple split-screen images includes: Pixel points in the split-screen image whose pixel values are lower than a first threshold are obtained, and a ratio P of pixel points whose pixel values are lower than the first threshold to the total pixel points in the split-screen image is calculated.
3. The method according to claim 2, characterized in that The grayscale detection result meets the conditions including: the ratio P is greater than the grayscale threshold; The edge detection result meets the condition that: the weighted sum of the ratio L and the ratio K is less than a second threshold, and the second threshold is used to characterize the edge and internal connectivity of the split-screen image; The grayscale detection result and the edge detection result meet the conditions including: the weighted sum of the ratio L and the ratio K and the result of processing the ratio P are less than a black screen threshold.
4. The method according to claim 3, characterized in that The method further comprises: The first threshold, the grayscale threshold, the second threshold, and the black screen threshold are obtained by using a data training method.
5. The method according to claim 1, wherein The performing split-screen processing on the image according to the edge matrix to obtain a plurality of split-screen images includes: Matching a matrix according to a preset ratio with the edge matrix; If the matrix of the preset ratio overlaps with the edge matrix, and the number of overlapping pixels is greater than a preset threshold, determining that the image corresponding to the matrix of the preset ratio in the image is a split-screen image; The matrix of the preset ratio is expanded to a matrix of the first ratio. If the matrix of the first ratio overlaps with the edge matrix and the number of overlapping pixels is greater than a preset threshold, it is determined that the image corresponding to the matrix of the first ratio in the image is a split-screen image.
6. The method according to claim 5, characterized in that The multiple split-screen images include any one of single split-screen, double split-screen, three split-screen, four split-screen and picture-in-picture.
7. The method according to claim 1, characterized in that The performing vertical edge detection and horizontal edge detection on the image to obtain an edge matrix of the image includes: Performing vertical edge detection on the image using a Soble edge detection method to obtain a vertical edge matrix and performing horizontal edge detection on the image to obtain a horizontal edge matrix; The vertical edge matrix and the horizontal edge matrix are synthesized to obtain an edge matrix of the image.
8. A device supporting black screen detection for multi-split screen, characterized in that: The device comprises: An edge processing module, configured to perform vertical edge detection and horizontal edge detection on an image to obtain an edge matrix of the image; A split-screen module, configured to perform split-screen processing on the image according to the edge matrix to obtain multiple split-screen images; a detection module, configured to perform edge detection on any one of the multiple split-screen images, and determine that the split-screen image is an abnormal image if a result of the edge detection meets a condition; or to perform grayscale detection and edge detection on any one of the multiple split-screen images, and determine that the split-screen image is an abnormal image if both the results of the grayscale detection and the results of the edge detection meet a condition; The detection module is specifically configured to perform edge detection on any split-screen image among the multiple split-screen images, including: Obtain an edge matrix of the split-screen image, obtain the number of edge pixels in the edge matrix of the split-screen image, and calculate a ratio L of the number of edge pixels to the total number of pixels in the split-screen image; Obtaining the number of connected graphs included in the split-screen image, and calculating a ratio K of the number of connected graphs to the total number of pixels in the split-screen image; The result of the edge detection is a weighted sum of the ratio L and the ratio K.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for black screen detection supporting multi-split screen as described in any one of claims 1-7 is implemented.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for black screen detection supporting multi-split screen as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Method and system for detecting failure of spliced screen
CN104347022A
High-speed monitoring video quality detection method
CN112804520A