Liquid crystal module defect detection method and system
Patent Information
- Application Number
- CN202610599825.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-30
- Publication Date
- 2026-09-15
AI Technical Summary
[0006]本发明提供了一种液晶模组缺陷检测方法及系统,以解决现有技术因依赖传统空间域图像处理或固定阈值分割,导致液晶模组图像中强烈的周期性栅格背景与微弱缺陷信号深度耦合、难以有效分离,从而造成的缺陷检测准确率低、漏检与误检率高,尤其对小尺寸、低对比度缺陷识别能力不足的技术问题
(1)本发明通过将图像由空间域变换至频域,精准识别并构建陷波滤波器滤除由周期性像素结构产生的栅格干扰谱,构建了针对液晶模组成像固有噪声的频域抑制机制,本发明利用周期性干扰在频域能量集中的特性,通过傅里叶变换将其转化为离散的频率峰值并进行针对性衰减,能够在保留缺陷空间信息的前提下,剥离强背景干扰,从而解决了栅格噪声严重掩盖缺陷信号的核心难题,为后续高灵敏度检测提供了信噪比显著提升的清晰图像基础。
Smart Images

Figure CN122760412A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine vision and industrial automation inspection technology, and in particular to a method and system for detecting defects in liquid crystal modules. Background Technology
[0002] Currently, as the core imaging component of various display terminals, the detection of surface and internal defects in LCD modules is a crucial step in ensuring the display quality of the final product and improving the yield rate. During the production process, any tiny defects such as bright spots, dark spots, scratches, or foreign objects can lead to the scrapping of the module or even the entire machine. Therefore, achieving efficient, accurate, and stable automated visual inspection is of vital engineering significance for ensuring continuous production and meeting the demands of the high-end display market.
[0003] One existing technology primarily employs machine vision inspection schemes based on traditional image processing algorithms or fixed threshold segmentation. This approach typically uses an industrial camera to capture surface images of the LCD module and employs methods such as edge detection, filtering, or setting global / local grayscale thresholds to attempt to separate defective areas from the background. When the grayscale, shape, or texture features of a suspected area exceed a preset empirical threshold, the system determines that it is a defect. This method is essentially a static detection mechanism that relies on manually set rules and shallow feature analysis of the image; its recognition logic is independent of the inherent, strong periodic structural characteristics of the LCD module image itself.
[0004] This visual inspection method, which relies on traditional image processing and fixed thresholds, has inherent technical limitations. Because liquid crystal modules consist of millions to tens of millions of pixels arranged in a strictly periodic manner, their imaging results in a highly concentrated grid-like background texture in the spatial domain. This periodic grid structure signal and the defect signal, which manifests as localized weak anomalies, are severely aliased in the frequency domain and deeply coupled in the spatial domain. Traditional spatial domain image processing methods struggle to fundamentally distinguish between these two signals, leading the system to either mistakenly identify a large number of normal grid textures as defects in an attempt to capture weak defects, or to submerge real defects with low contrast and small size in the grid background to avoid false alarms. The root cause lies in the fact that this method only performs pixel-level grayscale or gradient comparisons in the spatial domain, lacking the ability to gain frequency domain insight and modeling of the global periodic structure of the image, and failing to fully utilize the separability of defect signals and grid noise in the transform domain.
[0005] Therefore, the core technical challenge of existing technologies lies in addressing the strong interference and masking of defect signals caused by the inherent periodic grid structure in liquid crystal module imaging. This presents a problem of low defect recognition accuracy and robustness in traditional visual inspection methods, which rely solely on spatial domain analysis. Specifically, how can a visual inspection method be designed to effectively separate strong periodic background interference from weak defect signals in the transform domain, while maintaining detection efficiency, and to precisely locate defects using spatial domain features? This would enable high sensitivity and high accuracy in identifying various defects, especially low-contrast and small-sized defects. Summary of the Invention
[0006] This invention provides a method and system for detecting defects in liquid crystal modules, which solves the technical problem that existing technologies rely on traditional spatial domain image processing or fixed threshold segmentation, resulting in deep coupling and difficulty in effectively separating strong periodic grid backgrounds and weak defect signals in liquid crystal module images, leading to low defect detection accuracy, high missed detection and false detection rates, and especially insufficient ability to identify small-sized, low-contrast defects.
[0007] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for detecting defects in a liquid crystal module, comprising: The original image of the liquid crystal module is acquired, and a Fourier transform is performed on the original image to obtain a frequency domain image; Based on the frequency domain image, identify the frequency peaks generated by the periodic pixel structure of the liquid crystal module, and determine the grid interference spectrum based on the coordinates and energy intensity of all the frequency peaks. Based on the grid interference spectrum, a notch filter is constructed to filter the frequency domain image, resulting in a filtered frequency domain image. Perform an inverse Fourier transform on the filtered frequency domain image to obtain a denoised image with periodic grid interference removed; The denoised image is processed using a pre-defined convolutional neural network model to extract multi-scale local feature maps. Potential defect regions are then selected and labeled from the local feature maps to obtain feature maps. The boundary information of the potential defect region is extracted from the feature map, and a morphological dilation operation is performed on the boundary information to obtain a defect expansion mask. The defect extension mask is mapped onto the denoised image, and the pixel grayscale difference between the mask-covered area and the surrounding background area is calculated. If the pixel grayscale difference is greater than a preset grayscale threshold, it is confirmed as a real defect, and the coordinates corresponding to the real defect are output as the localization result.
[0008] Secondly, the present invention provides a liquid crystal module defect detection system, comprising: The image acquisition module is used to acquire the original image of the liquid crystal module and perform a Fourier transform on the original image to obtain a frequency domain image; The spectrum analysis module is used to identify frequency peaks generated by the periodic pixel structure of the liquid crystal module in the frequency domain image, and to determine the grid interference spectrum based on the coordinates and energy intensity of all the frequency peaks. The frequency domain filtering module is used to construct a notch filter based on the grid interference spectrum, and to filter the frequency domain image to obtain a filtered frequency domain image. The image reconstruction module is used to perform an inverse Fourier transform on the filtered frequency domain image to obtain a denoised image with periodic grid interference removed. The initial detection and localization module is used to process the denoised image using a preset convolutional neural network model, extract multi-scale local feature maps, screen potential defect areas from the local feature maps and label them to obtain feature maps; The mask generation module is used to extract the boundary information of the potential defect region from the feature map, and perform a morphological dilation operation on the boundary information to obtain a defect expansion mask. The final positioning module is used to map the defect extension mask onto the denoised image, calculate the pixel grayscale difference between the mask-covered area and the surrounding background area, and if the pixel grayscale difference is greater than a preset grayscale threshold, it is confirmed as a real defect, and the coordinates corresponding to the real defect are output as the positioning result.
[0009] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention transforms the image from the spatial domain to the frequency domain, accurately identifies and constructs a notch filter to filter out the grid interference spectrum generated by the periodic pixel structure, and constructs a frequency domain suppression mechanism for the inherent noise of the liquid crystal module imaging. This invention utilizes the characteristic of the energy concentration of periodic interference in the frequency domain, transforms it into discrete frequency peaks through Fourier transform and performs targeted attenuation, and can remove strong background interference while preserving the spatial information of the defect, thereby solving the core problem of grid noise seriously masking the defect signal, and providing a clear image foundation with significantly improved signal-to-noise ratio for subsequent high-sensitivity detection.
[0010] (2) This invention extracts local gradient features of denoised images through convolutional neural networks for initial screening, and after expanding the region by combining morphological operations, performs fine verification of pixel grayscale differences between the foreground and background. Single detection models are easily affected by residual noise or contrast changes. This invention first uses the perception capability of neural networks to quickly lock suspicious areas, and then makes a secondary judgment by grayscale differences based on pixel statistics. Furthermore, it uses morphological expansion to ensure complete coverage of defect edges, which can effectively distinguish between real defects and artifacts, and improve the detection rate and positioning accuracy of small and blurry defects. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the liquid crystal module defect detection method provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the liquid crystal module defect detection method provided in the second embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] Reference Figure 1 The first embodiment of the present invention provides a method for detecting defects in a liquid crystal module, comprising the following steps: S11, Acquire the original image of the liquid crystal module, and perform a Fourier transform on the original image to obtain a frequency domain image; S12, Based on the frequency domain image, identify the frequency peaks generated by the periodic pixel structure of the liquid crystal module, and determine the grid interference spectrum based on the coordinates and energy intensity of all the frequency peaks; S13, Based on the grid interference spectrum, a notch filter is constructed to filter the frequency domain image to obtain a filtered frequency domain image; S14, Perform an inverse Fourier transform on the filtered frequency domain graph to obtain a denoised image with periodic grid interference removed; S15, The denoised image is processed using a preset convolutional neural network model to extract multi-scale local feature maps, and potential defect regions are screened and labeled from the local feature maps to obtain feature maps; S16, extract the boundary information of the potential defect region from the feature map, perform a morphological dilation operation on the boundary information to obtain a defect expansion mask; S17, map the defect extension mask onto the denoised image, calculate the pixel grayscale difference between the mask-covered area and the surrounding background area, if the pixel grayscale difference is greater than a preset grayscale threshold, then it is confirmed as a real defect, and the coordinates corresponding to the real defect are output as the positioning result.
[0014] In step S11, the original image of the liquid crystal module is acquired, and a Fourier transform is performed on the original image to obtain a frequency domain image, including: The original image is obtained by capturing a grayscale image of the surface of the liquid crystal module using an industrial camera; Perform a two-dimensional discrete Fourier transform on the pixel matrix of the original image to obtain an initial frequency domain matrix in complex form; The initial frequency domain matrix is subjected to spectral centering processing, which moves the low-frequency components to the center of the matrix to obtain the frequency domain image.
[0015] First, the raw image of the LCD module to be tested is acquired. Specifically, at the production line inspection station, an industrial area scan camera with a resolution of 1920×1080 is used to capture the display area of the LCD module under uniform backlighting conditions, obtaining a grayscale image as the raw image. The brightness value of each pixel in this image is quantized to an integer between 0 and 255, forming a two-dimensional pixel matrix of the same size as the image resolution, reflecting the light emission or light transmission state of the pixels on the surface of the LCD module.
[0016] Subsequently, a two-dimensional discrete Fourier transform is performed on the pixel matrix of the original image to convert the image information from the spatial domain to the frequency domain, obtaining an initial frequency domain matrix. For liquid crystal module images, the regularly arranged pixel array appears as a periodically repeating bright and dark grid in the spatial domain. This periodic structure manifests in the frequency domain as a few sharp frequency peaks with highly concentrated energy and symmetrical distribution. After the transform, a complex matrix with the same size as the input image is output, i.e., the initial frequency domain matrix, which simultaneously contains the amplitude and phase information of each frequency component.
[0017] Next, the initial frequency domain matrix is subjected to spectrum centering to obtain a frequency domain image that is easier to observe and analyze. The unprocessed initial frequency domain matrix, representing the slowly changing low-frequency components of the image, such as a uniform background, is typically distributed at the four corners of the matrix, while high-frequency components, such as details and noise, are distributed near the center. This layout makes it difficult to visually observe the frequency distribution. The spectrum centering process is performed as follows: First, the entire initial frequency domain matrix is traversed; then, based on the row and column indices of each element, it is determined whether the sum of its row and column indices is odd or even. For matrix elements with an odd sum, the value is multiplied by negative one to invert the sign, while elements with an even sum remain unchanged. Effectively, this is equivalent to performing an alternating sign transformation on the matrix in both the horizontal and vertical directions. After this operation, the generated frequency domain image is more visually consistent with conventional understanding; bright spots in the center of the image represent low-frequency background, while bright spots further away from the center represent high-frequency components. This makes it more intuitive and convenient to identify high-frequency interference peaks generated by the periodic grid structure in subsequent steps.
[0018] In step S12, based on the frequency domain image, frequency peaks generated by the periodic pixel structure of the liquid crystal module are identified, and the grid interference spectrum is determined based on the coordinates and energy intensity of all the frequency peaks, including: Calculate the amplitude spectrum of the frequency domain image and identify maxima points in the amplitude spectrum where the energy is significantly higher than the local average level; Determine whether the spatial distribution of the maximum points exhibits a predetermined symmetry pattern; If the symmetry rule is satisfied, then the corresponding maximum point is determined as the frequency peak value; If the symmetry rule is not satisfied, the corresponding maximum point will be excluded and will not be used as the frequency peak. Based on the coordinates and energy intensity of all the frequency peaks, the grid interference spectrum characterizing the periodic interference distribution is generated.
[0019] First, the amplitude spectrum of the frequency domain image obtained in step S11 is calculated. The frequency domain image is a complex matrix. By calculating the modulus of each complex value, i.e., the amplitude of that frequency component, a real matrix of the same size as the frequency domain image is obtained, called the amplitude spectrum. This amplitude spectrum visually reflects the energy distribution of various frequency components in the image. In the amplitude spectrum, high-energy regions appear as bright spots, and low-energy regions as dark areas. Due to the periodic arrangement of the pixels in the liquid crystal module, the corresponding grid structure will appear in the frequency domain as highly concentrated, symmetrical bright spots, i.e., potential frequency peaks.
[0020] Subsequently, maxima points with energy significantly higher than the local average level are identified in the amplitude spectrum. Since the pixel array of the liquid crystal module is arranged in a strictly two-dimensional periodic pattern, the corresponding grid interference should manifest as a few discrete points with highly concentrated energy in the frequency domain. During identification, a local peak detection algorithm can be used. Taking each pixel in the amplitude spectrum as the center, comparisons are made within a preset-sized neighborhood window. If the energy value of the center point is not only the maximum value within that neighborhood but also exceeds the neighborhood average energy value by a preset multiple, such as 1.5 or 2 times, then that point is initially marked as a maxima point. This preset multiple threshold is a key parameter used to achieve a balance between sensitivity and noise immunity. Its typical value range is between 1.5 and 3.0, mainly determined based on the inherent characteristics of the liquid crystal module under test and the imaging conditions. Specifically, for modules with regular pixel arrangement and high contrast, the grid peaks are sharp, and the threshold can be lower, such as 1.5-2.0; for modules with high pixel density or relatively low imaging contrast, to suppress more subtle background fluctuations, the threshold can be higher, such as 2.0-2.5. This preset multiplier threshold can be set empirically based on the typical range of grid contrast of different LCD module models. The purpose is to initially screen out locations with abnormally high energy and eliminate interference from uniform background noise.
[0021] In one embodiment, for an OLED module used in a mainstream smartphone, the amplitude spectrum of 500 defect-free, high-quality images continuously collected on its production line was analyzed to statistically determine the distribution of the ratio of the maximum energy value to the average energy value within all local neighborhoods. The statistics showed that over 95% of the ratios were below 1.3. Therefore, setting the preset multiplier threshold to 1.8 ensures that while effectively capturing all grid frequency peaks, the false alarm probability caused by image sensor background noise and slight uneven illumination is controlled below 5%. In actual deployment, this statistical method can be used to quickly determine the adaptation threshold for this module model using an initial small sample size.
[0022] Next, it is determined whether the spatial distribution of these initially identified maxima exhibits a predetermined symmetry pattern. Liquid crystal module pixel arrays typically have periodicity in both row and column directions. This is reflected in the frequency domain, where the corresponding frequency peaks should be centrally or axially symmetric about the origin of the spectrum. Therefore, a predetermined symmetry pattern could be that for a maxima located in a certain quadrant, there should exist another maxima with similar energy in a quadrant symmetrical about the center point of the frequency domain image. The system checks whether all initially identified maxima conform to this symmetry pattern, effectively distinguishing between true interference peaks generated by periodic grids and accidental energy concentration points generated by random noise or non-periodic defects.
[0023] Then, if a maximum point satisfies the aforementioned symmetry rule, it is ultimately determined as the frequency peak. The coordinates of these frequency peaks directly correspond to the fundamental frequency and harmonic frequencies of the grid structure in the spatial domain. Their energy intensity reflects the significance of the frequency component in the original image. Finally, the grid interference spectrum is generated based on the coordinate positions of all determined frequency peaks and their corresponding energy intensity values. Specifically, the grid interference spectrum is a structured dataset used to accurately characterize patterns of periodic interference. Typically, it is implemented as an array or list, where each record corresponds to an identified frequency peak and explicitly includes the following fields: the x-coordinate and y-coordinate of the peak in the frequency domain image, and the energy intensity value corresponding to that coordinate point in the amplitude spectrum. Furthermore, to comprehensively describe the interference pattern, the spectrum can also systematically record derived information such as the frequency intervals between peaks and the azimuth angle relative to the origin of the spectrum.
[0024] In step S13, based on the grid interference spectrum, a notch filter is constructed to filter the frequency domain image, resulting in a filtered frequency domain image, including: The corresponding notch center position is determined based on the coordinates of each frequency peak in the grid interference spectrum. The stopband radius is adaptively determined based on the distance from the center position of each notch to the origin of the spectrum. Using each notch center position as the center and the corresponding stopband radius as the range, a zero-value region is set in the filter template matrix to construct a notch filter; The notch filter is multiplied by the frequency domain image, and a smooth transition is performed at the stopband edge to obtain the filtered frequency domain image.
[0025] First, based on the grid interference spectrum generated in step S12, the precise coordinates of each identified frequency peak in the frequency domain image are determined, serving as the center position of the corresponding notch filter. The grid interference spectrum records the two-dimensional coordinates of each frequency peak, which directly correspond to the row and column indices in the frequency domain image matrix. For example, a peak with coordinates (50, 30) is located at row 50 and column 30 in the frequency domain image matrix; this position will be set as the center of a notch filter.
[0026] Subsequently, the stopband radius is adaptively determined based on the distance from the center of each notch to the center point of the frequency domain image, i.e., the origin, representing zero frequency or DC component. The determination of this radius is crucial; a radius that is too small may result in incomplete filtering of interference components, leaving residual periodic noise; a radius that is too large may excessively damage useful information in the image adjacent to the interference frequency, such as defect edge features in certain directions. The fundamental frequency and harmonics of periodic grid interference vary in distance from the origin in the frequency domain. Generally, the farther the frequency peak is from the origin, the finer the corresponding spatial domain grid structure, i.e., the higher the spatial frequency, requiring more caution during filtering to avoid excessive damage to image details. Therefore, the stopband radius is usually set proportionally to this distance. In one specific implementation, the stopband radius can be set as a fixed percentage of this distance, such as 8% to 12%. Assuming a peak point is 100 pixels from the origin, its stopband radius can be set to 10 pixels. This adaptive mechanism ensures that a suitable rejection range can be set for grid interference of different spatial frequencies.
[0027] Next, based on all determined notch center locations and their corresponding stopband radii, the notch filter is constructed. A matrix with the exact same size as the frequency domain image is created as a filter template, and all its elements are initialized to 1, indicating that all frequency components are allowed to pass without attenuation. Then, for each frequency peak in the grid interference spectrum, a circle is drawn with the coordinate position of the peak as the center and the corresponding stopband radius determined in the previous step. The values of all template matrix elements within this circular region are set to 0. A value of 0 indicates complete blocking of the corresponding frequency component in that region. Through this operation, circular zero-value notch regions are formed at the positions of all periodic interference peaks in the template matrix.
[0028] Then, the constructed notch filter template is multiplied element-wise with the original frequency domain image obtained in step S11. In the multiplication operation, the complex pixel values located within the notch region in the frequency domain image matrix are multiplied by the 0 value of the filter template, and the result is set to zero, thereby achieving complete or near-complete attenuation of the energy of these specific frequency components. Pixel values located outside the notch region are multiplied by the 1 value of the template, and their amplitude and phase information are completely preserved.
[0029] Finally, the result of the dot product operation is processed by smoothing the stopband edges to obtain the final filtered frequency domain image. Directly performing 0-1 binarization filtering may introduce new steep edges in the frequency domain, resulting in ringing artifacts in the spatial domain image after the inverse transform. To avoid this problem, the edges of each notch region need to be smoothed. A common approach is to use a transition band several pixels wide, within which the filter template value gradually changes from 0 to 1 linearly or non-linearly. Specifically, the width of the transition band is usually set to 10% to 20% of the stopband radius. For each notch region, the width of the transition band is extended outward from the boundary determined by the stopband radius, centered on its center, forming a ring-shaped region. Within this ring-shaped region, the filter template value no longer remains 0, but increases linearly from 0 as the distance between the pixel and the notch center increases, until it reaches 1 at the outer boundary of the transition band. For example, for a notch filter with a stopband radius of 10 pixels and a transition band width of 2 pixels, the template value linearly increases from 0 to 1 within a ring band 10 to 12 pixels from the center. This smoothing process results in a gradual attenuation of frequency components, effectively suppressing raster interference while minimizing additional artifacts introduced during image reconstruction, thus ensuring image quality in subsequent steps. The matrix obtained after all the above operations is the filtered frequency domain map after removing the main periodic raster interference.
[0030] In step S14, an inverse Fourier transform is performed on the filtered frequency domain graph to obtain a denoised image with periodic grid interference removed, including: Perform an inverse fast Fourier transform on the filtered frequency domain graph to obtain a complex result matrix; Perform spectral inverse centering on the complex result matrix and calculate the modulus of the complex result matrix to obtain a spatial domain real matrix; The spatial domain real matrix is linearly stretched to grayscale, mapping the pixel value range of the spatial domain real matrix to a standard grayscale range, to obtain the denoised image.
[0031] First, an inverse fast Fourier transform (IFT) is performed on the filtered frequency domain image obtained in step S13. The IFT is the inverse operation of the Fourier transform, designed to convert the frequency domain data after notch filtering back to the spatial domain. This transform outputs a complex matrix of the same size as the original image, called the complex result matrix. This matrix contains all the amplitude and phase information necessary for image reconstruction. Since the main frequency components corresponding to the periodic grids have been attenuated in the frequency domain, the periodic stripe interference in the image represented by the complex result matrix has been significantly suppressed.
[0032] Subsequently, a spectral inverse centering process is performed on the complex result matrix. This operation is the reverse of the spectral centering process in step S11. Its specific implementation follows standard specifications in digital signal processing. The algorithm traverses each element in the complex result matrix and makes a judgment based on the row and column indices of that element. Consistent with the centering logic, for elements whose sum of row and column indices is odd, their value is multiplied by negative one, i.e., their sign is changed; for elements whose sum of row and column indices is even, their value remains unchanged. In step S11, for ease of observation and analysis, the low-frequency components were moved to the center of the matrix. Now, to correctly reconstruct the spatial domain image, this operation needs to be reversed, i.e., the sign inversion rule is applied again to move the low-frequency components from the center of the matrix back to the four corners of the matrix, restoring the original arrangement order of the data before the transformation. This step ensures that the subsequently calculated pixel positions strictly correspond to the original image.
[0033] Next, the modulus of the complex result matrix after inverse centering is calculated to obtain a spatial domain real matrix. Each element in the complex result matrix is a complex number, with its real and imaginary parts representing some two-dimensional information of the corresponding pixel. By calculating the modulus of each complex number, i.e., its distance from the origin in the complex plane, it can be converted into a real value. This real value directly corresponds to the grayscale intensity of the reconstructed image at that pixel location. The moduli of all pixels are calculated and arranged into a matrix of the same size as the original image to obtain the spatial domain real matrix. This matrix can be viewed as a grayscale image, but the actual range of its pixel values is unknown and not fixed.
[0034] Finally, the spatial domain real matrix is linearly stretched to grayscale to generate the final denoised image. Since the pixel value range after the inverse transform and modulo operation may be wide, and the overall image may be too dark or too bright, it is not convenient for direct observation and subsequent processing. The purpose of linear grayscale stretching is to linearly map the current pixel value range to a standard, full-range grayscale interval, typically 0 to 255, corresponding to an 8-bit grayscale image. Specifically, the spatial domain real matrix is first traversed to find the minimum and maximum pixel values. Then, for each original pixel value in the matrix, its output value is calculated using the linear transformation formula. After this transformation, the darkest pixel in the original matrix becomes 0 (pure black), and the brightest pixel becomes 255 (pure white). The remaining pixels are proportionally distributed between 0 and 255. The image obtained after this standardization process is the denoised image. In this image, the periodic grid background is essentially invisible, while defects such as scratches, bright spots, and dark spots are preserved or even enhanced due to the difference in local grayscale between their local grayscale and the uniform background, thus becoming more prominent.
[0035] In step S15, a preset convolutional neural network model is used to process the denoised image, extracting multi-scale local feature maps. Potential defect regions are then selected and labeled from the local feature maps to obtain feature maps, including: The denoised image is input into a preset convolutional neural network, and multi-scale local feature maps are extracted through convolutional layers and activation function layers; Calculate the gray-level gradient of each pixel position in the local feature map in multiple directions, and synthesize a gray-level gradient map; Pixels whose gradient values in the grayscale gradient image are greater than the gradient threshold are marked as initial suspicious points; Connectivity analysis is performed on the initial suspicious points, each connected component is marked as a potential defect region, and a binarized feature map is generated.
[0036] First, the denoised image obtained in step S14 is input into a pre-built and trained convolutional neural network model specifically designed for detecting minute defects in LCD modules. The model's structure is as follows: its input layer receives a single-channel denoised grayscale image. This is followed by four consecutive convolutional modules, each containing a convolutional layer with a 3×3 small kernel, a batch normalization layer, a ReLU activation function layer, and a 2×2 max-pooling layer. The convolutional layers extract local features from edges to texture layer by layer; the small kernels help to finely perceive minute defects; the batch normalization layer accelerates training and improves stability; the ReLU activation function introduces non-linearity; and the max-pooling layer performs downsampling to expand the receptive field and reduce parameters. The output channels of the four convolutional modules are 32, 64, 128, and 256, respectively. Finally, an additional convolutional layer without pooling is connected, outputting the final multi-scale local feature map. The feature map has a spatial size of 1 / 16 of the input image, but 256 channels, and its depth contains rich abstract feature information, enabling it to sensitively respond to differences between abnormal areas such as scratches, bright spots, and dark spots and a uniform background. The training process of this convolutional neural network model is supervised learning. The training data comes from a historically accumulated image library of LCD modules from the same production line, precisely annotated manually. This library contains tens of thousands of annotated image samples, each a standard-sized denoised image processed in steps S11-S14. The annotation information is a binary defect mask corresponding to the image pixels, where the pixel value of the defect area is 1 and the background is 0. During the training phase, the denoised image is input into the network, and the feature map output by the network is compared with the truly annotated mask. The cross-entropy loss function is used to measure the difference between the prediction and the reality, and the Adam optimizer is used for backpropagation on the graphics processor to update the network weights. During training, the dataset is randomly divided into training, validation, and test sets proportionally. Training stops when the loss function value on the validation set reaches the convergence target or the preset number of iterations, and the optimal model parameters are saved, thus obtaining the pre-trained model. This network, through forward propagation, transforms the entire input denoised image into one or more deeper local feature maps containing abstract semantic information. These feature maps enhance the difference between defective regions and normal backgrounds in the feature space.
[0037] Subsequently, based on the local feature map, the grayscale gradient of each pixel location is calculated in multiple directions. Since the feature map itself is an enhanced representation of local changes in the image, calculating gradients on it can further highlight boundary regions with drastic changes, which are likely to correspond to the edges of defects. Specifically, edge detection operators such as the Sobel operator can be used to calculate the gradient components of the feature map in the horizontal and vertical directions, respectively. Then, the gradient magnitude of each pixel is calculated, and the gradient magnitudes of all pixels are combined into a grayscale gradient map. In this map, areas with higher brightness correspond to locations where local features undergo drastic changes.
[0038] Next, the gradient value of each pixel in the grayscale gradient image is compared with a preset gradient threshold. The purpose of setting the gradient threshold is to distinguish true abnormal gradients from minor background fluctuations or residual noise. This threshold is determined through the following steps: collecting and analyzing a large number of samples generated from the same model of LCD module under normal, defect-free conditions on the production line, including denoised images and their gradient maps. Specifically, for a specific model of LCD module, at least 500 denoised images confirmed to be defect-free are collected, and the corresponding grayscale gradient maps are calculated using the same process. Subsequently, the gradient values of all pixels in all these normal gradient maps are statistically analyzed, and their cumulative distribution is calculated. Based on the balance requirements of detection sensitivity and false alarm rate in actual production, the highest percentile value from this cumulative distribution is selected as the gradient threshold. For example, to control false alarms caused by image noise or minor background fluctuations to a low level, the 95th percentile of the cumulative gradient value distribution is usually selected as the threshold. During online inspection, if the gradient value of a pixel is greater than this threshold, the point is considered to be a significant change point caused by a potential defect and is marked as an initial suspicious point.
[0039] Finally, connected component analysis is performed on all initially labeled suspicious points in the image to form complete potential defect regions. Since a defect is usually composed of multiple adjacent anomalous pixels, connected component analysis aims to aggregate these spatially adjacent initial suspicious points. During analysis, the 8-connectivity rule is typically used, meaning a pixel and its pixels above, below, left, right, and four diagonal points are considered to belong to the same connected component if they are all suspicious points. After traversing the entire gradient map, each independent connected component is labeled as an independent potential defect region. For visual representation, a blank binary image of the same size as the original denoised image is created as a feature map. The values of all pixel positions corresponding to each potential defect region in this feature map are set to 1, typically represented as white, while the values of the remaining background areas are set to 0, thus generating the final binarized feature map.
[0040] In step S16, the boundary information of the potential defect region is extracted from the feature map, and a morphological dilation operation is performed on the boundary information to obtain a defect propagation mask, including: An edge detection operation is performed on the feature map to obtain the contour pixel coordinates of each potential defect region; The reference width of the rectangular structural element is determined based on the maximum and minimum coordinate difference of the contour pixel coordinates in the horizontal direction, and the reference height of the rectangular structural element is determined based on the maximum and minimum coordinate difference in the vertical direction. Based on the reference width and the reference height, a rectangular structural element is generated according to a preset ratio; The morphological dilation operation on the contour pixel coordinates is performed using the rectangular structuring element to obtain the extended boundary coordinates; The coordinates of the extended boundary are merged with the coordinates of the original potential defect region to fill and generate a defect extension mask.
[0041] First, edge detection is performed on the binarized feature map generated in step S15 to accurately obtain the contour information of each marked potential defect region. In the feature map, white connected components represent potential defect regions. The purpose of edge detection is to identify the boundary pixels of these regions. This implementation can use the Canny edge detection algorithm, which can obtain continuous, single-pixel-wide edge lines by calculating the gradient of the image and applying non-maximum suppression and double-threshold hysteresis connections. After processing the feature map, a new edge image is output, which contains only contour lines. Subsequently, by scanning this edge image, the row and column coordinates of each white pixel are recorded and grouped according to connected component affiliation to form a set of contour pixel coordinates corresponding one-to-one with the potential defect region. Each set completely describes the shape and size of a suspected region.
[0042] Subsequently, based on the spatial distribution characteristics of each contour pixel coordinate set, a rectangular structuring element is generated for morphological dilation operations. The structuring element is the core of the morphological operation; its shape and size determine the direction and extent of dilation. Considering the diversity of LCD module defect shapes and the requirement for uniform dilation, this implementation chooses a rectangle as the shape of the structuring element. Its size needs to be adaptively determined according to the size of the current defect area to be processed. One specific method is to find the maximum and minimum coordinate values of all pixels in the row and column directions for a contour coordinate set, thereby obtaining the horizontal and vertical span of the area. The width of the rectangular structuring element is set to k times the horizontal span, and the height is set to k times the vertical span, where k is a preset expansion coefficient, for example, 0.05 to 0.15, mainly based on the balance between statistical analysis of LCD module defect characteristics and actual detection requirements. The establishment of this value range is based on systematic experimental statistics. First, a labeled sample set covering various types and sizes of real defects was constructed. Then, on this sample set, tests were conducted at different k-values within a candidate range of 0.02 to 0.20 with a certain step size. Two key metrics were recorded for each k-value: the recall rate of the defect region (the proportion of defects completely covered) and the increase in background noise area due to over-expansion. Statistical analysis showed that when the k-value was below 0.05, the recall rate for small or blurred-edge defects decreased significantly; when the k-value exceeded 0.15, the increase in background noise area significantly increased, leading to decreased contrast and increased false positive rate in subsequent verification steps. Within the range of 0.05 to 0.15, the average recall rate was maintained above 98% while the average increase in noise area was controlled within 5%, thus achieving an optimal balance between sensitivity and accuracy. If the coefficient was below 0.05, the expansion was too small, which might not effectively cover blurred edges or slight extensions of defects, causing some real defect regions to be missed in subsequent comparative verification, affecting detection sensitivity. If the coefficient is higher than 0.15, the expansion is excessive, easily including too many normal pixel areas around the defect in the mask. This introduces background noise when calculating pixel grayscale differences, reduces contrast, and increases the risk of misjudgment. A coefficient between 0.05 and 0.15 ensures that, in most cases, the expanded mask precisely covers the defect and its edge transition area, while minimizing the mixing of background pixels, thus ensuring the accuracy and reliability of subsequent precise authentication steps. This means that a defect area 50 pixels wide and 30 pixels high may correspond to a rectangular structural element 5 pixels wide and 3 pixels high. This adaptive mechanism ensures that the expansion is proportionate regardless of the defect size.
[0043] Next, using the generated rectangular structuring element, a morphological dilation operation is performed on the set of contour pixel coordinates. The intuitive effect of dilation is to expand the boundary of the target region outwards. During the operation, the center of the structuring element is aligned sequentially with each pixel coordinate on the contour. Then, all positions covered by the structuring element—that is, the positions determined by the current contour pixel coordinates plus all relative offset coordinates within the structuring element template—are added to the output set. After traversing all contour pixels, the resulting new set of coordinates is the expanded boundary coordinate.
[0044] Finally, the expanded boundary coordinates are merged with all the internal coordinates of the original potential defect region obtained in step S15, i.e., all the white pixel coordinates of the corresponding connected components in the feature map. The merging operation is to take the union of the two coordinate sets, thus obtaining a more complete coordinate set that includes both the original region and its surrounding extended boundary. Based on this final coordinate set, a blank binary matrix with the same size as the original denoised image is created as a mask. In this matrix, all positions belonging to the union coordinates are assigned a value of 1, representing the foreground, and the remaining positions are assigned a value of 0, representing the background. Through the filling operation, the final generated binary matrix is the defect extension mask.
[0045] In step S17, the defect extension mask is mapped onto the denoised image, and the pixel grayscale difference between the mask-covered area and the surrounding background area is calculated. If the pixel grayscale difference is greater than a grayscale threshold, it is confirmed as a real defect, and the coordinates corresponding to the real defect are output as the localization result, including: Align the defect extension mask with the denoised image, extract the grayscale values of all pixels within the mask area, and form a foreground pixel set; Extract the pixel grayscale values within an annular region of a predetermined width, based on the boundary of the defect expansion mask, to form a background pixel set; The pixel grayscale difference is obtained by calculating the absolute difference between the average grayscale of the foreground pixel set and the average grayscale of the background pixel set. If the pixel grayscale difference is greater than the grayscale threshold, then the area corresponding to the defect expansion mask is determined to be a real defect, and the corresponding geometric center coordinates are output as the positioning result.
[0046] First, the defect expansion mask generated in step S16 is spatially aligned with the denoised image obtained in step S14. Since both originate from the same original image and the geometric transformations performed are strictly reversible, they have a natural pixel-level correspondence. After alignment, each pixel position with a value of 1 in the mask directly corresponds to a specific pixel in the denoised image. The grayscale values of all these pixels are extracted and aggregated to form a dataset called the foreground pixel set. This set represents the brightness distribution within the entire expansion area initially suspected to be a defect.
[0047] Subsequently, to objectively evaluate the degree of anomaly in the foreground region, a normal background region needs to be defined for comparison. This implementation defines a ring-shaped background region based on the boundary of the defect-expanding mask. Specifically, first, the boundary pixels of the mask are found, i.e., pixels with a value of 1 and at least one adjacent pixel with a value of 0. Then, starting from these boundary pixels, a preset width, such as 5 to 15 pixels, is extended outwards, outside the mask, forming a ring-shaped region surrounding the mask. The selection of this preset width is based on the following considerations: First, it must ensure that the background region and the foreground region are spatially close, thus being under similar lighting and imaging conditions, making the grayscale contrast physically meaningful. Second, the width must be sufficient to cross the edge diffusion or optical halo area that the defect may cause, in order to collect a truly normal background signal. Finally, through statistical analysis of various defects in typical production line imaging systems, i.e., those ranging in size from several pixels to tens of pixels, it was found that setting the width within the range of 5 to 15 pixels can achieve a better balance between the statistical stability of the background set, such as the mean variance of grayscale, and the contrast sensitivity to defects in most scenarios. A width that is too narrow is easily affected by noise in individual pixels or the transition area of defect edges; a width that is too wide may introduce areas far from the defect where the lighting conditions have gradually changed, weakening the effectiveness of the contrast. The grayscale values of all pixels within this annular region are extracted from the denoised image to form a background pixel set. The selection of this annular background region provides a contrast benchmark of the brightness of a normal LCD module surface adjacent to the suspected area and with similar lighting conditions, thereby enabling more sensitive detection of local anomalies.
[0048] Next, the arithmetic mean grayscale values of the foreground pixel set and the background pixel set are calculated separately. The absolute value of the difference between the two mean grayscale values is calculated; this value is the pixel grayscale difference. This difference value quantitatively reflects the degree of deviation in average brightness between the suspected defect area and its surrounding normal area. The larger the difference value, the more obvious the contrast between the area and the background, and the higher the probability that it is a real defect.
[0049] Then, this pixel grayscale difference value is compared with a preset grayscale threshold to make a final judgment. The purpose of setting the grayscale threshold is to distinguish between real, visually impactful defects and minor, acceptable brightness fluctuations or image noise. This threshold is usually determined based on statistical analysis of a large number of known qualified and unqualified LCD module samples. The specific determination method is as follows: A statistically significant sample set is collected, which includes a large number of manually confirmed qualified product images and defective product images containing various confirmed real defects. For the qualified product images, multiple regions in the image are randomly selected that are equivalent to the area of the extended mask of the defect to be inspected, and the pixel grayscale difference value of each region is calculated to construct the qualified product difference value distribution. For the defective product images, the pixel grayscale difference value is calculated for each real defect region to construct the defect difference value distribution. Subsequently, based on these two distributions, the classification threshold that can optimally distinguish between "normal" and "defective" states is found through receiver operating characteristic (ROC) curve analysis. This optimal threshold typically corresponds to the point on the ROC curve closest to the top left corner, where the true positive rate is high and the false positive rate is low. A false positive rate target is pre-set, for example, 1%, and then the corresponding difference value is derived as the grayscale threshold. During online detection, if the pixel grayscale difference of a certain mask area is greater than this threshold, the area is ultimately determined to be a real defect; if it is less than or equal to the threshold, it is determined to be a false defect or irrelevant anomaly and is excluded.
[0050] Finally, for each area confirmed as a genuine defect, its precise location information needs to be output to guide subsequent repair or marking. The location result is represented by the geometric center coordinates of the defect within its corresponding defect extension mask. To calculate the geometric center coordinates, the row and column coordinates of all foreground pixels within the mask are averaged. The resulting row and column averages are the geometric center coordinates of the defect. These coordinates can be directly mapped back to the spatial location of the original image, providing clear positioning guidance for automated marking equipment or operators on the production line, thus completing the closed loop from image processing to physical spatial positioning.
[0051] In summary, this invention discloses a method for detecting defects in liquid crystal modules, comprising: acquiring an original image and performing a Fourier transform to obtain a frequency domain image; identifying the grid interference spectrum in the frequency domain image and constructing a notch filter for filtering; performing an inverse transform on the filtering result to obtain a denoised image; processing the denoised image using a convolutional neural network and initially locating potential defect regions based on gradient thresholds; performing morphological dilation on the potential defect regions to obtain an extended mask; calculating the pixel grayscale difference between the inner and outer regions of the mask, confirming the actual defect based on the difference threshold, and outputting the location result. This method can effectively suppress periodic grid interference and improve the detection accuracy and robustness of small, low-contrast defects. This invention, through a technical path combining frequency domain interference suppression, intelligent initial detection, and spatial domain fine verification, effectively removes strong periodic background noise and significantly enhances the visibility of defect signals, thereby achieving highly sensitive, highly accurate, and highly robust automated detection of various defects in liquid crystal modules, especially low-contrast, small-sized defects.
[0052] Reference Figure 2 The first embodiment of the present invention provides a liquid crystal module defect detection system, comprising: The image acquisition module is used to acquire the original image of the liquid crystal module and perform a Fourier transform on the original image to obtain a frequency domain image; The spectrum analysis module is used to identify frequency peaks generated by the periodic pixel structure of the liquid crystal module in the frequency domain image, and to determine the grid interference spectrum based on the coordinates and energy intensity of all the frequency peaks. The frequency domain filtering module is used to construct a notch filter based on the grid interference spectrum, and to filter the frequency domain image to obtain a filtered frequency domain image. The image reconstruction module is used to perform an inverse Fourier transform on the filtered frequency domain image to obtain a denoised image with periodic grid interference removed. The initial detection and localization module is used to process the denoised image using a preset convolutional neural network model, extract multi-scale local feature maps, screen potential defect areas from the local feature maps and label them to obtain feature maps; The mask generation module is used to extract the boundary information of the potential defect region from the feature map, and perform a morphological dilation operation on the boundary information to obtain a defect expansion mask. The final localization module is used to map the defect extension mask onto the denoised image, calculate the pixel grayscale difference between the mask-covered area and the surrounding background area, and if the pixel grayscale difference is greater than the grayscale threshold, it is confirmed as a real defect, and the coordinates corresponding to the real defect are output as the localization result.
[0053] It should be noted that the liquid crystal module defect detection system provided in this embodiment of the invention is used to execute all the process steps of the liquid crystal module defect detection method in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.
[0054] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0055] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for detecting defects of a liquid crystal module, characterized in that, include: The original image of the liquid crystal module is acquired, and a Fourier transform is performed on the original image to obtain a frequency domain image; Based on the frequency domain image, identify the frequency peaks generated by the periodic pixel structure of the liquid crystal module, and determine the grid interference spectrum based on the coordinates and energy intensity of all the frequency peaks. Based on the grid interference spectrum, a notch filter is constructed to filter the frequency domain image, resulting in a filtered frequency domain image. Perform an inverse Fourier transform on the filtered frequency domain image to obtain a denoised image with periodic grid interference removed; The denoised image is processed using a pre-defined convolutional neural network model to extract multi-scale local feature maps. Potential defect regions are then selected and labeled from the local feature maps to obtain feature maps. The boundary information of the potential defect region is extracted from the feature map, and a morphological dilation operation is performed on the boundary information to obtain a defect expansion mask. The defect extension mask is mapped onto the denoised image, and the pixel grayscale difference between the mask-covered area and the surrounding background area is calculated. If the pixel grayscale difference is greater than a preset grayscale threshold, it is confirmed as a real defect, and the coordinates corresponding to the real defect are output as the localization result.
2. The method for detecting defects in a liquid crystal module according to claim 1, characterized in that, The process of acquiring the original image of the liquid crystal module and performing a Fourier transform on the original image to obtain a frequency domain image includes: The original image is obtained by capturing a grayscale image of the surface of the liquid crystal module using an industrial camera; Perform a two-dimensional discrete Fourier transform on the pixel matrix of the original image to obtain an initial frequency domain matrix in complex form; The initial frequency domain matrix is subjected to spectral centering processing, which moves the low-frequency components to the center of the matrix to obtain the frequency domain image.
3. The method for detecting defects in a liquid crystal module according to claim 1, characterized in that, The step of identifying frequency peaks generated by the periodic pixel structure of the liquid crystal module based on the frequency domain image, and determining the grid interference spectrum based on the coordinates and energy intensity of all the frequency peaks, includes: Calculate the amplitude spectrum of the frequency domain image and identify maxima points in the amplitude spectrum where the energy is significantly higher than the local average level; Determine whether the spatial distribution of the maximum points exhibits a predetermined symmetry pattern; If the symmetry rule is satisfied, then the corresponding maximum point is determined as the frequency peak value; If the symmetry rule is not satisfied, the corresponding maximum point will be excluded and will not be used as the frequency peak. Based on the coordinates and energy intensity of all the frequency peaks, the grid interference spectrum characterizing the periodic interference distribution is generated.
4. The method for detecting defects in a liquid crystal module according to claim 1, characterized in that, The step of constructing a notch filter based on the grid interference spectrum and filtering the frequency domain image to obtain a filtered frequency domain image includes: The corresponding notch center position is determined based on the coordinates of each frequency peak in the grid interference spectrum. The stopband radius is adaptively determined based on the distance from the center position of each notch to the origin of the spectrum. Using each notch center position as the center and the corresponding stopband radius as the range, a zero-value region is set in the filter template matrix to construct a notch filter; The notch filter is multiplied by the frequency domain image, and a smooth transition is performed at the stopband edge to obtain the filtered frequency domain image.
5. The liquid crystal module defect detection method according to claim 1, characterized in that, The step of performing an inverse Fourier transform on the filtered frequency domain image to obtain a denoised image with periodic grid interference removed includes: Perform an inverse fast Fourier transform on the filtered frequency domain graph to obtain a complex result matrix; Perform spectral inverse centering on the complex result matrix and calculate the modulus of the complex result matrix to obtain a spatial domain real matrix; The spatial domain real matrix is linearly stretched to grayscale, mapping the pixel value range of the spatial domain real matrix to a standard grayscale range, to obtain the denoised image.
6. The liquid crystal module defect detection method according to claim 1, characterized in that, The process involves using a pre-defined convolutional neural network model to process the denoised image, extracting multi-scale local feature maps, filtering and labeling potential defect regions from the local feature maps to obtain feature maps, including: The denoised image is input into a preset convolutional neural network, and multi-scale local feature maps are extracted through convolutional layers and activation function layers; Calculate the gray-level gradient of each pixel position in the local feature map in multiple directions, and synthesize a gray-level gradient map; Pixels whose gradient values in the grayscale gradient image are greater than a preset gradient threshold are marked as initial suspicious points; Connectivity analysis is performed on the initial suspicious points, each connected component is marked as a potential defect region, and a binarized feature map is generated.
7. The method for detecting defects in a liquid crystal module according to claim 1, characterized in that, The step of extracting the boundary information of the potential defect region from the feature map and performing a morphological dilation operation on the boundary information to obtain a defect expansion mask includes: An edge detection operation is performed on the feature map to obtain the contour pixel coordinates of each potential defect region; The reference width of the rectangular structural element is determined based on the maximum and minimum coordinate difference of the contour pixel coordinates in the horizontal direction, and the reference height of the rectangular structural element is determined based on the maximum and minimum coordinate difference in the vertical direction. Based on the reference width and the reference height, a rectangular structural element is generated according to a preset ratio; The morphological dilation operation on the contour pixel coordinates is performed using the rectangular structuring element to obtain the extended boundary coordinates; The coordinates of the extended boundary are merged with the coordinates of the original potential defect region to fill and generate a defect extension mask.
8. The method for detecting defects in a liquid crystal module according to claim 1, characterized in that, The process involves mapping the defect extension mask onto the denoised image, calculating the pixel grayscale difference between the mask-covered area and the surrounding background area, and if the pixel grayscale difference is greater than a grayscale threshold, confirming it as a real defect and outputting the coordinates corresponding to the real defect as the localization result. This includes: Align the defect extension mask with the denoised image, extract the grayscale values of all pixels within the mask area, and form a foreground pixel set; Extract the pixel grayscale values within an annular region of a predetermined width, based on the boundary of the defect expansion mask, to form a background pixel set; The pixel grayscale difference is obtained by calculating the absolute difference between the average grayscale of the foreground pixel set and the average grayscale of the background pixel set. If the pixel grayscale difference is greater than the grayscale threshold, then the area corresponding to the defect expansion mask is determined to be a real defect, and the corresponding geometric center coordinates are output as the positioning result.
9. A liquid crystal module defect detection system, characterized in that, include: The image acquisition module is used to acquire the original image of the liquid crystal module and perform a Fourier transform on the original image to obtain a frequency domain image; The spectrum analysis module is used to identify frequency peaks generated by the periodic pixel structure of the liquid crystal module in the frequency domain image, and to determine the grid interference spectrum based on the coordinates and energy intensity of all the frequency peaks. The frequency domain filtering module is used to construct a notch filter based on the grid interference spectrum, and to filter the frequency domain image to obtain a filtered frequency domain image. The image reconstruction module is used to perform an inverse Fourier transform on the filtered frequency domain image to obtain a denoised image with periodic grid interference removed. The initial detection and localization module is used to process the denoised image using a preset convolutional neural network model, extract multi-scale local feature maps, screen potential defect areas from the local feature maps and label them to obtain feature maps; The mask generation module is used to extract the boundary information of the potential defect region from the feature map, and perform a morphological dilation operation on the boundary information to obtain a defect expansion mask. The final positioning module is used to map the defect extension mask onto the denoised image, calculate the pixel grayscale difference between the mask-covered area and the surrounding background area, and if the pixel grayscale difference is greater than a preset grayscale threshold, it is confirmed as a real defect, and the coordinates corresponding to the real defect are output as the positioning result.