Disclosure of Invention
Based on this, it is necessary to provide a method and a device for detecting the maintenance characteristics of the equipment screen aiming at the defects existing in the conventional detection method of the maintenance characteristics of the equipment screen.
A method for detecting equipment screen maintenance features comprises the following steps:
Acquiring a flash lamp image of the intelligent device to be detected, wherein the flash lamp image is a shooting image of the intelligent device to be detected when the intelligent device to be detected is irradiated by a flash lamp;
extracting an exposure point area of the flash lamp image, wherein the exposure point area comprises exposure points of the intelligent device to be detected irradiated by the flash lamp;
And judging whether the equipment screen of the intelligent equipment to be tested has maintenance characteristics or not according to the gradient direction distribution and the gradient direction of the exposure point area.
According to the equipment screen maintenance feature detection method, after the flash lamp image of the intelligent equipment to be detected is obtained, the exposure point area of the flash lamp image is extracted, and whether maintenance features exist on the equipment screen of the intelligent equipment to be detected is judged according to the gradient direction distribution and the gradient direction of the exposure point area. Based on this, by setting the environment of the flash image, the illumination environment disturbance of the flash image is reduced. Meanwhile, by means of image optimization aiming at the flash lamp image, whether maintenance features exist in a screen area of the intelligent device to be detected or not can be accurately and rapidly determined.
In one embodiment, the process of extracting the exposure point area of the flash image includes the steps of:
Carrying out gray level conversion on the flash lamp image to generate a corresponding gray level image;
carrying out binarization processing on the gray level image to obtain a binarized image;
Extracting the edge of the binarized image through an edge detection algorithm;
And screening out the exposure point area of the edge by a circle detection algorithm.
In one embodiment, before the process of binarizing the gray-scale image to obtain the binarized image, the method further comprises the steps of:
white noise interference of the gray scale image is removed.
In one embodiment, the process of judging whether the device screen of the intelligent device to be tested has maintenance features according to the gradient direction distribution and the gradient direction of the exposure point area includes the steps of:
calculating the gradient of the exposure point area;
Calculating the gradient direction and the gradient amplitude of each pixel point in the exposure point area by utilizing the gradient;
calculating gradient direction distribution of the exposure point area according to the gradient direction and the amplitude;
and sequencing the gradient direction distribution in an inverted order according to the gradient direction, and judging whether the equipment screen of the intelligent equipment to be tested has maintenance characteristics according to the angle of the gradient direction after sequencing in the inverted order.
In one embodiment, the process of sorting gradient direction distribution in a reverse order according to gradient direction, and judging whether a device screen of the intelligent device to be tested has maintenance features according to an angle of the gradient direction after sorting in the reverse order includes the steps of:
And judging whether the equipment screen of the intelligent equipment to be tested has maintenance characteristics or not according to the first n angles distributed in the front gradient direction after the reverse sequence sequencing, wherein n is a positive integer.
In one embodiment, n is 3.
In one embodiment, the process of judging whether the device screen of the intelligent device to be tested has maintenance features according to the first n angles distributed in the front gradient direction after the reverse sequence ordering includes the steps of:
And when the first n angles are target angles, judging that the equipment screen of the intelligent equipment to be tested has maintenance features, otherwise, judging that the intelligent equipment to be tested does not have maintenance features.
An equipment screen repair feature detection apparatus comprising:
The system comprises an image acquisition module, a display module and a display module, wherein the image acquisition module is used for acquiring a flash lamp image of the intelligent equipment to be detected, wherein the flash lamp image is a shooting image when the intelligent equipment to be detected is irradiated by a flash lamp;
The area extraction module is used for extracting an exposure point area of the flash lamp image, wherein the exposure point area comprises exposure points of the intelligent equipment to be detected, which are irradiated by the flash lamp;
And the feature detection module is used for judging whether the equipment screen of the intelligent equipment to be detected has maintenance features according to the gradient direction distribution and the gradient direction of the exposure point area.
According to the device for detecting the maintenance characteristics of the equipment screen, after the flash lamp image of the intelligent equipment to be detected is obtained, the exposure point area of the flash lamp image is extracted, and whether the maintenance characteristics exist on the equipment screen of the intelligent equipment to be detected is judged according to the gradient direction distribution and the gradient direction of the exposure point area. Based on this, by setting the environment of the flash image, the illumination environment disturbance of the flash image is reduced. Meanwhile, by means of image optimization aiming at the flash lamp image, whether maintenance features exist in a screen area of the intelligent device to be detected or not can be accurately and rapidly determined.
A computer storage medium having stored thereon computer instructions which, when executed by a processor, implement the apparatus screen repair feature detection method of any of the above embodiments.
According to the computer storage medium, after the flash lamp image of the intelligent device to be detected is obtained, the exposure point area of the flash lamp image is extracted, and whether the maintenance feature exists on the device screen of the intelligent device to be detected is judged according to the gradient direction distribution and the gradient direction of the exposure point area. Based on this, by setting the environment of the flash image, the illumination environment disturbance of the flash image is reduced. Meanwhile, by means of image optimization aiming at the flash lamp image, whether maintenance features exist in a screen area of the intelligent device to be detected or not can be accurately and rapidly determined.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the device screen repair feature detection method of any of the above embodiments when the program is executed by the processor.
According to the computer equipment, after the flash lamp image of the intelligent equipment to be detected is obtained, the exposure point area of the flash lamp image is extracted, and whether the maintenance feature exists on the equipment screen of the intelligent equipment to be detected is judged according to the gradient direction distribution and the gradient direction of the exposure point area. Based on this, by setting the environment of the flash image, the illumination environment disturbance of the flash image is reduced. Meanwhile, by means of image optimization aiming at the flash lamp image, whether maintenance features exist in a screen area of the intelligent device to be detected or not can be accurately and rapidly determined.
Detailed Description
For a better understanding of the objects, technical solutions and technical effects of the present invention, the present invention will be further explained below with reference to the drawings and examples. Meanwhile, it is stated that the embodiments described below are only for explaining the present invention and are not intended to limit the present invention.
Fig. 1 is a structural diagram of an acquisition device, as shown in fig. 1, wherein the acquisition device comprises a left light source 1, a right light source 11, a left acrylic light transmitting sheet 2, a right acrylic light transmitting sheet 10, a power line socket 3, a power switch 4, a touch screen 5, a flash lamp 6, a one-to-three data line 7, a camera 8, a front metal light guide strip 9 and a rear metal light guide strip 13, which are used for enhancing the brightness of the front side and the rear side, and an intelligent device placing plate 12 to be tested is generally green.
As shown in fig. 1, the smart device under test is placed in the placement board 12, and image capturing is performed by the camera 8 to capture the smart device under test. Unlike the long-time stable illumination photographed in the conventional recycling process, the flash 6 provides instantaneous strong flash illumination at the camera 8, and the flash image is collected in cooperation with the camera 8.
Based on this, fig. 2 is a flowchart of an apparatus screen maintenance feature detection method according to an embodiment, as shown in fig. 2, the apparatus screen maintenance feature detection method according to an embodiment includes steps S100 to S102:
s100, acquiring a flash lamp image of the intelligent device to be detected, wherein the flash lamp image is a shooting image of the intelligent device to be detected when the intelligent device to be detected is irradiated by a flash lamp;
s101, extracting an exposure point area of a flash lamp image, wherein the exposure point area comprises exposure points of the intelligent device to be tested, which are irradiated by the flash lamp;
s102, judging whether a device screen of the intelligent device to be tested has maintenance features or not according to gradient direction distribution and gradient direction of the exposure point area.
The execution subject of step S100 acquires a flash image, and performs the next image processing.
In step S101, the exposure point area of the flash lamp image is extracted, the irrelevant image information is removed, the subsequent image processing calculation amount is reduced, and the accuracy of detecting the maintenance feature is improved. And if the equipment screen has the maintenance feature, the equipment screen representing the corresponding intelligent equipment to be detected is maintained.
In one embodiment, the exposure point area of the flash image may be extracted by a pre-established image cropping approach.
In one example, fig. 3 is a flowchart of an apparatus screen maintenance feature detection method according to another embodiment, as shown in fig. 3, a process of extracting an exposure point area of a flash image in step S101 includes steps S200 to S204:
s200, performing gray level conversion on the flash lamp image to generate a corresponding gray level image;
s201, removing white noise interference of a gray level image;
s202, binarizing the gray level image to obtain a binarized image;
s203, extracting the edge of the binarized image through an edge detection algorithm;
s204, screening out the exposure point area of the edge through a circle detection algorithm.
Step S201 is an optional step.
The flash lamp image I is subjected to gray level conversion to generate a corresponding gray level image G1, and the following formula is shown:
G1(j,i)=0.1140*Ib(j,i)+0.5870*Ig(j,i)+0.2989*Ir(j,i)
The white noise interference of the gray image G1 is removed, and the white noise interference can be performed by a gaussian blur process, as follows:
Wherein G2 represents the gray-scale image G1 after the gaussian blur processing.
Where j=1, 2..h, i=1, 2..w, j and i denote coordinate values in the horizontal direction and the vertical direction with respect to the origin of the upper left corner in the gradation image G1, respectively, H and W denote the height and the width of X, W denote the length of the rectangular window, set to 3, a denote the amplitude of the corresponding rectangular window, set to 16. The rectangular window represents the template corresponding to the gaussian filter:
in one embodiment, the edge detection algorithm may be a Canny edge detection operator. Binarizing the gray level image (G1 or G2) to obtain a binarized image B, and extracting an edge E of the binarized image B by a Canny edge detection operator, wherein the formula is as follows:
as a preferred implementation mode, the threshold value of the Canny edge detection operator is respectively set to be 30 and 60 so as to improve the detection accuracy of intelligent devices to be detected, such as intelligent mobile phones.
In one embodiment, the circle detection algorithm may be a hough circle detection method. And screening out an exposure point region X in the edge E by a Hough circle detection method.
In one embodiment, as shown in fig. 3, in step S102, a process of determining whether a device screen of the intelligent device to be tested has a maintenance feature according to gradient direction distribution and gradient direction of an exposure point region includes steps S300 to S303:
S300, calculating gradients of the exposure point areas;
s301, calculating gradient directions and amplitudes of all pixel points in an exposure point area by using gradients;
s302, calculating gradient direction distribution of an exposure point area according to the gradient direction and the amplitude;
S303, carrying out reverse order sorting on the gradient direction distribution according to the gradient direction, and judging whether a device screen of the intelligent device to be tested has maintenance features according to the angle of the gradient direction after the reverse order sorting.
Wherein, the gradient G of the exposure spot area is calculated as follows:
G=|Gx|+|Gy|
calculating the gradient direction theta and the amplitude M of each pixel point in the exposure point area X by using the gradient G, wherein the gradient direction theta and the amplitude M are as follows:
using the gradient direction θ and the amplitude M, the gradient direction distribution H of the exposure spot area X is calculated as follows:
H(θ)=∑M(j,i),θ∈[0,360]
In one embodiment, the process of sorting gradient direction distribution in a reverse order according to gradient direction, and judging whether a device screen of the intelligent device to be tested has maintenance features according to an angle of the gradient direction after sorting in the reverse order includes the steps of:
And judging whether the equipment screen of the intelligent equipment to be tested has maintenance characteristics or not according to the first n angles distributed in the front gradient direction after the reverse sequence sequencing, wherein n is a positive integer.
In one embodiment, n is 3.
In one embodiment, the process of judging whether the device screen of the intelligent device to be tested has maintenance features according to the first n angles distributed in the front gradient direction after the reverse sequence ordering includes the steps of:
And when the first n angles are target angles, judging that the equipment screen of the intelligent equipment to be tested has maintenance features, otherwise, judging that the intelligent equipment to be tested does not have maintenance features.
In one embodiment, the target angle is 60 ° or 120 °.
According to the equipment screen maintenance feature detection method of any embodiment, after the flash lamp image of the intelligent equipment to be detected is obtained, the exposure point area of the flash lamp image is extracted, and whether maintenance features exist on the equipment screen of the intelligent equipment to be detected is judged according to gradient direction distribution and gradient direction of the exposure point area. Based on this, by setting the environment of the flash image, the illumination environment disturbance of the flash image is reduced. Meanwhile, by means of image optimization aiming at the flash lamp image, whether maintenance features exist in a screen area of the intelligent device to be detected or not can be accurately and rapidly determined.
The embodiment of the invention also provides a device screen maintenance feature detection device.
Fig. 4 is a block diagram of an apparatus screen maintenance feature detection device according to an embodiment, and as shown in fig. 4, the apparatus screen maintenance feature detection device according to an embodiment includes:
The image acquisition module 100 is used for acquiring a flash lamp image of the intelligent device to be detected, wherein the flash lamp image is a shooting image of the intelligent device to be detected when the intelligent device to be detected is irradiated by a flash lamp;
the area extraction module 101 is used for extracting an exposure point area of the flash lamp image, wherein the exposure point area comprises exposure points of the intelligent device to be detected, which are irradiated by the flash lamp;
The feature detection module 102 is configured to determine whether a maintenance feature exists on a device screen of the intelligent device to be detected according to the gradient direction distribution and the gradient direction of the exposure point area.
According to the device for detecting the maintenance characteristics of the equipment screen, after the flash lamp image of the intelligent equipment to be detected is obtained, the exposure point area of the flash lamp image is extracted, and whether the maintenance characteristics exist on the equipment screen of the intelligent equipment to be detected is judged according to the gradient direction distribution and the gradient direction of the exposure point area. Based on this, by setting the environment of the flash image, the illumination environment disturbance of the flash image is reduced. Meanwhile, by means of image optimization aiming at the flash lamp image, whether maintenance features exist in a screen area of the intelligent device to be detected or not can be accurately and rapidly determined.
The embodiment of the invention also provides a computer storage medium, on which computer instructions are stored, which when executed by a processor, implement the method for detecting the equipment screen maintenance characteristics according to any of the above embodiments.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
Or the above-described integrated units of the invention may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the embodiments of the present invention may be essentially or part contributing to the related art, and the computer software product may be stored in a storage medium, and include several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the methods of the embodiments of the present invention. The storage medium includes various media capable of storing program codes such as a removable storage device, a RAM, a ROM, a magnetic disk or an optical disk.
Corresponding to the above computer storage medium, in one embodiment, there is also provided a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for detecting a screen maintenance feature of a device according to any one of the above embodiments when the processor executes the program.
The computer device may be a terminal, and its internal structure may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a device screen maintenance feature detection method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can be keys, a track ball or a touch pad arranged on the shell of the computer equipment, can also be an external keyboard, a touch pad or a mouse, and the like
According to the computer equipment, after the flash lamp image of the intelligent equipment to be detected is obtained, the exposure point area of the flash lamp image is extracted, and whether the maintenance feature exists on the equipment screen of the intelligent equipment to be detected is judged according to the gradient direction distribution and the gradient direction of the exposure point area. Based on this, by setting the environment of the flash image, the illumination environment disturbance of the flash image is reduced. Meanwhile, by means of image optimization aiming at the flash lamp image, whether maintenance features exist in a screen area of the intelligent device to be detected or not can be accurately and rapidly determined.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.