CN110351549B - Screen display state detection method and device, terminal equipment and readable storage medium - Google Patents
Screen display state detection method and device, terminal equipment and readable storage medium Download PDFInfo
- Publication number
- CN110351549B CN110351549B CN201910670697.6A CN201910670697A CN110351549B CN 110351549 B CN110351549 B CN 110351549B CN 201910670697 A CN201910670697 A CN 201910670697A CN 110351549 B CN110351549 B CN 110351549B
- Authority
- CN
- China
- Prior art keywords
- detection image
- image
- straight line
- detection
- points
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a method, a device and equipment for detecting a screen display state and a readable storage medium. The method comprises the following steps: acquiring a first detection image of a screen of a terminal device, and filtering the first detection image to obtain a second detection image; segmenting the second detection image according to a preset segmentation threshold value to mark a reference point in the second detection image to obtain a marked third detection image; processing the third detection image through Gaussian mask convolution to determine whether a reference straight line exists on the third detection image; if the third detected image is determined to have the reference straight line, the third detected image is marked with the reference straight line. The invention realizes the automatic detection of the screen display state of the terminal equipment and improves the efficiency of detecting the screen display state of the terminal equipment and the accuracy of the detection result.
Description
Technical Field
The invention relates to the technical field of terminals, in particular to a screen display state detection method and device, terminal equipment and a computer readable storage medium.
Background
In the process of producing the television in a factory, the display state of the television screen needs to be checked, for example, the checking of the pixel points of the television screen. The inspection of the screen pixel points is to detect the pixel points with the brightness values not meeting the requirements in the screen, which generally refer to bright points and dark points, most of the related production processes at present are that a television is accessed with inspection signals, a quality inspector inputs a plurality of detection pictures in the television, and whether the bright points, the dark points and the like exist in the screen is detected in a manner of manual close-distance observation and judgment. The method for manually detecting the television screen consumes long time, and long-time observation easily causes the fatigue of eyes of screen detection personnel, so that the conditions of missed judgment and erroneous judgment exist, and the accuracy of a detection result is reduced; secondly, because signals need to be manually accessed into the television, manual detection can be carried out, so that the inspection efficiency of the television screen is low.
Disclosure of Invention
The invention mainly aims to provide a screen display state detection method, a screen display state detection device, a mobile terminal and a readable storage medium, and aims to solve the technical problems that in the prior art, the accuracy of a detection result of a reference point in a screen of a manual detection terminal device is low and the detection efficiency is low.
In order to achieve the above object, the present invention provides a method for detecting a screen display state, comprising the steps of:
acquiring a first detection image of a screen of a terminal device, and filtering the first detection image to obtain a second detection image;
segmenting the second detection image according to a preset segmentation threshold value to mark a reference point in the second detection image to obtain a marked third detection image, wherein the reference point is a pixel point of which the brightness value meets a preset reference point standard;
processing the third detection image through Gaussian mask convolution to determine whether a reference straight line exists on the third detection image, wherein the reference straight line is a straight line which meets a preset reference straight line standard in the third detection image;
and if the reference straight line exists on the third detection image, marking the reference straight line in the third detection image.
Optionally, if it is determined that the reference straight line exists on the third detected image, after the step of marking the reference straight line in the third detected image, the method further includes:
determining the position of a reference point corresponding to the reference point in the third detection image;
and outputting the position information of the reference point position.
Optionally, the step of obtaining a first detection image of a screen of the terminal device, and performing filtering processing on the first detection image to obtain a second detection image includes:
acquiring a first detection image of a screen of a terminal device, and performing frequency domain processing and Fourier transform on the first detection image to remove noise in the first detection image to obtain a first sub-image of the first detection image;
and filtering the first sub-image to obtain a second detection image.
Optionally, the step of performing filtering processing on the first sub-image to obtain a second detection image includes:
performing median filtering processing on the first sub-image according to a preset filtering threshold value to remove salt and pepper noise in the first sub-image to obtain a second sub-image of the first detection image;
and smoothing the second sub-image according to a preset smoothing threshold value to obtain a second detection image.
Optionally, the step of processing the third detection image by gaussian mask convolution to determine whether a reference straight line exists on the third detection image includes:
processing the third detection image by Gaussian mask convolution to calculate the ratio of reference points on a straight line in the third detection image;
and if the proportion is larger than or equal to a preset proportion parameter, determining that a reference straight line exists on the third detection image.
Optionally, before the step of obtaining the first detection image of the terminal device screen, the method further includes:
calling a pre-stored original detection picture;
and shooting the original detection picture according to the preset exposure time to obtain a first detection image.
Optionally, the reference points are dark points and bright points, the dark points are pixel points with brightness values smaller than a first preset brightness value, and the bright points are pixel points with brightness values larger than a second preset brightness value.
In addition, to achieve the above object, the present invention also provides a screen display state detecting device, including:
the acquisition module is used for acquiring a first detection image of a screen of the mobile terminal;
the filtering module is used for carrying out filtering processing on the first detection image to obtain a second detection image;
the segmentation module is used for segmenting the second detection image according to a preset segmentation threshold value so as to mark a reference point in the second detection image and obtain a marked third detection image, wherein the reference point is a pixel point of which the brightness value meets a preset reference point standard;
the processing module is used for processing the third detection image through Gaussian mask convolution to determine whether a reference straight line exists on the third detection image, wherein the reference straight line is a straight line meeting a preset reference straight line standard in the third detection image;
and a marking module, configured to mark the reference straight line in the third detection image if it is determined that the reference straight line exists on the third detection image.
In addition, to achieve the above object, the present invention further provides a terminal device, which includes a memory, a processor, and a screen display state detection program stored in the memory and executable on the processor, wherein the screen display state detection program, when executed by the processor, implements the steps of the screen display state detection method as described above.
Further, to achieve the above object, the present invention also provides a computer medium having the screen display state detection program stored thereon, which when executed by a processor, implements the steps of the screen display state detection method as described above.
According to the method, the first detection image of the screen of the terminal equipment is filtered, so that noise on the first detection image is removed, the noise is prevented from interfering with the subsequent reference point detection, the accuracy of the detection of the reference point of the screen of the terminal equipment is reduced, the first detection image after filtering is subjected to segmentation processing and Gaussian mask convolution processing, and the reference point and the reference straight line of the screen of the terminal equipment are obtained.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for detecting a screen display status according to a first embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a terminal device, and referring to fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment according to an embodiment of the invention.
It should be noted that fig. 1 is a schematic structural diagram of a hardware operating environment of the terminal device. The terminal equipment of the embodiment of the invention can be equipment such as a PC, a portable computer, a television and the like.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal device may further include an RF (Radio Frequency) circuit, a sensor, a WiFi module, and the like.
Those skilled in the art will appreciate that the terminal device configuration shown in fig. 1 does not constitute a limitation of the terminal device, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a computer storage readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a screen display state detection program. The operating system is a program for managing and controlling hardware and software resources of the terminal device, and supports the operation of the screen display state detection program and other software or programs.
The terminal device shown in fig. 1 may be used for detecting a screen display state of the terminal device, and the user interface 1003 is mainly used for detecting or outputting various messages, such as detecting a feedback instruction and outputting detection result information; the network interface 1004 is mainly used for interacting with a background server and communicating; the processor 1001 may be configured to call a screen display state detection program stored in the memory 1005, and perform the following operations:
acquiring a first detection image of a screen of a terminal device, and filtering the first detection image to obtain a second detection image;
segmenting the second detection image according to a preset segmentation threshold value to mark a reference point in the second detection image to obtain a marked third detection image, wherein the reference point is a pixel point of which the brightness value meets a preset reference point standard;
processing the third detection image through Gaussian mask convolution to determine whether a reference straight line exists on the third detection image, wherein the reference straight line is a straight line which meets a preset reference straight line standard in the third detection image;
and if the reference straight line exists on the third detection image, marking the reference straight line in the third detection image.
Further, after the step of marking the reference straight line in the third detected image if it is determined that the reference straight line exists on the third detected image, the processor 1001 may be further configured to call a screen display state detection program stored in the memory 1005, and perform the following steps:
determining the position of a reference point corresponding to the reference point in the third detection image;
and outputting the position information of the reference point position.
Further, the step of obtaining a first detection image of a screen of the terminal device, and performing filtering processing on the first detection image to obtain a second detection image includes:
acquiring a first detection image of a screen of a terminal device, and performing frequency domain processing and Fourier transform on the first detection image to remove noise in the first detection image to obtain a first sub-image of the first detection image;
and filtering the first sub-image to obtain a second detection image.
Further, the step of performing filtering processing on the first sub-image to obtain a second detection image includes:
performing median filtering processing on the first sub-image according to a preset filtering threshold value to remove salt and pepper noise in the first sub-image to obtain a second sub-image of the first detection image;
and smoothing the second sub-image according to a preset smoothing threshold value to obtain a second detection image.
Further, the step of processing the third detection image by gaussian mask convolution to determine whether a reference straight line exists on the third detection image comprises:
processing the third detection image by Gaussian mask convolution to calculate the ratio of reference points on a straight line in the third detection image;
and if the proportion is larger than or equal to a preset proportion parameter, determining that a reference straight line exists on the third detection image.
Further, before the step of acquiring the first detection image of the terminal device screen, the processor 1001 may be further configured to call a screen display state detection program stored in the memory 1005, and perform the following steps:
calling a pre-stored original detection picture;
and shooting the original detection picture according to the preset exposure time to obtain a first detection image.
Furthermore, the reference points are dark points and bright points, the dark points are pixel points with brightness values smaller than a first preset brightness value, and the bright points are pixel points with brightness values larger than a second preset brightness value.
The specific implementation of the terminal device of the present invention is substantially the same as the following embodiments of the screen display status detection method, and will not be described herein again.
Based on the hardware structure, various embodiments of the screen display state detection method are provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for detecting a screen display state according to a first embodiment of the present invention.
In this example, an embodiment of a screen display state detection method is provided, it being noted that while a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different than here.
In this embodiment, the screen display state detection method can be optionally applied to terminal devices, which can be computers, televisions, and the like. For convenience of description, the implementation process of the screen display state detection method is described in the present embodiment, and the second, third and fourth embodiments in a manner of omitting the execution subject.
The method for detecting the screen display state provided in this embodiment is used for detecting a reference point in a screen of a terminal device, where the reference point includes a dark point and a bright point, the dark point is defined as a pixel value having a luminance value smaller than a first preset luminance value, the bright point is defined as a pixel point having a luminance value larger than a second preset luminance value, and the first preset luminance value and the second preset luminance value are standards for determining the dark point and the bright point, respectively. Since the steps of detecting the dark spot and the bright spot on the screen of the terminal device are the same, the step of detecting the dark spot and the bright spot on the screen of the terminal device will be described in this embodiment, and the second, third and fourth embodiments with the dark spot and the bright spot being the reference points. The appearance of the dark spots and the bright spots in the screen is a problem of "point defects" of the screen, which may degrade the viewing quality of a user if too many or in a conspicuous position, and thus the dark spots and the bright spots in the screen should be inspected and eliminated when the terminal device is shipped from a factory. The screen display state detection method comprises the following steps:
step S10, acquiring a first detection image of a terminal device screen, and filtering the first detection image to obtain a second detection image;
detecting dark spots and bright spots in a screen of the terminal equipment in different detection images, so that the first detection image, the second detection image, the segmentation threshold and the reference straight line are divided according to a detected object in the embodiment, if the dark spots in the screen of the terminal equipment are detected, the first detection image of the screen of the terminal equipment is obtained as the first dark spot detection image, the preset segmentation threshold is the first segmentation threshold, and the obtained second detection image and the obtained third detection image are respectively the second dark spot detection image and the third dark spot detection image, and the reference straight line is the dark spot straight line; if the bright spot in the terminal screen is detected, acquiring a first detection image of the terminal screen as a first bright spot detection image, and acquiring a second detection image and a third detection image as second bright spot detection images, wherein the second detection image and the third detection image are respectively a second bright spot detection image and the third bright spot detection image, and the reference straight line is a bright spot straight line. The following describes the detection of dark spots and bright spots on the screen of the terminal device.
If the dark spot of the screen of the terminal equipment is detected, acquiring a first dark spot detection image of the screen of the terminal equipment after detecting a dark spot detection instruction of the screen of the terminal equipment, wherein the first dark spot detection image can be an image of the screen of the terminal equipment in a white field and is used for detecting the dark spot in the screen. In this embodiment, the dark point is a pixel point having a brightness value lower than a first preset brightness value, and in order to distinguish the pixel point from a dark point on a dark point straight line described below, the pixel point having the brightness value lower than the first preset brightness value is referred to as a first dark point, and the dark point on the dark point straight line is referred to as a second dark point. The first preset brightness value is manually formulated and input according to the specific conditions displayed on the screen and personal experience, and after the first preset brightness value is set, a user can change the first preset brightness value as required. And after the first dark spot detection image is obtained, filtering the first dark spot detection image to obtain a second dark spot detection image. It should be noted that the filtering process performed on the first dark spot detection image is to remove noise in the first dark spot detection image, in particular to remove regular noise and salt and pepper noise in the first dark spot detection image, so as to reduce interference for subsequently extracting dark spots in the screen.
If the bright spot of the screen of the terminal equipment is detected, after a bright spot detection instruction of the screen of the terminal equipment is detected, a first bright spot detection image of the screen of the terminal equipment is obtained, wherein the first bright spot detection image can be an image of the screen in a gray field or a black field and is used for detecting the bright spot in the screen, the bright spot is a pixel point with a brightness value larger than a second preset brightness value, in order to distinguish the bright spot from a bright spot on a bright spot straight line explained below, the pixel point with the brightness value larger than the second preset brightness value is called a first bright spot, and the bright spot on the bright spot straight line is called a second bright spot. The second preset brightness value is also manually set and input according to the specific situation displayed on the screen and personal experience. Similar to the step of detecting the dark spot in the screen, after the first bright spot detection image is obtained, the first bright spot detection image is filtered to remove the noise in the first bright spot detection image, so as to obtain a second bright spot detection image. It should be noted that the filtering processing on the first bright point detection image is to remove noise in the first bright point detection image, especially to remove regular noise and salt and pepper noise in the first bright point detection image, so as to reduce interference for subsequently extracting bright points in the screen.
And step S20, segmenting the second detection image according to a preset segmentation threshold value to mark a reference point in the second detection image to obtain a marked third detection image, wherein the reference point is a pixel point of which the brightness value meets a preset reference point standard.
In image processing, due to different gray values of the background of the image and interference from external light, if a fixed threshold is used in threshold segmentation, the segmentation effect is greatly affected when the environment changes, and in order to avoid this effect, a dynamic threshold segmentation mode is used in this embodiment.
The segmentation threshold is a preset threshold which can be modified according to actual conditions. The selection of the segmentation threshold is related to the position of the pixel point in the second detection image, the gray value of the pixel point, the brightness value of the pixel point and the field characteristic of the pixel point. In the following, the detection of bright and dark spots in the screen of the terminal device is described separately.
When dark spots on a screen of the terminal equipment are detected, a group of first segmentation thresholds is selected to segment a second dark spot detection image, the second dark spot detection image is divided into a plurality of areas, and the interior of each area has consistent attributes. Calculating the average brightness value of the pixel points in each area, finding out the area with the average brightness value lower than a first preset brightness value, marking the pixel points with the brightness values lower than the first preset brightness value in the area, wherein the pixel points are first dark points, and thus obtaining a third dark point detection image marked with the first dark points. When the dark point of the screen of the terminal equipment is detected, the reference point is a first dark point, and the preset reference point standard of the first dark point is that the brightness value of the pixel point is smaller than a first preset brightness value.
After the third dark spot detection image is obtained, a prompt message is output to prompt the user to confirm whether to delete the mark of the first dark spot in the third dark spot detection image. And if a confirmation instruction that the user confirms to delete the mark of the first dark spot in the third dark spot detection image is received, deleting the mark according to the confirmation instruction so as to achieve the purpose of keeping the dark spot. And if a confirmation instruction that the user confirms to delete the mark of the first dark point in the third dark point detection image is not received, not deleting the mark, and continuously executing the operation of detecting the dark point straight line in the third dark point detection image.
When the bright spot of the screen of the terminal equipment is detected, the second bright spot detection image is also segmented by adopting a dynamic threshold segmentation mode, which is similar to the detection of the dark spot of the screen of the terminal equipment. In the embodiment, a group of second segmentation thresholds is selected to segment the second bright point detection image, the second bright point detection image is divided into a plurality of areas, and the interior of each area has consistent attributes. Calculating the average brightness value of the pixel points in each area, finding out the area with the average brightness value larger than a second preset brightness value, marking the pixel points with the brightness value lower than the second preset brightness value in the area, wherein the pixel points are first bright points, and thus obtaining a third bright point detection image marked with the first bright points. When the bright spot of the screen of the terminal equipment is detected, the reference point is a first bright spot, and the preset reference point standard of the first bright spot is that the brightness value of the pixel point is greater than a second preset brightness value.
After the third bright point detection image is obtained, a prompt message is output to prompt the user to confirm whether to delete the mark of the first bright point in the third bright point detection image. And if an instruction that the user confirms to delete the mark of the first bright point in the third bright point detection image is received, deleting the mark of the first bright point according to the instruction so as to achieve the purpose of reserving the first bright point. And if the instruction that the user confirms to delete the mark of the first bright point in the third bright point detection image is not received, the mark of the first bright point is not deleted, and the operation of detecting the bright point straight line in the third bright point detection image is continuously executed.
And step S30, processing the third detection image through Gaussian mask convolution to determine whether a reference straight line exists on the third detection image, wherein the reference straight line is a straight line which meets a preset reference straight line standard in the third detection image.
The gaussian mask convolution processing is performed in two steps, the first step is a mask operation, the mask operation can be understood as shielding a portion of an image to be processed to control a region or a processing process where the portion of the image to be processed is located, and the portion of the image to be processed in this embodiment refers to a whole or a local region of the third detected image. The second step is to perform gaussian convolution processing on the image part to be processed, and the operation plays a role in removing noise to a certain extent. And obtaining the pixel value of each pixel point of the part of the image to be processed through Gaussian convolution processing, and determining whether a reference straight line exists on the third detection image according to the pixel value of each pixel point. The reference straight line is a dark point straight line and a bright point straight line, the preset reference straight line standard of the dark point straight line is that the ratio of the second dark point on the straight line in the third dark point detection image is greater than or equal to the preset proportion parameter, and the preset reference straight line standard of the bright point straight line is that the ratio of the second bright point on the straight line in the third bright point detection image is greater than or equal to the preset proportion parameter.
Further, step S30 includes:
and a, processing the third detection image through Gaussian mask convolution to calculate the ratio of the reference points on the straight line in the third detection image.
And after the third detection image is subjected to Gaussian mask convolution processing, obtaining the pixel value of each pixel point on the straight line in the third detection image, and comparing the pixel value of each pixel point with a preset pixel value.
When the dark points of the screen of the terminal equipment are detected, the pixel values of all pixel points on the third dark point detection image are compared with the preset first pixel value to obtain the pixel points of which the pixel values on the straight line are smaller than the preset first pixel value in the third dark point detection image, the pixel points are second dark points, the ratio of the number of the second dark points on the straight line to the total number of the pixel points on the straight line is calculated to obtain the occupation ratio of the dark points on the straight line, wherein the first pixel value is a standard for judging the second dark points, and the first pixel value is formulated and input by researchers according to the specific conditions displayed on the screen and personal experience.
When the bright spots of the screen of the terminal equipment are detected, comparing pixel values of all pixel points on a third bright spot detection image with a preset second pixel value to obtain pixel points, which are larger than the preset second pixel value, on a straight line in the third bright spot detection image, wherein the pixel points are second bright spots, calculating a ratio of the number of the second bright spots on the straight line to the total number of the pixel points on the straight line to obtain the ratio of the bright spots on the straight line, wherein the second pixel value is a standard for judging the second bright spots, and the second pixel value is formulated and input by researchers according to specific conditions and personal experiences of screen display.
And b, if the proportion is larger than or equal to a preset proportion parameter, determining that a reference point straight line exists on the third detection image.
After the ratio of the reference point on the straight line in the third detection image is obtained, comparing the ratio with a preset ratio parameter, and if the ratio is greater than or equal to the preset ratio parameter, indicating that the reference straight line exists on the third detection image; and if the ratio is smaller than the preset ratio parameter, indicating that no reference straight line exists on the third detection image. The size of the proportional parameter can be set according to specific needs, and the size of the proportional parameter in this embodiment is not particularly limited.
In step S40, if it is determined that a reference straight line exists on the third detection image, the reference straight line is marked on the third detection image.
When it is determined that the reference straight line exists on the third detected image, the reference straight line is marked in the third detected image. After marking the reference straight line on the third detected image, a prompt message is output to prompt the user to confirm whether to delete the mark of the reference straight line in the third detected image. If an instruction that a user confirms to delete the mark of the reference straight line in the third detection image is received, deleting the mark according to the instruction so as to achieve the purpose of keeping the reference straight line; if an instruction for confirming the deletion of the mark of the reference straight line in the third detected image by the user is not received, the mark is not deleted.
According to the method, the first detection image of the screen of the terminal device is subjected to filtering processing, so that noise on the first detection image is removed, subsequent reference detection is prevented from being interfered by the noise, the accuracy of detection of the reference point of the screen of the terminal device is reduced, and then the first detection image subjected to filtering processing is subjected to segmentation processing and Gaussian mask convolution processing to obtain the reference point and the reference straight line of the screen of the terminal device.
Further, the present invention proposes a second embodiment, and the second embodiment of the screen display state detection method is different from the first embodiment of the screen display state detection method in that, if it is determined that the reference straight line exists on the third detected image, after the step of marking the reference straight line in the third detected image, the method further includes:
c, determining the position of a reference point corresponding to the reference point in the third detection image;
and d, outputting the position information of the reference point position.
The reference point positions referred to in this embodiment include dark point positions and bright point positions. After the detection of the dark point and the bright point in the screen of the terminal device is completed, the dark point position corresponding to the dark point in the third dark point detection image and the bright point position corresponding to the bright point in the third bright point detection image can be determined, that is, the dark point position corresponding to the first dark point and the second dark point in the third dark point detection image and the bright point position corresponding to the first bright point and the second bright point in the third bright point detection image are determined. And after determining the positions of the dark spots and the positions of the bright spots, outputting position information of the positions of the dark spots and the positions of the bright spots, wherein the representation mode of the position information can be the position coordinates of the dark spots and the bright spots on a screen of the terminal equipment, and can also be other modes capable of representing the positions of the dark spots and the bright spots.
The positions of the dark spots and the bright spots on the screen of the terminal equipment are determined, and the position information of the positions of the dark spots and the bright spots is output, so that the user can conveniently improve and delete the dark spots and the bright spots in the screen of the terminal equipment in the following process.
Further, the present invention provides a third embodiment, where the third embodiment of the screen display state detection method is different from the first embodiment of the screen display state detection method, and the second embodiment is different in that the step of obtaining a first detection image of a screen of a terminal device, and performing filtering processing on the first detection image to obtain a second detection image includes:
and c, acquiring a first detection image of a screen of the terminal equipment, and performing frequency domain processing and Fourier transform on the first detection image to remove noise in the first detection image to obtain a first sub-image of the first detection image.
After a first detection image of the terminal device is obtained, firstly, frequency domain processing is carried out on the first detection image to obtain a first detection image after the frequency domain processing. Frequency domain processing refers to a technique for modifying the image spectrum to different degrees, and is generally assumed as follows: firstly, noise causing image quality reduction occupies a high frequency band of a frequency spectrum; secondly, the image edge occupies a high frequency band; and thirdly, the image main body or the gray level slowly-changing area occupies a low frequency band. Based on these assumptions, selective modifications can be made to the various frequency bands. Therefore, the frequency domain processing is performed on the first detection image, and each frequency band in the first detection image can be modified to eliminate noise.
In order to further eliminate the noise in the first detection image, the first detection image after frequency domain processing is subjected to fourier transform to remove the noise in the first detection image, so as to obtain a first sub-image of the first detection image. It should be noted that after the first detection image is subjected to frequency domain processing and fourier transform, noise, especially regular noise, in the first detection image is removed.
And d, filtering the first sub-image to obtain a second detection image.
The frequency domain processing and the Fourier transform only remove part of the noise, and the rest part of the noise (mainly the salt and pepper noise) needs to be filtered, so that after the first sub-image is obtained, the first sub-image is filtered to obtain a second detection image.
Further, step d includes:
and e, performing median filtering processing on the first sub-image according to a preset filtering threshold value to remove salt and pepper noise in the first sub-image to obtain a second sub-image of the first detection image.
The preset filtering threshold may be obtained through calculation or obtained through experience of researchers. If the filtering threshold is obtained through calculation, one of the calculation methods may be to use the median of the gray values of the pixels in the first sub-image as the preset filtering threshold. After the filtering threshold is obtained, performing median filtering processing on the first sub-image to remove salt and pepper noise in the first sub-image, and obtaining a second sub-image of the first detection image. And the median filtering eliminates salt and pepper noise by adopting a nonlinear filtering method according to a preset filtering threshold value. The nonlinear filtering method is very effective in smoothing impulse noise and eliminating salt-pepper noise, and can protect sharp edges of images.
And f, smoothing the second sub-image according to a preset smoothing threshold value to obtain a second detection image.
And after the second sub-image is obtained, smoothing the second sub-image. The mode adopted in the smoothing process is mean filtering, and the mean filtering adopts a linear filtering method. In this embodiment, the average pixel value of all the pixel points on the first sub-image may be used as the smoothing threshold. It should be noted that the smoothing threshold and the filtering threshold are similar and can also be obtained through the experience of researchers. Specifically, according to a preset smoothing threshold, a mean value filtering mode is adopted to smooth the second sub-image so as to remove gaussian noise in the second sub-image, and a second detection image is obtained.
It should be noted that the process of obtaining the second detection image is similar to the process of obtaining the second detection image, and repeated description is omitted here.
In the embodiment, partial noise in the first detection image is removed by performing advanced frequency domain processing and fourier transform on the first detection image, and then median filtering processing and smoothing processing are performed on the image from which the partial noise is removed, salt-pepper noise and gaussian noise on the first detection image are removed, so that the noise is prevented from influencing the detection of the screen reference point of the terminal device, and the accuracy of the detection result of the screen reference point of the terminal device is improved.
Further, the present invention proposes a fourth embodiment, and the fourth embodiment of the screen display state detection method is different from the first embodiment of the screen display state detection method, and the second embodiment and the third embodiment are different in that before the step of acquiring the first detection image of the screen of the terminal device, the method further includes:
and c, calling a pre-stored original detection picture.
And d, shooting the original detection picture according to preset exposure time to obtain a first detection image.
The original detection picture may be a white field picture, or a gray field picture, or a black field picture. The white field picture is a picture with an R (red) value of 255, a G (green) value of 255 and a B (blue) value of 255 in one picture, and is used for detecting a dark spot on a screen of the terminal device. The gray field picture is a picture with an R value of 128, a G value of 128 and a B value of 128 in an image, the black field picture is a picture with an R value of 0, a G value of 0 and a B value of 0 in an image, and the gray field picture and the black field picture are used for detecting a bright point on a screen of the terminal device. And after receiving the detection instruction, calling an original detection picture, and shooting the original dark spot detection picture according to the preset exposure time to obtain a first dark spot detection image. The detection instruction may be triggered by the user in the terminal device as needed, or may be triggered by a timing task in the terminal device, the preset exposure time may be set by the user as needed, and the size of the preset exposure time is not specifically limited in this embodiment. It should be noted that, when detecting a dark spot on the screen of the terminal device, the exposure time should be reduced in order to prevent the dark spot detection on the screen of the terminal device from being affected by the exposure during the process of capturing the original detection picture. When detecting the bright spot on the screen of the terminal device, the exposure time should be increased in order to prevent the bright spot detection on the screen of the terminal device from being affected by underexposure during the process of shooting the original detection picture. The adjustment of the exposure time can be automatically completed by the terminal equipment or manually adjusted by a user.
The implementation obtains the first detection image by calling the original detection image in the terminal equipment and then shooting the original detection image, changes the condition that the terminal equipment originally needs to receive the detection image through the access signal to detect the screen reference point of the terminal equipment, and realizes the automatic output of the screen reference point detection image.
In addition, an embodiment of the present invention further provides a device for detecting a screen display state, where the device for detecting a screen display state includes:
the acquisition module is used for acquiring a first detection image of a screen of the terminal equipment;
the filtering module is used for carrying out filtering processing on the first detection image to obtain a second detection image;
the segmentation module is used for segmenting the second detection image according to a preset first segmentation threshold value so as to mark a reference point in the second detection image and obtain a marked third detection image, wherein the reference point is a pixel point of which the brightness value meets a preset reference point standard;
the processing module is used for processing the third detection image through Gaussian mask convolution to determine whether a reference straight line exists on the third detection image, wherein the reference straight line is a straight line meeting a preset reference straight line standard in the third detection image;
and a marking module, configured to mark the reference straight line in the third detection image if it is determined that the reference straight line exists on the third detection image.
Further, the screen display state detection apparatus further includes:
the determining module is used for determining the reference point position corresponding to the reference point in the third detection image;
and the output module is used for outputting the position information of the reference point position.
Further, the screen display state detection apparatus further includes:
the processing transformation module is used for acquiring a first detection image of a screen of the terminal equipment, and performing frequency domain processing and Fourier transformation on the first detection image to remove noise in the first detection image to obtain a first sub-image of the first detection image;
the filtering module is further configured to perform filtering processing on the first sub-image to obtain a second detection image.
Further, the filtering module includes:
the filtering unit is used for performing median filtering processing on the first sub-image according to a preset filtering threshold value so as to remove salt and pepper noise in the first sub-image and obtain a second sub-image of the first detection image;
and the smoothing unit is used for smoothing the second sub-image according to a preset smoothing threshold value to obtain a second detection image.
Further, the convolution module includes:
a convolution unit configured to convolution-process the third detection image by a gaussian mask to calculate a ratio of reference points on a straight line in the third detection image;
and the determining unit is used for determining that a reference straight line exists on the third detection image if the ratio is greater than or equal to a preset ratio parameter.
Further, the screen display state detection apparatus further includes:
the calling module is used for calling a pre-stored original detection picture;
and the shooting module is used for shooting the original detection picture according to the preset exposure time to obtain a first detection image.
Further, the reference points are dark points and bright points, the dark points are pixel points with brightness values smaller than a preset first preset brightness value, and the bright points are pixel points with brightness values larger than a preset second preset brightness value.
The embodiment of the screen display state detection device of the invention is basically the same as that of the screen display state detection method, and is not described herein again.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a screen display state detection program is stored on the computer-readable storage medium, and when being executed by a processor, the screen display state detection program implements the steps of the screen display state detection method described above.
Note that the computer-readable storage medium may be provided in a terminal device.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the screen display status detection method described above, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a readable storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (9)
1. A method for detecting a screen display state is characterized by comprising the following steps:
acquiring a first detection image of a screen of a terminal device, and filtering the first detection image to obtain a second detection image;
segmenting the second detection image according to a preset segmentation threshold value to mark a reference point in the second detection image to obtain a marked third detection image, wherein the reference point is a pixel point of which the brightness value meets a preset reference point standard;
processing the third detection image through Gaussian mask convolution to determine whether a reference straight line exists on the third detection image, wherein the reference straight line is a straight line which meets a preset reference straight line standard in the third detection image;
if the reference straight line exists on the third detection image, marking the reference straight line in the third detection image;
the step of processing the third detected image by gaussian mask convolution to determine whether a reference straight line exists on the third detected image comprises:
performing Gaussian convolution processing on an image part to be processed in the third detection image to obtain pixel values of all pixel points of the image part to be processed, wherein the image part to be processed is all or a local area of the third detection image;
calculating the ratio of reference points on a straight line in the third detection image; when the third detection image is a third dark point detection image, taking pixel points with pixel values smaller than a preset first pixel value on a straight line in the third dark point detection image as second dark points, and calculating the ratio of the number of the second dark points on the straight line to the total number of the pixel points on the straight line to obtain the occupation ratio of the dark points on the straight line; when the third detection image is a third bright point detection image, taking pixel points with pixel values larger than a preset second pixel value on a straight line in the third bright point detection image as second bright points, and calculating the ratio of the number of the second bright points on the straight line to the total number of the pixel points on the straight line to obtain the ratio of the bright points on the straight line;
and if the proportion is larger than or equal to a preset proportion parameter, determining that a reference straight line exists on the third detection image.
2. The screen display state detecting method of claim 1, wherein if it is determined that the reference straight line exists on the third detected image, after the step of marking the reference straight line in the third detected image, further comprising:
determining the position of a reference point corresponding to the reference point in the third detection image;
and outputting the position information of the reference point position.
3. The screen display state detection method of claim 1, wherein the step of obtaining a first detection image of a screen of a terminal device and performing filtering processing on the first detection image to obtain a second detection image comprises:
acquiring a first detection image of a screen of a terminal device, and performing frequency domain processing and Fourier transform on the first detection image to remove noise in the first detection image to obtain a first sub-image of the first detection image;
and filtering the first sub-image to obtain a second detection image.
4. The screen display state detection method of claim 3, wherein the step of performing filtering processing on the first sub-image to obtain a second detection image comprises:
performing median filtering processing on the first sub-image according to a preset filtering threshold value to remove salt and pepper noise in the first sub-image to obtain a second sub-image of the first detection image;
and smoothing the second sub-image according to a preset smoothing threshold value to obtain a second detection image.
5. The screen display state detection method of claim 1, wherein the step of acquiring the first detection image of the terminal device screen is preceded by:
calling a pre-stored original detection picture;
and shooting the original detection picture according to the preset exposure time to obtain a first detection image.
6. The method as claimed in any one of claims 1 to 4, wherein the reference points are dark points and bright points, the dark points are pixels with a brightness value smaller than a first preset brightness value, and the bright points are pixels with a brightness value larger than a second preset brightness value.
7. A screen display state detection device, characterized by comprising:
the acquisition module is used for acquiring a first detection image of a screen of the mobile terminal;
the filtering module is used for carrying out filtering processing on the first detection image to obtain a second detection image;
the segmentation module is used for segmenting the second detection image according to a preset first segmentation threshold value so as to mark a reference point in the second detection image and obtain a marked third detection image, wherein the reference point is a pixel point of which the brightness value meets a preset reference point standard;
the processing module is used for processing the third detection image through Gaussian mask convolution to determine whether a reference straight line exists on the third detection image, wherein the reference straight line is a straight line meeting a preset reference straight line standard in the third detection image;
a marking module, configured to mark a reference straight line in the third detection image if it is determined that the reference straight line exists in the third detection image;
a convolution module, the convolution module comprising:
the convolution unit is used for performing Gaussian convolution processing on the to-be-processed image part in the third detection image to obtain a pixel value of each pixel point of the to-be-processed image part, wherein the to-be-processed image part is the whole or local area of the third detection image; calculating the ratio of reference points on a straight line in the third detection image; when the third detection image is a third dark point detection image, taking pixel points with pixel values smaller than a preset first pixel value on a straight line in the third dark point detection image as second dark points, and calculating the ratio of the number of the second dark points on the straight line to the total number of the pixel points on the straight line to obtain the occupation ratio of the dark points on the straight line; when the third detection image is a third bright point detection image, taking pixel points with pixel values larger than a preset second pixel value on a straight line in the third bright point detection image as second bright points, and calculating the ratio of the number of the second bright points on the straight line to the total number of the pixel points on the straight line to obtain the ratio of the bright points on the straight line;
and the determining unit is used for determining that a reference straight line exists on the third detection image if the ratio is greater than or equal to a preset ratio parameter.
8. A terminal device comprising a memory, a processor and a screen display state detection program stored on the memory and executable on the processor, the screen display state detection program when executed by the processor implementing the steps of the screen display state detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that a screen display state detection program is stored thereon, which when executed by a processor implements the steps of the screen display state detection method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910670697.6A CN110351549B (en) | 2019-07-23 | 2019-07-23 | Screen display state detection method and device, terminal equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910670697.6A CN110351549B (en) | 2019-07-23 | 2019-07-23 | Screen display state detection method and device, terminal equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110351549A CN110351549A (en) | 2019-10-18 |
CN110351549B true CN110351549B (en) | 2021-11-09 |
Family
ID=68180155
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910670697.6A Active CN110351549B (en) | 2019-07-23 | 2019-07-23 | Screen display state detection method and device, terminal equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110351549B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113038021B (en) * | 2021-03-26 | 2022-08-19 | 歌尔股份有限公司 | Image shake detection method, image shake detection device and readable storage medium |
CN114140382B (en) * | 2021-10-22 | 2022-07-29 | 珠海视熙科技有限公司 | Screen area detection method and device and storage medium |
CN116912181B (en) * | 2023-06-30 | 2024-04-26 | 深圳市圆周检测技术有限公司 | Screen uniformity detection method, system and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104010190A (en) * | 2014-05-29 | 2014-08-27 | 东莞市信太通讯设备有限公司 | Method for automatically detecting dead pixels of mobile phone screen before assembling |
CN105301810A (en) * | 2015-11-24 | 2016-02-03 | 上海斐讯数据通信技术有限公司 | Screen defect detecting method and screen defect detecting device |
CN105701484A (en) * | 2016-03-02 | 2016-06-22 | 成都翼比特自动化设备有限公司 | Insulator explosion algorithm based on image identification technology |
WO2016146105A1 (en) * | 2015-03-16 | 2016-09-22 | Hochschule Offenburg | Method and device for calibrating a camera |
CN109119009A (en) * | 2017-06-26 | 2019-01-01 | 深圳回收宝科技有限公司 | Screen defect inspection method, detection device, system and storage medium |
-
2019
- 2019-07-23 CN CN201910670697.6A patent/CN110351549B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104010190A (en) * | 2014-05-29 | 2014-08-27 | 东莞市信太通讯设备有限公司 | Method for automatically detecting dead pixels of mobile phone screen before assembling |
WO2016146105A1 (en) * | 2015-03-16 | 2016-09-22 | Hochschule Offenburg | Method and device for calibrating a camera |
CN105301810A (en) * | 2015-11-24 | 2016-02-03 | 上海斐讯数据通信技术有限公司 | Screen defect detecting method and screen defect detecting device |
CN105701484A (en) * | 2016-03-02 | 2016-06-22 | 成都翼比特自动化设备有限公司 | Insulator explosion algorithm based on image identification technology |
CN109119009A (en) * | 2017-06-26 | 2019-01-01 | 深圳回收宝科技有限公司 | Screen defect inspection method, detection device, system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110351549A (en) | 2019-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110351549B (en) | Screen display state detection method and device, terminal equipment and readable storage medium | |
US10497097B2 (en) | Image processing method and device, computer readable storage medium and electronic device | |
US11113795B2 (en) | Image edge processing method, electronic device, and computer readable storage medium | |
CN107431784B (en) | System and method for detecting smoke during anatomical surgery | |
EP3811607B1 (en) | Image capture device and method for image score-based video quality enhancement | |
EP3731221B1 (en) | Image brightness adjustment method, device and system, and computer-readable storage medium | |
CN111739041B (en) | Image frame clipping method, device and equipment | |
JP7295950B2 (en) | Video enhancement control method, device, electronic device and storage medium | |
CN105335939B (en) | Image processing method and device | |
CN108932696B (en) | Signal lamp halo suppression method and device | |
CN112383820B (en) | Method for identifying horizontal and vertical screens of screen projection equipment, storage medium and terminal equipment | |
CN104902143B (en) | A kind of image de-noising method and device based on resolution ratio | |
CN109658427A (en) | Image processing method and device | |
CN110637227B (en) | Detection parameter determining method and detection device | |
CN109618228B (en) | Video enhancement control method and device and electronic equipment | |
CN109727216A (en) | Image processing method, device, terminal device and storage medium | |
CN117218039A (en) | Image processing method, device, computer equipment and storage medium | |
US10311550B2 (en) | Image processing device for eliminating graininess of image | |
CN111915497A (en) | Image black and white enhancement method and device, electronic equipment and readable storage medium | |
CN112150433B (en) | Method for detecting whisker substance of circuit board, computer equipment and storage medium | |
CN114119390A (en) | Image processing method and device | |
CN110636361B (en) | Intelligent mobile phone APP setting platform, method and storage medium | |
CN110136073B (en) | Image sharpening processing method and system | |
JP2006277688A (en) | Apparatus and method for improving image quality, and program therefor | |
CN115713471B (en) | Image noise reduction method and device, storage medium and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |