[go: up one dir, main page]

CN111292302B - Screen detection method and device - Google Patents

Screen detection method and device Download PDF

Info

Publication number
CN111292302B
CN111292302B CN202010072292.5A CN202010072292A CN111292302B CN 111292302 B CN111292302 B CN 111292302B CN 202010072292 A CN202010072292 A CN 202010072292A CN 111292302 B CN111292302 B CN 111292302B
Authority
CN
China
Prior art keywords
screen
area
photo
pixel
continuous
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010072292.5A
Other languages
Chinese (zh)
Other versions
CN111292302A (en
Inventor
刘尧
常树林
陈敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wanwu Xinsheng Information Technology Group Co.,Ltd.
Original Assignee
Shanghai Wanwu Xinsheng Environmental Technology Group Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Wanwu Xinsheng Environmental Technology Group Co filed Critical Shanghai Wanwu Xinsheng Environmental Technology Group Co
Priority to CN202010072292.5A priority Critical patent/CN111292302B/en
Publication of CN111292302A publication Critical patent/CN111292302A/en
Priority to PCT/CN2020/120888 priority patent/WO2021147385A1/en
Application granted granted Critical
Publication of CN111292302B publication Critical patent/CN111292302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30121CRT, LCD or plasma display

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

本发明的目的是提供一种屏幕检测方法及装置,本发明通过将屏幕亮屏显示为白底画面,基于白底画面的边界可以简单、准确的定位设备的屏幕位置。另外,本发明通过分别拍摄包含显示为满屏黄色画面的屏幕区域的第一照片、包含显示为满屏白色画面的屏幕区域的第二照片,便于后续在第一照片或第二照片中可靠识别出所述屏幕的轮廓所围成的范围内的不同种类的屏幕裂纹或划痕。

Figure 202010072292

The purpose of the present invention is to provide a screen detection method and device. The present invention displays the bright screen as a white background image, and can simply and accurately locate the screen position of the device based on the boundary of the white background image. In addition, the present invention respectively takes the first photo containing the screen area displayed as a full-screen yellow screen, and the second photo containing the screen area displayed as a full-screen white screen, so as to facilitate subsequent reliable identification in the first photo or the second photo Different kinds of screen cracks or scratches within the range enclosed by the outline of the screen.

Figure 202010072292

Description

屏幕检测方法及装置Screen detection method and device

技术领域technical field

本发明涉及计算机领域,尤其涉及一种屏幕检测方法及装置。The invention relates to the field of computers, in particular to a screen detection method and device.

背景技术Background technique

现有的手机等智能终端的屏幕上裂纹、划痕的检测都是通过人工的方式进行检测,存在费时费力的问题。The detection of cracks and scratches on the screens of existing smart terminals such as mobile phones is done manually, which is time-consuming and labor-intensive.

发明内容Contents of the invention

本发明的一个目的是提供一种屏幕检测方法及装置。An object of the present invention is to provide a screen detection method and device.

根据本发明的一个方面,提供了一种屏幕检测方法,该方法包括:According to one aspect of the present invention, a screen detection method is provided, the method comprising:

将屏幕亮屏显示为白底画面;Display the bright screen as a white background screen;

拍摄包括所述白底画面的手机屏幕的照片;taking a photo of the mobile phone screen including said white background picture;

从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Recognizing the boundary of the white background picture from the photo, using the boundary as the outline of the screen;

将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Display the bright screen as a full-screen yellow screen, and control the light source to illuminate the screen area that is displayed as a full-screen yellow screen;

拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Take the first photo of the area of the screen that includes the area of the screen shown as a full-screen yellow screen;

将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Display the bright screen as a full-screen white screen, and control the light source to illuminate the screen area displayed as a full-screen white screen;

拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Take a second photo that includes the area of the screen that appears as a full-screen white image;

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。Detecting whether there are cracks or scratches in the area enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches in the screen.

进一步的,上述方法中,从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓,包括:Further, in the above method, identifying the boundary of the white background picture from the photo, using the boundary as the outline of the screen, includes:

将所述照片转换为灰度图片;converting said photo into a grayscale image;

指定预设像素阈值T1对所述灰度图片进行分割,其中,将所述照片中超过所述预设像素阈值T1的像素点的像素值设为255,将所述照片中未超过所述预设像素阈值T1的像素点的像素值设为0;Designate a preset pixel threshold T1 to segment the grayscale picture, wherein the pixel values of the pixels in the photo that exceed the preset pixel threshold T1 are set to 255, and the pixel values in the photos that do not exceed the preset pixel threshold T1 are set to 255. Set the pixel value of the pixel point of the pixel threshold T1 to be 0;

获取所述灰度图片中的像素值为255的各个像素点连续的区域;Obtain the continuous area of each pixel point in the grayscale image with a pixel value of 255;

计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选,其中,舍弃像素点的个数量小于预设个数阈值T2的像素点连续的区域,并保留像素点的个数量大于等于预设个数阈值T2的像素点连续的区域;Calculate the number of pixels in the area where each pixel is continuous, and filter the area where each pixel is continuous, wherein the area where the number of pixels is less than the preset number threshold T2 is discarded is continuous, and Retaining a region where the number of pixels is greater than or equal to the preset number threshold T2 and the pixels are continuous;

计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s,其中,饱满度s=某个保留的像素点连续的区域中的像素点的个数/该个保留的像素点连续的区域的最小外接旋转矩形的面积;Calculate the area of the minimum circumscribed rotating rectangle of each retained pixel continuous region, and calculate the fullness s of the smallest circumscribed rotated rectangle of each retained pixel continuous region, where fullness s=a certain reserved pixel The number of pixels in the continuous area/the area of the smallest circumscribed rotating rectangle of the reserved pixel continuous area;

将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓。The area where the reserved pixels are continuous with the fullness s greater than the preset fullness threshold T3 is taken as the boundary of the white background picture, and the boundary is taken as the outline of the screen.

进一步的,上述方法中,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,Further, in the above method, it is detected whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, and if there are cracks or scratches in the screen, it is determined that there are cracks or scratches in the screen,

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若某条裂纹或划痕的长度超过预设长度阈值,则判定所述屏幕存在裂纹或划痕。Detect whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, and if so, calculate the length of each crack or scratch, if a certain crack or scratch is If the length exceeds the preset length threshold, it is determined that there is a crack or scratch on the screen.

进一步的,上述方法中,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,Further, in the above method, it is detected whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, and if there are cracks or scratches in the screen, it is determined that there are cracks or scratches in the screen,

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算裂纹或划痕的个数,若裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。Detect whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, if there are, calculate the number of cracks or scratches, if the number of cracks or scratches exceeds If the number threshold is preset, it is determined that there are cracks or scratches on the screen.

进一步的,上述方法中,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,Further, in the above method, it is detected whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, and if there are cracks or scratches in the screen, it is determined that there are cracks or scratches in the screen,

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若长度超过预设长度阈值的裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。Detecting whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, if there is, calculating the length of each crack or scratch, if the length exceeds the preset length threshold If the number of cracks or scratches exceeds the preset number threshold, it is determined that there are cracks or scratches on the screen.

根据本发明的另一方面,还提供一种屏幕检测装置,其中,该装置包括:According to another aspect of the present invention, a screen detection device is also provided, wherein the device includes:

显示模块,用于将屏幕亮屏显示为白底画面;The display module is used to display the bright screen as a white background image;

第一拍摄模块,用于拍摄包括所述白底画面的手机屏幕的照片;The first photographing module is used to photograph the photograph of the mobile phone screen that comprises described white background picture;

识别模块,用于从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;An identification module, configured to identify the boundary of the white background picture from the photo, and use the boundary as the outline of the screen;

第二拍摄模块,用于将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域,拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;The second shooting module is used to display the bright screen of the screen as a full-screen yellow picture, and control the light source to illuminate the screen area displayed as a full-screen yellow picture, and shoot the first photo containing the screen area displayed as a full-screen yellow picture;

第三拍摄模块,用于将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域,拍摄包含显示为满屏白色画面的屏幕区域的第二照片;The third shooting module is used to display the bright screen of the screen as a full-screen white picture, and control the light source to illuminate the screen area displayed as a full-screen white picture, and take a second photo containing the screen area displayed as a full-screen white picture;

检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。The detection module is configured to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, and if so, determine that there are cracks or scratches on the screen.

进一步的,上述装置中,所述识别模块,用于将所述照片转换为灰度图片;指定预设像素阈值T1对所述灰度图片进行分割,其中,将所述照片中超过所述预设像素阈值T1的像素点的像素值设为255,将所述照片中未超过所述预设像素阈值T1的像素点的像素值设为0;获取所述灰度图片中像素值为255的各个像素点连续的区域;计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选,其中,舍弃像素点的个数量小于预设个数阈值T2的像素点连续的区域,并保留像素点的个数量大于等于预设个数阈值T2的像素点连续的区域;计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s,其中,饱满度s=某个保留的像素点连续的区域中的像素点的个数/该个保留的像素点连续的区域的最小外接旋转矩形的面积;将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓。Further, in the above-mentioned device, the recognition module is used to convert the photo into a grayscale picture; specify a preset pixel threshold T1 to segment the grayscale picture, wherein, the pixels in the photo that exceed the preset Set the pixel value of the pixel point of the pixel threshold T1 to 255, and set the pixel value of the pixel point not exceeding the preset pixel threshold T1 in the photo to 0; obtain the pixel value of 255 in the gray scale image A region where each pixel point is continuous; calculate the number of pixels in each pixel point continuous region, and filter each pixel point continuous region, wherein the number of discarded pixel points is less than the preset number threshold T2 A region with continuous pixels, and retain a region with continuous pixels whose number of pixels is greater than or equal to the preset number threshold T2; calculate the area of the smallest circumscribed rotating rectangle for each retained region of continuous pixels, and calculate each reserved The fullness s of the minimum circumscribed rotating rectangle of the continuous pixel point area, wherein, the fullness s=the number of pixels in a certain reserved pixel point continuous area/the minimum value of the reserved pixel point continuous area The area of the circumscribed rotating rectangle; use the continuous area of the reserved pixels whose fullness s is greater than the preset fullness threshold T3 as the boundary of the white background picture, and use the boundary as the outline of the screen.

进一步的,上述装置中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若某条裂纹或划痕的长度超过预设长度阈值,则判定所述屏幕存在裂纹或划痕。Further, in the above device, the detection module is used to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, and if so, calculate the or the length of the scratch, if the length of a certain crack or scratch exceeds the preset length threshold, it is determined that there is a crack or scratch on the screen.

进一步的,上述装置中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算裂纹或划痕的个数,若裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。Further, in the above device, the detection module is used to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, and if so, calculate the crack or scratch If the number of cracks or scratches exceeds the preset number threshold, it is determined that there are cracks or scratches on the screen.

进一步的,上述装置中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若长度超过预设长度阈值的裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。Further, in the above device, the detection module is used to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, and if so, calculate the or the length of the scratches, if the number of cracks or scratches whose length exceeds the preset length threshold exceeds the preset number threshold, it is determined that there are cracks or scratches on the screen.

根据本发明的另一方面,还提供一种基于计算的设备,其中,包括:According to another aspect of the present invention, there is also provided a computing-based device, comprising:

处理器;以及processor; and

被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:A memory arranged to store computer-executable instructions that, when executed, cause the processor to:

将屏幕亮屏显示为白底画面;Display the bright screen as a white background screen;

拍摄包括所述白底画面的手机屏幕的照片;taking a photo of the mobile phone screen including said white background picture;

从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Recognizing the boundary of the white background picture from the photo, using the boundary as the outline of the screen;

将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Display the bright screen as a full-screen yellow screen, and control the light source to illuminate the screen area that is displayed as a full-screen yellow screen;

拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Take the first photo of the area of the screen that includes the area of the screen shown as a full-screen yellow screen;

将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Display the bright screen as a full-screen white screen, and control the light source to illuminate the screen area displayed as a full-screen white screen;

拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Take a second photo that includes the area of the screen that appears as a full-screen white image;

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。Detecting whether there are cracks or scratches in the area enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches in the screen.

根据本发明的另一方面,还提供一种计算机可读存储介质,其上存储有计算机可执行指令,其中,该计算机可执行指令被处理器执行时使得该处理器:According to another aspect of the present invention, there is also provided a computer-readable storage medium on which computer-executable instructions are stored, wherein, when the computer-executable instructions are executed by a processor, the processor:

将屏幕亮屏显示为白底画面;Display the bright screen as a white background screen;

拍摄包括所述白底画面的手机屏幕的照片;taking a photo of the mobile phone screen including said white background picture;

从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Recognizing the boundary of the white background picture from the photo, using the boundary as the outline of the screen;

将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Display the bright screen as a full-screen yellow screen, and control the light source to illuminate the screen area that is displayed as a full-screen yellow screen;

拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Take the first photo of the area of the screen that includes the area of the screen shown as a full-screen yellow screen;

将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Display the bright screen as a full-screen white screen, and control the light source to illuminate the screen area displayed as a full-screen white screen;

拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Take a second photo that includes the area of the screen that appears as a full-screen white image;

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。Detecting whether there are cracks or scratches in the area enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches in the screen.

与现有技术相比,本发明通过将屏幕亮屏显示为白底画面,基于白底画面的边界可以简单、准确的定位设备的屏幕位置。另外,本发明通过分别拍摄包含显示为满屏黄色画面的屏幕区域的第一照片、包含显示为满屏白色画面的屏幕区域的第二照片,便于后续在第一照片或第二照片中可靠识别出所述屏幕的轮廓所围成的范围内的不同种类的屏幕裂纹或划痕。Compared with the prior art, the present invention displays the bright screen as a white background picture, and the screen position of the device can be positioned simply and accurately based on the boundary of the white background picture. In addition, the present invention respectively takes the first photo containing the screen area displayed as a full-screen yellow screen, and the second photo containing the screen area displayed as a full-screen white screen, so as to facilitate subsequent reliable identification in the first photo or the second photo Different kinds of screen cracks or scratches within the range enclosed by the outline of the screen.

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1示出根据本发明一实施例的屏幕检测方法的流程图。Fig. 1 shows a flowchart of a screen detection method according to an embodiment of the present invention.

附图中相同或相似的附图标记代表相同或相似的部件。The same or similar reference numerals in the drawings represent the same or similar components.

具体实施方式detailed description

下面结合附图对本发明作进一步详细描述。The present invention will be described in further detail below in conjunction with the accompanying drawings.

在本申请一个典型的配置中,终端、服务网络的设备和可信方均包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration of the present application, the terminal, the device serving the network and the trusted party all include one or more processors (CPUs), input/output interfaces, network interfaces and memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM. Memory is an example of computer readable media.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media excludes non-transitory computer-readable media, such as modulated data signals and carrier waves.

如图1所示,本发明提供一种屏幕检测方法,所述方法包括:As shown in Figure 1, the present invention provides a screen detection method, the method comprising:

步骤S1,将屏幕亮屏显示为白底画面;Step S1, displaying the bright screen as a white background image;

在此,所述屏幕可以是手机、PAD等带有显示屏幕的终端设备;Here, the screen may be a terminal device with a display screen such as a mobile phone or a PAD;

步骤S2,拍摄包括所述白底画面的屏幕的照片;Step S2, taking a photo of the screen including the white background picture;

在此,拍摄手机屏幕的时候,会同时把屏幕区域之外的无关区域也拍摄进去,后续需要从中识别屏幕区域;Here, when shooting the screen of the mobile phone, the irrelevant area outside the screen area will also be captured, and the screen area needs to be identified from it later;

步骤S3,从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Step S3, identifying the boundary of the white background picture from the photo, and using the boundary as the outline of the screen;

步骤S4,将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Step S4, displaying the bright screen as a full-screen yellow picture, and controlling the light source to illuminate the screen area displayed as a full-screen yellow picture;

在此,为了保证后续拍摄照片的清晰度,可以通过控制光源照亮显示为满屏黄色画面的屏幕区域,以对显示为满屏黄色画面的屏幕区域进行补光;Here, in order to ensure the clarity of subsequent photos taken, the screen area displayed as a full-screen yellow screen can be illuminated by controlling the light source to fill in the screen area displayed as a full-screen yellow screen;

步骤S5,拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Step S5, taking a first photo including a screen area displayed as a full-screen yellow screen;

步骤S6,将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Step S6, displaying the bright screen as a full-screen white picture, and controlling the light source to illuminate the screen area displayed as a full-screen white picture;

在此,为了保证后续拍摄照片的清晰度,可以通过控制光源照亮显示为满屏白色画面的屏幕区域,以对显示为满屏白色画面的屏幕区域进行补光;Here, in order to ensure the clarity of subsequent photos taken, the screen area displayed as a full-screen white screen can be illuminated by controlling the light source to fill in the screen area displayed as a full-screen white screen;

步骤S7,拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Step S7, taking a second photo including a screen area displayed as a full-screen white screen;

步骤S8,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。Step S8 , detecting whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches on the screen.

在此,不同类别的裂纹或划痕在满屏白色画面的屏幕区域或满屏黄色画面的屏幕区域的显示清晰度会不同,因此,可以分别拍摄拍摄包含显示为满屏黄色画面的屏幕区域的第一照片、包含显示为满屏白色画面的屏幕区域的第二照片,以保证后续拍摄到的不同类别的屏幕裂纹或划痕的清晰度。Here, the display clarity of different types of cracks or scratches will be different in the screen area full of white screens or the screen area of full screen yellow screens. The first photo, and the second photo including the screen area displayed as a full-screen white screen, to ensure the clarity of different types of screen cracks or scratches taken later.

若在所述第一照片或第二照片中,只要有其中一张照片检测到存在裂纹或划痕,则可以判定所述屏幕存在裂纹或划痕。If cracks or scratches are detected in one of the first photos or the second photos, it can be determined that there are cracks or scratches on the screen.

本发明通过将屏幕亮屏显示为白底画面,基于白底画面的边界可以简单、准确的定位设备的屏幕位置。另外,本发明通过分别拍摄包含显示为满屏黄色画面的屏幕区域的第一照片、包含显示为满屏白色画面的屏幕区域的第二照片,便于后续在第一照片或第二照片中可靠识别出所述屏幕的轮廓所围成的范围内的不同种类的屏幕裂纹或划痕。In the present invention, the bright screen is displayed as a picture with a white background, and the screen position of the device can be positioned simply and accurately based on the boundary of the picture with a white background. In addition, the present invention respectively takes the first photo containing the screen area displayed as a full-screen yellow screen, and the second photo containing the screen area displayed as a full-screen white screen, so as to facilitate subsequent reliable identification in the first photo or the second photo Different kinds of screen cracks or scratches within the range enclosed by the outline of the screen.

本发明的屏幕检测方法一实施例中,步骤S3,从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓,包括:In an embodiment of the screen detection method of the present invention, step S3, identifying the boundary of the white background picture from the photo, using the boundary as the outline of the screen, includes:

步骤S31,将所述照片src转换为灰度图片gray;Step S31, converting the photo src into a grayscale image gray;

步骤S32,指定预设像素阈值T1对所述灰度图片gray进行分割,其中,将所述照片src中超过所述预设像素阈值T1的像素点的像素值设为255,将所述照片src中未超过所述预设像素阈值T1的像素点的像素值值设为0;Step S32, specifying a preset pixel threshold T1 to segment the grayscale image gray, wherein the pixel values of the pixels exceeding the preset pixel threshold T1 in the photo src are set to 255, and the photo src is set to The pixel values of the pixel points that do not exceed the preset pixel threshold T1 are set to 0;

步骤S33,获取所述灰度图片gray中的像素值为255的各个像素点连续的区域;Step S33, obtaining a region where each pixel in the grayscale image gray has a pixel value of 255 and is continuous;

在此,某个像素点在另一个像素点的8邻域内,可以认为两者是连续的,2个或2个以上连续像素点可以形成一个像素点连续的区域;Here, if a certain pixel is in the 8-neighborhood of another pixel, the two can be considered to be continuous, and two or more consecutive pixels can form a continuous pixel area;

像素值为0为黑色的像素点,像素值为255表示白色的像素点,像素值为0的像素点的连接区域不需要考虑,视为屏幕区域之外的背景;A pixel with a pixel value of 0 is a black pixel, a pixel with a value of 255 is a white pixel, and the connection area of a pixel with a pixel value of 0 does not need to be considered, and it is regarded as the background outside the screen area;

步骤S34,计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选,其中,舍弃像素点的个数量小于预设个数阈值T2的像素点连续的区域,并保留像素点的个数量大于等于预设个数阈值T2的像素点连续的区域;Step S34, calculating the number of pixels in the area where each pixel is continuous, and filtering each area where each pixel is continuous, wherein the number of discarded pixels is less than the preset number threshold T2. region, and retain a region where the number of pixels is greater than or equal to the preset number threshold T2 and the pixels are continuous;

步骤S35,计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s,其中,饱满度s=某个保留的像素点连续的区域中的像素点的个数/该个保留的像素点连续的区域的最小外接旋转矩形的面积;Step S35, calculate the area of the smallest circumscribed rotating rectangle in each area of continuous pixel points retained, and calculate the fullness s of the smallest circumscribed rotated rectangle in the area of continuous pixel points retained, wherein, fullness s=a reserved The number of pixels in the area with continuous pixels/the area of the smallest circumscribed rotating rectangle of the area with continuous pixels;

步骤S36,将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓。Step S36 , taking the area with continuous pixels whose fullness s is greater than the preset fullness threshold T3 as the boundary of the white background picture, and using the boundary as the outline of the screen.

在此,可以遍历每个保留的像素点连续的区域,用每个保留的像素点连续的区域的像素点个数除以其最小外接旋转矩形的面积,得到该区域的饱满度s,如果某个保留的像素点连续的区域的饱满度s值大于预设饱满度阈值T3则其为屏幕区域,若小于,则为非屏幕区域。Here, it is possible to traverse each area where each reserved pixel is continuous, and divide the number of pixels in each area where each reserved pixel is continuous by the area of the smallest circumscribed rotating rectangle to obtain the fullness s of the area. If the fullness s value of the area with consecutive retained pixels is greater than the preset fullness threshold T3, it is a screen area, and if it is smaller, it is a non-screen area.

本实施通过指定预设像素阈值T1对所述灰度图片gray进行分割;计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选;计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s;将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓,从而准确、可靠的识别出各种终端的屏幕位置。In this implementation, the gray-scale image gray is segmented by specifying a preset pixel threshold T1; the number of pixels in the area where each pixel is continuous is calculated, and each area where each pixel is continuous is screened; The area of the minimum circumscribed rotating rectangle of the continuous pixel point area, calculate the fullness s of the minimum circumscribed rotated rectangle in the continuous pixel point area of each reserved; set the fullness s greater than the preset fullness threshold T3 of the reserved pixels The continuous area is used as the boundary of the white background image, and the boundary is used as the outline of the screen, so that the screen positions of various terminals can be accurately and reliably identified.

本发明的屏幕检测方法一实施例中,步骤S9,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,In an embodiment of the screen detection method of the present invention, step S9 is to detect whether there are cracks or scratches in the area surrounded by the outline of the screen in the first photo or the second photo, and if so, determine whether the screen There are cracks or scratches,

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若某条裂纹或划痕的长度超过预设长度阈值,则判定所述屏幕存在裂纹或划痕。Detect whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, and if so, calculate the length of each crack or scratch, if a certain crack or scratch is If the length exceeds the preset length threshold, it is determined that there is a crack or scratch on the screen.

在此,通过计算每条裂纹或划痕的长度,能够可靠筛选符合要求的裂纹或划痕,便于准确判定所述屏幕存在裂纹或划痕。Here, by calculating the length of each crack or scratch, the cracks or scratches that meet the requirements can be reliably screened, so as to accurately determine whether the screen has cracks or scratches.

本发明的屏幕检测方法一实施例中,步骤S9,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,In an embodiment of the screen detection method of the present invention, step S9 is to detect whether there are cracks or scratches in the area surrounded by the outline of the screen in the first photo or the second photo, and if so, determine whether the screen There are cracks or scratches,

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算裂纹或划痕的个数,若裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。Detect whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, if there are, calculate the number of cracks or scratches, if the number of cracks or scratches exceeds If the number threshold is preset, it is determined that there are cracks or scratches on the screen.

在此,通过计算每条裂纹或划痕的个数,能够可靠筛选符合要求的裂纹或划痕,便于准确判定所述屏幕存在裂纹或划痕。Here, by counting the number of each crack or scratch, the cracks or scratches that meet the requirements can be reliably screened, so as to accurately determine whether the screen has cracks or scratches.

本发明的屏幕检测方法一实施例中步骤S9,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,In step S9 in an embodiment of the screen detection method of the present invention, it is detected whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, and if there is, it is determined that the screen exists cracks or scratches,

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若长度超过预设长度阈值的裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。Detecting whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, if there is, calculating the length of each crack or scratch, if the length exceeds the preset length threshold If the number of cracks or scratches exceeds the preset number threshold, it is determined that there are cracks or scratches on the screen.

在此,通过计算每条裂纹或划痕的长度,并计算长度超过预设长度阈值的裂纹或划痕的个数是否超过预设个数阈值,能够可靠筛选符合要求的裂纹或划痕,便于更准确判定所述屏幕存在裂纹或划痕。Here, by calculating the length of each crack or scratch, and calculating whether the number of cracks or scratches whose length exceeds the preset length threshold exceeds the preset number threshold, cracks or scratches that meet the requirements can be reliably screened to facilitate It is more accurate to determine whether the screen has cracks or scratches.

本发明提供一种屏幕检测装置,所述装置包括:The present invention provides a screen detection device, which includes:

显示模块,用于将屏幕亮屏显示为白底画面;The display module is used to display the bright screen as a white background image;

在此,所述屏幕可以是手机、PAD等带有显示屏幕的终端设备;Here, the screen may be a terminal device with a display screen such as a mobile phone or a PAD;

第一拍摄模块,用于拍摄包括所述白底画面的手机屏幕的照片;The first photographing module is used to photograph the photograph of the mobile phone screen that comprises described white background picture;

识别模块,用于从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;An identification module, configured to identify the boundary of the white background picture from the photo, and use the boundary as the outline of the screen;

第二拍摄模块,用于将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域,拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;The second shooting module is used to display the bright screen of the screen as a full-screen yellow picture, and control the light source to illuminate the screen area displayed as a full-screen yellow picture, and shoot the first photo containing the screen area displayed as a full-screen yellow picture;

在此,为了保证后续拍摄照片的清晰度,可以通过控制光源照亮显示为满屏黄色画面的屏幕区域,以对显示为满屏黄色画面的屏幕区域进行补光;Here, in order to ensure the clarity of subsequent photos taken, the screen area displayed as a full-screen yellow screen can be illuminated by controlling the light source to fill in the screen area displayed as a full-screen yellow screen;

第三拍摄模块,用于将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域,拍摄包含显示为满屏白色画面的屏幕区域的第二照片;The third shooting module is used to display the bright screen of the screen as a full-screen white picture, and control the light source to illuminate the screen area displayed as a full-screen white picture, and take a second photo containing the screen area displayed as a full-screen white picture;

在此,为了保证后续拍摄照片的清晰度,可以通过控制光源照亮显示为满屏白色画面的屏幕区域,以对显示为满屏白色画面的屏幕区域进行补光;Here, in order to ensure the clarity of subsequent photos taken, the screen area displayed as a full-screen white screen can be illuminated by controlling the light source to fill in the screen area displayed as a full-screen white screen;

检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。The detection module is configured to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, and if so, determine that there are cracks or scratches on the screen.

在此,不同类别的裂纹或划痕在满屏白色画面的屏幕区域或满屏黄色画面的屏幕区域的显示清晰度会不同,因此,可以分别拍摄拍摄包含显示为满屏黄色画面的屏幕区域的第一照片、包含显示为满屏白色画面的屏幕区域的第二照片,以保证后续拍摄到的不同类别的屏幕裂纹或划痕的清晰度。Here, the display clarity of different types of cracks or scratches will be different in the screen area full of white screens or the screen area of full screen yellow screens. The first photo, and the second photo including the screen area displayed as a full-screen white screen, to ensure the clarity of different types of screen cracks or scratches taken later.

若在所述第一照片或第二照片中,只要有其中一张照片检测到存在裂纹或划痕,则可以判定所述屏幕存在裂纹或划痕。If cracks or scratches are detected in one of the first photos or the second photos, it can be determined that there are cracks or scratches on the screen.

本发明通过将屏幕亮屏显示为白底画面,基于白底画面的边界可以简单、准确的定位设备的屏幕位置。另外,本发明通过分别拍摄包含显示为满屏黄色画面的屏幕区域的第一照片、包含显示为满屏白色画面的屏幕区域的第二照片,便于后续在第一照片或第二照片中可靠识别出所述屏幕的轮廓所围成的范围内的不同种类的屏幕裂纹或划痕。In the present invention, the bright screen is displayed as a picture with a white background, and the screen position of the device can be positioned simply and accurately based on the boundary of the picture with a white background. In addition, the present invention respectively takes the first photo containing the screen area displayed as a full-screen yellow screen, and the second photo containing the screen area displayed as a full-screen white screen, so as to facilitate subsequent reliable identification in the first photo or the second photo Different kinds of screen cracks or scratches within the range enclosed by the outline of the screen.

本发明的屏幕检测装置一实施例中,所述识别模块,用于将所述照片src转换为灰度图片gray;指定预设像素阈值T1对所述灰度图片gray进行分割,其中,将所述照片src中超过所述预设像素阈值T1的像素点的像素值设为255,将所述照片src中未超过所述预设像素阈值T1的像素点的像素值设为0;获取所述灰度图片gray中像素值为255的各个像素点连续的区域;计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选,其中,舍弃像素点的个数量小于预设个数阈值T2的像素点连续的区域,并保留像素点的个数量大于等于预设个数阈值T2的像素点连续的区域;计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s,其中,饱满度s=某个保留的像素点连续的区域中的像素点的个数/该个保留的像素点连续的区域的最小外接旋转矩形的面积;将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓。In an embodiment of the screen detection device of the present invention, the identification module is used to convert the photo src into a grayscale image gray; specify a preset pixel threshold T1 to segment the grayscale image gray, wherein the Set the pixel value of the pixel points exceeding the preset pixel threshold T1 in the photo src to 255, and set the pixel value of the pixel points in the photo src not exceeding the preset pixel threshold T1 to 0; obtain the In the grayscale image gray, the pixel value is 255 in the continuous area of each pixel point; calculate the number of pixels in the continuous area of each pixel point, and filter the continuous area of each pixel point, and discard the pixel point A region in which the number of pixels is less than the preset number threshold T2 is continuous, and a region in which the number of pixels is greater than or equal to the preset number threshold T2 is continuous; calculate the minimum value of each retained pixel point in the region The area of the circumscribed rotating rectangle is calculated by calculating the fullness s of the smallest circumscribed rotated rectangle in the continuous area of each reserved pixel point, where the fullness s=the number of pixels in a certain reserved pixel point continuous area/the The area of the smallest circumscribed rotating rectangle in the area of continuous pixels retained; the area of continuous pixels retained with the fullness s greater than the preset fullness threshold T3 is used as the boundary of the white background picture, and the boundary is used as the boundary of the white background picture to describe the outline of the screen.

在此,某个像素点在另一个像素点的8邻域内,可以认为两者是连续的,2个或2个以上连续像素点可以形成一个像素点连续的区域;Here, if a certain pixel is in the 8-neighborhood of another pixel, the two can be considered to be continuous, and two or more consecutive pixels can form a continuous pixel area;

像素值为0为黑色的像素点,像素值为255表示白色的像素点,像素值为0的像素点的连接区域不需要考虑,视为屏幕区域之外的背景;A pixel with a pixel value of 0 is a black pixel, a pixel with a value of 255 is a white pixel, and the connection area of a pixel with a pixel value of 0 does not need to be considered, and it is regarded as the background outside the screen area;

可以遍历每个保留的像素点连续的区域,用每个保留的像素点连续的区域的像素点个数除以其最小外接旋转矩形的面积,得到该区域的饱满度s,如果某个保留的像素点连续的区域的饱满度s值大于预设饱满度阈值T3则其为屏幕区域,若小于,则为非屏幕区域。It is possible to traverse each area where each reserved pixel is continuous, and divide the number of pixels in each area where each reserved pixel is continuous by the area of the smallest circumscribed rotating rectangle to obtain the fullness s of the area. If a reserved If the fullness s value of the area with continuous pixels is greater than the preset fullness threshold T3, it is a screen area, and if it is smaller, it is a non-screen area.

本实施通过指定预设像素阈值T对所述灰度图片gray进行分割;计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选;计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s;将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓,从而准确、可靠的识别出各种终端的屏幕位置。In this implementation, the gray-scale image gray is segmented by specifying a preset pixel threshold T; the number of pixels in the area where each pixel is continuous is calculated, and each area where each pixel is continuous is screened; The area of the minimum circumscribed rotating rectangle of the continuous pixel point area, calculate the fullness s of the minimum circumscribed rotated rectangle in the continuous pixel point area of each reserved; set the fullness s greater than the preset fullness threshold T3 of the reserved pixels The continuous area is used as the boundary of the white background image, and the boundary is used as the outline of the screen, so that the screen positions of various terminals can be accurately and reliably identified.

本发明的屏幕检测装置一实施例中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若某条裂纹或划痕的长度超过预设长度阈值,则判定所述屏幕存在裂纹或划痕。In an embodiment of the screen detection device of the present invention, the detection module is used to detect whether there are cracks or scratches in the area surrounded by the outline of the screen in the first photo or the second photo, and if so, The length of each crack or scratch is calculated, and if the length of a certain crack or scratch exceeds a preset length threshold, it is determined that there is a crack or scratch on the screen.

在此,通过计算每条裂纹或划痕的长度,能够可靠筛选符合要求的裂纹或划痕,便于准确判定所述屏幕存在裂纹或划痕。Here, by calculating the length of each crack or scratch, the cracks or scratches that meet the requirements can be reliably screened, so as to accurately determine whether the screen has cracks or scratches.

本发明的屏幕检测装置一实施例中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算裂纹或划痕的个数,若裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。In an embodiment of the screen detection device of the present invention, the detection module is used to detect whether there are cracks or scratches in the area surrounded by the outline of the screen in the first photo or the second photo, and if so, The number of cracks or scratches is calculated, and if the number of cracks or scratches exceeds a preset number threshold, it is determined that there are cracks or scratches on the screen.

在此,通过计算每条裂纹或划痕的个数,能够可靠筛选符合要求的裂纹或划痕,便于准确判定所述屏幕存在裂纹或划痕。Here, by counting the number of each crack or scratch, the cracks or scratches that meet the requirements can be reliably screened, so as to accurately determine whether the screen has cracks or scratches.

本发明的屏幕检测装置一实施例中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若长度超过预设长度阈值的裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。In an embodiment of the screen detection device of the present invention, the detection module is used to detect whether there are cracks or scratches in the area surrounded by the outline of the screen in the first photo or the second photo, and if so, The length of each crack or scratch is calculated, and if the number of cracks or scratches whose length exceeds the preset length threshold exceeds the preset number threshold, it is determined that there is a crack or scratch on the screen.

在此,通过计算每条裂纹或划痕的长度,并计算长度超过预设长度阈值的裂纹或划痕的个数是否超过预设个数阈值,能够可靠筛选符合要求的裂纹或划痕,便于更准确判定所述屏幕存在裂纹或划痕。Here, by calculating the length of each crack or scratch, and calculating whether the number of cracks or scratches whose length exceeds the preset length threshold exceeds the preset number threshold, cracks or scratches that meet the requirements can be reliably screened to facilitate It is more accurate to determine whether the screen has cracks or scratches.

根据本发明的另一方面,还提供一种基于计算的设备,其中,包括:According to another aspect of the present invention, there is also provided a computing-based device, comprising:

处理器;以及processor; and

被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:A memory arranged to store computer-executable instructions that, when executed, cause the processor to:

将屏幕亮屏显示为白底画面;Display the bright screen as a white background image;

拍摄包括所述白底画面的手机屏幕的照片;taking a photo of the mobile phone screen including said white background picture;

从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Recognizing the boundary of the white background picture from the photo, using the boundary as the outline of the screen;

将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Display the bright screen as a full-screen yellow screen, and control the light source to illuminate the screen area that is displayed as a full-screen yellow screen;

拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Take the first photo of the area of the screen that includes the area of the screen shown as a full-screen yellow screen;

将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Display the bright screen as a full-screen white screen, and control the light source to illuminate the screen area displayed as a full-screen white screen;

拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Take a second photo that includes the area of the screen that appears as a full-screen white image;

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。Detecting whether there are cracks or scratches in the area enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches in the screen.

根据本发明的另一方面,还提供一种计算机可读存储介质,其上存储有计算机可执行指令,其中,该计算机可执行指令被处理器执行时使得该处理器:According to another aspect of the present invention, there is also provided a computer-readable storage medium on which computer-executable instructions are stored, wherein, when the computer-executable instructions are executed by a processor, the processor:

将屏幕亮屏显示为白底画面;Display the bright screen as a white background image;

拍摄包括所述白底画面的手机屏幕的照片;taking a photo of the mobile phone screen including said white background picture;

从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Recognizing the boundary of the white background picture from the photo, using the boundary as the outline of the screen;

将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Display the bright screen as a full-screen yellow screen, and control the light source to illuminate the screen area that is displayed as a full-screen yellow screen;

拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Take the first photo of the area of the screen that includes the area of the screen shown as a full-screen yellow screen;

将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Display the bright screen as a full-screen white screen, and control the light source to illuminate the screen area displayed as a full-screen white screen;

拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Take a second photo that includes the area of the screen that appears as a full-screen white image;

检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。Detecting whether there are cracks or scratches in the area enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches in the screen.

本发明的各设备和存储介质实施例的详细内容,具体可参见各方法实施例的对应部分,在此,不再赘述。For detailed content of each device and storage medium embodiment of the present invention, refer to corresponding parts of each method embodiment specifically, and details are not repeated here.

与现有技术相比,本发明通过将屏幕亮屏显示为白底画面,基于白底画面的边界可以简单、准确的定位设备的屏幕位置。另外,通过指定预设像素阈值T1对所述灰度图片gray进行分割;计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选;计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s;将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓,从而准确、可靠的识别出各种终端的屏幕位置。Compared with the prior art, the present invention displays the bright screen as a white background picture, and the screen position of the device can be positioned simply and accurately based on the boundary of the white background picture. In addition, the grayscale image gray is segmented by specifying a preset pixel threshold T1; calculating the number of pixels in the continuous area of each pixel, and filtering the continuous area of each pixel; calculating each reserved The area of the minimum circumscribed rotating rectangle of the continuous pixel point area, calculate the fullness s of the minimum circumscribed rotated rectangle in the continuous pixel point area of each reserved; set the fullness s greater than the preset fullness threshold T3 of the reserved pixels The continuous area is used as the boundary of the white background image, and the boundary is used as the outline of the screen, so that the screen positions of various terminals can be accurately and reliably identified.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

需要注意的是,本发明可在软件和/或软件与硬件的组合体中被实施,例如,可采用专用集成电路(ASIC)、通用目的计算机或任何其他类似硬件设备来实现。在一个实施例中,本发明的软件程序可以通过处理器执行以实现上文所述步骤或功能。同样地,本发明的软件程序(包括相关的数据结构)可以被存储到计算机可读记录介质中,例如,RAM存储器,磁或光驱动器或软磁盘及类似设备。另外,本发明的一些步骤或功能可采用硬件来实现,例如,作为与处理器配合从而执行各个步骤或功能的电路。It should be noted that the present invention can be implemented in software and/or a combination of software and hardware, for example, it can be implemented by an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware devices. In one embodiment, the software program of the present invention can be executed by a processor to realize the steps or functions described above. Likewise, the software program (including associated data structures) of the present invention can be stored in a computer-readable recording medium such as RAM memory, magnetic or optical drive or floppy disk and the like. In addition, some steps or functions of the present invention may be implemented by hardware, for example, as a circuit that cooperates with a processor to execute each step or function.

另外,本发明的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本发明的方法和/或技术方案。而调用本发明的方法的程序指令,可能被存储在固定的或可移动的记录介质中,和/或通过广播或其他信号承载媒体中的数据流而被传输,和/或被存储在根据所述程序指令运行的计算机设备的工作存储器中。在此,根据本发明的一个实施例包括一个装置,该装置包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发该装置运行基于前述根据本发明的多个实施例的方法和/或技术方案。In addition, a part of the present invention can be applied as a computer program product, such as a computer program instruction. When it is executed by a computer, the method and/or technical solution according to the present invention can be invoked or provided through the operation of the computer. The program instructions for invoking the method of the present invention may be stored in a fixed or removable recording medium, and/or transmitted through broadcasting or data streams in other signal-carrying media, and/or stored in the in the working memory of the computer device on which the program instructions described above are executed. Here, an embodiment according to the present invention comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, a trigger The operation of the device is based on the foregoing methods and/or technical solutions according to multiple embodiments of the present invention.

对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本发明内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。装置权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。It will be apparent to those skilled in the art that the invention is not limited to the details of the above-described exemplary embodiments, but that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Accordingly, the embodiments should be regarded in all points of view as exemplary and not restrictive, the scope of the invention being defined by the appended claims rather than the foregoing description, and it is therefore intended that the scope of the invention be defined by the appended claims rather than by the foregoing description. All changes within the meaning and range of equivalents of the elements are embraced in the present invention. Any reference sign in a claim should not be construed as limiting the claim concerned. In addition, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means stated in the device claims may also be realized by one unit or device through software or hardware. The words first, second, etc. are used to denote names and do not imply any particular order.

Claims (10)

1.一种屏幕检测方法,其中,该方法包括:1. A screen detection method, wherein the method comprises: 将屏幕亮屏显示为白底画面;Display the bright screen as a white background image; 拍摄包括所述白底画面的手机屏幕的照片;taking a photo of the mobile phone screen including said white background picture; 从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Recognizing the boundary of the white background picture from the photo, using the boundary as the outline of the screen; 将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Display the bright screen as a full-screen yellow screen, and control the light source to illuminate the screen area that is displayed as a full-screen yellow screen; 拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Take the first photo of the area of the screen that includes the area of the screen shown as a full-screen yellow screen; 将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Display the bright screen as a full-screen white screen, and control the light source to illuminate the screen area displayed as a full-screen white screen; 拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Take a second photo that includes the area of the screen that appears as a full-screen white image; 检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕;Detecting whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches on the screen; 从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓,包括:Identifying the boundary of the white background picture from the photo, using the boundary as the outline of the screen, including: 将所述照片转换为灰度图片;converting said photo to a grayscale image; 指定预设像素阈值T1对所述灰度图片进行分割,其中,将所述照片中超过所述预设像素阈值T1的像素点的像素值设为255,将所述照片中未超过所述预设像素阈值T1的像素点的像素值设为0;Designate a preset pixel threshold T1 to segment the grayscale picture, wherein the pixel values of the pixels in the photo that exceed the preset pixel threshold T1 are set to 255, and the pixel values in the photos that do not exceed the preset pixel threshold T1 are set to 255. Set the pixel value of the pixel point of the pixel threshold T1 to be 0; 获取所述灰度图片中的像素值为255的各个像素点连续的区域;Obtain the continuous area of each pixel point in the grayscale image with a pixel value of 255; 计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选,其中,舍弃像素点的个数量小于预设个数阈值T2的像素点连续的区域,并保留像素点的个数量大于等于预设个数阈值T2的像素点连续的区域;Calculate the number of pixels in the area where each pixel is continuous, and filter the area where each pixel is continuous, wherein the area where the number of pixels is less than the preset number threshold T2 is discarded is continuous, and Retaining a region where the number of pixels is greater than or equal to the preset number threshold T2 and the pixels are continuous; 计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s,其中,饱满度s=某个保留的像素点连续的区域中的像素点的个数/该个保留的像素点连续的区域的最小外接旋转矩形的面积;Calculate the area of the minimum circumscribed rotating rectangle of each retained pixel continuous region, and calculate the fullness s of the smallest circumscribed rotated rectangle of each retained pixel continuous region, where fullness s=a certain reserved pixel The number of pixels in the continuous area/the area of the smallest circumscribed rotating rectangle of the reserved pixel continuous area; 将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓。The area where the reserved pixels are continuous with the fullness s greater than the preset fullness threshold T3 is taken as the boundary of the white background picture, and the boundary is taken as the outline of the screen. 2.根据权利要求1所述的方法,其中,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,包括:2. The method according to claim 1, wherein it is detected whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, and if there is, it is determined that the screen exists Cracks or scratches, including: 检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若某条裂纹或划痕的长度超过预设长度阈值,则判定所述屏幕存在裂纹或划痕。Detect whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, and if so, calculate the length of each crack or scratch, if a certain crack or scratch is If the length exceeds the preset length threshold, it is determined that there is a crack or scratch on the screen. 3.根据权利要求1所述的方法,其中,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,包括:3. The method according to claim 1, wherein it is detected whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, and if there is, it is determined that the screen exists Cracks or scratches, including: 检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算裂纹或划痕的个数,若裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。Detect whether there are cracks or scratches in the range surrounded by the outline of the screen in the first photo or the second photo, if there are, calculate the number of cracks or scratches, if the number of cracks or scratches exceeds If the number threshold is preset, it is determined that there are cracks or scratches on the screen. 4.根据权利要求1所述的方法,其中,检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕,包括:4. The method according to claim 1, wherein it is detected whether there are cracks or scratches in the range enclosed by the outline of the screen in the first photo or the second photo, and if there is, it is determined that the screen exists Cracks or scratches, including: 检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若长度超过预设长度阈值的裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。Detecting whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, if there is, calculating the length of each crack or scratch, if the length exceeds the preset length threshold If the number of cracks or scratches exceeds the preset number threshold, it is determined that there are cracks or scratches on the screen. 5.一种屏幕检测装置,其中,该装置包括:5. A screen detection device, wherein the device comprises: 显示模块,用于将屏幕亮屏显示为白底画面;The display module is used to display the bright screen as a white background image; 第一拍摄模块,用于拍摄包括所述白底画面的手机屏幕的照片;The first photographing module is used to photograph the photograph of the mobile phone screen that comprises described white background picture; 识别模块,用于将所述照片转换为灰度图片;指定预设像素阈值T1对所述灰度图片进行分割,其中,将所述照片中超过所述预设像素阈值T1的像素点的像素值设为255,将所述照片中未超过所述预设像素阈值T1的像素点的像素值设为0;获取所述灰度图片中像素值为255的各个像素点连续的区域;计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选,其中,舍弃像素点的个数量小于预设个数阈值T2的像素点连续的区域,并保留像素点的个数量大于等于预设个数阈值T2的像素点连续的区域;计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s,其中,饱满度s=某个保留的像素点连续的区域中的像素点的个数/该个保留的像素点连续的区域的最小外接旋转矩形的面积;将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓;An identification module, configured to convert the photo into a grayscale image; specify a preset pixel threshold T1 to segment the grayscale image, wherein pixels in the photo that exceed the preset pixel threshold T1 are The value is set to 255, and the pixel value of the pixel that does not exceed the preset pixel threshold T1 in the photo is set to 0; obtain the continuous area of each pixel with a pixel value of 255 in the grayscale picture; calculate each The number of pixels in the area where the pixels are continuous, and each area where the pixels are continuous is screened, wherein the area where the number of pixels is less than the preset number threshold T2 is discarded is continuous, and the pixels are retained The area where the number of points is greater than or equal to the preset number threshold T2 is a continuous pixel point; calculate the area of the smallest circumscribed rotating rectangle of each retained pixel point continuous area, and calculate the minimum circumscribed area of each retained pixel point continuous area The fullness s of the rotating rectangle, wherein, the fullness s=the number of pixels in a certain reserved pixel point continuous area/the area of the minimum circumscribed rotating rectangle of the reserved pixel point continuous area; the fullness s is greater than the preset fullness threshold value T3, the area where the reserved pixels are continuous is used as the boundary of the white background picture, and the boundary is used as the outline of the screen; 第二拍摄模块,用于将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域,拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;The second shooting module is used to display the bright screen of the screen as a full-screen yellow picture, and control the light source to illuminate the screen area displayed as a full-screen yellow picture, and shoot the first photo containing the screen area displayed as a full-screen yellow picture; 第三拍摄模块,用于将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域,拍摄包含显示为满屏白色画面的屏幕区域的第二照片;The third shooting module is used to display the bright screen of the screen as a full-screen white picture, and control the light source to illuminate the screen area displayed as a full-screen white picture, and take a second photo containing the screen area displayed as a full-screen white picture; 检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕。The detection module is configured to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, and if so, determine that there are cracks or scratches on the screen. 6.根据权利要求5所述的装置,其中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若某条裂纹或划痕的长度超过预设长度阈值,则判定所述屏幕存在裂纹或划痕。6. The device according to claim 5, wherein the detection module is configured to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, if If there is, the length of each crack or scratch is calculated, and if the length of a certain crack or scratch exceeds a preset length threshold, it is determined that there is a crack or scratch on the screen. 7.根据权利要求5所述的装置,其中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算裂纹或划痕的个数,若裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。7. The device according to claim 5, wherein the detection module is configured to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, if If there is, the number of cracks or scratches is calculated, and if the number of cracks or scratches exceeds a preset number threshold, it is determined that there are cracks or scratches on the screen. 8.根据权利要求5所述的装置,其中,所述检测模块,用于检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,计算每条裂纹或划痕的长度,若长度超过预设长度阈值的裂纹或划痕的个数超过预设个数阈值,则判定所述屏幕存在裂纹或划痕。8. The device according to claim 5, wherein the detection module is configured to detect whether there are cracks or scratches within the range surrounded by the outline of the screen in the first photo or the second photo, if If there is, the length of each crack or scratch is calculated, and if the number of cracks or scratches whose length exceeds the preset length threshold exceeds the preset number threshold, it is determined that there is a crack or scratch on the screen. 9.一种基于计算的设备,其中,包括:9. A computing-based device, comprising: 处理器;以及processor; and 被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:A memory arranged to store computer-executable instructions that, when executed, cause the processor to: 将屏幕亮屏显示为白底画面;Display the bright screen as a white background image; 拍摄包括所述白底画面的手机屏幕的照片;taking a photo of the mobile phone screen including said white background picture; 从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Recognizing the boundary of the white background picture from the photo, using the boundary as the outline of the screen; 将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Display the bright screen as a full-screen yellow screen, and control the light source to illuminate the screen area that is displayed as a full-screen yellow screen; 拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Take the first photo of the area of the screen that includes the area of the screen shown as a full-screen yellow screen; 将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Display the bright screen as a full-screen white screen, and control the light source to illuminate the screen area displayed as a full-screen white screen; 拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Take a second photo that includes the area of the screen that appears as a full-screen white image; 检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕;Detecting whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches on the screen; 将所述照片转换为灰度图片;converting said photo to a grayscale image; 指定预设像素阈值T1对所述灰度图片进行分割,其中,将所述照片中超过所述预设像素阈值T1的像素点的像素值设为255,将所述照片中未超过所述预设像素阈值T1的像素点的像素值设为0;Designate a preset pixel threshold T1 to segment the grayscale picture, wherein the pixel values of the pixels in the photo that exceed the preset pixel threshold T1 are set to 255, and the pixel values in the photos that do not exceed the preset pixel threshold T1 are set to 255. Set the pixel value of the pixel point of the pixel threshold T1 to be 0; 获取所述灰度图片中的像素值为255的各个像素点连续的区域;Obtain the continuous area of each pixel point in the grayscale image with a pixel value of 255; 计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选,其中,舍弃像素点的个数量小于预设个数阈值T2的像素点连续的区域,并保留像素点的个数量大于等于预设个数阈值T2的像素点连续的区域;Calculate the number of pixels in the area where each pixel is continuous, and filter the area where each pixel is continuous, wherein the area where the number of pixels is less than the preset number threshold T2 is discarded is continuous, and Retaining a region where the number of pixels is greater than or equal to the preset number threshold T2 and the pixels are continuous; 计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s,其中,饱满度s=某个保留的像素点连续的区域中的像素点的个数/该个保留的像素点连续的区域的最小外接旋转矩形的面积;Calculate the area of the minimum circumscribed rotating rectangle of each retained pixel continuous region, and calculate the fullness s of the smallest circumscribed rotated rectangle of each retained pixel continuous region, where fullness s=a certain reserved pixel The number of pixels in the continuous area/the area of the smallest circumscribed rotating rectangle of the reserved pixel continuous area; 将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓。The area where the reserved pixels are continuous with the fullness s greater than the preset fullness threshold T3 is taken as the boundary of the white background picture, and the boundary is taken as the outline of the screen. 10.一种计算机可读存储介质,其上存储有计算机可执行指令,其中,该计算机可执行指令被处理器执行时使得该处理器:10. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, cause the processor to: 将屏幕亮屏显示为白底画面;Display the bright screen as a white background image; 拍摄包括所述白底画面的手机屏幕的照片;taking a photo of the mobile phone screen including said white background picture; 从所述照片中识别出所述白底画面的边界,将所述边界作为所述屏幕的轮廓;Recognizing the boundary of the white background picture from the photo, using the boundary as the outline of the screen; 将屏幕亮屏显示为满屏黄色画面,并控制光源照亮显示为满屏黄色画面的屏幕区域;Display the bright screen as a full-screen yellow screen, and control the light source to illuminate the screen area that is displayed as a full-screen yellow screen; 拍摄包含显示为满屏黄色画面的屏幕区域的第一照片;Take the first photo of the area of the screen that includes the area of the screen shown as a full-screen yellow screen; 将屏幕亮屏显示为满屏白色画面,并控制光源照亮显示为满屏白色画面的屏幕区域;Display the bright screen as a full-screen white screen, and control the light source to illuminate the screen area displayed as a full-screen white screen; 拍摄包含显示为满屏白色画面的屏幕区域的第二照片;Take a second photo that includes the area of the screen that appears as a full-screen white image; 检测所述第一照片或第二照片中所述屏幕的轮廓所围成的范围内是否存在裂纹或划痕,若存在,判定所述屏幕存在裂纹或划痕;Detecting whether there are cracks or scratches within the range enclosed by the outline of the screen in the first photo or the second photo, and if so, determining that there are cracks or scratches on the screen; 将所述照片转换为灰度图片;converting said photo to a grayscale image; 指定预设像素阈值T1对所述灰度图片进行分割,其中,将所述照片中超过所述预设像素阈值T1的像素点的像素值设为255,将所述照片中未超过所述预设像素阈值T1的像素点的像素值设为0;Designate a preset pixel threshold T1 to segment the grayscale picture, wherein the pixel values of the pixels in the photo that exceed the preset pixel threshold T1 are set to 255, and the pixel values in the photos that do not exceed the preset pixel threshold T1 are set to 255. Set the pixel value of the pixel point of the pixel threshold T1 to be 0; 获取所述灰度图片中的像素值为255的各个像素点连续的区域;Obtain the continuous area of each pixel point in the grayscale image with a pixel value of 255; 计算每个像素点连续的区域中的像素点的个数,对每个像素点连续的区域进行筛选,其中,舍弃像素点的个数量小于预设个数阈值T2的像素点连续的区域,并保留像素点的个数量大于等于预设个数阈值T2的像素点连续的区域;Calculate the number of pixels in the area where each pixel is continuous, and filter the area where each pixel is continuous, wherein the area where the number of pixels is less than the preset number threshold T2 is discarded is continuous, and Retaining a region where the number of pixels is greater than or equal to the preset number threshold T2 and the pixels are continuous; 计算每个保留的像素点连续的区域的最小外接旋转矩形的面积,计算每个保留的像素点连续的区域的最小外接旋转矩形的饱满度s,其中,饱满度s=某个保留的像素点连续的区域中的像素点的个数/该个保留的像素点连续的区域的最小外接旋转矩形的面积;Calculate the area of the minimum circumscribed rotating rectangle of each retained pixel continuous region, and calculate the fullness s of the smallest circumscribed rotated rectangle of each retained pixel continuous region, where fullness s=a certain reserved pixel The number of pixels in the continuous area/the area of the smallest circumscribed rotating rectangle of the reserved pixel continuous area; 将饱满度s大于预设饱满度阈值T3的保留的像素点连续的区域作为所述白底画面的边界,将所述边界作为所述屏幕的轮廓。The area where the reserved pixels are continuous with the fullness s greater than the preset fullness threshold T3 is taken as the boundary of the white background picture, and the boundary is taken as the outline of the screen.
CN202010072292.5A 2020-01-21 2020-01-21 Screen detection method and device Active CN111292302B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010072292.5A CN111292302B (en) 2020-01-21 2020-01-21 Screen detection method and device
PCT/CN2020/120888 WO2021147385A1 (en) 2020-01-21 2020-10-14 Screen detection method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010072292.5A CN111292302B (en) 2020-01-21 2020-01-21 Screen detection method and device

Publications (2)

Publication Number Publication Date
CN111292302A CN111292302A (en) 2020-06-16
CN111292302B true CN111292302B (en) 2022-12-27

Family

ID=71028402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010072292.5A Active CN111292302B (en) 2020-01-21 2020-01-21 Screen detection method and device

Country Status (2)

Country Link
CN (1) CN111292302B (en)
WO (1) WO2021147385A1 (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10445708B2 (en) 2014-10-03 2019-10-15 Ecoatm, Llc System for electrically testing mobile devices at a consumer-operated kiosk, and associated devices and methods
CA3056457A1 (en) 2014-10-31 2016-05-06 Mark Vincent Bowles Systems and methods for recycling consumer electronic devices
US12322259B2 (en) 2018-12-19 2025-06-03 Ecoatm, Llc Systems and methods for vending and/or purchasing mobile phones and other electronic devices
JP7291161B2 (en) 2019-02-12 2023-06-14 エコエーティーエム, エルエルシー Connector carrier for electronic device kiosks
JP7438181B2 (en) 2019-02-12 2024-02-26 エコエーティーエム, エルエルシー Kiosk for evaluating and purchasing used electronic devices
CN211956539U (en) 2019-02-18 2020-11-17 埃科亚特姆公司 System for evaluating the condition of an electronic device
EP4078494B1 (en) 2019-12-18 2025-03-26 ecoATM, LLC Systems and methods for vending and/or purchasing mobile phones and other electronic devices
CN111292302B (en) * 2020-01-21 2022-12-27 上海万物新生环保科技集团有限公司 Screen detection method and device
US11922467B2 (en) 2020-08-17 2024-03-05 ecoATM, Inc. Evaluating an electronic device using optical character recognition
WO2022040668A1 (en) 2020-08-17 2022-02-24 Ecoatm, Llc Evaluating an electronic device using optical character recognition
US12271929B2 (en) 2020-08-17 2025-04-08 Ecoatm Llc Evaluating an electronic device using a wireless charger
US12321965B2 (en) 2020-08-25 2025-06-03 Ecoatm, Llc Evaluating and recycling electronic devices
CN114140382B (en) * 2021-10-22 2022-07-29 珠海视熙科技有限公司 Screen area detection method and device and storage medium
CN113936232A (en) * 2021-10-25 2022-01-14 京东科技信息技术有限公司 Screen fragmentation identification method, device, equipment and storage medium
CN114663418A (en) * 2022-04-06 2022-06-24 京东安联财产保险有限公司 Image processing method and device, storage medium and electronic equipment
CN116309487A (en) * 2023-03-23 2023-06-23 凌云光技术股份有限公司 Straight scratch detection method, device, storage medium, and electronic equipment
CN117745724B (en) * 2024-02-20 2024-04-26 高唐县瑞景精密机械有限公司 Stone polishing processing defect region segmentation method based on visual analysis

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567300A (en) * 2011-12-29 2012-07-11 方正国际软件有限公司 Picture document processing method and device
CN104835242A (en) * 2015-04-17 2015-08-12 深圳怡化电脑股份有限公司 Bank note image processing method
CN105894036A (en) * 2016-04-19 2016-08-24 武汉大学 Image feature template matching method being applied to detection of mobile phone screen defects
CN106204614A (en) * 2016-07-21 2016-12-07 湘潭大学 A kind of workpiece appearance defects detection method based on machine vision
CN108280822A (en) * 2017-12-20 2018-07-13 歌尔科技有限公司 The detection method and device of screen cut
CN109765245A (en) * 2019-02-25 2019-05-17 武汉精立电子技术有限公司 Large scale display screen defects detection localization method
CN110084801A (en) * 2019-04-28 2019-08-02 深圳回收宝科技有限公司 A kind of detection method of terminal screen, device, portable terminal and storage medium
CN110672617A (en) * 2019-09-14 2020-01-10 华南理工大学 Method for detecting defects of silk-screen area of glass cover plate of smart phone based on machine vision
CN110706182A (en) * 2019-10-10 2020-01-17 普联技术有限公司 Method and device for detecting flatness of shielding case, terminal equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9538169B2 (en) * 2014-11-03 2017-01-03 Denso International America, Inc. Quality test device for inspecting vehicular display module having thin-film transistors
CN110070524B (en) * 2019-04-03 2021-05-18 北京东舟技术股份有限公司 Intelligent terminal panel visual fault detection system
CN111292302B (en) * 2020-01-21 2022-12-27 上海万物新生环保科技集团有限公司 Screen detection method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567300A (en) * 2011-12-29 2012-07-11 方正国际软件有限公司 Picture document processing method and device
CN104835242A (en) * 2015-04-17 2015-08-12 深圳怡化电脑股份有限公司 Bank note image processing method
CN105894036A (en) * 2016-04-19 2016-08-24 武汉大学 Image feature template matching method being applied to detection of mobile phone screen defects
CN106204614A (en) * 2016-07-21 2016-12-07 湘潭大学 A kind of workpiece appearance defects detection method based on machine vision
CN108280822A (en) * 2017-12-20 2018-07-13 歌尔科技有限公司 The detection method and device of screen cut
CN109765245A (en) * 2019-02-25 2019-05-17 武汉精立电子技术有限公司 Large scale display screen defects detection localization method
CN110084801A (en) * 2019-04-28 2019-08-02 深圳回收宝科技有限公司 A kind of detection method of terminal screen, device, portable terminal and storage medium
CN110672617A (en) * 2019-09-14 2020-01-10 华南理工大学 Method for detecting defects of silk-screen area of glass cover plate of smart phone based on machine vision
CN110706182A (en) * 2019-10-10 2020-01-17 普联技术有限公司 Method and device for detecting flatness of shielding case, terminal equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"矩形度";张弘、李嘉锋;《数字图像处理与分析》;20191231;第135页 *

Also Published As

Publication number Publication date
WO2021147385A1 (en) 2021-07-29
CN111292302A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN111292302B (en) Screen detection method and device
CN111325716B (en) Method and device for detecting screen scratches and cracks
CN111325717B (en) Mobile phone defect location identification method and device
CN111311556B (en) Mobile phone defect location identification method and device
US11682225B2 (en) Image processing to detect a rectangular object
CN111175318A (en) Screen scratch fragmentation detection method and equipment
CN107909569B (en) Screen-patterned detection method, screen-patterned detection device and electronic equipment
US11893767B2 (en) Text recognition method and apparatus
JP2022539910A (en) Electronic device screen area defect inspection method and apparatus
JP2022539912A (en) Electronic device backplane appearance defect inspection method and apparatus
US9679354B2 (en) Duplicate check image resolution
JP2022545336A (en) Camera color unevenness inspection method and apparatus
CN111272388A (en) Method and device for detecting camera flash lamp
CN107704798A (en) Image blurring method, device, computer readable storage medium and computer equipment
CN113781414B (en) Lens resolution testing method and device and electronic equipment
CN109271910A (en) A kind of Text region, character translation method and apparatus
CN115311466A (en) Image recognition method, electronic device and storage medium
CN111242116B (en) Screen positioning method and device
CN113391779A (en) Parameter adjusting method, device and equipment for paper-like screen
CN108154077B (en) Fire automatic-positioning type photograph platform
CN110035232A (en) A kind of image acquiring method based on target object, device and electronic equipment
CN118366167A (en) Character defect detection method and related equipment
CN114529491A (en) Image quality detection method, device, electronic equipment and storage medium
CN111579211A (en) Display screen detection method, detection device and computer storage medium
CN117115136A (en) AOI resistance black surface defect eliminating method, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai

Applicant after: Shanghai wanwansheng Environmental Protection Technology Group Co.,Ltd.

Address before: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai

Applicant before: SHANGHAI YUEYI NETWORK INFORMATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai

Patentee after: Shanghai Wanwu Xinsheng Information Technology Group Co.,Ltd.

Country or region after: China

Address before: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai

Patentee before: Shanghai wanwansheng Environmental Protection Technology Group Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address