Fancy screen detection method and electronic equipment
By building a mask area on the display screen of an electronic device, dividing image blocks and calculating the color difference value, or determining the number of pixels with a large brightness gap through edge detection, the screen problem caused by detection of display driver circuit failure is solved, and the screen is realized Accurate detection of color blocks and line screens.
Patent Information
- Application Number
- CN202311056593.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
AI Technical Summary
How to detect the problem of screen loss on the electronic device display screen due to a failure of the display driver circuit.
By acquiring the detection image, the mask recognition area is divided into multiple image blocks, and the color difference value between each two image blocks is calculated. When the color difference value is greater than or equal to the color difference threshold, it is determined that the screen of the device to be tested appears. It is also possible to determine the number of pixels with a large brightness gap in the mask recognition area through edge detection, and determine the screen when certain conditions are met.
Effective detection of color blocks or line-like screens on the display screen caused by display driver circuit failure is realized, and the accuracy and reliability of the detection are improved.
Smart Images

Figure CN119494810A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a screen flower detection method and electronic equipment. Background Art
[0002] Currently, the display panels of electronic devices are mainly liquid crystal displays (LCD) or organic light-emitting diode displays (OLED).
[0003] When an electronic device runs an application, a driving circuit is required to drive the LCD or OLED to display the corresponding image. The driving circuit will have a certain pressure, so it may fail, causing the display screen of the electronic device to appear distorted.
[0004] Therefore, how to detect the occurrence of screen distortion on the display screen of an electronic device due to a failure in a display driving circuit is a technical problem that those skilled in the art urgently need to solve. Summary of the invention
[0005] The screen noise detection method and electronic device provided in the present application can detect screen noise on the display screen of the electronic device caused by a malfunction of the display driving circuit.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, the present application provides a method for detecting a screen distortion, comprising:
[0008] A detection image can be obtained, wherein the detection image includes a screen of the device under test that is displaying an image, and the display interface of the device under test includes a mask area. Then, a mask recognition area corresponding to the mask area in the detection image can be divided into multiple image blocks. When the color difference values of two image blocks among the multiple image blocks are greater than or equal to a color difference threshold, it indicates that the color difference between the two image blocks is large, and it can be determined that a flowery screen appears on the device under test.
[0009] In some possible implementations, the color difference value between every two image blocks in a plurality of image blocks can be determined to obtain a plurality of color difference values. When the largest color difference value among the plurality of color difference values is greater than or equal to a color difference threshold, it is determined that a color block-like screen display appears on the device under test. For example, the plurality of image blocks can be sorted from large to small according to the sum of the means of the three channels L, a, and b, and the color difference value between the image block with the largest sum of the means of the three channels and the image block with the smallest sum of the means of the three channels is calculated. When the color difference value is greater than or equal to the color difference threshold, it is determined that a color block-like screen display appears on the device under test.
[0010] Furthermore, the detected image is a BGR image, and the color difference value between the two image blocks can be determined by converting the BGR image into the laboratory color space Lab, determining the mean of three channels in each image block in Lab, the three channels including brightness, green to red components, and blue to yellow components, and determining the color difference value between the two image blocks according to the difference in the mean values of the corresponding channels between the image blocks.
[0011] The present application can also determine that the grayscale value corresponding to the pixel point in the mask area is a first grayscale value, and perform edge detection on the mask recognition area to detect the pixel points in the mask recognition area with a large brightness difference relative to the surrounding pixels, that is, the pixel points whose grayscale value and the first grayscale value have a difference greater than or equal to the threshold value, which can be called edge pixels. When the number of edge pixels detected in the mask recognition area in the detection image meets the quantity condition, it can be determined that the device under test has a distorted screen, wherein the quantity condition can be that the ratio of the edge pixels detected to the total pixels in the mask recognition area is greater than or equal to the ratio threshold, or the number of edge pixels is greater than or equal to the quantity threshold. In this way, it is possible to detect a distorted screen on the display screen caused by a malfunction in the display driver circuit.
[0012] Furthermore, the mask recognition area can be determined by:
[0013] Acquire the first-frame detection image, wherein the first-frame detection image may include the screen area of the device under test and the shooting scene area, the screen area may be a mask recognition area and a central area, wherein the grayscale value of the pixel points in the mask recognition area is a first grayscale value, the grayscale value of the pixel points in the central area is a second grayscale value, and the grayscale value of the pixel points in the shooting scene area is a third grayscale value, the first grayscale value, the second grayscale value and the third grayscale value may be set as required, and in order to distinguish different areas by the grayscale value of the pixel points, the first grayscale value and the second grayscale value may be set to different values, and the first grayscale value and the third grayscale value may be set to different values. The area composed of pixels of the first grayscale value may be determined as the mask recognition area in the detection image.
[0014] The following is an example in which the mask area is a gray mask area, the pixels of the third gray value are black pixels, and the image displayed on the display screen of the electronic device 1 when the first frame detection image is captured is pure white.
[0015] Specifically, since the pixels in the shooting scene area are black pixels, the grayscale value of black pixels is generally 0. Therefore, in order to distinguish the shooting scene area from the screen area, the third grayscale value can be set to 0. Then, according to the pixels greater than the third grayscale value, that is, the pixels with grayscale values greater than 0, the position of the screen area of the device under test in the first frame detection image is determined. After determining the position of the screen area, the position of the mask recognition area can be determined by determining the position of the central area. It should be noted that, since the image displayed on the display screen of the electronic device 1 when shooting the first frame detection image is pure white, the pixels in the central area of the first frame detection image obtained are white. Since the pixels in the mask recognition area are gray, the grayscale value of the pixels in the central area is greater than the grayscale value of the pixels in the mask recognition area, and then the first grayscale threshold can be set to the range of 100-128. Then, the position of the central area can be determined according to the pixels greater than the first grayscale value, and then the position of the mask recognition area in the detection image can be determined according to the position of the screen area and the position of the central area.
[0016] In some possible implementations, the display screen of the electronic device 1 also includes a front camera, and the screen area in the captured detection image also includes a camera hole area (front camera hole area). After the first frame detection image is converted into a grayscale image, the pixels in the camera hole area are black pixels, and the pixel values are generally 0. The position of the camera hole area in the detection image can be determined based on the pixels in the screen area that are less than the first grayscale value, and the position of the mask recognition area can be determined based on the position of the screen area, the position of the central area, and the position of the camera hole area.
[0017] In some possible implementation methods, since the screen of the device under test may be a curved screen, the display interface of the device under test may be incomplete in the video or photo taken by the test equipment, or the front camera hole may have bumps or burrs, so the screen area can be regionally eroded, and the front camera hole area and the center area can be regionally expanded.
[0018] Then, the area formed by the pixel points of the first gray value is determined according to the position of the screen area after the area erosion, the position of the camera hole area after the area expansion, and the position of the central area after the area expansion.
[0019] In a second aspect, the present application provides an electronic device, including: a camera processor and a memory;
[0020] The camera is used to collect video streams;
[0021] One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the electronic device performs the method described in any one of the first aspects.
[0022] In a third aspect, the present application provides a computer storage medium, comprising computer instructions, which, when executed on a mobile terminal, enables the electronic device to execute the method described in any one of the first aspects.
[0023] In a fourth aspect, the present application provides a computer program product, comprising instructions; when the instructions are executed by an electronic device, the electronic device executes the method described in any one of the first aspects.
[0024] It can be seen from the above technical solution that the present application has the following beneficial effects:
[0025] In the present application, a detection image can be obtained, wherein the detection image includes the screen of the device under test that is displaying the image, and the display interface of the device under test includes a mask area. Then, the mask recognition area corresponding to the mask area in the detection image can be divided into multiple image blocks. When the color difference value of two image blocks in the multiple image blocks is greater than or equal to the color difference threshold, it means that the color difference between the two image blocks is large, and it can be determined that the device under test has a screen flower when generating the frame test image, thereby realizing the detection of the color block type screen flower caused by the display drive circuit failure, or, determining that the gray value corresponding to the pixel point in the mask area is the first gray value, and performing edge detection on the mask recognition area to detect the pixel points in the mask recognition area with a large brightness difference relative to the surrounding pixel points, that is, the pixel points whose gray value and the first gray value have a difference greater than or equal to the threshold value, which can be called edge pixel points. When the number of edge pixel points detected in the mask recognition area in the detection image meets the quantity condition, it can be determined that the device under test has a screen flower, thereby realizing the detection of the line type screen flower caused by the display drive circuit failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1A A partial diagram of a driving circuit in a display screen provided in an embodiment of the present application;
[0027] Figure 1B An exemplary diagram of the composition of an electronic device provided in an embodiment of the present application;
[0028] Figure 2 An example diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0029] Figure 3 A flowchart of a method for detecting a screen distortion provided in an embodiment of the present application;
[0030] Figure 4a A schematic diagram of a first type of mask region provided in an embodiment of the present application;
[0031] Figure 4b A schematic diagram of a second method of constructing a mask region provided in an embodiment of the present application;
[0032] Figure 4c A schematic diagram of a third method of constructing a mask region provided in an embodiment of the present application;
[0033] Figure 4d A schematic diagram of a fourth method of constructing a mask region provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of opening a camera provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of a camera video interface preview provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of a camera photo taking interface preview provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of detecting various regions of an image provided in an embodiment of the present application;
[0038] Fig. 9 A schematic diagram of an execution device provided in an embodiment of the present application;
[0039] Fig.10 A schematic diagram of a detection image after regional erosion and regional expansion provided in an embodiment of the present application;
[0040] Fig.11 A flowchart of a color block type screen detection method provided in an embodiment of the present application;
[0041] Fig.12 A schematic diagram of a combination of a mask area and a test image provided in an embodiment of the present application;
[0042] Fig.13 A schematic diagram of an embodiment of the present application after performing an AND operation on a mask area and a test image;
[0043] Fig.14a A schematic diagram of dividing a mask recognition area into a preset number of image blocks provided in an embodiment of the present application;
[0044] Fig.14b A schematic diagram of a detected color block image provided by the present application;
[0045] Fig.14c A schematic diagram of another detected color block image provided by the present application;
[0046] Fig.15A flowchart of a line-type flower screen detection method provided in an embodiment of the present application;
[0047] Fig.16 A schematic diagram of another combination of a mask area and a test image provided in an embodiment of the present application;
[0048] Fig.17 Another schematic diagram of performing an AND operation on a mask area and a test image provided in an embodiment of the present application;
[0049] Fig.18 A schematic diagram of a detection image after edge detection of a mask recognition area provided in an embodiment of the present application;
[0050] Fig.19 A schematic diagram of a detected line image provided by the present application;
[0051] Fig. 20 A schematic diagram of another detected line image provided in the present application. DETAILED DESCRIPTION
[0052] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.
[0053] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0054] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given:
[0055] Liquid crystal display (LCD) is a type of flat display. The advantages of this display are low power consumption, small size, and low radiation. It uses a liquid crystal solution in two polarized materials, so that when current passes through the liquid, the crystals will be rearranged to achieve the purpose of imaging.
[0056] Organic laser display OLED, also known as organic light-emitting diode, is a self-luminous material that does not require a backlight panel. It has the advantages of uniform image quality, fast response speed, can emit light with a simple driving circuit, and simple process.
[0057] At present, electronic devices are generally equipped with display screens, which can display images, texts, and controllable controls, etc. Among them, the display screen is mainly a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
[0058] A driving circuit is provided in the LCD or OLED. When the electronic device is triggered to run an application, the driving circuit is required to drive the LCD or OLED to display the corresponding image. In this way, the driving circuit will be under certain pressure, so it may fail, causing the display screen of the electronic device to be distorted.
[0059] Furthermore, the driving circuit may include: a display driving link, a timing control circuit, a scan driving circuit, a reference voltage circuit, a VSS driving circuit, a VDD driving circuit, etc.
[0060] After research, it was found that these driving circuits are distributed around the circuit board, that is, around the screen. Figure 1A As shown, if the driving circuits around the circuit board fail, the screen will generally be distorted first around the screen, or the effect of distorted screen will be most obvious around the screen.
[0061] In view of this, the present application proposes a method for detecting a screen flower, in which the screen of the device under test can be photographed or recorded to obtain a detection image, wherein the display interface of the device under test includes a mask area. Then, the mask recognition area corresponding to the mask area in the detection image can be divided into multiple image blocks. When the color difference value of two image blocks in the multiple image blocks is greater than or equal to the color difference threshold, it means that the color difference between the two image blocks is large, and it can be determined that the screen of the device under test has a flower screen when generating the frame test image, thereby realizing the detection of the color block type flower screen on the display screen caused by the failure of the display drive circuit, or, determining that the gray value corresponding to the pixel point in the mask area is a first gray value, when the number of pixel points in the mask recognition area corresponding to the mask area in the detection image, whose gray value is greater than or equal to the first gray value, meets the quantity condition, it can be determined that the screen of the device under test has a flower screen when generating the frame test image. Thus, the detection of the line type flower screen on the display screen caused by the failure of the display drive circuit is realized.
[0062] In some embodiments, the electronic device may be a mobile phone, a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable electronic device, a smart watch, etc. The present application does not impose any special restrictions on the specific form of the above electronic devices. In this embodiment, the structure of the electronic device may be as follows: Figure 1B As shown, Figure 1B A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0063] like Figure 1B As shown, the electronic device may include a processor 110, a sensor module 120, a camera 130, a display screen 140, etc. The sensor module 120 may include a touch sensor 120A, etc.
[0064] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0065] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0066] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0067] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0068] In some embodiments, the processor 110 may include one or more interfaces, which may include an inter-integrated circuit (I2C) interface, a universal asynchronous receiver / transmitter (UART) interface, and a mobile industry processor interface (MIPI).
[0069] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 120A, the charger, the flash, the camera 130, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 120A through the I2C interface, so that the processor 110 communicates with the touch sensor 120A through the I2C bus interface to realize the touch function of the electronic device.
[0070] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 140 and the camera 130. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 130 communicate via the CSI interface to realize the shooting function of the electronic device. The processor 110 and the display screen 140 communicate via the DSI interface to realize the display function of the electronic device.
[0071] The electronic device implements the display function through a GPU, a display screen 140, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 140 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0072] The display screen 140 is used to display images, videos, etc. The display screen 140 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oled, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 140, where N is a positive integer greater than 1.
[0073] A series of graphical user interfaces (GUIs) can be displayed on the display screen 140 of the electronic device, and these GUIs are the main screens of the electronic device. Generally speaking, the size of the display screen 140 of the electronic device is fixed, and only limited controls can be displayed on the display screen 140 of the electronic device. A control is a GUI element, which is a software component included in an application program, and controls all data processed by the application program and interactive operations on the data. Users can interact with the control through direct manipulation to read or edit relevant information of the application program. Generally speaking, a control can include visual interface elements such as icons, controls, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc.
[0074] The electronic device can realize the shooting function through the ISP, the camera 130, the video codec, the GPU, the display screen 140 and the application processor.
[0075] The ISP is used to process the data fed back by the camera 130. For example, when taking a photo, the shutter is opened, and the ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 130.
[0076] The camera 130 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device may include 1 or N cameras 130, where N is a positive integer greater than 1.
[0077] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency point, a digital signal processor is used to perform Fourier transform on the frequency point energy.
[0078] Video codecs are used to compress or decompress digital videos. Electronic devices can support one or more video codecs. In this way, electronic devices can play or record videos in multiple coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0079] NPU is a neural network (NN) computing processor. It can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of electronic devices, such as image recognition.
[0080] The touch sensor 120A is also called a "touch control device". The touch sensor 120A can be set on the display screen 140, and the touch sensor 120A and the display screen 140 form a touch screen, also called a "touch control screen". The touch sensor 120A is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 140. In other embodiments, the touch sensor 120A can also be set on the surface of the electronic device, which is different from the position of the display screen 140.
[0081] In addition, an operating system is run on the above components, and application programs can be installed and run on the operating system.
[0082] The operating system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0083] Figure 2 It is an example diagram of the software structure of the electronic device according to the embodiment of the present application.
[0084] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, framework layer, Android runtime and system library, and kernel layer.
[0085] The application layer can include a series of application packages. Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, video, mask area construction APP, etc.
[0086] The framework layer provides application programming interface (API) and programming framework for the application layer. The framework layer includes some predefined functions. Figure 2 As shown, the framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0087] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0088] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0089] The view system includes visual controls, such as controls for displaying text, controls for displaying images, and application icons. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a mask area can include a view for displaying text and a view for displaying images.
[0090] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0091] AndroidRuntime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0092] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0093] The application layer and framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0094] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0095] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0096] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0097] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0098] A 2D graphics engine is a drawing engine for 2D drawings.
[0099] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, sensor driver, and display driver is used to drive the display driver circuit to display the corresponding image on LCD or OLED.
[0100] For example, when a user touches the mask area to build an APP icon on the electronic device interface, the electronic device will trigger the start of the mask area APP construction operation at the application layer, and then call the view system API service of the application framework layer to form a mask area display interface. Then the display driver of the kernel layer will drive the hardware display driver circuit to display the constructed mask area on the display screen 140.
[0101] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.
[0102] The following is a detailed description of the screen distortion detection method provided by the present application, which can be implemented on electronic device 1 and electronic device 2, where electronic device 1 is used as the electronic device to be tested and electronic device 2 is used as the electronic device to be tested. The method can detect screen distortion on the display screen of the electronic device caused by a malfunction in the display driving circuit.
[0103] In order to make the technical solution of the present application clearer and easier to understand, the following describes the screen distortion detection method provided by the present application in combination with the above embodiments and the corresponding drawings. Figure 3 A flow chart of a method for detecting a screen distortion is shown in FIG. Figure 3 As shown, the screen distortion detection method provided in the embodiment of the present application may include:
[0104] S301: The electronic device 1 constructs a mask area on the display interface.
[0105] It should be noted that the driving circuits in the liquid crystal display (LCD) or organic light-emitting diode (OLED), such as the display driving link, reference voltage circuit, VSS driving circuit, VDD driving circuit, etc., are all distributed around the circuit board, that is, around the screen. Figure 1A As shown, if the driving circuit around the circuit board fails, resulting in screen problems such as color blocks or lines, the screen will generally be distorted first from the four sides of the screen or the effect of the screen being distorted is most obvious around the four sides of the screen. Therefore, in the present application, a mask area can be constructed on the display interface of the electronic device 1, that is, a mask area is constructed around the screen, and then the screen is detected in the mask area to see if there is a problem of screen distortion, which can improve the accuracy of detecting screen distortion.
[0106] The mask area refers to an area where the mask processing is performed on the image so that the value of the mask pixel is non-0, for example, it can be an area where the value of the mask pixel is 1, and a construction rule can be set in advance, such as Figure 4a The construction rules shown are that the mask area can be composed of four parts. The first part of the mask area, that is, area a, has a width of xcm, the second part of the mask area, that is, area b, has a width of ycm, the third part of the mask area, that is, area c, has a width of ncm, and the third part of the mask area, that is, area d, has a width of mcm, wherein the specific values of x, y, n and m can be set according to actual needs. In this way, the mask area can be constructed on the display interface of the electronic device 1 by constructing the four parts that constitute the mask area through the construction rules.
[0107] The above is only one way to construct the mask area. In practical applications, other methods can be used to construct the mask area. For example, see Figure 4b .exist Figure 4b The middle mask area can also be composed of four parts a, b, c and d, so that the mask area can be constructed on the display interface of the electronic device 1 by constructing each part that constitutes the mask area. Figure 4a The embodiment shown differs in that the areas of the four portions of the construction mask region are not the same.
[0108] In some possible implementations, the mask area may also be composed of a portion of each of the portions a, b, c, and d, for example. Figure 4c as well as Figure 4d shown.
[0109] The constructed mask area can be gray, black, or white. If a gray mask area is constructed, the effect of producing black or white lines on the detection is more obvious. If a black mask area is constructed, the effect of producing white or gray lines on the detection is more obvious. If a white mask area is constructed, the effect of producing black or gray lines on the detection is more obvious. Technical personnel in this field can construct mask areas of different colors according to actual needs. The following takes the construction of a gray mask area as an example for introduction.
[0110] S302: The electronic device 1 performs a pressure test on the display screen.
[0111] Stress testing refers to running a series of tasks to simulate normal user use in order to stimulate display driver failures and produce screen distortion, for example, running a series of apps such as audio software and game software.
[0112] The electronic device 1 can perform a pressure test after constructing a mask area on the display interface.
[0113] S303: The electronic device 2 may obtain an image of the electronic device 1 performing a pressure test on the display screen.
[0114] In some possible implementations, the electronic device 2 may record a video of the electronic device 1 performing a stress test on the display screen through a camera application, and then obtain multiple frames of images of the electronic device 1 performing a stress test on the display screen from the video.
[0115] Further, such as Figure 5 As shown, Figure 5A schematic diagram of a user opening a camera application is shown. For example, the user's touch operation is to open the camera. The touch sensor 120A can receive the user's touch operation on the camera icon 501 and report the touch operation on the camera icon 501 to the processor 110. After receiving the touch operation on the camera icon 501, the processor 110 can respond to the above touch operation and start the application corresponding to the camera icon 501 (which can be simply referred to as the camera application).
[0116] When the electronic device 2 triggers the camera application operation at the application layer, it calls the view system API service of the system framework layer to form a camera display interface and display the camera video preview interface on the display screen 140. The camera display interface can be composed of one or more views, including a view for displaying text and a view for displaying pictures. Figure 6 The camera application interface of the electronic device 2 shown in the figure may include various functional controls such as a video control 601 on the display interface of the camera application, and the display interface may display the screen of the electronic device 1. The electronic device 2 triggers a video recording event in response to the user clicking the video control 601, thereby recording the electronic device 1 and obtaining a video. Then, multiple frames of detection images may be obtained from the video to perform screen distortion detection on each frame of the detection image.
[0117] In some possible implementations, the electronic device 2 can take a photo of the electronic device 1, such as Figure 7 The camera application interface shown in the figure may include various functional controls such as a photo control 701 on the display interface of the camera application, and the display interface may display the screen of the electronic device 1. The electronic device responds to the user clicking the photo control 701, triggering a start photo event, so that the electronic device 1 can be photographed to obtain a detection image. The photo event can be pre-set to trigger once every preset time period, so that multiple frames of detection images can be obtained to perform flower screen detection on each frame of the detection image, wherein the preset time period can be set according to demand.
[0118] Specifically, Figure 8 As shown, Figure 8 The image shown can be called a detection image. Figure 8 Area A, that is, the image displayed in the display interface of electronic device 1 can be called a test image. When electronic device 1 runs a stress test scenario, the image obtained by electronic device 2 taking a photo or recording a video of the screen of electronic device 1 is the image generated by electronic device 1 running the stress test scenario. It can be understood that the test image includes the test image. Therefore, the test image can be detected in this application to determine whether a distorted screen is generated when the electronic device 1 generates a test image of the corresponding frame.
[0119] Since the electronic device 1 and the electronic device 2 may be at a certain distance in some cases, there may be a redundant A area in the detection image in addition to the test image displayed by the electronic device 1. Therefore, it is necessary to perform step S304 to determine the position of the mask area in each frame of the detection image.
[0120] The following describes the specific steps of performing the flower screen detection on the detection image. It should be noted that the steps of performing the flower screen detection on the detection image can be performed on a computer with an image processing function. Specifically, Fig. 9 As shown, in Fig. 9 Device A is a test device (electronic device 2), device B is a device under test (electronic device 1), and device C is a computer with image processing function.
[0121] You can first build a test screen on the device under test. Fig. 9 The mask area shown in (a) is then Fig. 9 As shown in (b), when the display screen of the device under test B displays an image, the test device A can be used to take a photo or video of the device under test to obtain a test image, and then Fig. 9 As shown in (c), the obtained detection image can be sent to the C device, so that the subsequent step of performing flower screen detection on the detection image can be performed on the C device, that is, on a computer with image processing function.
[0122] Of course, in the present application, the test device can also directly perform a flower screen detection on the test image after acquiring the test image. That is to say, the subsequent step of performing a flower screen detection on the test image can also be performed on the electronic device 2 of the test device. The following is an introduction taking the electronic device 2 as the execution body.
[0123] S304: The electronic device 2 determines the position of the mask recognition area corresponding to the mask area in each frame of the detection image.
[0124] The mask recognition region is a region corresponding to the mask region in each frame of the detection image, and the position of the mask recognition region corresponding to the mask region in each frame of the detection image is determined so as to subsequently process the mask recognition region.
[0125] In order to avoid the electronic device 2 being affected by the ambient light during the shooting of the electronic device 1, resulting in inaccurate screen detection results, the electronic device 1 can be photographed in an opaque space. For example, the electronic device 2 can photograph the electronic device 1 in an opaque dark environment to obtain multiple frames of detection images, wherein each frame of the detection image can include the screen area of the device under test and the shooting scene area.
[0126] Furthermore, the electronic device 2 can obtain the first frame detection image in multiple frames of detection images, that is, the first frame image. The first frame detection image is used to determine the position of the mask recognition area on each frame detection image. It should be noted that when the electronic device 1 is photographed in a dark environment without light transmission, the pixels in the shooting scene area in the obtained detection image are black. In order to be able to determine the position of the mask area corresponding to the mask recognition area in the detection image, at the moment corresponding to the shooting of the first frame detection image, the electronic device 1 needs to display a pure white or pure black image on the display screen. Therefore, the content displayed on the display screen of the electronic device 1 when shooting the first frame detection image is different from the content displayed on the display screen of the electronic device 1 when shooting other frame detection images, but the first frame detection image is the same size as the other frame detection images, and then by determining the position of the mask recognition area in the first frame detection image, the position of the mask recognition area in each subsequent frame detection image can be determined.
[0127] Among them, the detection image is generally a BGR image. BGR image refers to an image including three color channels of RGB, that is, each pixel in the image is composed of three channels, and different pixels are obtained by different proportions of three colors. Each channel represents a color, B is blue, G is green, and R is red, representing the three primary colors respectively. In the pixel array of a two-dimensional image, after determining the row and column, the values of the three primary colors at that position will also be obtained to determine the color of the pixel.
[0128] After obtaining the BGR image, since we take the construction of a gray mask area as an example, we need to convert the BGR image into a grayscale image (grayscale image, Gray). In a grayscale image, the grayscale value of each pixel ranges from 0 to 255. The pixel with a grayscale value of 0 is black, the pixel with a grayscale value of 128 is gray, and the pixel with a grayscale value of 255 is white.
[0129] Then, the contour area and position of the electronic device 2 can be calculated by binarizing the grayscale image. For example, a first grayscale threshold can be set, and the contour area of the electronic device 2 can be calculated by the first grayscale threshold, wherein the first grayscale threshold can be preset according to needs, for example, set to any number from 1 to 128, for example, if it is set to 100, then the pixel values with grayscale values lower than 100 can be set to 0, and the pixel values with grayscale values higher than or equal to 100 can be set to 255. For another example, if it is set to 128, then the pixel values with grayscale values lower than 128 can be set to 0, and the pixel values with grayscale values higher than or equal to 128 can be set to 255. In this way, the contour area (the area of the screen area) of the electronic device 2 can be determined based on the pixel points greater than the first grayscale threshold after the grayscale image is binarized, as shown in FIG. Figure 8As shown, the position area corresponding to the outline area of the electronic device 2 is Figure 8 The A area in the image, and the area a of the front hole (imaging hole) in the A area.
[0130] After determining the contour area of the electronic device 2, in order to determine the area of the mask recognition area in the contour area, a second grayscale threshold can be set, and the detection image can be binarized according to the second grayscale threshold, wherein the second grayscale threshold can be preset according to the needs, for example, it can be set to any number between 129 and 254, for example, it is set to 200, then the pixel value with a grayscale value lower than 200 can be set to 0, and the pixel value with a grayscale value higher than or equal to 200 can be set to 255, so that the area of the central area of the electronic device 2 can be determined according to the pixel points greater than or equal to the second grayscale threshold, and the corresponding position area is Figure 8 That is, as shown in 8, firstly, the position of area A in the detection image and the position of area a in area A are determined by a first grayscale threshold, and then the position of area B is determined by a second grayscale threshold, and then in area A, area a and area B are removed, and what remains is area C, which is the mask recognition area. It should be noted that in this embodiment, the electronic device 1 includes a front camera as an example. The electronic device 1 may not include a front camera. When the electronic device 1 does not include a front camera, the position of the screen area and the position of the center area in the detection image can be determined, and then the position of the mask recognition area is determined according to the position of the screen area and the position of the center area.
[0131] In some possible implementations, the first frame detection image includes the screen area of the device under test and the shooting scene area, and the screen area can be a mask recognition area and a central area, wherein the grayscale value of the pixel points in the mask recognition area is a first grayscale value, the grayscale value of the pixel points in the central area is a second grayscale value, and the grayscale value of the pixel points in the shooting scene area is a third grayscale value. The first grayscale value, the second grayscale value, and the third grayscale value can be set according to requirements, and in order to distinguish different areas by the grayscale values of the pixels, the first grayscale value and the second grayscale value can be set to different values, and the first grayscale value and the third grayscale value can be set to different values. The area composed of pixels of the first grayscale value can be determined as the mask recognition area in the detection image.
[0132] The following is an example in which the mask area is a gray mask area, the pixels of the third gray value are black pixels, and the image displayed on the display screen of the electronic device 1 when the first frame detection image is captured is pure white.
[0133] Specifically, since the pixels in the shooting scene area are black pixels, the grayscale value of black pixels is generally 0. Therefore, in order to distinguish the shooting scene area from the screen area, the third grayscale value can be set to 0. Then, based on the pixels greater than the third grayscale value, that is, the pixels with grayscale values greater than 0, the position of the screen area of the device under test in the first frame detection image is determined, such as Figure 8 As shown, the position of the screen area of the device under test in the first frame detection image is determined as area A. After the position of the screen area is determined, the position of the mask recognition area can be determined by determining the position of the central area. It should be noted that, since the image displayed on the display screen of the electronic device 1 when taking the first frame detection image is pure white, the pixels in the central area of the acquired first frame detection image are white. Since the pixels in the mask recognition area are gray, the grayscale value of the pixels in the central area is greater than the grayscale value of the pixels in the mask recognition area, and the first grayscale threshold can be set to the range of 100-128, and then the position of the central area can be determined based on the pixels greater than the first grayscale value, for example. Figure 8 The area in the image can then be used to detect the position of the mask recognition area in the image according to the position of the screen area and the position of the central area.
[0134] In some possible implementations, the display screen of the electronic device 1 also includes a front camera, and the screen area in the captured detection image also includes a camera hole area (front camera hole area). After the first frame detection image is converted into a grayscale image, the pixels in the camera hole area are black pixels, and the pixel values are generally 0. The position of the camera hole area in the detection image can be determined based on the pixels in the screen area that are less than the first grayscale value, and the position of the mask recognition area can be determined based on the position of the screen area, the position of the central area, and the position of the camera hole area.
[0135] In addition, since the screen of electronic device 1 may be a curved screen, the display interface of electronic device 1 may be incomplete in the video or photo taken by electronic device 2, or the front camera hole may have bumps or burrs, so the screen area can be regionally eroded, and the front camera hole area and the center area can be regionally expanded.
[0136] Specifically, regional erosion refers to eliminating boundary points of a target region so that the boundary of the target region shrinks inward. It should be noted that the target region here refers to the region that needs to be eroded.
[0137] The principle is to set a template area for reference. Then traverse each pixel in the target area and compare it with each pixel in the template area to see if the corresponding pixel values are consistent. If they are consistent, then the pixel is retained. Otherwise, the target pixel is set to the background color, which is equivalent to deleting the target pixel.
[0138] Region expansion refers to expanding the boundary points of the target region, merging all background points in contact with the target region into the target region, and expanding the boundary of the target region outward. It should be noted that the target region here is the region that needs to be expanded.
[0139] The principle is to traverse the target area in the target image, only consider the grayscale values of the target pixel and its two adjacent left and right pixels, and confirm whether they have an intersection with the expanded structural element, that is, there is at least one corresponding grayscale value equal. If there is an intersection, the pixel is processed. Otherwise, the pixel is deleted, where the target image refers to the image that needs to be expanded.
[0140] After regional erosion of the screen area and regional expansion of the front aperture area and the central area, we can get the following Fig.10 The image shown. Fig.10 Region A in the middle is the mask recognition area after regional erosion and regional expansion. It should be noted that the value of the mask pixel in the mask recognition area is non-0, while the value of the remaining areas is 0.
[0141] In this way, after determining the position of the mask recognition area in the first frame of the detection image, the position of the mask area in each subsequent frame of the detection image can be determined.
[0142] S305: The electronic device 2 performs screen distortion detection on the mask recognition area of each frame of the detection image.
[0143] The electronic device 2 may perform frame-by-frame screen noise detection on the mask recognition area of each detection image frame, wherein the screen noise detection may include color block type screen noise detection and line type screen noise detection.
[0144] Furthermore, taking the detection of a certain frame of test image as an example, Figure 8 As shown, in the frame detection image, the electronic device 2 can determine the mask recognition area corresponding to the detection area. It should be noted that the frame detection image can be first subjected to color block type flower screen detection. If it is determined that the frame detection image has a color block type flower screen, the next frame detection image can be detected. If it is determined that the frame detection image does not have a color block type flower screen, then the frame detection image can be subjected to line type flower screen detection. Of course, the frame detection image can also be first subjected to line type flower screen detection. If it is determined that the frame detection image has a line type flower screen, then the next frame detection image can be detected. If it is determined that the frame detection image does not have a line type flower screen, then the frame detection image can be subjected to flower screen type flower screen detection. Those skilled in the art can set it according to actual needs and it is not limited here.
[0145] Specifically, the color block type flower screen detection method and the line type flower screen detection method provided in this application can be introduced in detail in conjunction with the flow chart.
[0146] like Fig.11 As shown, Fig.11 The flowchart of a color block type screen noise detection method provided in the present application is introduced by taking the application of electronic device 2 as an example, including:
[0147] S110: Convert the detection image from the BGR image to the Lab color space (Lab color space, Lab).
[0148] like Fig.12 As shown, the electronic device 2 can determine and display the mask area in the frame detection image, and display the corresponding test image in the central area of the electronic device 1. For example, the test image generates a green block. Fig.12 As shown, for example, area A is the area where a green color block is generated.
[0149] Then the frame detection image can be converted from the BGR image to the Lab color space, where the Lab color space is the optimal space for image segmentation based on color, and is composed of a brightness channel and two color channels. In the Lab color space, L can represent brightness, a can represent the component from green to red, and b can represent the component from blue to yellow.
[0150] S111: performing AND operation on the test image in the detection image and the determined mask area to determine the mask recognition area including the image data.
[0151] The AND operation refers to the arithmetic "AND" operation. It can be 0&1=0, 1&1=1, 0&0=0. Since the value of the mask pixel in the mask recognition area is non-0, for example, 1, and the rest of the area is 0, the test image is ANDed with the mask recognition area, and only the part where the test image and the mask recognition area overlap is retained to determine the mask recognition area including the image data. After the AND operation, the detection image can be obtained by Fig.12 The image shown in is transformed into Fig.13 The image shown, Fig.13 The A in the figure can be called the mask recognition area.
[0152] S112: Divide the mask recognition area including the image data into a preset number of image blocks, and calculate the mean of the three channels L, a, and b of each image block respectively.
[0153] After performing the AND operation, the mask recognition area can be divided into a preset number of image blocks. It is understandable that if color blocks appear in the detection image, the color difference values between each image block may be quite different. Therefore, the L, a, and b channel averages of each image block can be calculated separately. The preset number can be set in advance according to the needs, for example, 4 blocks. After being divided into 4 image blocks, the detection image can be as follows Fig.14a As shown, each region A, B, C and D represents an image block, which is just an example and not a limitation.
[0154] S113: Calculate the average color difference value between every two image blocks in a preset number of image blocks.
[0155] The electronic device 2 can calculate the average color difference value between every two image blocks in a preset number of image blocks. For example, if the four image blocks are a, b, c and d, the average color difference between a and b, the average color difference between a and c, the average color difference between b and c, etc. can be calculated. Based on this principle, the average color difference value between every two image blocks in a preset number of image blocks is calculated.
[0156] The specific color difference calculation method can be calculated according to formula (1):
[0157] E=[(△L*) 2 +(△a*) 2 +(△b*) 2 ] 0.5 (1)
[0158] Among them, △L* represents the difference in L between two image blocks, △a* represents the difference in a between two image blocks,
[0159] △b* represents the difference value of b between two image blocks, and △E represents the color difference value between two image blocks.
[0160] Therefore, the color difference value between every two image blocks can be calculated by the above formula, and finally multiple color difference values can be obtained.
[0161] S114: taking a maximum color difference value from the multiple color difference values. If the maximum color difference value is greater than a color difference threshold, it can be determined that a color block-like screen noise appears on the screen of the electronic device 1 when generating the frame of the test image.
[0162] After calculating multiple average color difference values, the electronic device 2 can take the maximum color difference value. If the maximum color difference value is greater than the color difference threshold, it can be determined that the electronic device 1 has a color block-like screen when generating the frame detection image. The color difference threshold can also be pre-set as 15 according to needs. Of course, this is just an example and is not limited to any limit.
[0163] It should be noted that the above embodiment is only one possible implementation method provided in the present application, and the present application may also have other implementable methods. For example, according to the sum of the means of the three channels L, a, and b, multiple image blocks are sorted from large to small, and the color difference value between the image block with the largest sum of the three-channel means and the image block with the smallest sum of the three-channel means is calculated. Then, the color difference value can be compared with the color difference threshold to determine whether the screen of the electronic device 1 has color block-like screen noise when generating the frame of test image.
[0164] For another example, the color difference value between two image blocks is randomly calculated. If it is determined that the color difference value is greater than the color difference threshold, the calculation of the color difference values between the remaining modules is stopped. Those skilled in the art can set the specific implementation method according to actual needs. This is just an example for illustration and is not limited.
[0165] In the present application, the screen of the device under test can be photographed or recorded to obtain a test image. The mask recognition area including the image data is determined by ANDing the test image displayed by the device under test in the test image with the mask area. That is to say, the portion of the mask area in the test image that overlaps with the test image is retained. Then, the mask recognition area can be divided into multiple image blocks. When the color difference values of two image blocks among the multiple image blocks are greater than or equal to the color difference threshold, it means that the color difference between the two image blocks is large. It can be determined that the device under test has a color block-like screen distortion when generating the frame of the test image, thereby realizing the detection of a color block-like screen distortion caused by a failure in the display driving circuit.
[0166] Specifically, when a color block or other type of distorted screen image is detected in the detection image, the image displayed on the display screen of the corresponding device under test may be as follows: Fig.14b as well as Fig.14c As shown, of course, these are just two examples for illustration, and the detection of color block-type flower screens in this application is not limited to these two.
[0167] The following is a detailed introduction to the line type flower screen detection method.
[0168] like Fig.15 As shown, Fig.15 The flowchart of a line-type screen noise detection method provided in the present application is introduced by taking the application of electronic device 2 as an example, including:
[0169] S151: Convert the detection image from a BGR image to a Gray image.
[0170] like Fig.16 As shown, the corresponding test image is displayed in the central area of the electronic device 1, and the test image generating line-type distorted screen is taken as an example.
[0171] Then the frame detection image can be converted from a BGR image to a Gray image.
[0172] Specifically, the BGR image can be converted into a Gray image using formula (2).
[0173] Geay=B 0.114+G 0.587+R 0.299 (2)
[0174] Wherein, in formula (2), B, G, and R represent the value of each channel respectively. It should be noted that here, the construction of the gray mask area is taken as an example, so the detection image is converted from the BGR image to the Gray image, and those skilled in the art can set it according to actual needs.
[0175] S152: performing AND operation on the test image in the detection image and the determined mask area to determine the mask recognition area including the image data.
[0176] The principle here is similar to that of S111, and no further description is given here. After the AND operation, the detection image can be obtained by Fig.16 The image shown in is transformed into Fig.17 Image shown. Fig.17 The A in the figure can be called the mask recognition area.
[0177] S153: Perform edge detection on the mask recognition area including the image data.
[0178] The electronic device 2 can perform edge detection on the detection image after the AND operation, that is, perform edge detection on the mask recognition area to determine the pixels in the mask recognition area that have a larger brightness difference with respect to the surrounding pixels.
[0179] Specifically, the grayscale value corresponding to the pixel point in the mask area can be set to the first grayscale value, then the grayscale value corresponding to the pixel point in the mask recognition area is also the first grayscale value, and then the pixel points whose difference between the grayscale value and the first grayscale value in the mask recognition area in the detection image is greater than or equal to the threshold are detected, that is, the pixel points with a larger brightness difference relative to the surrounding pixels. The pixel points detected by the edge can be called edge pixels, where the threshold can be set according to needs.
[0180] For example, Fig.16 As shown, Fig.16 The pixels in area A are black, and the surrounding pixels are gray. It can be seen that the brightness difference between the pixels in area A and the surrounding pixels is large. Fig.16 , the pixels in area A can be edge pixels.
[0181] Furthermore, the Canny algorithm may be used to perform edge detection on the mask recognition area in the detection image, wherein the detection image on which edge detection is performed may be used as a target image, and then edge detection may be performed on the mask area of the target image.
[0182] Specifically, the target image is smoothed using a Gaussian filter to obtain a filtered target image, and then the filtered target image is smoothed using first-order partial derivative finite difference to calculate the initial gradient amplitude of each pixel, and the initial gradient amplitude is subjected to non-maximum suppression to obtain the final gradient amplitude of each pixel. Based on the final gradient amplitude of each pixel, a double threshold algorithm is used to determine the target candidate edge in the filtered target image, thereby determining the edge pixel points of the target candidate edge. That is, the pixel points with a large brightness difference relative to the surrounding pixels can be detected using the Canny algorithm to make edge detection more efficient. Of course, other algorithms can also be used to perform edge detection on the target image, which is not limited here. The detected image after edge detection of the mask recognition area can be as follows Fig.18 shown.
[0183] 154: When the number of edge pixels detected by edge detection meets the quantity condition, it is determined that a line-like screen appears on the screen of the device under test when generating the frame of test image.
[0184] In some possible implementations, the ratio of detected edge pixels to the total pixels in the mask recognition area can be calculated. If the ratio is greater than or equal to a ratio threshold, it can be determined that line-like screen noise appears on the screen of the device under test when generating the frame of the test image.
[0185] In some possible implementations, the number of detected edge pixels may be calculated. If the number is greater than or equal to a threshold value, it may be determined that line-like screen noise appears on the screen of the device under test when generating the frame of the test image.
[0186] In the present application, the screen of the device under test can be photographed or recorded to obtain a test image. The test image displayed by the device under test in the test image is ANDed with the mask area to determine the mask recognition area including the image data, that is, the portion of the mask area in the test image that overlaps with the test image is retained. Then, the mask recognition area can be edge detected, and then the pixel points detected by the edge can be used to determine whether the screen of the device under test has line-type distorted screen when generating the frame of the test image. When the ratio of edge pixel points to the total pixel points in the mask recognition area is greater than the ratio threshold or the number of edge pixel points is greater than or equal to the number threshold, it can be determined that the screen of the device under test has line-type distorted screen when generating the frame of the test image. This enables the detection of line-type distorted screen on the display screen caused by a malfunction in the display driver circuit.
[0187] Specifically, when a line-like image is detected in the detection image, the image displayed on the display screen of the corresponding device under test can be as follows: Fig.19 as well as Fig. 20As shown, of course, these are just two examples for illustration, and the detection of line-type flower screens in this application is not limited to these two.
[0188] An embodiment of the present application also provides an electronic device, comprising: a processor and a memory; wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the electronic device executes the method in the above embodiment.
[0189] An embodiment of the present application further provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method in the above embodiment.
[0190] The technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, etc., various media that can store program codes.
[0191] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for detecting a distorted screen, characterized in that: include: Acquire a detection image, wherein the detection image includes a screen of the device under test that is displaying an image, and the display interface of the device under test includes a mask area; Divide the mask recognition area corresponding to the mask area in the detection image into a preset number of image blocks, and determine that a screen distortion occurs on the device under test when the color difference values of two image blocks among the multiple image blocks are greater than or equal to a color difference threshold; or Determine that the grayscale value corresponding to the pixel point in the mask area is a first grayscale value; When the number of pixel points whose grayscale value difference with the first grayscale value in the mask recognition area corresponding to the mask area in the detection image is greater than or equal to the threshold satisfies the quantity condition, it is determined that the device under test has a distorted screen.
2. The method according to claim 1, characterized in that The position of the mask area on the display screen of the device under test corresponds to the position of the driving circuit of the device under test, and the mask recognition area is determined by: Acquire a first-frame detection image, and convert the first-frame detection image from a BGR image into a grayscale image, wherein the first-frame detection image includes a screen area of the device under test and a shooting scene area, wherein the screen area includes a mask recognition area where the grayscale value of the pixel point is a first grayscale value and a central area where the grayscale value of the pixel point is a second grayscale value, and the grayscale value of the pixel point in the shooting scene area is a third grayscale value; the first grayscale value is different from the second grayscale value, and the first grayscale value is different from the third grayscale value; The area formed by the pixels of the first gray value is determined as the mask recognition area in the detection image.
3. The method according to claim 2, characterized in that The mask area is a gray mask area, the pixels of the third gray value are black pixels, and the area formed by the pixels of the first gray value is determined as the mask recognition area in the detection image, including: Determine the position of the screen area of the device under test in the detection image according to the pixel points with a gray value greater than the third gray value; Determine the position of the central area according to the pixel points with a gray value greater than the first gray value; Determine an area composed of pixel points of a first gray value according to the position of the screen area and the position of the central area; The area formed by the pixels of the first gray value is determined as the mask recognition area in the detection image.
4. The method according to claim 3, characterized in that The screen area also includes a camera hole area, and the area composed of pixel points of the first gray value determined according to the position of the screen area and the position of the central area includes: Determine the position of the camera hole area in the detection image according to the pixel points in the screen area that are less than the first gray value; The area formed by the pixel points of the first gray value is determined according to the position of the screen area, the position of the central area and the position of the camera hole area.
5. The method according to claim 4, characterized in that The step of determining the area composed of pixel points of the first gray value according to the position of the screen area, the position of the central area, and the position of the camera hole area includes: Performing regional erosion on the screen area, and performing regional expansion on the camera hole area and the central area; The area formed by the pixel points of the first gray value is determined according to the position of the screen area after the area erosion, the position of the camera hole area after the area expansion, and the position of the central area after the area expansion.
6. The method according to claim 1, characterized in that When the color difference values of two image blocks among the multiple image blocks are greater than or equal to the color difference threshold, determining that the device under test has a distorted screen includes: Determine a color difference value between every two image blocks in the plurality of image blocks; When the maximum color difference value among the color difference values is greater than or equal to the color difference threshold, it is determined that the device under test has a color block-like screen noise.
7. The method according to claim 6, characterized in that The detection image is a BGR image, and determining the color difference value between every two image blocks in the plurality of image blocks includes: Convert the BGR image into Lab color space Lab; Determining the mean of three channels in each image block in the Lab, the three channels including brightness, green to red component, and blue to yellow component; The color difference value between each two image blocks is determined according to the difference in the mean values of the corresponding channels between the image blocks.
8. The method according to claim 1, characterized in that: When the number of pixels in the mask recognition area whose brightness changes are greater than a threshold value satisfies a quantity condition, determining that a screen distortion occurs on the device under test includes: When the proportion of pixels in the mask recognition area whose grayscale value difference with the first grayscale value is greater than or equal to the threshold in the total pixels in the mask recognition area is greater than or equal to the proportion threshold, or the number of pixels in the mask recognition area whose grayscale value difference with the first grayscale value is greater than or equal to the threshold is greater than or equal to the number threshold, it is determined that the device under test has a line-type screen noise.
9. An electronic device, characterized in that: include: Camera processor and memory; The camera is used to collect video streams; Wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the electronic device performs the method as described in any one of claims 1-8.
10. A computer storage medium, characterized in that: The method comprises computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 8.
Citation Information
Cited By
Projector polarization phenomenon detection method, device, equipment and medium
CN120451055A