Touch screen surface defect detection method and related equipment

Through optical imaging technology and semantic segmentation algorithm combined with deep learning models, the problem of insufficient recognition accuracy and reliability of existing automated optical detection systems in complex backgrounds and micro defect detection is solved, and efficient and accurate touch screen surface defect detection and quality control are achieved.

CN120102589AInactive Publication Date: 2025-06-06BEIJING NINESTARS ERA TECH

Patent Information

Application Number
CN202510207880.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When faced with complex backgrounds and tiny defects, existing automated optical detection systems have insufficient recognition accuracy and reliability, making it difficult to achieve comprehensive and accurate detection of touch screen surface defects.

Method used

Optical imaging technology combined with semantic segmentation algorithm is used to perform image processing and defect detection through multi-spectral imaging, high dynamic range imaging and deep learning models (such as convolutional neural networks, attention mechanism layers, etc.).

Benefits of technology

It significantly improves the accuracy and reliability of detection, can quickly identify and locate defects, and formulate corresponding quality control measures based on the defect type, improving production efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120102589A_ABST
    Figure CN120102589A_ABST
Patent Text Reader

Abstract

The invention relates to a touch screen surface defect detection method and related equipment, and the method comprises the following steps: carrying out the optical imaging of the surface of a target touch screen, and obtaining an optical image; performing image segmentation on the optical image through a preset semantic segmentation algorithm to obtain segmented sub-images; inputting the segmented sub-images into a preset image detection algorithm to judge whether defects exist in the target touch screen or not; if yes, defect positioning and marking are carried out on the target touch screen based on the segmented sub-images, and a surface defect area of the target touch screen is obtained; the defect type of the target touch screen is determined based on the surface defect area, and corresponding quality control measures are made based on the defect type, so that the problem that although a basic automatic optical detection system can improve the detection speed to a certain extent, the detection speed cannot be greatly improved in the face of complex backgrounds and tiny defects is solved. And the identification precision and the reliability still need to be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of touch screens, and in particular to a surface defect detection method for a touch screen and related equipment. Background Art

[0002] With the rapid development of the electronic equipment market, the quality of touch screens, as the main interface for users to interact with devices, has become particularly important. However, traditional surface defect detection methods often rely on manual inspection or basic automated optical inspection technology, which has obvious deficiencies in efficiency and accuracy. First of all, manual inspection is not only time-consuming and labor-intensive, but also difficult to ensure stability and consistency over long periods of time, especially when dealing with a large number of products, which is prone to fatigue and misjudgment. In addition, although the basic automated optical inspection system can improve the detection speed to a certain extent, its recognition accuracy and reliability still need to be improved when facing complex backgrounds and tiny defects.

[0003] Another challenge lies in the limitations of existing image processing algorithms. Many current algorithms require complex preprocessing steps and have poor adaptability to different types of defects and changing environmental conditions. For example, various types of defects that may appear in the touch screen production process, such as scratches, bubbles, impurities, etc., due to their diverse morphology and random distribution, make it difficult for general image processing algorithms to achieve comprehensive and accurate detection. At the same time, different touch screen materials and structural differences also put higher requirements on the detection algorithm. How to design a detection solution that can adapt to a variety of materials and accurately identify various types of defects is an important problem facing current research.

[0004] Therefore, the development of an efficient and accurate method for automatic detection of touch screen surface defects has become an urgent need in the industry. This method should not only be able to quickly identify and locate defects, but also be able to classify them according to the specific characteristics of the defects and formulate corresponding quality control measures. Existing technologies and methods are still insufficient in this regard, especially in the problem of finding a balance between speed and accuracy. The method proposed in this study aims to solve the above problems by combining advanced optical imaging technology and semantic segmentation algorithms, and provide a new solution for improving the quality control level of touch screens. This method is expected to significantly improve production efficiency, reduce product recalls and customer complaints caused by quality problems, and thus enhance the market competitiveness of enterprises. Summary of the invention

[0005] The main purpose of the present invention is to provide a surface defect detection method and related equipment for a touch screen, which solves the technical problem that although the basic automated optical inspection system can improve the detection speed to a certain extent, its recognition accuracy and reliability still need to be improved when faced with complex backgrounds and tiny defects.

[0006] To achieve the above object, the present invention provides a method for detecting surface defects of a touch screen, comprising the following steps:

[0007] Performing optical imaging on the surface of the target touch screen to obtain an optical image;

[0008] Performing image segmentation on the optical image using a preset semantic segmentation algorithm to obtain segmented sub-images;

[0009] Inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen;

[0010] If so, the defect is located and marked on the target touch screen based on the segmented sub-image to obtain a surface defect area of ​​the target touch screen;

[0011] The defect type of the target touch screen is determined based on the surface defect area, and corresponding quality control measures are formulated based on the defect type.

[0012] Furthermore, performing optical imaging on the surface of the target touch screen to obtain an optical image includes:

[0013] Performing a multi-band spectral scan on the surface of the target touch screen by a preset multi-spectral imaging device to obtain multi-band spectral data; wherein the multi-band spectral data includes spectral information of a visible light band, a near infrared band, and an ultraviolet band;

[0014] Performing fusion processing on the multi-band spectral data to obtain a fused spectral image;

[0015] Based on a preset high dynamic range imaging technology, the dynamic range of the fused spectrum image is expanded to obtain a high dynamic range image; wherein the high dynamic range image includes brightness distribution and detail information of the upper surface of the target touch screen;

[0016] Performing denoising and image enhancement on the high dynamic range image to obtain a denoised and enhanced image;

[0017] Edge extraction is performed on the denoised and enhanced image to obtain an optical image.

[0018] Furthermore, the performing image segmentation on the optical image by using a preset semantic segmentation algorithm to obtain segmented sub-images includes:

[0019] Performing adaptive region segmentation on the optical image to obtain an initial segmentation region map, and performing region feature extraction on the initial segmentation region map to obtain a region feature vector;

[0020] Performing watershed transformation processing on the optical image based on the regional feature vector to obtain a regional watershed map, and performing over-segmentation suppression on the regional watershed map to obtain a suppressed segmentation map;

[0021] Performing region label propagation on the suppressed segmentation map to obtain a region label map, and performing semantic constraint processing on the region label map using a preset semantic segmentation algorithm to obtain a semantic segmentation map;

[0022] The optical image is segmented based on the semantic segmentation map to obtain segmented sub-images.

[0023] Furthermore, the step of inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen includes:

[0024] Inputting the segmented sub-image into a preset image detection algorithm; wherein the image detection algorithm includes a convolutional neural network, an attention mechanism layer, a weighted fusion layer, and a pooling layer;

[0025] Performing feature extraction on the segmented sub-image through the convolutional neural network to obtain a multi-scale feature map; wherein the convolutional neural network includes three convolutional layers, the convolutional kernel sizes in the convolutional layers are 7×7, 5×5 and 3×3, the number of convolutional kernels are 64, 128 and 256, and the step size is 1;

[0026] Performing a non-local attention mechanism calculation on the multi-scale feature map through the attention mechanism layer to obtain an attention weight map; wherein the attention mechanism layer includes a 1×1 convolution layer and a softmax function;

[0027] Performing weighted fusion on the attention weight map and the multi-scale feature map through the weighted fusion layer to obtain a weighted feature map;

[0028] The weighted feature map is subjected to spatial pyramid pooling processing by the pooling layer to obtain a pooled feature vector; wherein the spatial pyramid pooling includes four pooling layers of different scales, the pooling sizes of the pooling layers are 1×1, 2×2, 3×3 and 6×6, respectively, and the step size is 1;

[0029] It is determined whether there is a defect in the target touch screen based on the pooled feature vector.

[0030] Furthermore, the defect location and marking of the target touch screen based on the segmented sub-image to obtain the surface defect area of ​​the target touch screen includes:

[0031] Performing local reflection intensity analysis on the segmented sub-image to obtain a reflection intensity distribution map, and performing gradient calculation on the surface of the target touch screen based on the reflection intensity distribution map to obtain a surface gradient map;

[0032] Performing anisotropic diffusion processing on the surface gradient map to obtain an edge enhancement map;

[0033] Performing morphological reconstruction on the edge enhancement image to obtain a defect candidate region map, and performing region growing segmentation based on the defect candidate region map to obtain a defect contour map;

[0034] Performing density clustering processing on the defect contour map to obtain a defect density distribution map, and performing watershed processing based on the defect density distribution map to obtain a defect segmentation map;

[0035] Calculating and locating the minimum circumscribed rectangle of the defect segmentation map to obtain a defect location frame map, and extracting geometric features of the defect location frame map to obtain a defect feature vector;

[0036] The defect area on the surface of the target touch screen is marked based on the defect feature vector to obtain the surface defect area of ​​the target touch screen.

[0037] Furthermore, the performing of region growing segmentation based on the defect candidate region map to obtain a defect contour map includes:

[0038] Performing local gradient analysis on the defect candidate region map to obtain a gradient intensity map, and selecting regional seed points based on the gradient intensity map to obtain a seed point set;

[0039] Performing eight-neighborhood expansion analysis on the seed point set to obtain a neighborhood feature map, and performing similarity calculation based on the neighborhood feature map to obtain a regional similarity matrix;

[0040] Performing adaptive threshold calculation on the regional similarity matrix to obtain a growth threshold map, and performing regional expansion control on the defect candidate region map based on the growth threshold map to obtain a regional growth state map;

[0041] Performing boundary connectivity analysis on the regional growth state map to obtain a boundary feature map, and merging regions based on the boundary feature map to obtain a region merging map;

[0042] Contour features are extracted from the region merged image to obtain a contour description vector, and a defect contour is constructed based on the contour description vector to obtain a defect contour image.

[0043] Furthermore, determining the defect type of the target touch screen based on the surface defect area and formulating corresponding quality control measures based on the defect type includes:

[0044] Performing defect texture spectrum analysis on the surface defect area to obtain a defect texture spectrum map, and performing spectral density calculation based on the defect texture spectrum map to obtain a spectral density feature vector;

[0045] Performing a local binary pattern analysis on the surface defect area based on the spectral density feature vector to obtain a binary feature map, and performing a gray level co-occurrence matrix calculation based on the binary feature map to obtain a texture feature matrix;

[0046] Performing principal curvature analysis on the texture feature matrix to obtain a curvature feature map, and performing morphological gradient calculation based on the curvature feature map to obtain a defect edge feature map;

[0047] Performing Zernike moment calculation on the defect edge feature map to obtain a shape description feature vector, and classifying defect types based on the shape description feature vector to obtain a defect type label, wherein the defect type label includes scratches, pits, bubbles, and foreign matter on the target touch screen;

[0048] A quality grade of the target touch screen is evaluated based on the defect type label to obtain a defect grade evaluation result, and corresponding quality control measures are formulated based on the defect grade evaluation result.

[0049] The present invention also provides a surface defect detection device for a touch screen, comprising:

[0050] An imaging module, used for optically imaging the surface of the target touch screen to obtain an optical image;

[0051] A segmentation module, used to perform image segmentation on the optical image using a preset semantic segmentation algorithm to obtain segmented sub-images;

[0052] A detection module, used for inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen;

[0053] a marking module, configured to locate and mark the defect of the target touch screen based on the segmented sub-image, if any, to obtain a surface defect area of ​​the target touch screen;

[0054] A formulation module is used to determine the defect type of the target touch screen based on the surface defect area, and formulate corresponding quality control measures based on the defect type.

[0055] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0056] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0057] The present invention provides a method for detecting surface defects of a touch screen, comprising the following steps: optically imaging the surface of a target touch screen to obtain an optical image; segmenting the optical image by a preset semantic segmentation algorithm to obtain a segmented sub-image; inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen; if there is, locating and marking the defect of the target touch screen based on the segmented sub-image to obtain a surface defect area of ​​the target touch screen; determining the defect type of the target touch screen based on the surface defect area, and formulating corresponding quality control measures based on the defect type. Through the above technical means, the technical problem that the basic automated optical detection system can improve the detection speed to a certain extent, but its recognition accuracy and reliability still need to be improved when facing complex backgrounds and tiny defects is solved, and compared with traditional manual inspection or basic automated detection means, the method can significantly shorten the detection time while ensuring or even improving the detection accuracy. This is conducive to speeding up production, reducing product rework and delays caused by quality problems, and thus optimizing the technical effect of the operation efficiency of the entire production line. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a schematic diagram of the steps of a method for detecting surface defects of a touch screen in one embodiment of the present invention;

[0059] Figure 2 is a structural block diagram of a surface defect detection device for a touch screen in one embodiment of the present invention;

[0060] Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0061] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0063] like Figure 1 As shown, Figure 1 It is a schematic diagram of the steps of a method for detecting surface defects of a touch screen in one embodiment of the present invention;

[0064] In one embodiment of the present invention, a method for detecting surface defects of a touch screen is provided, comprising the following steps:

[0065] Step S1, optically imaging the surface of the target touch screen to obtain an optical image.

[0066] Specifically, in the process of optically imaging the surface of the target touch screen, it is first necessary to use a high-precision optical imaging device to capture the image information of the touch screen surface, so as to obtain a clear and detailed optical image. The key to this process is to select the appropriate optical imaging technology to ensure that all details of the touch screen surface can be accurately reflected, including any minor defects that may exist. For example, in a typical industrial production environment, when the touch screen products on the production line pass through the inspection station, the high-resolution camera installed here will quickly and accurately shoot each passing product to generate a high-quality optical image. These images not only include the overall appearance of the touch screen, but also carefully record every subtle change and feature on its surface. In order to achieve the above-mentioned "optical imaging of the surface of the target touch screen to obtain an optical image", it is necessary to ensure that the imaging device has sufficient resolution and contrast adjustment capabilities so that the preset semantic segmentation algorithm can be used in the subsequent steps to accurately segment the image. Specifically, this means that the imaging system must not only be able to capture the basic structure of the touch screen surface, but also be able to identify various reflection and refraction phenomena caused by material differences, manufacturing processes or external environmental factors. For example, during the inspection process, light spots or shadows caused by uneven coating of the touch screen glass may be encountered. These need to be correctly captured by optimizing imaging parameters, and ensure that the final generated optical image can truly reflect the actual condition of the touch screen surface. In addition, in order to adapt to different production speeds and inspection requirements, the imaging equipment also needs to support real-time data processing functions to ensure that each touch screen passing through the inspection station can be quickly imaged and transmitted to the next processing stage, such as image segmentation and defect detection, thus forming a complete set of automated processes from optical imaging to defect location and classification, greatly improving the inspection efficiency and accuracy. In this process, every detail cannot be ignored, because they are directly related to whether the subsequent steps can proceed smoothly and the reliability of the final inspection results. For example, if the quality of the initial optical image is not high, then even if the subsequent semantic segmentation and image detection algorithms are advanced, accurate defect analysis results cannot be obtained. Therefore, ensuring the high-quality execution of the optical imaging step is the basis for the success of the entire inspection method.

[0067] Step S2, performing image segmentation on the optical image using a preset semantic segmentation algorithm to obtain segmented sub-images.

[0068] Specifically, after optical imaging of the surface of the target touch screen and obtaining high-quality optical images, the next step is to segment these optical images through a preset semantic segmentation algorithm to obtain segmented sub-images. The core of this step is to use advanced computer vision technology to decompose complex optical images into multiple meaningful parts, each of which represents a specific area or object in the image. Specifically, the semantic segmentation algorithm first comprehensively analyzes the input optical image, identifies different sets of pixels, and classifies them into corresponding categories according to their characteristics. For example, in the application scenario of touch screen surface detection, these categories may include normal display areas, borders, buttons, and potential defective areas such as scratches, bubbles, etc. To achieve this process, the preset semantic segmentation algorithm is usually based on a deep learning model, such as a convolutional neural network (CNN), which has been trained with a large amount of labeled data and can accurately understand and distinguish different types of image features. When the optical image is input into this model, it automatically generates a pixel-level classification result, thereby segmenting the image into multiple sub-images with clear meanings. For example, during the inspection process, if an area is marked as possibly having scratches, that portion of the image is extracted separately as a segmented sub-image for further analysis and processing.

[0069] Step S3: input the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen.

[0070] Specifically, after the optical image is segmented by a preset semantic segmentation algorithm and multiple segmented sub-images are obtained, the next step is to input these segmented sub-images into a preset image detection algorithm to determine whether there are defects in the target touch screen. This process relies on advanced image processing and analysis techniques, which aim to identify potential defects by carefully examining each segmented sub-image. Specifically, the preset image detection algorithm is usually based on deep learning models, such as convolutional neural networks (CNNs), which have been trained with a large amount of labeled data and can accurately identify different types of defect features. When the segmented sub-images are input into this model, the algorithm automatically analyzes the pixel distribution, texture features, and other visual information in each sub-image and compares them with known defect patterns. For example, in a typical industrial production environment, assume that a batch of touch screen products needs to undergo strict quality inspection to ensure that there are no scratches, bubbles, or other surface defects. At this time, the semantically segmented sub-images will be fed into the image detection algorithm one by one, and the algorithm will analyze each sub-image in detail. If a sub-image contains an area suspected of being scratched, the image detection algorithm will determine whether there are indeed scratches in the area based on its pre-learned feature library. This judgment not only relies on static feature matching, but also may combine contextual information and data from other adjacent sub-images for comprehensive evaluation, thereby improving the accuracy of the judgment. In addition, in order to further improve the reliability of detection, the image detection algorithm can also set different thresholds and parameters to flexibly adjust the sensitivity and specificity in different application scenarios. For example, on a production line with high precision requirements, a higher threshold can be set to reduce the false alarm rate; while in a large-scale rapid detection scenario, the threshold can be appropriately lowered to increase the detection speed. In this way, the image detection algorithm can not only efficiently identify various types of surface defects, but also provide accurate information support for subsequent defect location and marking. In short, the link of inputting the segmented sub-image into the preset image detection algorithm is a key step in the entire touch screen surface defect detection process. It directly determines whether various potential defects can be accurately discovered and classified, thereby providing a reliable basis for product quality control. In this process, every detail is crucial because they jointly determine the accuracy and effectiveness of the final detection results. Therefore, optimizing the performance and parameter settings of the image detection algorithm is an important guarantee to ensure the successful operation of the entire detection system.

[0071] Step S4: if there is a defect, the target touch screen is defectively located and marked based on the segmented sub-image to obtain a surface defect area of ​​the target touch screen.

[0072] Specifically, after determining that there are indeed defects in the target touch screen through the preset image detection algorithm, the next key step is to accurately locate and mark these defects based on the segmented sub-images to obtain the surface defect area of ​​the target touch screen. This process requires not only high-precision positioning technology, but also an effective marking method to ensure that each defect can be accurately identified and recorded. Specifically, when the image detection algorithm confirms that a segmented sub-image contains a defect, the system will automatically further analyze the sub-image, extract the specific location information of the defect, and generate corresponding marking data on this basis. First, during the positioning process, the system will use the pixel coordinate information in the segmented sub-image to accurately calculate the location of the defect. Since each segmented sub-image has been processed by the semantic segmentation algorithm, each part of it has a clear semantic label, which makes the positioning work more intuitive and efficient. For example, in an industrial production environment, suppose a batch of touch screen products are undergoing quality inspection on an assembly line. When the image detection algorithm identifies that there is a scratch in a sub-image, the system will immediately calculate the specific location coordinates of the scratch based on the pixel distribution of the sub-image. These coordinates include not only the lateral and longitudinal positions of the defect on the two-dimensional plane, but may also involve depth information (if three-dimensional imaging technology is used), thus providing comprehensive data support for subsequent detailed analysis. Secondly, in the marking stage, the system converts the calculated defect location information into visual marking data for manual inspection or further automated processing. Common marking methods include superimposing color-coded annotation boxes, arrows or other graphic symbols on the original optical image, directly pointing to the area where the defect is located. For example, for the scratch defect mentioned above, the system may draw a red border around it and attach a short text description next to it, such as "Scratch: Length 5mm, Width 0.1mm". This kind of marking is not only clear and concise, but also helps to quickly identify and classify different types of defects. In addition, in order to improve the accuracy and readability of the marking, the system can also adjust the color, size and style of the marking according to specific production needs. For example, on a high-speed production line, in order to ensure that the operator can quickly notice the critical defects, it can be marked with eye-catching colors and larger fonts; in a laboratory environment that requires fine analysis, more detailed markings and instructions can be used. Furthermore, in order to ensure the efficiency and accuracy of the entire defect location and marking process, the system usually combines a variety of technologies and tools for optimization. For example, using machine learning algorithms to analyze historical data and continuously improve the parameter settings for location and marking; or through linkage with other inspection equipment, multi-angle and multi-level defect detection and marking can be achieved.In a practical application scenario, suppose an electronic product manufacturer is conducting a comprehensive quality inspection of its high-end touch screen products. When a product is found to have a bubble defect, the system will not only mark the specific location of the bubble in the optical image, but also automatically generate a detailed report based on its shape, size and distribution for reference by the quality control department. This report can not only help engineers quickly understand the quality problems of the product, but also provide a scientific basis for formulating corresponding repair measures and improvement plans. In short, the process of defect location and marking of the target touch screen based on the segmented sub-image is a complex and precise task. It not only relies on advanced image processing technology and efficient algorithm support, but also needs to be flexibly adjusted in combination with the specific needs in the actual application scenario. Through this process, the system can accurately identify and record various defects on the surface of the touch screen, providing a solid foundation for subsequent quality control and product improvement. In this process, every detail is crucial because they jointly determine the reliability and practicality of the final test results. Therefore, continuous optimization and improvement of the technology and methods of this link is an important guarantee to ensure the efficient operation of the entire detection system.

[0073] Step S5, determining the defect type of the target touch screen based on the surface defect area, and formulating corresponding quality control measures based on the defect type.

[0074] Specifically, after the target touch screen is defectively located and marked based on the segmented sub-images, the next step is to determine the defect type of the target touch screen based on the surface defect area and formulate corresponding quality control measures based on these defect types. This process involves in-depth analysis of the marked defect areas, identifying the specific types of defects, and determining the subsequent quality management strategy based on their nature and impact. Specifically, after the system has successfully marked the various defect areas on the surface of the touch screen, the next task is to clarify the specific type of each defect, such as scratches, bubbles, impurities, etc., through further image analysis and technical evaluation. First, in the process of determining the defect type, the system uses a preset feature library and machine learning model to compare known defect patterns. For example, in a typical industrial production environment, suppose a batch of touch screen products are being inspected on an assembly line. When the system identifies a defect suspected of scratches in a specific area, it automatically calls various scratch sample data stored in the database and compares it with the current defect area. This comparison not only relies on visual features such as shape, color and texture, but may also be combined with other physical parameters such as depth and length to ensure the accuracy of classification. If the analysis confirms that the area is indeed a scratch, the system will mark it as a "scratch" type and record relevant details such as location, size and severity. Secondly, based on the determined defect type, the system will formulate corresponding quality control measures. The key to this step is to choose the appropriate treatment method according to the different types of defects and their impact on product quality. For example, for minor scratches that do not affect the function, simple repair measures such as local grinding or coating repair may be taken; while for more serious bubble problems, more complex treatment solutions may be required, such as reprocessing or material replacement. In actual operation, suppose an electronic product manufacturer finds that there are multiple bubble defects in a batch of touch screen products it produces. The system will automatically generate detailed repair suggestions based on the location and size of these defects. For example, for small bubbles located at the edge of the screen, local heating and pressure treatment can be used to eliminate them; while for large bubbles concentrated in the display area, complete rework and re-packaging process may be required. In addition, in order to ensure the effectiveness and consistency of the entire quality control process, the system will also combine historical data and experience knowledge to continuously optimize and improve quality control measures. For example, by analyzing past similar defect handling cases, best practices can be summarized and applied to the current production process. In a practical application scenario, suppose a company has encountered problems with tiny impurities on the touch screen many times in the past few months. Through systematic data analysis and improvement measures, they found that adjusting certain production process parameters can significantly reduce the occurrence of such problems. Therefore, in the new batch production, they will implement these improvement measures in advance and ensure that each touch screen meets the expected quality standards through real-time monitoring and feedback mechanisms.Finally, the system will also generate detailed reports and records for reference and archiving by the quality control department. These reports not only include specific information and treatment suggestions for each defect, but also cover the data and result analysis of the entire detection process. For example, in the above-mentioned touch screen bubble problem, the report generated by the system will list in detail the location, size, severity and recommended treatment methods of all detected bubble defects. In this way, quality control personnel can make decisions quickly based on this information and take necessary actions to ensure the consistency and reliability of product quality. In short, determining the defect type based on the surface defect area and formulating corresponding quality control measures is a systematic and scientific process. It not only relies on advanced technical means, but also needs to be flexibly adjusted in combination with the specific needs of actual application scenarios. Through this process, the overall quality and market competitiveness of the product can be effectively improved, bringing greater economic benefits to the enterprise. In this process, every detail is crucial because they jointly determine the reliability and practicality of the final test results. Therefore, continuous optimization and improvement of the technology and methods of this link is an important guarantee to ensure the efficient operation of the entire detection system.

[0075] In a specific embodiment, performing optical imaging on the surface of the target touch screen to obtain an optical image includes:

[0076] Performing a multi-band spectral scan on the surface of the target touch screen by a preset multi-spectral imaging device to obtain multi-band spectral data; wherein the multi-band spectral data includes spectral information of a visible light band, a near infrared band, and an ultraviolet band;

[0077] Performing fusion processing on the multi-band spectral data to obtain a fused spectral image;

[0078] Based on a preset high dynamic range imaging technology, the dynamic range of the fused spectrum image is expanded to obtain a high dynamic range image; wherein the high dynamic range image includes brightness distribution and detail information of the upper surface of the target touch screen;

[0079] Performing denoising and image enhancement on the high dynamic range image to obtain a denoised and enhanced image;

[0080] Edge extraction is performed on the denoised and enhanced image to obtain an optical image.

[0081] Specifically, in the process of optical imaging of the surface of the target touch screen, the surface of the target touch screen is first scanned by a preset multi-spectral imaging device to obtain multi-band spectral data including visible light band, near infrared band and ultraviolet band. The core of this process is to use the spectral information of different bands to capture various features of the touch screen surface. For example, in a typical industrial production environment, when a batch of touch screen products are being inspected on the assembly line, the high-precision multi-spectral imaging device installed on the production line will scan each product in turn. These devices can simultaneously obtain spectral information from visible light to near infrared and even ultraviolet bands, thereby fully reflecting the physical properties of the touch screen surface, including material composition, coating thickness and potential defects. Next, in order to convert the multi-band spectral data into more useful information, the system will fuse these data to obtain a fused spectral image. The goal of the fusion processing is to integrate the data of each band, eliminate redundant information, and enhance useful features. For example, in the above application scenario, assuming that there are tiny scratches or bubbles on the surface of a touch screen, these defects may be more obvious in certain specific bands. Through fusion processing, the system can combine the advantages of each band to generate a fused spectral image with more details and clearer features. This step not only improves the overall quality of the image, but also provides a richer data basis for subsequent analysis. Subsequently, based on the preset high dynamic range imaging technology, the system will expand the dynamic range of the fused spectral image to obtain a high dynamic range image. High dynamic range imaging technology aims to capture and display the brightness distribution and detail information in the image, and maintain high-quality imaging effects even under extreme lighting conditions. In actual operation, assuming that a batch of touch screen products are tested in strong or weak light environments, traditional imaging methods may cause the image to be overexposed or underexposed, making it impossible to accurately identify some important surface details. Through high dynamic range imaging technology, the system can effectively expand the dynamic range of the image to ensure that all details of the touch screen surface can be clearly presented in both the highlight area and the shadow part. In this way, even subtle defects can be accurately captured, providing a reliable basis for subsequent quality control. Then, the system will perform denoising and image enhancement on the high dynamic range image to obtain a denoised and enhanced image. The purpose of denoising is to remove random noise and other interference factors in the image to improve the signal-to-noise ratio of the image. For example, in the above application scenarios, due to changes in ambient light or limitations of the device itself, various noises may exist in the original image, affecting the recognition of surface defects on the touch screen. Through advanced denoising algorithms, the system can effectively reduce these noises and make the image clearer. In addition, image enhancement technology is used to further improve the contrast and sharpness of the image and highlight key features. For example, for defects such as scratches or bubbles on the touch screen, these areas can be made more obvious through enhancement processing, which is convenient for subsequent segmentation and detection.Finally, the system will perform edge extraction on the denoised and enhanced image to obtain the final optical image. Edge extraction is a commonly used image processing technology that aims to identify significant boundaries and contours in an image, thereby providing a clear reference for subsequent semantic segmentation and defect detection. In the above application scenario, assuming that there are various types of defects on the surface of a touch screen, such as scratches, bubbles, and impurities, through edge extraction technology, the system can accurately outline the contours of these defects and distinguish them from the background and other normal areas. This precise edge information not only helps with subsequent segmentation and classification, but also provides a solid foundation for defect location and marking. Throughout the process, each step is closely linked to form an efficient and accurate optical imaging process. For example, in an electronic product manufacturing company, suppose a batch of high-end touch screen products are undergoing quality inspection. When these products pass through the inspection station, the multispectral imaging device first scans them to obtain multi-band spectral data; then, the system fuses these data to generate a fused spectral image; then, the dynamic range of the image is expanded through high dynamic range imaging technology to ensure that all details are clearly captured; on this basis, the system performs denoising and image enhancement to further improve the image quality; finally, the final optical image is generated by edge extraction of the denoised and enhanced image. These optical images not only contain all the details of the touch screen surface, but also provide high-quality data support for subsequent semantic segmentation and defect detection. Therefore, the entire process not only relies on advanced technologies and algorithms, but also needs to be flexibly adjusted in combination with the specific needs of actual application scenarios to ensure the accuracy and reliability of the final test results. In this way, enterprises can effectively improve the overall quality and market competitiveness of their products and bring greater economic benefits to the enterprise. In this process, every detail is crucial because they jointly determine the reliability and practicality of the final test results. Therefore, continuous optimization and improvement of the technology and methods of this link is an important guarantee to ensure the efficient operation of the entire inspection system.

[0082] In a specific embodiment, the step of performing image segmentation on the optical image by using a preset semantic segmentation algorithm to obtain segmented sub-images includes:

[0083] Performing adaptive region segmentation on the optical image to obtain an initial segmentation region map, and performing region feature extraction on the initial segmentation region map to obtain a region feature vector;

[0084] Performing watershed transformation processing on the optical image based on the regional feature vector to obtain a regional watershed map, and performing over-segmentation suppression on the regional watershed map to obtain a suppressed segmentation map;

[0085] Performing region label propagation on the suppressed segmentation map to obtain a region label map, and performing semantic constraint processing on the region label map using a preset semantic segmentation algorithm to obtain a semantic segmentation map;

[0086] The optical image is segmented based on the semantic segmentation map to obtain segmented sub-images.

[0087] Specifically, after optical imaging of the surface of the target touch screen and obtaining a high-quality optical image, it is necessary to segment these optical images through a preset semantic segmentation algorithm to obtain segmented sub-images. This process first starts with adaptive regional segmentation of the optical image, generates an initial segmented region map, and extracts regional features from the initial segmented region map to obtain a regional feature vector. Specifically, in a typical industrial production environment, assuming that a batch of touch screen products are being inspected on an assembly line, when the optical image is generated, the system automatically performs adaptive regional segmentation on it. This process relies on advanced image processing technology, which can divide the image into multiple meaningful regions based on different features in the image (such as brightness, color, and texture). For example, for different components or potential defect areas on the touch screen, the system can identify the boundaries between them and segment them into independent regions. Each region contains specific feature information, which will be further extracted and converted into regional feature vectors. Based on these regional feature vectors, the system will perform watershed transformation on the optical image to generate a regional watershed map, and suppress over-segmentation of this regional watershed map to obtain a suppressed segmentation map. The watershed transform is a commonly used image segmentation method that simulates the concept of "watershed" in topography, that is, the image is regarded as a terrain height map, where the grayscale value of each pixel represents its height. Through this transformation, the system can clearly separate the various regions in the image. However, a simple watershed transform may lead to over-segmentation problems, that is, some parts that should belong to the same area are mistakenly segmented into multiple small areas. Therefore, in order to overcome this problem, the system will perform over-segmentation suppression on the regional watershed map. For example, in the above application scenario, suppose there are tiny scratches or bubbles on the surface of a touch screen. After the watershed transform, these areas may be over-segmented into multiple small blocks. Through the over-segmentation suppression technology, the system can merge these small blocks and restore the integrity of the original area, thereby generating a more accurate suppressed segmentation map. Next, the system will perform regional label propagation on the suppressed segmentation map to obtain a regional label map, and perform semantic constraint processing on the regional label map through a preset semantic segmentation algorithm to obtain a semantic segmentation map. The process of regional label propagation is to give each segmented area a unique identifier for subsequent analysis and processing. In this process, the system uses the similarity between adjacent regions to propagate labels to ensure that each region can be correctly identified and classified. For example, in the application scenario of touch screen surface detection, if a certain area is marked as having possible scratches, the system will use regional label propagation technology to extend this label to all related pixels to form a complete label area. Subsequently, the system will apply the preset semantic segmentation algorithm to further semantically constrain these labeled areas.Semantic segmentation not only considers the visual features of the image, but also combines contextual information and prior knowledge to ensure that each area can be accurately classified as a specific object or defect type. For example, through the semantic segmentation algorithm, the system can distinguish which areas are normal display parts and which areas may have scratches, bubbles or other types of defects. Finally, the optical image is segmented based on the semantic segmentation map to obtain segmented sub-images. The goal of this step is to decompose the entire optical image into multiple sub-images with clear meanings, each of which represents a specific area or object. For example, in the above application scenario, assume that there are multiple types of defects on the surface of a touch screen, such as scratches, bubbles, and impurities. Through the semantic segmentation map, the system can accurately separate these different defective areas and generate multiple segmented sub-images. Each segmented sub-image not only contains all the detailed information of a specific area, but also provides a solid foundation for subsequent defect detection and positioning. For example, for an area marked as a scratch, the system can analyze its shape, size, and position in detail through the segmented sub-image, and then formulate corresponding repair measures. In the whole process, each step is closely linked to form an efficient and accurate image segmentation process. For example, in an electronic product manufacturing company, suppose a batch of high-end touch screen products are undergoing quality inspection. When these products pass through the inspection station, the optical imaging device first scans them to generate high-quality optical images; then, the system performs adaptive regional segmentation on these images, generates an initial segmentation region map, and extracts regional feature vectors; then, by performing watershed transformation on these feature vectors, a regional watershed map is generated, and over-segmentation suppression is performed to obtain a suppressed segmentation map; on this basis, the system performs regional label propagation to obtain a regional label map, and semantically constrains these label maps through a semantic segmentation algorithm to generate a semantic segmentation map; finally, the optical image is segmented based on the semantic segmentation map to generate multiple segmented sub-images. These segmented sub-images not only contain all the detailed information on the touch screen surface, but also provide high-quality data support for subsequent defect detection and positioning. Therefore, the entire process not only relies on advanced technologies and algorithms, but also needs to be flexibly adjusted in combination with the specific needs of actual application scenarios to ensure the accuracy and reliability of the final test results. In this way, enterprises can effectively improve the overall quality and market competitiveness of their products and bring greater economic benefits to the enterprise. In this process, every detail is crucial because they jointly determine the reliability and practicality of the final test results. Therefore, continuously optimizing and improving the technologies and methods in this link is an important guarantee for ensuring the efficient operation of the entire detection system.

[0088] In a specific embodiment, the step of inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen includes:

[0089] Inputting the segmented sub-image into a preset image detection algorithm; wherein the image detection algorithm includes a convolutional neural network, an attention mechanism layer, a weighted fusion layer, and a pooling layer;

[0090] Performing feature extraction on the segmented sub-image through the convolutional neural network to obtain a multi-scale feature map; wherein the convolutional neural network includes three convolutional layers, the convolutional kernel sizes in the convolutional layers are 7×7, 5×5 and 3×3, the number of convolutional kernels are 64, 128 and 256, and the step size is 1;

[0091] Performing a non-local attention mechanism calculation on the multi-scale feature map through the attention mechanism layer to obtain an attention weight map; wherein the attention mechanism layer includes a 1×1 convolution layer and a softmax function;

[0092] Performing weighted fusion on the attention weight map and the multi-scale feature map through the weighted fusion layer to obtain a weighted feature map;

[0093] The weighted feature map is subjected to spatial pyramid pooling processing by the pooling layer to obtain a pooled feature vector; wherein the spatial pyramid pooling includes four pooling layers of different scales, the pooling sizes of the pooling layers are 1×1, 2×2, 3×3 and 6×6, respectively, and the step size is 1;

[0094] It is determined whether there is a defect in the target touch screen based on the pooled feature vector.

[0095] Specifically, in the process of inputting the segmented sub-images into the preset image detection algorithm to determine whether there are defects in the target touch screen, these segmented sub-images need to be first sent to a complex deep learning model for processing. This model includes components such as convolutional neural network (CNN), attention mechanism layer, weighted fusion layer and pooling layer, each of which plays a key role in the entire detection process. Specifically, in a typical industrial production environment, assuming that a batch of touch screen products are being inspected on the assembly line, when the segmented sub-images are generated, the system will automatically input them into the preset image detection algorithm. First, the segmented sub-images will be sent to the convolutional neural network (CNN) for feature extraction to obtain multi-scale feature maps. Convolutional neural network is one of the core technologies in deep learning. It can extract rich feature information from images through a series of convolution operations. In this specific implementation, the convolutional neural network contains three convolutional layers, each of which uses convolutional kernels of different sizes (7×7, 5×5 and 3×3 respectively), and the number of convolutional kernels is 64, 128 and 256 respectively, with a step size of 1. For example, in the above application scenario, suppose a segmented sub-image contains a potential scratch area on the touch screen. Through the operation of the first layer of convolution kernels (7×7), the system can initially capture larger texture features; then, the second layer of convolution kernels (5×5) further refines these features and identifies smaller structures; finally, the third layer of convolution kernels (3×3) focuses on capturing the finest details, such as the specific shape and location of the scratches. After these three layers of convolution operations, the system generates multi-scale feature maps, which not only contain information at different scales, but also provide a rich data basis for subsequent analysis. Next, the multi-scale feature map will be sent to the attention mechanism layer for non-local attention mechanism calculation to obtain the attention weight map. The attention mechanism is a technology used to enhance the model's attention to important features, and is particularly suitable for defect detection tasks under complex backgrounds. In this process, the attention mechanism layer first reduces the dimensionality of the multi-scale feature map through a 1×1 convolution layer, and then applies the softmax function to calculate the attention weight of each pixel. For example, in the above application scenario, suppose there are multiple suspected defect areas in a segmented sub-image, but not all areas actually have problems. Through the operation of the attention mechanism layer, the system can automatically identify the most representative defect areas and assign higher weights to them, thereby highlighting these key areas. In this way, even in a complex background, the system can accurately focus on the real defect parts and improve the accuracy of detection. Then, the attention weight map and the multi-scale feature map will be sent to the weighted fusion layer for weighted fusion to obtain a weighted feature map. The weighted fusion process aims to combine the weight information in the attention weight map with the feature information in the multi-scale feature map to generate a more accurate feature representation.For example, in the above application scenario, assuming that a segmented sub-image contains multiple defect areas of different types, through the operation of the weighted fusion layer, the system can assign corresponding weights to each area according to its importance, and fuse these weights with the corresponding feature map. The weighted feature map generated in this way not only retains the detailed information in the original feature map, but also enhances the expressiveness of the key areas, providing high-quality data support for further analysis. Subsequently, the weighted feature map will be sent to the pooling layer for spatial pyramid pooling to obtain a pooled feature vector. Spatial pyramid pooling is a technology for extracting multi-level features, which can significantly reduce the feature dimension without losing global information. In this specific implementation, spatial pyramid pooling includes four pooling layers of different scales, with pooling sizes of 1×1, 2×2, 3×3 and 6×6, and a step size of 1. For example, in the above application scenario, assuming that there are defects of multiple scales in a segmented sub-image, through pooling operations of different scales, the system can extract the feature representations of these defects at each scale. The final generated pooled feature vector not only contains rich hierarchical information, but also provides a solid foundation for subsequent classification and judgment. Finally, based on the pooled feature vector, it is determined whether there is a defect in the target touch screen. This process usually relies on pre-trained classifiers or regression models, which can make accurate judgments based on the information in the feature vector. For example, in the above application scenario, assuming that there is indeed a scratch defect in a segmented sub-image, the system will classify it as "defective" based on the relevant information in the pooled feature vector, and record the specific location and type of the defect. This defect detection method based on deep learning not only improves the accuracy and efficiency of detection, but also adapts to different production environments and detection needs. In the whole process, each step is closely connected, forming an efficient and accurate image detection process. For example, in an electronic product manufacturing company, assuming that a batch of high-end touch screen products are undergoing quality inspection, when these products pass through the inspection station, the segmented sub-image is first generated and input into the image detection algorithm; then, the system extracts multi-scale feature maps through convolutional neural networks; then, the attention weight map is calculated using the attention mechanism layer, and the weighted feature map is generated through the weighted fusion layer; on this basis, the system performs spatial pyramid pooling to generate pooled feature vectors; finally, based on these feature vectors, it is determined whether there is a defect and the relevant results are recorded. These steps not only rely on advanced technologies and algorithms, but also need to be flexibly adjusted in combination with the specific needs of actual application scenarios to ensure the accuracy and reliability of the final test results. In this way, companies can effectively improve the overall quality and market competitiveness of their products and bring greater economic benefits to the company. In this process, every detail is crucial because they jointly determine the reliability and practicality of the final test results. Therefore, continuous optimization and improvement of the technology and methods of this link is an important guarantee to ensure the efficient operation of the entire detection system.

[0096] In a specific embodiment, the defect location and marking of the target touch screen based on the segmented sub-image to obtain the surface defect area of ​​the target touch screen includes:

[0097] Performing local reflection intensity analysis on the segmented sub-image to obtain a reflection intensity distribution map, and performing gradient calculation on the surface of the target touch screen based on the reflection intensity distribution map to obtain a surface gradient map;

[0098] Performing anisotropic diffusion processing on the surface gradient map to obtain an edge enhancement map;

[0099] Performing morphological reconstruction on the edge enhancement image to obtain a defect candidate region map, and performing region growing segmentation based on the defect candidate region map to obtain a defect contour map;

[0100] Performing density clustering processing on the defect contour map to obtain a defect density distribution map, and performing watershed processing based on the defect density distribution map to obtain a defect segmentation map;

[0101] Calculating and locating the minimum circumscribed rectangle of the defect segmentation map to obtain a defect location frame map, and extracting geometric features of the defect location frame map to obtain a defect feature vector;

[0102] The defect area on the surface of the target touch screen is marked based on the defect feature vector to obtain the surface defect area of ​​the target touch screen.

[0103] Specifically, in the process of defect location and marking of the target touch screen based on the segmented sub-image, it is first necessary to analyze the local reflection intensity of the segmented sub-image to obtain a reflection intensity distribution map, and then calculate the gradient of the surface of the target touch screen based on the distribution map to generate a surface gradient map. The core of this process is to use the reflection intensity information to capture the subtle changes on the touch screen surface, thereby providing basic data for subsequent defect detection. For example, in a typical industrial production environment, suppose a batch of touch screen products are being inspected on an assembly line. When the segmented sub-image is generated, the system will automatically perform a local reflection intensity analysis on it. Through this analysis, the system can identify the reflection characteristics of different areas, especially those that may contain defects. These reflection characteristics will be converted into a reflection intensity distribution map, which is then used to calculate the surface gradient map. The surface gradient map not only reflects the brightness changes on the touch screen surface, but also provides important reference information for subsequent edge detection. Next, the system will perform anisotropic diffusion processing on the surface gradient map to generate an edge enhancement map. Anisotropic diffusion is a technology used to smooth images and enhance edges. It can reduce the impact of noise while retaining important edge information. For example, in the above application scenario, assuming that there are multiple suspected scratch or bubble areas in a segmented sub-image, through anisotropic diffusion processing, the system can effectively remove noise interference in these areas and enhance their edge features. The edge enhancement image generated in this way not only clearly shows the contours of each potential defect, but also provides high-quality data support for subsequent morphological reconstruction. Then, the system will perform morphological reconstruction on the edge enhancement image to generate a defect candidate area map, and perform region growing segmentation based on the image to generate a defect contour map. Morphological reconstruction is a commonly used image processing technology that aims to restore and optimize the structural information in the image through a series of morphological operations (such as expansion, corrosion, etc.). In this process, the system first generates a defect candidate area map by performing morphological operations on the edge enhancement image. These candidate areas contain all possible defect locations. Then, the system performs region growing segmentation based on these candidate areas, that is, merging pixels with similar features into the same area, thereby generating a more accurate defect contour map. For example, in the above application scenario, assuming that there are multiple suspected scratch areas in a segmented sub-image, through region growing segmentation technology, the system can accurately divide these areas to form a clear defect contour map. Subsequently, the system will perform density clustering on the defect contour map to generate a defect density distribution map, and perform watershed processing based on the map to generate a defect segmentation map. Density clustering is a method used to identify high-density areas in an image, which can help the system more accurately determine the specific location and range of the defect. For example, in the above application scenario, assuming that there are multiple defects of different types in a segmented sub-image, through density clustering processing, the system can identify the high-density area of ​​each defect and mark it as a defect density distribution map.Next, the system performs watershed processing based on this distribution map, which is a classic image segmentation method that can effectively separate different defect areas and generate a more refined defect segmentation map. The defect segmentation map generated in this way not only clearly shows the specific location and shape of each defect, but also provides a solid foundation for subsequent positioning and marking. Next, the system will calculate and locate the minimum enclosing rectangle of the defect segmentation map, generate a defect positioning frame map, and extract geometric features from the map to generate a defect feature vector. The minimum enclosing rectangle calculation is a method for determining the boundary of an object. It can generate a minimum enclosing rectangle for each defect, thereby achieving accurate positioning. For example, in the above application scenario, assuming that there are multiple defects of different shapes and sizes in a segmented sub-image, the system can generate an accurate positioning frame map for each defect through the minimum enclosing rectangle calculation. These positioning frames not only indicate the specific location of each defect, but also provide a reference for subsequent geometric feature extraction. The system generates defect feature vectors by extracting geometric features from these positioning frames. These feature vectors include detailed information such as the location, size, and shape of each defect. Finally, the system marks the defective area on the surface of the target touch screen based on the defect feature vector and generates the surface defect area of ​​the target touch screen. The goal of this step is to accurately mark all detected defective areas for subsequent quality control and repair measures. For example, in the above application scenario, suppose a batch of touch screen products is found to have multiple different types of defects after inspection. The system will accurately mark each defect on the surface of the touch screen according to the feature vector of each defect. These marks not only clearly show the specific location and type of each defect, but also provide detailed reference information for quality control personnel. For example, for an area marked as a scratch, the system will record its location, length, width and other information in detail to facilitate subsequent repair work. Throughout the process, each step is closely linked to form an efficient and accurate defect location and marking process. For example, in an electronic product manufacturing company, suppose a batch of high-end touch screen products is undergoing quality inspection. When these products pass through the inspection station, the segmented sub-image is first generated and input into the system; then, the system generates a surface gradient map through local reflection intensity analysis and gradient calculation; then, an edge enhancement map is generated using anisotropic diffusion processing; on this basis, the system performs morphological reconstruction and region growth segmentation to generate a defect contour map; next, the system performs density clustering and watershed processing on the defect contour map to generate a defect segmentation map; then, the system performs minimum circumscribed rectangle calculation and geometric feature extraction to generate a defect feature vector; finally, the surface of the target touch screen is marked with defect areas based on these feature vectors to generate the surface defect area of ​​the target touch screen.These steps not only rely on advanced technologies and algorithms, but also need to be flexibly adjusted in combination with the specific needs of actual application scenarios to ensure the accuracy and reliability of the final test results. In this way, companies can effectively improve the overall quality and market competitiveness of their products and bring greater economic benefits to the company. In this process, every detail is crucial because they jointly determine the reliability and practicality of the final test results. Therefore, continuous optimization and improvement of the technology and methods of this link is an important guarantee to ensure the efficient operation of the entire detection system.

[0104] In a specific embodiment, the performing region growing segmentation based on the defect candidate region map to obtain a defect contour map includes:

[0105] Performing local gradient analysis on the defect candidate region map to obtain a gradient intensity map, and selecting regional seed points based on the gradient intensity map to obtain a seed point set;

[0106] Performing eight-neighborhood expansion analysis on the seed point set to obtain a neighborhood feature map, and performing similarity calculation based on the neighborhood feature map to obtain a regional similarity matrix;

[0107] Performing adaptive threshold calculation on the regional similarity matrix to obtain a growth threshold map, and performing regional expansion control on the defect candidate region map based on the growth threshold map to obtain a regional growth state map;

[0108] Performing boundary connectivity analysis on the regional growth state map to obtain a boundary feature map, and merging regions based on the boundary feature map to obtain a region merging map;

[0109] Contour features are extracted from the region merged image to obtain a contour description vector, and a defect contour is constructed based on the contour description vector to obtain a defect contour image.

[0110] Specifically, in the process of performing region growing segmentation based on the defect candidate region map to obtain the defect contour map, it is first necessary to perform local gradient analysis on the defect candidate region map to generate a gradient intensity map, and select regional seed points based on the gradient intensity map to generate a seed point set. The core of this process is to use gradient information to identify potential defect regions and select suitable seed points as the starting point of region growth. For example, in a typical industrial production environment, suppose a batch of touch screen products are being tested on an assembly line. When the system generates a defect candidate region map, it will automatically perform local gradient analysis on the map. Through this analysis, the system can identify the brightness changes in different regions, especially those that may contain defects. These gradient information will be converted into gradient intensity maps and then used for seed point selection. The system will select multiple seed points in regions with high gradient intensity, which will serve as the basis for subsequent region growth. Next, the system will perform eight-neighborhood extension analysis on the seed point set to generate a neighborhood feature map, and perform similarity calculation based on the map to generate a regional similarity matrix. Eight-neighborhood extension is a commonly used image processing technology that aims to determine the region to which each pixel belongs by analyzing the relationship between each pixel and its eight surrounding neighboring pixels. In this process, the system first generates neighborhood feature maps by performing eight-neighborhood expansion analysis on the seed point set. These feature maps not only contain information about each seed point and its neighborhood, but also provide basic data for subsequent similarity calculations. Then, the system performs similarity calculations based on these neighborhood feature maps to generate a regional similarity matrix. This matrix records the degree of similarity between each seed point and its neighborhood, thus providing a basis for subsequent regional expansion control. For example, in the above application scenario, assuming that a seed point is located in an area suspected of scratches, through eight-neighborhood expansion analysis and similarity calculation, the system can identify all relevant pixels in the area and merge them into the same area. Then, the system performs adaptive threshold calculation on the regional similarity matrix to generate a growth threshold map, and based on this map, performs regional expansion control on the defect candidate area map to generate a regional growth state map. Adaptive threshold calculation is a method of dynamically adjusting the threshold, which aims to flexibly set the standard for regional expansion according to the specific features of the image. In this process, the system first generates a growth threshold map by performing adaptive threshold calculation on the regional similarity matrix. This threshold map not only reflects the expansion standard of each area, but also provides guidance for subsequent regional expansion control. Next, the system controls the region expansion of the defect candidate region map based on this growth threshold map and generates a region growth status map. These status maps show the specific status of each region during the expansion process, including which regions have completed expansion and which regions are still expanding. For example, in the above application scenario, assuming that a region has reached the preset expansion standard, the system will stop further expansion of the region and mark it as a completed expansion state.Subsequently, the system will perform boundary connectivity analysis on the region growth state map to generate a boundary feature map, and then merge regions based on the map to generate a region merge map. Boundary connectivity analysis is a means for identifying and optimizing the boundaries of each region in an image, which can help the system determine the boundary position of each region more accurately. In this process, the system first generates a boundary feature map by performing boundary connectivity analysis on the region growth state map. These feature maps not only show the boundary information of each region, but also provide basic data for subsequent region merging. Next, the system merges regions based on these boundary feature maps to generate a region merge map. In this way, the system can merge regions with similar features and connected boundaries to form a more complete defect region. For example, in the above application scenario, assuming that the boundary of a region is connected to the boundary of another region and has similar features, the system will merge the two regions into a larger region, thereby improving the accuracy of detection. Next, the system will perform contour feature extraction on the region merge map to generate a contour description vector, and construct the defect contour based on the vector to generate a defect contour map. Contour feature extraction is a technology used to identify and describe the contours of each region in an image, which can provide detailed reference information for subsequent defect location and marking. In this process, the system first extracts contour features from the region merge map to generate contour description vectors. These vectors not only contain the contour information of each region, but also provide basic data for the subsequent defect contour construction. Then, the system constructs the defect contour based on these contour description vectors and generates defect contour maps. These contour maps not only clearly show the specific location and shape of each defect, but also provide detailed reference information for subsequent quality control and repair measures. For example, in the above application scenario, assuming that a certain area is identified as having a scratch defect, the system will record its contour information in detail, including location, length, width, etc., to facilitate subsequent repair work. Throughout the process, each step is closely linked, forming an efficient and accurate region growth segmentation process. For example, in an electronic product manufacturing company, suppose a batch of high-end touch screen products are undergoing quality inspection. When these products pass the inspection station, the system first generates a defect candidate area map; then, by performing local gradient analysis and seed point selection on the map, a seed point set is generated; then, using eight-neighborhood extension analysis and similarity calculation, a regional similarity matrix is ​​generated; on this basis, the system performs adaptive threshold calculation and regional expansion control to generate a regional growth state map; next, the system performs boundary connectivity analysis and regional merging to generate a regional merging map; then, the system performs contour feature extraction and defect contour construction to generate a defect contour map. These steps not only rely on advanced technologies and algorithms, but also need to be flexibly adjusted in combination with the specific needs of actual application scenarios to ensure the accuracy and reliability of the final detection results.In this way, enterprises can effectively improve the overall quality and market competitiveness of their products, bringing greater economic benefits to the enterprise. In this process, every detail is crucial because they jointly determine the reliability and practicality of the final test results. Therefore, continuous optimization and improvement of the technology and methods of this link is an important guarantee to ensure the efficient operation of the entire testing system.

[0111] In a specific embodiment, determining the defect type of the target touch screen based on the surface defect area, and formulating corresponding quality control measures based on the defect type, includes:

[0112] Performing defect texture spectrum analysis on the surface defect area to obtain a defect texture spectrum map, and performing spectral density calculation based on the defect texture spectrum map to obtain a spectral density feature vector;

[0113] Performing a local binary pattern analysis on the surface defect area based on the spectral density feature vector to obtain a binary feature map, and performing a gray level co-occurrence matrix calculation based on the binary feature map to obtain a texture feature matrix;

[0114] Performing principal curvature analysis on the texture feature matrix to obtain a curvature feature map, and performing morphological gradient calculation based on the curvature feature map to obtain a defect edge feature map;

[0115] Performing Zernike moment calculation on the defect edge feature map to obtain a shape description feature vector, and classifying defect types based on the shape description feature vector to obtain a defect type label, wherein the defect type label includes scratches, pits, bubbles, and foreign matter on the target touch screen;

[0116] A quality grade of the target touch screen is evaluated based on the defect type label to obtain a defect grade evaluation result, and corresponding quality control measures are formulated based on the defect grade evaluation result.

[0117] Specifically, in the process of determining the defect type of the target touch screen and formulating corresponding quality control measures based on it, it is first necessary to perform defect texture spectrum analysis on the surface defect area, generate a defect texture spectrum map, and perform spectral density calculation based on the map to obtain a spectral density feature vector. The core of this process is to identify its characteristics by analyzing the texture information of the defect area, thereby providing basic data for subsequent classification. For example, in a typical industrial inspection scenario, assuming that a batch of high-end touch screen products are being inspected on the assembly line, the system will first perform a detailed texture spectrum analysis on the surface defect areas that may exist on these touch screens. By quantitatively describing the texture features of these areas, the system can generate defect texture spectra reflecting different defect types. Subsequently, spectral density calculations are performed based on these spectra to obtain spectral density feature vectors that can characterize the characteristics of these defects. These feature vectors not only contain key information about the defect texture, but also provide an important basis for further defect analysis. Next, local binary pattern analysis is performed on the surface defect area based on the obtained spectral density feature vector to generate a binary feature map, and grayscale co-occurrence matrix calculations are performed based on the map to obtain a texture feature matrix. Local binary pattern is an effective method for describing image texture. It can capture the relationship between each pixel and its neighborhood in the image, and then be used to extract deeper texture features. In this process, the system uses the spectral density feature vector as input and generates binary feature maps through local binary pattern analysis. These maps reflect the relationship between each pixel and its neighborhood, providing necessary data support for further gray level co-occurrence matrix calculation. Then, the system calculates the gray level co-occurrence matrix based on these binary feature maps to obtain a texture feature matrix that reflects the internal structural characteristics of the surface defect area. This matrix not only shows the texture distribution inside the defect area, but also lays the foundation for subsequent curvature analysis and morphological gradient calculation. For example, in the above application scenario, assuming that a defect area is initially determined to be a scratch, through local binary pattern analysis and gray level co-occurrence matrix calculation, the system can further refine the description of the defect area, including its texture direction, contrast and other key features. Then, the system performs principal curvature analysis on the obtained texture feature matrix to generate a curvature feature map, and performs morphological gradient calculation based on the map to obtain a defect edge feature map. Principal curvature analysis is mainly used to evaluate the curvature of the image surface, which can more accurately depict the shape characteristics of the defect area. At this stage, the system first performs principal curvature analysis on the texture feature matrix to generate curvature feature maps. These curvature feature maps reveal the curvature degree of the defect area and its changing pattern, providing important reference information for further morphological gradient calculations. Then, the system performs morphological gradient calculations based on these curvature feature maps to obtain defect edge feature maps. These edge feature maps clearly show the boundary position of the defect area and its changing trend, providing key data support for the final defect classification.For example, in the above application scenario, assuming that a defect area shows obvious bending features after principal curvature analysis, the system can further clarify the boundary contour of the area through morphological gradient calculation to facilitate subsequent classification. Next, the system performs Zernike moment calculation on the defect edge feature map to generate a shape description feature vector, and classifies the defect type based on the vector to obtain a defect type label. Zernike moment is a powerful image feature description tool that can effectively capture the shape information in the image. In this process, the system first performs Zernike moment calculation on the defect edge feature map to generate a shape description feature vector. These vectors not only contain key information about the shape of the defect area, but also provide an important basis for the final defect type classification. Then, the system classifies the defect type based on these shape description feature vectors to obtain specific defect type labels such as scratches, pits, bubbles or foreign matter. These labels accurately reflect the specific type of each defect area and provide basic data for subsequent quality grade assessment. For example, in the above application scenario, assuming that a defect area is classified as a scratch after Zernike moment calculation, the system will mark it according to this result for subsequent processing. Finally, the quality grade of the target touch screen is evaluated based on the obtained defect type label, and the defect grade evaluation result is obtained, and corresponding quality control measures are formulated based on the result. Quality grade evaluation is an important step to ensure that product quality meets the standard. It combines the defect type label with the preset quality standard for comprehensive evaluation. In this process, the system first evaluates the quality grade of each touch screen based on the defect type label to obtain the defect grade evaluation result reflecting the severity of its defects. These evaluation results not only consider the number and type of defects, but also their location and impact range. Then, the system formulates corresponding quality control measures based on these evaluation results. For example, for minor scratch problems, simple repairs may be recommended; for serious pits or bubbles, comprehensive rework or even scrapping may be required. For example, in the above application scenario, if a batch of touch screen products are found to have scratches and pits of varying degrees after comprehensive testing, the system will conduct a detailed quality grade evaluation based on the specific defect conditions of each product, and propose targeted quality control measures accordingly to ensure the quality and market competitiveness of the final product. Through such a systematic process, enterprises can not only effectively improve product quality, but also significantly reduce production costs and improve overall operational efficiency. In the whole process, each step is closely linked, forming an efficient and accurate quality control system, which brings significant economic benefits and technical advantages to the enterprise. Therefore, continuous optimization and improvement of the technology and methods of this link is crucial to ensure the stable operation of the entire testing system.

[0118] The above describes the surface defect detection method of the touch screen in the embodiment of the present invention. The following describes the surface defect detection device of the touch screen in the embodiment of the present invention. Figure 2 , an embodiment of a surface defect detection device for a touch screen in an embodiment of the present invention comprises:

[0119] An imaging module 21 is used to perform optical imaging on the surface of the target touch screen to obtain an optical image;

[0120] A segmentation module 22, configured to perform image segmentation on the optical image using a preset semantic segmentation algorithm to obtain segmented sub-images;

[0121] A detection module 23, used for inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen;

[0122] a marking module 24, configured to locate and mark the defect of the target touch screen based on the segmented sub-image, if any, to obtain a surface defect area of ​​the target touch screen;

[0123] The formulation module 25 is used to determine the defect type of the target touch screen based on the surface defect area, and formulate corresponding quality control measures based on the defect type.

[0124] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.

[0125] Reference Figure 3 The present invention also provides a computer device in an embodiment, wherein the internal structure of the computer device can be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0126] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0127] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0129] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0130] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for detecting surface defects of a touch screen, characterized in that: The following steps are involved: Performing optical imaging on the surface of the target touch screen to obtain an optical image; Performing image segmentation on the optical image using a preset semantic segmentation algorithm to obtain segmented sub-images; Inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen; If so, the defect is located and marked on the target touch screen based on the segmented sub-image to obtain a surface defect area of ​​the target touch screen; The defect type of the target touch screen is determined based on the surface defect area, and corresponding quality control measures are formulated based on the defect type.

2. The method for detecting surface defects of a touch screen according to claim 1, characterized in that: The optical imaging of the surface of the target touch screen to obtain an optical image includes: Performing a multi-band spectral scan on the surface of the target touch screen by a preset multi-spectral imaging device to obtain multi-band spectral data; wherein the multi-band spectral data includes spectral information of a visible light band, a near infrared band, and an ultraviolet band; Performing fusion processing on the multi-band spectral data to obtain a fused spectral image; Based on a preset high dynamic range imaging technology, the dynamic range of the fused spectrum image is expanded to obtain a high dynamic range image; wherein the high dynamic range image includes brightness distribution and detail information of the upper surface of the target touch screen; Performing denoising and image enhancement on the high dynamic range image to obtain a denoised and enhanced image; Edge extraction is performed on the denoised and enhanced image to obtain an optical image.

3. The method for detecting surface defects of a touch screen according to claim 1, characterized in that: The step of performing image segmentation on the optical image by using a preset semantic segmentation algorithm to obtain segmented sub-images includes: Performing adaptive region segmentation on the optical image to obtain an initial segmentation region map, and performing region feature extraction on the initial segmentation region map to obtain a region feature vector; Performing watershed transformation processing on the optical image based on the regional feature vector to obtain a regional watershed map, and performing over-segmentation suppression on the regional watershed map to obtain a suppressed segmentation map; Performing region label propagation on the suppressed segmentation map to obtain a region label map, and performing semantic constraint processing on the region label map using a preset semantic segmentation algorithm to obtain a semantic segmentation map; The optical image is segmented based on the semantic segmentation map to obtain segmented sub-images.

4. The method for detecting surface defects of a touch screen according to claim 1, characterized in that: The step of inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen includes: Inputting the segmented sub-image into a preset image detection algorithm; wherein the image detection algorithm includes a convolutional neural network, an attention mechanism layer, a weighted fusion layer, and a pooling layer; Performing feature extraction on the segmented sub-image through the convolutional neural network to obtain a multi-scale feature map; wherein the convolutional neural network includes three convolutional layers, the convolutional kernel sizes in the convolutional layers are 7×7, 5×5 and 3×3, the number of convolutional kernels are 64, 128 and 256, and the step size is 1; Performing a non-local attention mechanism calculation on the multi-scale feature map through the attention mechanism layer to obtain an attention weight map; wherein the attention mechanism layer includes a 1×1 convolution layer and a softmax function; Performing weighted fusion on the attention weight map and the multi-scale feature map through the weighted fusion layer to obtain a weighted feature map; The weighted feature map is subjected to spatial pyramid pooling processing by the pooling layer to obtain a pooled feature vector; wherein the spatial pyramid pooling includes four pooling layers of different scales, the pooling sizes of the pooling layers are 1×1, 2×2, 3×3 and 6×6, respectively, and the step size is 1; It is determined whether there is a defect in the target touch screen based on the pooled feature vector.

5. The method for detecting surface defects of a touch screen according to claim 1, characterized in that: The method of locating and marking defects of the target touch screen based on the segmented sub-images to obtain a surface defect area of ​​the target touch screen includes: Performing local reflection intensity analysis on the segmented sub-image to obtain a reflection intensity distribution map, and performing gradient calculation on the surface of the target touch screen based on the reflection intensity distribution map to obtain a surface gradient map; Performing anisotropic diffusion processing on the surface gradient map to obtain an edge enhancement map; Performing morphological reconstruction on the edge enhancement image to obtain a defect candidate region map, and performing region growing segmentation based on the defect candidate region map to obtain a defect contour map; Performing density clustering processing on the defect contour map to obtain a defect density distribution map, and performing watershed processing based on the defect density distribution map to obtain a defect segmentation map; Calculating and locating the minimum circumscribed rectangle of the defect segmentation map to obtain a defect location frame map, and extracting geometric features of the defect location frame map to obtain a defect feature vector; The defect area on the surface of the target touch screen is marked based on the defect feature vector to obtain the surface defect area of ​​the target touch screen.

6. The method for detecting surface defects of a touch screen according to claim 5, characterized in that: The performing region growing segmentation based on the defect candidate region map to obtain a defect contour map includes: Performing local gradient analysis on the defect candidate region map to obtain a gradient intensity map, and selecting regional seed points based on the gradient intensity map to obtain a seed point set; Performing eight-neighborhood expansion analysis on the seed point set to obtain a neighborhood feature map, and performing similarity calculation based on the neighborhood feature map to obtain a regional similarity matrix; Performing adaptive threshold calculation on the regional similarity matrix to obtain a growth threshold map, and performing regional expansion control on the defect candidate region map based on the growth threshold map to obtain a regional growth state map; Performing boundary connectivity analysis on the regional growth state map to obtain a boundary feature map, and merging regions based on the boundary feature map to obtain a region merging map; Contour features are extracted from the region merged image to obtain a contour description vector, and a defect contour is constructed based on the contour description vector to obtain a defect contour image.

7. The method for detecting surface defects of a touch screen according to claim 1, characterized in that: The step of determining the defect type of the target touch screen based on the surface defect area and formulating corresponding quality control measures based on the defect type includes: Performing defect texture spectrum analysis on the surface defect area to obtain a defect texture spectrum map, and performing spectral density calculation based on the defect texture spectrum map to obtain a spectral density feature vector; Performing a local binary pattern analysis on the surface defect area based on the spectral density feature vector to obtain a binary feature map, and performing a gray level co-occurrence matrix calculation based on the binary feature map to obtain a texture feature matrix; Performing principal curvature analysis on the texture feature matrix to obtain a curvature feature map, and performing morphological gradient calculation based on the curvature feature map to obtain a defect edge feature map; Performing Zernike moment calculation on the defect edge feature map to obtain a shape description feature vector, and classifying defect types based on the shape description feature vector to obtain a defect type label, wherein the defect type label includes scratches, pits, bubbles, and foreign matter on the target touch screen; A quality grade of the target touch screen is evaluated based on the defect type label to obtain a defect grade evaluation result, and corresponding quality control measures are formulated based on the defect grade evaluation result.

8. A surface defect detection device for a touch screen, characterized in that: include: An imaging module, used for optically imaging the surface of the target touch screen to obtain an optical image; A segmentation module, used to perform image segmentation on the optical image using a preset semantic segmentation algorithm to obtain segmented sub-images; A detection module, used for inputting the segmented sub-image into a preset image detection algorithm to determine whether there is a defect in the target touch screen; a marking module, configured to locate and mark the defect of the target touch screen based on the segmented sub-image, if any, to obtain a surface defect area of ​​the target touch screen; A formulation module is used to determine the defect type of the target touch screen based on the surface defect area, and formulate corresponding quality control measures based on the defect type.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Multi-type traffic packet matching management method and system and readable storage medium

    CN118316892A

  • Photoelectric product detection method and system based on image processing

    CN119850602A

Cited By

  • Intelligent detection method for metal surface coating defects

    CN120314317A

  • Image-based defect detection method, electronic equipment, medium and program product

    CN120782774A