A method, device and storage medium for detecting appearance defects of a curved screen

By dynamically adjusting the segmentation lines and cutting the image, the problem of information loss in the appearance defect detection of curved screens is solved, achieving more efficient and accurate detection effects.

CN119559165BActive Publication Date: 2025-06-20SHENZHEN SEICHITECH TECHN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510097578.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-06-20
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The prior art is difficult to accurately analyze the surface area when detecting appearance defects of curved screens, resulting in information loss and affecting the accuracy and efficiency of detection.

Method used

By acquiring the first to be detected image and the second to be detected image of the curved screen to be detected, the bright band information and area feature information are extracted, the segmentation line is dynamically adjusted to generate the target shear segmentation line, the clipping image generates the surface and plane area images, and stitching and defect analysis are performed.

Benefits of technology

It reduces information loss in the detection of surface screen appearance defects, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559165B_ABST
    Figure CN119559165B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for detecting appearance defects of a curved screen, which is used to improve the detection accuracy of appearance defects of the curved screen. Obtain a first image to be detected and a second image to be detected; extract the bright band information of the first image to be detected; perform gray scale value analysis on the second image to be detected to extract regional feature information; determine the candidate segmentation line region of the second image to be detected through the bright band information and the regional feature information; determine the initial segmentation line according to the candidate segmentation line region; dynamically adjust the position of the initial segmentation line through the regional features of the candidate segmentation line region until the segmentation line meets the preset conditions to generate a target shear segmentation line; perform shearing on the first image to be detected and the second image to be detected according to the target shear segmentation line to generate a curved surface region image and a planar region image; splice the curved surface region image and the planar region image to generate a spliced image; perform defect analysis on the spliced image to generate a defect feature analysis result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of curved screen detection, and in particular, to a method, device, and storage medium for detecting appearance defects of curved screens. Background Art

[0002] With the update and iteration of electronic products, the use of display screens is becoming more and more frequent, and consumers have higher requirements for the quality of products. This has led to an increasing amount of content to be detected for display screens, and the detection accuracy is also constantly rising.

[0003] With the increasing number of application fields and more complex application scenarios of electronic devices, the precision of display screens is getting higher and higher, and the shapes are also ever-changing. In the field of display screen manufacturing, display screen defect detection is a key process step. Display screen defects include pixel defects and appearance defects. Appearance defects mainly include defects such as foreign matter contamination, scratches, etc. For general flat display screens, the display screen can be photographed from a radial perspective to analyze appearance defects. However, for curved screens, due to the existence of curved surface areas, simple radial photography cannot accurately analyze the appearance defects of the curved surface areas. To solve the above problems, usually the curved surface area and the flat surface area are photographed separately and then spliced. Such a method relies on a fixed dividing line, resulting in information loss during the division process of the curved surface area and the flat surface area, affecting the accuracy and efficiency of detection. Moreover, in order to prevent scratches on the display screen during the detection process, in the prior art, a protective film is usually attached to the curved screen, so that scratches will not affect the display screen body. However, this also causes more information loss in image segmentation and splicing using a fixed dividing line, greatly reducing the detection accuracy of the appearance defects of the curved screen. Summary of the Invention

[0004] The present application discloses a method, device, and storage medium for detecting appearance defects of curved screens, which are used to improve the detection accuracy of appearance defects of curved screens.

[0005] The first aspect of the present application discloses a method for detecting appearance defects of a curved screen, including:

[0006] Obtaining a first image to be detected and a second image to be detected of the curved screen to be detected, where the first image to be detected and the second image to be detected are images collected when a curved surface side light source and a radial side light source are respectively activated;

[0007] Extracting the bright band information of the first image to be detected;

[0008] Performing grayscale value analysis on the second image to be detected to extract region feature information;

[0009] Determining a candidate dividing line region of the second image to be detected through the bright band information and the region feature information;

[0010] Determine an initial dividing line based on the candidate dividing line region;

[0011] Dynamically adjust the position of the initial dividing line through the regional features of the candidate dividing line region until the dividing line meets the preset conditions to generate a target shear dividing line, where the regional features include regional area and regional gray scale;

[0012] Shear the first image to be detected and the second image to be detected according to the target shear dividing line to generate a curved surface region image and a planar region image;

[0013] Stitch the curved surface region image and the planar region image to generate a stitched image;

[0014] Conduct defect analysis on the stitched image to generate a defect feature analysis result.

[0015] Optionally, determining an initial dividing line based on the candidate dividing line region includes:

[0016] Conduct connected component analysis on the candidate dividing line region and merge adjacent candidate dividing line regions that meet the conditions;

[0017] Generate a continuous initial dividing line based on the merged candidate dividing line region.

[0018] Optionally, dynamically adjusting the position of the initial dividing line through the regional features of the candidate dividing line region until the dividing line meets the preset conditions to generate a target shear dividing line includes:

[0019] Dynamically adjust the position and shape of the initial dividing line according to the regional features of the merged candidate dividing line region to generate an intermediate dividing line;

[0020] Conduct iterative condition analysis on the intermediate dividing line and the initial dividing line;

[0021] When the result of the iterative condition analysis does not meet the termination iteration condition, determine the current dividing line region of the intermediate dividing line, and dynamically adjust the position and shape of the initial dividing line according to the regional features of the current dividing line region;

[0022] When the result of the iterative condition analysis meets the termination iteration condition, calculate the target shear dividing line based on the moving intermediate dividing line.

[0023] Optionally, generating a continuous initial dividing line based on the merged candidate dividing line region includes:

[0024] Determine the candidate region gray scale mean of each merged candidate dividing line region;

[0025] Determine the bright band feature value of each merged candidate dividing line region according to the bright band information;

[0026] Calculate the regional weighted value of each merged candidate segmentation line region according to the grayscale mean value of the candidate region and the bright band feature value;

[0027] Determine the candidate segmentation line regions that meet the conditions according to the regional weighted value, and use morphological operations to smooth the regional boundaries to generate an initial segmentation line.

[0028] Optionally, extract the bright band information of the first image to be detected, including:

[0029] Perform grayscale conversion on the first image to be detected to generate a grayscale conversion image;

[0030] Perform threshold segmentation on the grayscale conversion image according to the preset grayscale mean weight to generate a binary image;

[0031] Extract the edge region of the binary image and extract the bright band information of the edge region.

[0032] Optionally, after shearing the first image to be detected and the second image to be detected according to the target shear segmentation line to generate a curved surface region image and a planar region image, before splicing the curved surface region image and the planar region image to generate a spliced image, the method includes:

[0033] Perform fuzzy logic refinement processing on the curved surface region image and the planar region image.

[0034] The second aspect of this application discloses a device for detecting the appearance defects of a curved screen, including:

[0035] An acquisition unit for acquiring a first image to be detected and a second image to be detected of the curved screen to be detected, where the first image to be detected and the second image to be detected are images acquired when the curved surface side light source and the radial side light source are started respectively;

[0036] A first extraction unit for extracting the bright band information of the first image to be detected;

[0037] A second extraction unit for performing gray level value analysis on the second image to be detected to extract regional feature information;

[0038] A determination unit for determining the candidate segmentation line region of the second image to be detected through the bright band information and the regional feature information;

[0039] A first generation unit for determining an initial segmentation line according to the candidate segmentation line region;

[0040] A dynamic adjustment unit for dynamically adjusting the position of the initial segmentation line through the regional features of the candidate segmentation line region until the segmentation line meets the preset conditions to generate a target shear segmentation line, and the regional features include regional area and regional gray level;

[0041] A second generation unit, configured to cut the first image to be detected and the second image to be detected according to a target cutting and dividing line, and generate a curved surface area image and a planar area image;

[0042] A third generation unit, configured to splice the curved surface area image and the planar area image to generate a spliced image;

[0043] A fourth generation unit, configured to perform defect analysis on the spliced image to generate a defect feature analysis result.

[0044] Optionally, the first generation unit includes:

[0045] A merging module, configured to perform connected component analysis on a candidate dividing line region, and merge adjacent candidate dividing line regions that meet the conditions;

[0046] A first generation module, configured to generate a continuous initial dividing line according to the merged candidate dividing line region.

[0047] Optionally, the dynamic adjustment unit includes:

[0048] configured to dynamically adjust the position and shape of the initial dividing line according to the region features of the merged candidate dividing line region to generate an intermediate dividing line, where the region features include region area and region gray level;

[0049] configured to perform iterative condition analysis on the intermediate dividing line and the initial dividing line;

[0050] configured to, when the iterative condition analysis result does not meet the termination iteration condition, determine the current dividing line region of the intermediate dividing line, and dynamically adjust the position and shape of the initial dividing line according to the region features of the current dividing line region;

[0051] configured to, when the iterative condition analysis result meets the termination iteration condition, calculate a target cutting and dividing line according to the dynamic intermediate dividing line.

[0052] Optionally, the first generation module includes:

[0053] Determine the candidate region gray level mean value of each merged candidate dividing line region;

[0054] Determine the bright band feature value of each merged candidate dividing line region according to the bright band information;

[0055] Calculate the region weighted value of each merged candidate dividing line region according to the candidate region gray level mean value and the bright band feature value;

[0056] Determine the candidate dividing line regions that meet the conditions according to the region weighted value, and use morphological operations to smooth the region boundaries to generate an initial dividing line.

[0057] Optionally, the first extraction unit includes:

[0058] Perform grayscale conversion on the first image to be detected to generate a grayscale-converted image;

[0059] Perform threshold segmentation on the grayscale-converted image according to a preset grayscale mean weight to generate a binary image;

[0060] Extract the edge region of the binary image and extract the bright band information of the edge region.

[0061] Optionally, after the second generation unit and before the third generation unit, the device includes:

[0062] A processing unit for performing fuzzy logic refinement processing on the curved surface region image and the planar region image.

[0063] The third aspect of the present application provides a device for detecting appearance defects of a curved screen, including:

[0064] A processor, a memory, an input / output unit, and a bus;

[0065] The processor is connected to the memory, the input / output unit, and the bus;

[0066] The memory stores a program, and the processor calls the program to execute the methods as described in the first aspect and any optional methods of the first aspect.

[0067] The fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, it executes the methods as described in the first aspect and any optional methods of the first aspect.

[0068] From the above technical solutions, it can be seen that the embodiments of the present application have the following advantages:

[0069] In the present application, first, the first image to be detected and the second image to be detected of the curved screen to be detected are obtained. The first image to be detected and the second image to be detected are images collected when the curved surface side light source and the radial side light source are started, respectively. Sufficient curved surface data and planar data are respectively extracted from the first image to be detected and the second image to be detected. Next, the bright band information of the first image to be detected is extracted. Then, gray level value analysis is performed on the second image to be detected to extract regional feature information. The candidate segmentation line region of the second image to be detected is determined through the bright band information and the regional feature information. The initial segmentation line is determined according to the candidate segmentation line region, and the position of the initial segmentation line is dynamically adjusted through the regional features of the candidate segmentation line region until the segmentation line meets the preset conditions to generate a target shear segmentation line. The first image to be detected and the second image to be detected are sheared according to the target shear segmentation line to generate a curved surface region image and a planar region image. The curved surface region image and the planar region image are spliced to generate a spliced image. Defect analysis is performed on the spliced image to generate a defect feature analysis result.

[0070] By activating the curved surface side light source and the radial side light source, and respectively collecting the first image to be detected and the second image to be detected of the curved surface screen to be detected, sufficient curved surface data is extracted from the first image to be detected, and sufficient plane data is extracted from the second image to be detected. Then, the candidate segmentation line region of the second image to be detected is determined through bright band information and region feature information, and the segmentation line is dynamically calculated to accurately extract the positions of the plane region and the curved surface region, reducing the information loss during the splicing process of the screen region image and the curved surface region image, and improving the efficiency and accuracy of the appearance defect detection of the curved surface screen. Brief Description of the Drawings

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0072] Figure 1 Schematic diagram of an embodiment of the method for detecting the appearance defects of the curved surface screen in the present application;

[0073] Figure 2 Schematic diagram of an embodiment of the method for generating the initial segmentation line in the present application;

[0074] Figure 3 Schematic diagram of an embodiment of the method for generating the target shear segmentation line in the present application;

[0075] Figure 4 Schematic diagram of an embodiment of the method for generating the initial segmentation line in the present application;

[0076] Figure 5 Schematic diagram of an embodiment of the method for extracting the bright band information of the first image to be detected in the present application;

[0077] Figure 6 Schematic diagram of an embodiment of the method for edge processing of the curved surface region image and the plane region image in the present application;

[0078] Figure 7 Schematic diagram of an embodiment of the device for detecting the appearance defects of the curved surface screen in the present application;

[0079] Figure 8 Schematic diagram of an embodiment of the device for detecting the appearance defects of the curved surface screen in the present application;

[0080] Figure 9 Schematic diagram of the first image to be detected in the present application;

[0081] Figure 10 This is a schematic diagram of the second image to be detected in this application. Detailed implementation manners

[0082] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of this application. However, those skilled in the art should clearly understand that this application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of this application.

[0083] It should be understood that when used in the specification and appended claims of this application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0084] It should also be understood that the term "and / or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0085] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" according to the context.

[0086] In addition, in the description of the specification and appended claims of this application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0087] The reference to "one embodiment" or "some embodiments" etc. described in the specification of this application means that specific features, structures, or characteristics described in connection with that embodiment are included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0088] In the prior art, in the field of display screen manufacturing, display screen defect detection is a key process step. Display screen defects include pixel defects and appearance defects, and appearance defects mainly include defects such as foreign matter contamination, scratches, etc. General flat display screens can be photographed through a radial viewing angle to analyze appearance defects. However, for a curved screen, due to the existence of a curved surface area, simple radial photography cannot accurately analyze the appearance defects of the curved surface area. To solve the above problems, usually, the curved surface area and the flat surface area are photographed separately and then spliced. Such a method relies on a fixed dividing line, resulting in information loss during the division process of the curved surface area and the flat surface area, affecting the accuracy and efficiency of detection. Moreover, in order to prevent scratches on the display screen during the detection process, in the prior art, a protective film is usually attached to the curved screen, so that scratches will not affect the display screen body. However, this also causes more information loss in image segmentation and splicing using a fixed dividing line, greatly reducing the detection accuracy of the appearance defects of the curved screen.

[0089] Based on this, the present application discloses a method, device, and storage medium for detecting appearance defects of a curved screen, which are used to improve the detection accuracy of the appearance defects of the curved screen.

[0090] Next, the technical solutions in the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0091] The method of the present application can be applied to a server, device, terminal, or other devices with logical processing capabilities. In this regard, the present application makes no limitation. For convenience of description, the following takes the execution subject as a terminal for description.

[0092] Please refer to Figure 1 , an embodiment of a method for detecting appearance defects of a curved screen provided by the present application includes:

[0093] 101. Obtain a first image to be detected and a second image to be detected of the curved screen to be detected, where the first image to be detected and the second image to be detected are images collected when a curved surface side light source and a radial side light source are respectively started;

[0094] The terminal obtains a first image to be detected and a second image to be detected of the curved screen to be detected, where the first image to be detected and the second image to be detected are images collected when a curved surface side light source and a radial side light source are respectively started.

[0095] The terminal uses an industrial camera and different types of light sources to photograph the curved screen to be measured, so as to obtain high-quality image data for subsequent defect detection and analysis. The steps are as follows:

[0096] 1. Start the curved side light sources on both sides. Adjust the light source brightness and position according to the curvature characteristics of the curved screen to be measured to ensure uniform illumination. Use the industrial camera to collect the first image to be detected;

[0097] 2. Turn off the curved side light sources and turn on the radial side light source. The radial side light source is as perpendicular as possible to the planar area of the curved screen, but does not affect the shooting of the industrial camera, and ensure that the switching process of the light source is stable to avoid the decline of image quality caused by illumination differences.

[0098] Keep the positions of the industrial camera and the curved screen to be measured unchanged, re-trigger the camera to take a picture, and collect the second image to be detected. Ensure that the specifications (resolution, exposure time, etc.) of the second image are the same as those of the first image.

[0099] Please refer to Figure 9 and Figure 10 , Figure 9 is a schematic diagram of the first image to be detected. Through the illumination of the curved side light sources on both sides, a bright band in the curved surface area is formed in the figure. The bright band in the curved surface area includes a large area of the curved surface area and a part of the planar area. Figure 10 is a schematic diagram of the second image to be detected. By turning on the radial side light source, a bright band in the planar area is formed in the figure for the planar area and a part of the curved surface area.

[0100] 102. Extract the bright band information of the first image to be detected;

[0101] The terminal needs to extract the bright band information of the edge area (the boundary of the bright band in the curved surface area) in the first image to be detected for subsequent determination of the dividing line.

[0102] 103. Perform grayscale value analysis on the second image to be detected to extract regional feature information;

[0103] The terminal performs grayscale value analysis on the whole of the second image to be detected or only on the edge area to extract the feature information of this area. Specifically, in this embodiment, the purpose of performing grayscale value analysis on the second image to be detected to extract regional features is to compare with the bright band information of the first image to construct a dividing line model. It mainly includes two steps: using the sliding window method for regional division and calculating the average grayscale value of each area.

[0104] First, use the sliding window method, which is a method of dividing an image into multiple small regions (windows) and can be used for local feature extraction. The following are the specific implementation steps: First, select the window size. Determine the window size according to data such as the resolution of the display screen, where \(W\) is the window width and \(H\) is the window height. The window size should be flexibly selected according to image features and application scenarios.

[0105] Then, slide the window. Specifically, start from the upper left corner of the second image to be detected, and slide the window to the right and down. Slide one pixel or multiple pixels each time until the entire image is traversed.

[0106] Then, the terminal starts to calculate the average gray value of the region. Specifically, for each region within the sliding window, calculate its average gray level value \(M\). Let \(I(x,y)\) be the gray level value of the second image, and the coordinates of the pixels within the window are \((x,y)\). Then, the calculation formula for the average gray level value is:

[0107]

[0108] where \(N\) is the total number of pixels within the window, obtained by multiplying the resolution, \(N = W\times H\). \(R\) is the set of pixels within the current window.

[0109] 104. Determine the candidate segmentation line region of the second image to be detected through bright band information and region feature information;

[0110] The terminal determines the candidate segmentation line region of the second image to be detected through bright band information and region feature information. Specifically, in this embodiment, region feature extraction is implemented as follows:

[0111] 1. Bright band feature extraction: By analyzing the bright band information of the first image to be detected, extract the average gray level value of the bright band, denoted as \(\overline{I}\). .

[0112] 2. Gray level comparison: The terminal compares the average gray level value of each window region of the second image to be detected with the average gray level value of the bright band to construct a feature matrix. Set a threshold (for example, ±10% of the bright band gray level value), and determine whether each region is a candidate segmentation line region:

[0113]

[0114] where is the threshold range, usually taking 0.1 or 0.2.

[0115] Candidate regions for the segmentation line:

[0116] For each window region, determine whether its average gray level value is within the threshold range. Mark the regions that meet the conditions as candidate segmentation line regions.

[0117] 105. Determine an initial dividing line based on the candidate dividing line region;

[0118] 106. Dynamically adjust the position of the initial dividing line through the regional features of the candidate dividing line region until the dividing line meets the preset conditions to generate a target shear dividing line. The regional features include regional area and regional gray scale;

[0119] Next, the terminal determines an initial dividing line according to the candidate dividing line region, so as to dynamically adjust the position of the initial dividing line through the regional features of the candidate dividing line region (the regional features include regional area and regional gray scale) subsequently, that is, to determine whether the features of the dividing line meet the current feature conditions of the region, continuously iterate and update, and dynamically adjust the dividing line, so that the obtained dividing line can accurately divide the curved surface region and the plane region, and there will be no loss of curved surface region information and plane region information in the subsequent fusion process.

[0120] 107. Cut the first image to be detected and the second image to be detected according to the target shear dividing line to generate a curved surface region image and a plane region image;

[0121] The terminal cuts the first image to be detected and the second image to be detected according to the target shear dividing line to generate a curved surface region image and a plane region image. Specifically:

[0122] 1. Region segmentation: According to the determined target shear dividing line , perform region extraction:

[0123] Extract the plane region of the first image to be detected. The formula is as follows:

[0124]

[0125] Among them, is the first image to be detected, is the pixel coordinate, is the function representation of the dividing line.

[0126] Extract the curved surface region of the second image to be detected:

[0127]

[0128] Among them, is the second image to be detected.

[0129] 108. Stitch the curved surface region image and the plane region image to generate a stitched image;

[0130] The terminal stitches the curved surface region image and the plane region image to generate a stitched image. Specifically, it includes:

[0131] 1. Image stitching: Stitch the extracted planar region and curved surface region, and use a multiple interpolation algorithm (such as bilinear interpolation) to smooth the stitching region to reduce artifacts and information loss.

[0132] 2. Result output: Perform defect detection and analysis on the processed final image, and output the detection result.

[0133] 109. Perform defect analysis on the stitched image to generate a defect feature analysis result.

[0134] In this embodiment, the terminal performs defect analysis on the stitched image to generate a defect feature analysis result. Specifically, the specific process of defect detection is as follows:

[0135] 1. Image preprocessing: By using Gaussian filtering, it can smooth the image while better retaining the detailed information of the defects.

[0136]

[0137] In the formula, represents the pixel point after Gaussian filtering, is the standard deviation.

[0138] 2. Image segmentation: The threshold segmentation algorithm is the simplest image segmentation technique, mainly applicable to the situation where the foreground and background differences are large and the region to be segmented is obvious. The key to threshold segmentation lies in selecting an appropriate threshold T to distinguish the foreground and background. Its expression is as follows:

[0139]

[0140] In the formula, represents the gray value of the pixel point of the input image, T represents the threshold for segmenting the foreground and background, represents the output image.

[0141] 3. Morphological processing: Perform morphological processing on the segmented image to connect and fill small regions.

[0142] 4. Connected component analysis: Use a connectivity analysis algorithm (such as depth-first search or breadth-first search) to identify and label each connected region in the binary image.

[0143] 5. Feature extraction: Calculate the features of each labeled blob, find the defect location, and output the result.

[0144] 6. Feature statistics and result output:

[0145] After detecting the defects in the stitched image, this module mainly aggregates and integrates all detected defects, and extracts defect feature quantities such as area, average concentration, aspect ratio, etc. Then, it saves the feature data of all defects to the preset file path and displays some data results.

[0146] In this embodiment, first, the first image to be detected and the second image to be detected of the curved screen to be detected are obtained. The first image to be detected and the second image to be detected are images collected when the curved surface side light source and the radial side light source are started respectively. Sufficient curved surface data and plane data are respectively extracted from the first image to be detected and the second image to be detected. Next, the bright band information of the first image to be detected is extracted. Then, the gray level value analysis is performed on the second image to be detected to extract the regional feature information. The candidate segmentation line region of the second image to be detected is determined through the bright band information and the regional feature information. The initial segmentation line is determined according to the candidate segmentation line region, and the position of the initial segmentation line is dynamically adjusted through the regional features of the candidate segmentation line region until the segmentation line meets the preset conditions, and the target shear segmentation line is generated. The first image to be detected and the second image to be detected are sheared according to the target shear segmentation line to generate a curved surface region image and a plane region image. The curved surface region image and the plane region image are stitched to generate a stitched image. Defect analysis is performed on the stitched image to generate a defect feature analysis result.

[0147] In this embodiment, by starting the curved surface side light source and the radial side light source, and respectively collecting the first image to be detected and the second image to be detected of the curved screen to be detected, sufficient curved surface data is extracted from the first image to be detected, and sufficient plane data is extracted from the second image to be detected. Then, the candidate segmentation line region of the second image to be detected is determined through the bright band information and the regional feature information, and the position of the plane region and the curved surface region is accurately extracted by dynamically calculating the segmentation line, reducing the information loss in the process of stitching the screen region image and the curved surface region image, and improving the efficiency and accuracy of the appearance defect detection of the curved screen.

[0148] Please refer to Figure 2 , an embodiment of a method for generating an initial segmentation line provided by this application includes:

[0149] 201. Perform a connected component analysis on the candidate segmentation line region, and merge adjacent candidate segmentation line regions that meet the conditions;

[0150] The terminal performs a connected component analysis on the candidate segmentation line region and merges adjacent candidate segmentation line regions that meet the conditions, that is, the dynamic shear segmentation line is determined: First, perform a connected component analysis on the candidate region and merge adjacent regions that meet the conditions.

[0151] 202. Generate a continuous initial segmentation line according to the merged candidate segmentation line region.

[0152] The terminal generates continuous initial dividing lines based on the merged candidate dividing line regions , morphological operations (such as dilation and erosion) can be used to smooth the boundaries and generate continuous dividing lines, which are not limited here

[0153] Please refer to Figure 3 , this application provides an embodiment of a method for generating a target shear dividing line, including:

[0154] 301. Dynamically adjust the position and shape of the initial dividing line according to the regional characteristics of the merged candidate dividing line region to generate an intermediate dividing line

[0155] The terminal dynamically adjusts the position and shape of the initial dividing line according to the regional characteristics of the candidate dividing line region to facilitate the best matching of the boundaries between the planar region and the curved surface region

[0156] 302. Perform iterative condition analysis on the intermediate dividing line and the initial dividing line

[0157] 303. When the result of the iterative condition analysis does not meet the termination iteration condition, determine the current dividing line region of the intermediate dividing line, and dynamically adjust the position and shape of the initial dividing line according to the regional characteristics of the current dividing line region

[0158] The terminal performs iterative condition analysis on the intermediate dividing line and the initial dividing line. When the result of the iterative condition analysis does not meet the termination iteration condition, determine the current dividing line region of the intermediate dividing line, and dynamically adjust the position and shape of the initial dividing line according to the regional characteristics of the current dividing line region

[0159] Specifically, calculate the weighted value (iteration adjustment amount) according to the regional characteristics, and recalculate and update the position of the dividing line according to the weighted value (iteration adjustment amount) to make it more accurately conform to the image characteristics. In this way, the dividing line can be adaptively adjusted to adapt to the changes in the image. Final dividing line: After several iterations, the final position of the dividing line is .

[0160] Iterative adjustment: To ensure the real-time optimization of the dividing line, an iterative algorithm is used for adjustment. Set an upper limit on the number of iterations and a convergence threshold :

[0161] Calculate the current dividing line position

[0162]

[0163] Among them, is the adjustment amount for the nth iteration, calculated based on the current bright band area and gray scale value. The calculation method mainly compares the size according to the gray scale value and the average value of the bright band area to determine the offset direction, and then determines the offset amount according to the area of the current dividing line area (whether there is merging). The offset of the dividing line area without merging is less than that of the merged area. By multiplying the number of merges by the unit minimum offset value, the displacement size of each merged area or single area can be determined.

[0164] Convergence judgment: Calculate the difference between the current dividing line and the previous dividing line:

[0165]

[0166] If or the iteration times are reached , stop the iteration.

[0167] 304. When the analysis result of the iteration condition meets the termination iteration condition, calculate the target shear dividing line according to the moving middle dividing line.

[0168] When the analysis result of the iteration condition meets the termination iteration condition, the terminal calculates the target shear dividing line according to the moving middle dividing line ( ).

[0169] Adopt the weighted average method, and calculate the final shear dividing line by weighting according to the gray scale value, area and similarity with the bright band of each candidate area:

[0170]

[0171] Among them, is the weight (calculated based on area and gray scale similarity), is the boundary position of the candidate area. The weight algorithm is the product of the area of the current area and the gray scale similarity. The gray scale similarity is the ratio of the average gray scale of the current area to the average gray scale of the bright band area.

[0172] Finally, perform model output: Output the finally calculated dynamic shear dividing line for subsequent precise extraction and stitching of image areas.

[0173] Please refer to Figure 4 , this application provides an embodiment of a method for generating an initial dividing line, including:

[0174] 401. Determine the candidate area gray scale average value of each merged candidate dividing line area;

[0175] 402. Determine the bright band characteristic value of each merged candidate dividing line area according to the bright band information;

[0176] 403. Calculate the regional weighted value of each merged candidate segmentation line region based on the gray - scale mean value of the candidate region and the bright - band feature value;

[0177] In this embodiment, the terminal determines the gray - scale mean value of the candidate region of each merged candidate segmentation line region, determines the bright - band feature value of each merged candidate segmentation line region according to the bright - band information, and then calculates the regional weighted value of each merged candidate segmentation line region based on the gray - scale mean value of the candidate region and the bright - band feature value.

[0178] Specifically, the principle of the weighting algorithm in this embodiment is as follows. The weighting algorithm aims to assign different weights to different features to more accurately calculate the position of the shear segmentation line. The steps of the algorithm are as follows:

[0179] Define the feature value: Set the feature value of the bright - band information as L. This bright - band feature value can be the product of the gray - scale mean value and the area in the AA region of the bright - band region, and the average gray - scale value of each small region in the second image is (k is the window index).

[0180] Calculate the weighted value: Calculate the weighted value for each region k , and its formula is:

[0181]

[0182] Among them, and are the weight coefficients, reflecting the importance of the bright - band information and the gray - scale value.

[0183] is the bright - band feature value (such as brightness, area, etc.) in region k.

[0184] 404. Determine the candidate segmentation line regions that meet the conditions according to the regional weighted value, and use morphological operations to smooth the region boundary to generate the initial segmentation line.

[0185] The terminal determines the candidate segmentation line regions that meet the conditions according to the regional weighted value, and uses morphological operations to smooth the region boundary to generate the initial segmentation line. Specifically, the terminal determines the position of the initial segmentation line: Determine the position of the initial segmentation line according to the weighted value Determine the position of the initial segmentation line . Select the region with the largest weighted value as the position of the initial segmentation line:

[0186]

[0187] Please refer to Figure 5 , this application provides an embodiment of a method for extracting the bright - band information of the first image to be detected, including:

[0188] 501. Convert the first image to be detected into grayscale to generate a grayscale-converted image;

[0189] 502. Perform threshold segmentation on the grayscale-converted image according to the preset grayscale mean weight to generate a binary image;

[0190] 503. Extract the edge region of the binary image and extract the bright band information of the edge region.

[0191] The terminal converts the first image to be detected into grayscale to generate a grayscale-converted image, performs threshold segmentation on the grayscale-converted image according to the preset grayscale mean weight to generate a binary image, then extracts the edge region of the binary image and extracts the bright band information of the edge region. Specifically, preprocess the image:

[0192] The first step, grayscale conversion: Convert the color image to a grayscale image to simplify processing. represents the grayscale of the pixel at this point, usually in the range of 0 to 255, , , respectively represent the color components of the R channel, G channel, and B channel of this pixel point. The specific formula is as follows:

[0193]

[0194] The second step, threshold segmentation:

[0195] 1. Threshold selection: Use Otsu's method to automatically calculate the global threshold TTT, and divide the grayscale image into foreground (bright band) and background. Otsu's method selects the optimal threshold by maximizing the between-class variance.

[0196]

[0197] Among them, and are the weights of the pixels below and above the threshold T respectively. and are the average grayscale values of the pixels below and above the threshold T respectively.

[0198] 2. Apply the threshold: Apply the threshold T to the grayscale image for binary processing to obtain a binary image .

[0199]

[0200] The third step, edge detection: Extract the region edge.

[0201] 1. Gaussian smoothing: Use a Gaussian filter to smooth the image to reduce noise.

[0202] 2. Gradient calculation: Calculate the gradient of the image, usually using the Sobel operator.

[0203]

[0204]

[0205]

[0206]

[0207] 3. Non-maximum suppression: Refine the edges by detecting whether each pixel is a local maximum.

[0208] 4. Double thresholding: Use two thresholds (high and low) to determine strong edges and weak edges.

[0209] 5. Edge connection: Connect weak edges with strong edges to form the final edge image.

[0210] Fourth step, average gray value calculation: Calculate the average gray level value for the extracted contour region. For each contour region C, its average gray level value M can be calculated by the following formula:

[0211]

[0212] where: N is the number of pixel points in the contour region.

[0213] Please refer to Figure 6 , this application provides an embodiment of a method for edge processing of curved surface region images and planar region images, including:

[0214] 601. Perform fuzzy logic refinement processing on the curved surface region image and the planar region image.

[0215] In this embodiment, the terminal performs fuzzy logic refinement processing on the curved surface region image and the planar region image. Specifically:

[0216] 1. Fuzzy logic refinement: In the boundary region, use fuzzy logic to further refine region extraction. Fuzzy logic allows for the handling of boundary ambiguity and ensures better information retention.

[0217] 2. Fuzzy set definition: Set the fuzzy set F as the fuzziness of the boundary pixels, which can be defined according to the gray level value or brightness of the pixels. For example, for the boundary pixel b:

[0218]

[0219] where, is the gray level value of the boundary pixel, is a membership function that represents the membership degree of a boundary pixel belonging to the bright band.

[0220] 3. Fuzzy rules: Set fuzzy rules to make judgments based on the position and brightness of pixels in the boundary area. For example:

[0221] If is a relatively high brightness value, then it is more likely to belong to the flat area.

[0222] If is a relatively low brightness value, then it is more likely to belong to the curved surface area.

[0223] 4. Fuzzy decision-making: Through the fuzzy inference system, combined with the weights of the rules, obtain the final category of each boundary pixel.

[0224] 5. Region integrity check: After the region extraction is completed, perform an integrity check:

[0225] Information integrity evaluation: Check whether the extracted region meets specific integrity criteria, such as:

[0226]

[0227] where and are the number of pixels in the flat area and the curved surface area respectively, and are the number of pixels in the original image, is a preset integrity threshold.

[0228] Please refer to Figure 7 , this application provides an embodiment of a device for detecting appearance defects of a curved screen, including:

[0229] An acquisition unit 701, configured to acquire a first image to be detected and a second image to be detected of the curved screen to be detected, where the first image to be detected and the second image to be detected are images acquired when the curved surface side light source and the radial side light source are started respectively;

[0230] A first extraction unit 702, configured to extract the bright band information of the first image to be detected;

[0231] Optionally, the first extraction unit 702 includes:

[0232] Perform gray-scale conversion on the first image to be detected to generate a gray-scale conversion image;

[0233] Perform threshold segmentation on the gray-scale conversion image according to the preset gray-scale mean weight to generate a binary image;

[0234] Extract the edge region of the binary image and extract the bright band information of the edge region.

[0235] A second extraction unit 703, configured to perform grayscale value analysis on a second image to be detected, so as to extract region feature information;

[0236] A determination unit 704, configured to determine a candidate segmentation line region of the second image to be detected through the bright band information and the region feature information;

[0237] A first generation unit 705, configured to determine an initial segmentation line according to the candidate segmentation line region;

[0238] Optionally, the first generation unit 705 includes:

[0239] A merging module 7051, configured to perform connected component analysis on the candidate segmentation line region and merge adjacent candidate segmentation line regions that meet the conditions;

[0240] A first generation module 7052, configured to generate a continuous initial segmentation line according to the merged candidate segmentation line region.

[0241] Optionally, the first generation module 7052 includes:

[0242] Determine the candidate region gray scale mean value of each merged candidate segmentation line region;

[0243] Determine the bright band feature value of each merged candidate segmentation line region according to the bright band information;

[0244] Calculate the region weighted value of each merged candidate segmentation line region according to the candidate region gray scale mean value and the bright band feature value;

[0245] Determine the candidate segmentation line regions that meet the conditions according to the region weighted value, and use morphological operations to smooth the region boundary to generate an initial segmentation line.

[0246] A dynamic adjustment unit 706, configured to dynamically adjust the position of the initial segmentation line through the region features of the candidate segmentation line region until the segmentation line meets the preset conditions, and generate a target shear segmentation line, where the region features include the region area and the region gray scale;

[0247] Optionally, the dynamic adjustment unit 706 includes:

[0248] For dynamically adjusting the position and shape of the initial segmentation line according to the region features of the merged candidate segmentation line region to generate an intermediate segmentation line, where the region features include the region area and the region gray scale;

[0249] For performing iterative condition analysis on the intermediate segmentation line and the initial segmentation line;

[0250] When the analysis result of the iteration condition does not meet the termination iteration condition, it is used to determine the current dividing line area of the intermediate dividing line, and dynamically adjust the position and shape of the initial dividing line according to the area characteristics of the current dividing line area;

[0251] When the analysis result of the iteration condition meets the termination iteration condition, it is used to calculate the target shear dividing line according to the moving intermediate dividing line.

[0252] The second generation unit 707 is used to shear the first image to be detected and the second image to be detected according to the target shear dividing line, and generate a curved surface area image and a flat surface area image;

[0253] The processing unit 708 is used to perform fuzzy logic refinement processing on the curved surface area image and the flat surface area image;

[0254] The third generation unit 709 is used to splice the curved surface area image and the flat surface area image to generate a spliced image;

[0255] The fourth generation unit 710 is used to perform defect analysis on the spliced image and generate a defect feature analysis result.

[0256] Please refer to Figure 8 , this application provides a device for detecting appearance defects of a curved screen, including:

[0257] A processor 801, a memory 802, an input / output unit 803, and a bus 804.

[0258] The processor 801 is connected to the memory 802, the input / output unit 803, and the bus 804.

[0259] The memory 802 stores a program, and the processor 801 calls the program to execute the methods as described in Figure 1 , Figure 2 and Figure 3 , Figure 4 , Figure 5 in the method.

[0260] This application provides a computer-readable storage medium, and a program is stored on the computer-readable storage medium. When the program is executed on a computer, it executes the methods as described in Figure 1 , Figure 2 and Figure 3 , Figure 4 , Figure 5 in the method.

[0261] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described system, device, and unit can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0262] In several embodiments provided by this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.

[0263] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0264] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0265] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of this application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, read-only memory), random access memories (RAM, random access memory), magnetic disks, or optical discs and other various media that can store program codes.

Claims

1. A method for detecting appearance defects of a curved screen, characterized in that: include: Acquire a first image to be detected and a second image to be detected of the curved screen to be detected, wherein the first image to be detected and the second image to be detected are images collected when the curved side light source and the radial side light source are started respectively; Extracting bright band information of the first image to be detected; Performing grayscale value analysis on the second image to be detected to extract regional feature information; Determine a candidate segmentation line region of the second to-be-detected image according to the bright band information and the region feature information; Determining an initial segmentation line according to the candidate segmentation line area, including: performing a connected domain analysis on the candidate segmentation line area, merging adjacent candidate segmentation line areas that meet the conditions; generating a continuous initial segmentation line according to the merged candidate segmentation line area; generating a continuous initial segmentation line according to the merged candidate segmentation line area, including: determining a candidate area grayscale mean of each merged candidate segmentation line area; determining a bright band feature value of each merged candidate segmentation line area according to the bright band information; calculating a regional weighted value of each merged candidate segmentation line area according to the candidate area grayscale mean and the bright band feature value; determining a qualified candidate segmentation line area according to the regional weighted value, and using morphological operations to smooth the region boundary to generate an initial segmentation line; Dynamically adjusting the position of the initial segmentation line through the regional features of the candidate segmentation line region until the segmentation line reaches a preset condition to generate a target shear segmentation line, wherein the regional features include the regional area and the regional grayscale, including: dynamically adjusting the position and shape of the initial segmentation line according to the regional features of the merged candidate segmentation line region to generate an intermediate segmentation line; performing iterative condition analysis on the intermediate segmentation line and the initial segmentation line; when the iterative condition analysis result does not meet the termination iteration condition, determining the current segmentation line region of the intermediate segmentation line, and dynamically adjusting the position and shape of the initial segmentation line according to the regional features of the current segmentation line region; when the iterative condition analysis result meets the termination iteration condition, calculating the target shear segmentation line according to the intermediate segmentation line; Shearing the first to-be-detected image and the second to-be-detected image according to the target shearing segmentation line to generate a curved surface area image and a flat surface area image; Splicing the curved surface area image and the planar area image to generate a spliced ​​image; Perform defect analysis on the spliced ​​image to generate defect feature analysis results.

2. The method according to claim 1, characterized in that Extracting bright band information of the first image to be detected includes: Performing grayscale conversion on the first image to be detected to generate a grayscale converted image; Performing threshold segmentation on the grayscale conversion image according to a preset grayscale mean weight to generate a binary image; The edge region of the binary image is extracted, and the bright band information of the edge region is extracted.

3. The method according to any one of claims 1 to 2, characterized in that After the first to-be-detected image and the second to-be-detected image are sheared according to the target shearing segmentation line to generate a curved surface area image and a flat surface area image, the curved surface area image and the flat surface area image are spliced ​​before the spliced ​​image is generated, the method includes: The fuzzy logic thinning process is performed on the surface area image and the plane area image.

4. A device for detecting appearance defects of a curved screen, characterized in that: include: An acquisition unit, used for acquiring a first image to be detected and a second image to be detected of the curved screen to be detected, wherein the first image to be detected and the second image to be detected are images collected when the curved side light source and the radial side light source are started respectively; A first extraction unit, used to extract bright band information of the first image to be detected; A second extraction unit, used for performing grayscale value analysis on the second image to be detected to extract regional feature information; A determination unit, configured to determine a candidate segmentation line region of the second image to be detected according to the bright band information and the region feature information; A first generating unit, configured to determine an initial segmentation line according to the candidate segmentation line region; The first generation unit comprises: A merging module, used to perform connected domain analysis on the candidate segmentation line regions and merge adjacent candidate segmentation line regions that meet the conditions; A first generating module, used for generating a continuous initial segmentation line according to the merged candidate segmentation line area; The first generation module includes: determining the candidate region grayscale mean of each merged candidate segmentation line region; determining the bright band feature value of each merged candidate segmentation line region according to the bright band information; calculating the region weighted value of each merged candidate segmentation line region according to the candidate region grayscale mean and the bright band feature value; determining the candidate segmentation line region that meets the conditions according to the region weighted value, and using morphological operations to smooth the region boundary to generate an initial segmentation line; A dynamic adjustment unit, configured to dynamically adjust the position of the initial segmentation line according to the regional features of the candidate segmentation line region until the segmentation line reaches a preset condition, thereby generating a target shear segmentation line, wherein the regional features include the regional area and the regional grayscale; Dynamic adjustment unit, including: Used to dynamically adjust the position and shape of the initial segmentation line according to the regional features of the merged candidate segmentation line area to generate an intermediate segmentation line, where the regional features include the area and the grayscale of the area; Used to perform iterative condition analysis on the intermediate dividing line and the initial dividing line; When the iteration condition analysis result does not meet the termination condition, the current segmentation line area of ​​the middle segmentation line is determined, and the position and shape of the initial segmentation line are dynamically adjusted according to the regional characteristics of the current segmentation line area; When the iterative condition analysis result meets the termination condition, the target cutting segmentation line is calculated according to the middle segmentation line; A second generating unit, configured to shear the first to-be-detected image and the second to-be-detected image according to the target shearing segmentation line to generate a curved surface area image and a flat surface area image; A third generating unit, configured to splice the curved surface area image and the planar area image to generate a spliced ​​image; The fourth generating unit is used to perform defect analysis on the spliced ​​image and generate defect feature analysis results.

5. A device for detecting appearance defects of a curved screen, characterized in that: include: A processor, a memory, an input-output unit and a bus, wherein the processor is connected to the memory, the input-output unit and the bus, the memory stores a program, and the processor calls the program to execute the method as claimed in any one of claims 1 to 3.

6. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Method and system for rapidly detecting appearance defects of curved screen

    CN110018167A

  • Curved surface label splicing detection method based on machine vision

    CN112837257A