Low-gray-scale picture imaging defect visual detection method and system of OLED display screen

By analyzing the color characteristics and setting the discrete distribution of low grayscale images on OLED displays, and combining the support vector machine algorithm, the accuracy and efficiency problems of low grayscale image detection in existing technologies have been solved, and the accurate location and marking of imaging defects have been achieved.

CN120876404APending Publication Date: 2025-10-31JIANG SU HE YI GUANG XIAN KE JI YOU XIAN GONG SI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510977936.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing detection methods struggle to effectively capture subtle color defects when processing low grayscale images on OLED displays, leading to frequent missed or false detections. They also lack adaptability to complex display content, especially in color transition areas and low-brightness scenes, where the accuracy of defect identification drops significantly.

Method used

By extracting grayscale images with average pixel brightness below a preset threshold, color characteristic analysis is performed to generate a chromaticity feature vector matrix. Color transition analysis and dispersion distribution settings are then performed, and pixel classification is performed using a support vector machine algorithm to mark imaging defects.

Benefits of technology

It enables precise location and marking of imaging defects in OLED displays, improving the targeting and accuracy of detection, and enhancing the efficiency and precision of imaging quality detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876404A_ABST
    Figure CN120876404A_ABST
Patent Text Reader

Abstract

The invention provides a low-gray-scale image imaging defect visual detection method and system for an OLED display screen. The method comprises the following steps: aiming at original image data of a display screen, extracting a gray scale picture with a pixel brightness mean value lower than a preset brightness threshold value as a first image, carrying out color characteristic analysis on the first image, and generating a second image marked with a chromaticity feature vector; identifying the chromaticity feature vector according to the second image, generating a feature vector matrix for representing chromaticity distribution of each pixel in the second image, and performing color jump analysis through the feature vector matrix to obtain a third image; extracting a jump region in the third image, and setting marks for distinguishing different dispersion distribution for chromaticity distribution dispersion distribution according to the jump region to obtain a fourth image; and identifying dispersion distribution according to the fourth image, combining with a chromaticity abnormal pixel region in the hopping region, performing pixel classification in the hopping region, and setting defect marks for pixels with imaging defects represented by a classification result to obtain a fifth image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of image processing and computer vision, and more specifically, to a visual detection method and system for low grayscale image imaging defects in OLED displays. Background Technology

[0002] Display image quality inspection is a crucial step in modern electronic device manufacturing, directly impacting the product's visual experience and market competitiveness. Its importance is particularly pronounced in high-precision display technologies such as OLED displays. High-quality display performance not only affects user experience but also plays a decisive role in brand reputation and production cost control. However, existing inspection methods often suffer from insufficient accuracy when processing low grayscale images, struggling to effectively capture subtle color defects, leading to frequent missed or false detections. Most of these methods rely on image segmentation with fixed thresholds or single color analysis, lacking adaptability to complex display content. Especially in color transition areas and low-brightness scenes, the accuracy of defect identification drops significantly.

[0003] In low-grayscale image detection, color complexity and feature extraction in boundary areas become core challenges. The color complexity of displayed content varies greatly, and traditional methods cannot dynamically adjust the analysis granularity based on the content, leading to loss of detail in target areas and computational redundancy in low-complexity areas. This limitation further complicates the identification of color abrupt changes and the dispersion of color point distribution. Due to the lack of targeted color space partitioning and feature vector construction, existing technologies struggle to accurately quantify subtle deviations within the color gamut, especially in boundary areas where discontinuities in color transitions are often ignored, thus affecting the comprehensive detection of defects.

[0004] Therefore, this application provides a visual detection method and system for low grayscale image imaging defects in OLED displays to solve one of the aforementioned technical problems. Summary of the Invention

[0005] The purpose of this application is to provide a visual inspection method and system for low grayscale image imaging defects in OLED displays, which can solve at least one of the technical problems mentioned above.

[0006] The specific plan is as follows:

[0007] According to a specific embodiment of this application, in a first aspect, this application provides a visual detection method for low grayscale image imaging defects in an OLED display, comprising:

[0008] For the original image data of the display screen, a grayscale image with an average pixel brightness value lower than a preset brightness threshold is extracted as the first image. Color characteristic analysis is performed on the first image to generate a second image marked with a chromaticity feature vector. Based on the chromaticity feature vector marked by the second image, a feature vector matrix is ​​generated to characterize the chromaticity distribution of each pixel in the second image. Color jump analysis is performed through the feature vector matrix to obtain a third image marked with jump regions. The jump regions are extracted from the third image, and according to the discrete distribution of the chromaticity distribution in the jump regions, a label is set to distinguish different discrete distributions to obtain a fourth image marked with the discrete distribution. Based on the discrete distribution marked by the fourth image, combined with the chromaticity abnormal pixel regions in the jump regions, pixel classification is performed in the jump regions, and defect labels are set for pixels that indicate imaging defects in the classification results to obtain a fifth image marked with defect pixel locations.

[0009] According to a specific embodiment of this application, in a second aspect, this application provides a visual inspection system for low grayscale image imaging defects in OLED displays, comprising:

[0010] The data extraction unit is used to extract grayscale images with an average pixel brightness value lower than a preset brightness threshold from the original image data of the display screen as a first image, and perform color characteristic analysis on the first image to generate a second image marked with a chromaticity feature vector; the processing unit is used to generate a feature vector matrix to characterize the chromaticity distribution of each pixel in the second image based on the chromaticity feature vector marked by the second image, and perform color jump analysis through the feature vector matrix to obtain a third image marked with jump regions; it is used to extract the jump regions in the third image, and set markers to distinguish different discrete distributions according to the discrete distribution of the jump regions with respect to the chromaticity distribution, to obtain a fourth image marked with the discrete distribution; and it is used to classify pixels in the jump regions based on the discrete distribution marked by the fourth image, combined with the chromaticity abnormal pixel regions in the jump regions, and set defect markers for pixels that characterize imaging defects in the classification results, to obtain a fifth image marked with defect pixel locations.

[0011] Compared with the prior art, the above-described solution of this application has at least the following beneficial effects: This application provides a visual detection method for low grayscale image imaging defects in OLED displays. By extracting images with an average pixel brightness below a preset threshold and performing color characteristic analysis on these low grayscale images, potential imaging defects can be effectively identified. This method first filters out low grayscale images by processing the original image data. This step ensures that subsequent analysis focuses on images that may have subtle color deviations, improving the targeting and accuracy of the detection. Then, a second image is generated by performing color characteristic analysis on the first image, enabling the construction of a chromaticity feature vector. This lays the foundation for subsequent color jump and dispersion analysis. Finally, through a series of detailed analysis steps, including color jump analysis, dispersion distribution setting, and classification based on support vector machine algorithms, the precise location and marking of imaging defects are achieved, greatly improving the efficiency and accuracy of OLED display imaging quality detection. Attached Figure Description

[0012] Figure 1 A flowchart of a visual detection method for low grayscale image defects in an OLED display is shown.

[0013] Figure 2 A flowchart of a method for obtaining a second image from a first image is shown;

[0014] Figure 3 A flowchart of a method for obtaining a sixth image is shown;

[0015] Figure 4 A flowchart of a method for obtaining a seventh image is shown;

[0016] Figure 5 A flowchart of a method for obtaining an eighth image is shown;

[0017] Figure 6 A flowchart of a method for obtaining a ninth image is shown;

[0018] Figure 7 A flowchart of a method for acquiring a second image is shown;

[0019] Figure 8 A flowchart of a method for acquiring a third image is shown;

[0020] Figure 9 A flowchart of a method for obtaining a fourth image is shown;

[0021] Figure 10 A unit block diagram of a visual inspection system for low grayscale image imaging defects of an OLED display screen according to an embodiment of this application is shown. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.

[0024] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0025] It should be understood that although the terms first, second, third, etc., may be used in the embodiments of this application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, first may also be referred to as second without departing from the scope of the embodiments of this application, and similarly, second may also be referred to as first.

[0026] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”

[0027] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.

[0028] It should be noted that any symbols and / or numbers present in the specification that are not marked in the accompanying drawings are not reference numerals.

[0029] The optional embodiments of this application are described in detail below with reference to the accompanying drawings.

[0030] The embodiments provided in this application are embodiments of a visual detection method for low grayscale image imaging defects in an OLED display.

[0031] The following is combined Figure 1 The embodiments of this application will be described in detail.

[0032] Figure 1 A flowchart of a visual detection method for low grayscale image defects in an OLED display is shown, as follows: Figure 1 As shown, it includes the following steps.

[0033] Step S101: For the original image data of the display screen, extract the grayscale image with the average pixel brightness value lower than the preset brightness threshold as the first image, and perform color characteristic analysis on the first image to generate a second image with a chromaticity feature vector.

[0034] Step S102: Based on the chromaticity feature vector of the second image identifier, generate a feature vector matrix to characterize the chromaticity distribution of each pixel in the second image, and perform color jump analysis through the feature vector matrix to obtain a third image with jump regions identified.

[0035] Step S103: Extract the transition regions in the third image, and set markers to distinguish different dispersion distributions according to the dispersion distribution of the transition regions relative to the chromaticity distribution, to obtain a fourth image marked with a dispersion distribution.

[0036] Step S104: Based on the discrete distribution of the fourth image identifier, combined with the color aberration pixel region in the transition region, perform pixel classification in the transition region, and set defect markers for pixels that represent imaging defects in the classification results, to obtain the fifth image with defect pixel locations marked.

[0037] Among them, the chromatic aberration pixel region includes each sub-region in which the chromaticity value difference of consecutive pixels in the jump region exceeds a preset difference threshold.

[0038] In this embodiment, by extracting images with an average pixel brightness below a preset threshold and performing color characteristic analysis on these low-grayscale images, potential imaging defects can be effectively identified. The method first filters out low-grayscale images by processing the original image data. This step ensures that subsequent analysis focuses on images that may have subtle color deviations, improving the targeting and accuracy of the detection. Next, a second image is generated by performing color characteristic analysis on the first image, enabling the construction of a chromaticity feature vector. This lays the foundation for subsequent color jump and dispersion analysis. Finally, through a series of meticulous analysis steps, including color jump analysis, dispersion distribution setting, and classification based on the support vector machine algorithm, the precise location and labeling of imaging defects are achieved, greatly improving the efficiency and accuracy of OLED display imaging quality detection.

[0039] In some embodiments, the original image data of the display screen is first acquired, and the average pixel brightness is calculated and compared with a preset brightness threshold. If the average brightness is lower than the preset threshold, the image is determined to be a low grayscale image, thus obtaining the first image.

[0040] Specifically, acquiring raw image data from the input device is a fundamental step in image processing, typically achieved through images captured by devices such as cameras or scanners. For example, in industrial inspection scenarios, a camera captures images of products on an assembly line, generating raw image data containing pixel information. This raw image data is stored in a two-dimensional matrix, with each pixel containing a brightness value, usually within a grayscale range of 0 to 255. It's important to note that the brightness value reflects the lightness or darkness of the pixel, providing the data foundation for subsequent analysis. Pixel decomposition tools are used to extract the brightness value of each pixel, forming a pixel brightness set.

[0041] Preferably, the pixel decomposition tool optimizes processing speed by employing parallel processing for high-resolution images. This method can quickly extract brightness data, supporting subsequent calculations and significantly improving processing efficiency. Then, an average value calculation tool is used to process the pixel brightness set, calculating the average of all pixel brightness values ​​to obtain the average brightness value. For example, the sum of the brightness values ​​of 10,000 pixels is 1,500,000, and the average value is 150. If the image contains many dark areas, the average brightness value may be lower, such as 80. The average value calculation is simple and efficient, reflecting the overall brightness level of the image and providing a quantitative basis for grayscale judgment. If the average brightness value is lower than a preset threshold, the image is marked as a low grayscale image by the grayscale judgment tool, resulting in the first image.

[0042] As a feasible implementation, in a specific example, the preset threshold can be set to 100. If the average brightness is 80, which is below this threshold, the grayscale judgment tool will mark the image as a low grayscale image. It is worth noting that the threshold setting needs to be adjusted according to the application scenario; for example, the threshold in night vision monitoring may be lower, such as 50, to adapt to low-light environments. The grayscale judgment tool quickly classifies images by comparing the average with the threshold. For example, in industrial inspection, low grayscale images may indicate surface defects or insufficient light, triggering subsequent processing. This marking mechanism not only improves the automation level of inspection and reduces manual intervention but also optimizes the selection of image enhancement algorithms. For example, contrast stretching technology is preferentially used for low grayscale images to improve the visibility of image details. Furthermore, pixel decomposition, average calculation, and grayscale judgment processes can be integrated into embedded devices to form a real-time image processing system. For example, the image processing module on a production line analyzes dozens of images per second, quickly marking low grayscale images to ensure inspection efficiency. This integrated solution not only records the frequency of low grayscale image occurrences but also analyzes illumination stability, guiding equipment maintenance and improving the reliability and intelligence level of industrial inspection.

[0043] In the above embodiments, image characteristics are quantified by the average brightness value, and automated classification is achieved by combining it with threshold judgment, significantly reducing the false positive rate. For example, traditional manual inspection may miss defects due to subjective differences, while objective judgment based on the average brightness value ensures the consistency of results. In addition, marking low grayscale images can also trigger an alarm mechanism to remind operators to pay attention to abnormal situations, thereby improving production safety.

[0044] Figure 2 A flowchart of a method for obtaining a second image from a first image is shown, as follows: Figure 2 As shown, it includes the following steps.

[0045] Step S201: Predict the color complexity distribution features of the first image to obtain a sixth image with color complexity distribution features.

[0046] Step S202: Based on a preset standard, the sixth image is segmented and merged to obtain a seventh image with a set of segmented regions.

[0047] Step S203: In the set of segmented regions identified by the seventh image, stable regions whose entropy boundaries all satisfy smooth changes are selected and marked, resulting in the eighth image marked with stable regions.

[0048] Step S204: Mark the boundary region in the stable region identified by the eighth image to obtain the ninth image with the boundary region identified.

[0049] Step S205: Extract the set of boundary pixels in the boundary region identified by the ninth image, and extract the chromaticity feature vector based on the set of boundary pixels to obtain the second image identified by the chromaticity feature vector.

[0050] In this embodiment, the sixth image is obtained by segmenting the first image and calculating its color complexity distribution. This process helps to accurately capture the color changes of the displayed content, especially for fine processing of boundary areas. Then, the segmentation grid size is dynamically adjusted according to the color entropy value to achieve accurate division of regions with different complexity. This not only improves processing efficiency but also avoids information loss. Next, stable regions are marked in the seventh image to reduce unnecessary detail interference and enhance the reliability of boundary detection. Finally, the boundary region marking makes the edge features clearer, which is beneficial for subsequent color feature extraction. The entire process ensures the comprehensiveness and accuracy of defect detection.

[0051] For example, to facilitate understanding, the following implementation details of obtaining the sixth, seventh, eighth, ninth, and second images are described through different embodiments.

[0052] Figure 3 A flowchart of a method for obtaining a sixth image is shown, as follows: Figure 3 As shown, it includes the following steps.

[0053] Step S301: According to the pixel distribution of the first image, the first image is divided into multiple local regions, and the pixel color distribution of each local region is calculated to obtain local statistical data.

[0054] Step S302: Calculate the color entropy value for each local region and construct an entropy field mapping containing the color entropy value of each local region.

[0055] Step S303: Extract features from the entropy field mapping and mark local areas with color entropy values ​​higher than a preset threshold as target areas to generate a heat map reflecting color complexity.

[0056] Step S304: Based on the heatmap data, a linear interpolation method is used to map the pixel distribution of the first image, and combined with the feature data extracted from the entropy field mapping, the color complexity distribution features of the mapped first image are predicted to obtain a sixth image with color complexity distribution features.

[0057] In this embodiment, an entropy field mapping model is constructed by calculating the color distribution of local regions and their color entropy values, which can effectively reflect the color complexity of different parts of the image. This approach allows the system to adopt corresponding analysis strategies for different levels of color complexity, thereby improving the accuracy and flexibility of color complexity assessment. The generation of heatmaps provides an intuitive way to display the color complexity distribution, which helps guide subsequent region segmentation and feature extraction. Combined with the application of linear interpolation methods, the color complexity distribution can be predicted more accurately, providing a solid foundation for subsequent defect detection.

[0058] In some embodiments, color complexity distribution feature prediction is performed on the first image to generate a sixth image identified by color complexity distribution features. Specifically, the pixel distribution of the first image is first obtained, and grayscale conversion and histogram equalization are used to preprocess the first image. The first image is segmented into multiple local regions using a two-dimensional sliding window, and the pixel color distribution of each region is calculated to obtain local statistical data. Based on the local statistical data, the formula H=-Σ(p i log(p i Calculate the color entropy value, where H is the color entropy value and p i Let be the pixel probability of the i-th color within the region. Based on this, an entropy field mapping containing the entropy values ​​of all regions is constructed using color entropy values. Further, feature extraction is performed on the entropy field mapping; if the entropy value is higher than a preset threshold, it is marked as a target region, generating a heatmap reflecting color complexity, thus obtaining heatmap data. Based on the heatmap data, linear interpolation is used to map the pixel distribution of the first image, and combined with the feature data extracted from the entropy field mapping, the color complexity distribution characteristics of the first image are predicted.

[0059] As a feasible implementation, when acquiring the pixel distribution of the first image, a grayscale conversion tool can be used to convert the color image to a grayscale image to simplify color information. For example, assuming the input image is in RGB format, grayscale conversion can be achieved using a weighted average method, merging the red, green, and blue channel values ​​proportionally into a single brightness value to generate a grayscale image. This method effectively reduces subsequent computational complexity while preserving the main structural information of the image. Specifically, when preprocessing the grayscale image using histogram equalization, image contrast can be enhanced by adjusting the pixel brightness distribution. For example, for a low-contrast first image, histogram equalization will redistribute pixel values, making the brightness range more uniform. Assuming the original image brightness values ​​are concentrated between 50 and 100, after equalization, the brightness values ​​may expand to 0 to 255. This processing can highlight image details, facilitating subsequent region segmentation and feature extraction.

[0060] In one specific embodiment, when segmenting a first image into multiple local regions using a two-dimensional sliding window, the window size can be set to 32×32 pixels with a stride of 16 pixels to generate overlapping regions. For example, a 256×256 pixel image can be segmented into hundreds of local regions. Within each region, the pixel color distribution is calculated, and the histograms of the red, green, and blue channels are statistically analyzed to obtain local statistical data. This method captures local image features and avoids losing details in global statistics. For example, when calculating the color entropy value of each region, the probability of each color appearing can be calculated based on the local statistical data. Assuming a region has 256 colors, and the pixel percentage of a certain color is 0.1, its entropy contribution is -0.1*log(0.1). By accumulating the entropy values ​​of all colors, the color entropy of the region is obtained. The entropy value reflects the color complexity of the region; a high entropy value indicates diverse color distribution. After constructing the entropy field mapping, a two-dimensional distribution map reflecting the entropy values ​​of all regions can be generated.

[0061] For example, preferably, when using a convolutional neural network to extract features from the entropy field mapping, a multi-layer convolutional structure can be used to extract high-order features. For example, the network contains three convolutional layers, each using a 3×3 convolutional kernel, to extract the spatial pattern of the entropy field distribution. If the entropy value of a certain region exceeds a preset threshold, such as 2.5, it is marked as a target region. Based on this, a heatmap is generated, where brightness reflects differences in complexity, facilitating intuitive analysis. It can be understood that when mapping the pixel distribution of the sixth image based on the heatmap data, pixel values ​​can be adjusted using linear interpolation. For example, if the brightness value of a certain region in the heatmap is 200, after mapping to the sixth image, the pixel value of that region may be proportionally adjusted to the range of 180 to 220. Combining the features of the entropy field mapping, the color complexity distribution of the sixth image can be predicted. For example, the target region may have more color transitions, making it suitable for image segmentation or object detection tasks. It should be noted that the above method, through stepwise processing from pixel distribution to heatmap, can effectively analyze the local and global characteristics of the image. Each step of the process provides a reliable foundation for subsequent analysis, and the generated heatmaps and complexity distributions provide crucial information for image processing tasks.

[0062] Figure 4 A flowchart of a method for obtaining a seventh image is shown, as follows: Figure 4 As shown, it includes the following steps.

[0063] Step S401: The sixth image is divided into multiple local regions by a two-dimensional sliding window, and the pixel color distribution of each local region is determined according to the color complexity distribution of the sixth image.

[0064] Step S402: Determine the information entropy value of each local region according to the pixel color distribution, and compare the information entropy value of each local region with the information entropy threshold.

[0065] Step S403: For the first local region where the information entropy value is higher than the information entropy threshold, the first local region is segmented using a first-granularity segmentation grid.

[0066] Step S404: For the second local region where the information entropy value is lower than the information entropy threshold, the second granularity segmentation grid is used to segment the second local region. In the sub-regions after the segmentation of the second local region, adjacent sub-regions with a similarity of pixel distribution higher than a preset similarity threshold are merged.

[0067] The second particle size is larger than the first particle size.

[0068] Step S405: Use a region boundary smoothing algorithm to adjust the boundaries of all regions to obtain the seventh image with the set of segmented regions identified.

[0069] In this embodiment, by comparing the information entropy value of each local region with the information entropy threshold, an appropriate granularity is selected for segmentation or merging, which better adapts to regions of varying complexity. Using different segmentation grid sizes preserves the details of high-complexity regions while reducing redundant computation in low-complexity regions, improving overall processing efficiency. Furthermore, adjusting all region boundaries using a region boundary smoothing algorithm ensures the quality of the segmented region set, providing a clearer and more accurate reference for subsequent defect detection.

[0070] In some embodiments, the sixth image is segmented and merged based on a preset standard to generate a seventh image with a set of segmented regions. Specifically, the pixel distribution of the sixth image is first obtained and preprocessed using histogram equalization. The sixth image is segmented into multiple local regions using a two-dimensional sliding window, and the pixel color distribution of each local region is determined according to the color complexity distribution of the sixth image. The pixel probability of different colors in each region is determined based on the pixel color distribution of each region, and the information entropy value of each region is calculated to obtain a set of region entropy values. Based on the set of entropy values, the entropy value of each region is compared with an information entropy threshold. If the entropy value of a region is higher than the information entropy threshold, the region is determined to use a first-granularity segmentation grid to obtain a set of first-granularity segmentation grid regions. If the entropy value of a region is lower than the information entropy threshold, a second-granularity segmentation grid is used. By calculating the similarity of pixel distributions of adjacent regions, if the similarity is higher than a preset similarity threshold, adjacent regions are merged to obtain a set of second-granularity merged regions. Finally, the set of first-granularity segmentation grid regions and the set of second-granularity grid regions are merged, and a region boundary smoothing algorithm is used to adjust the boundaries of all regions to generate a set of segmented regions for the seventh image, resulting in the final set of segmented regions.

[0071] As a feasible implementation, when acquiring the pixel distribution of the sixth image, a color space conversion tool can be used to convert the image from RGB format to HSV format to extract hue, saturation, and brightness information. For example, a 512×512 pixel image can generate pixel distribution data containing three channels: hue, saturation, and brightness, facilitating subsequent analysis of color characteristics. It should be noted that the HSV format more intuitively reflects color changes and is suitable for evaluating color complexity. Specifically, when preprocessing the sixth image using histogram equalization, the pixel distribution can be adjusted separately for the brightness channel. For example, assuming the brightness values ​​of the sixth image are concentrated between 80 and 120, histogram equalization can expand the brightness values ​​to 0 to 255, enhancing image contrast and facilitating subsequent region segmentation. This method highlights image details and reduces the interference of low-contrast areas on entropy calculation.

[0072] As a specific implementation, when segmenting the sixth image into multiple local regions using a two-dimensional sliding window, the window size can be set to 64×64 pixels with a stride of 32 pixels to generate overlapping regions. For example, a 1024×1024 pixel image can be segmented into thousands of local regions. The distribution of hue and saturation within each region is statistically analyzed to generate a color histogram for subsequent entropy calculation. This segmentation method captures local color changes and preserves image details. For example, when calculating the pixel color distribution of each region and applying the entropy formula, the probability of each color can be statistically analyzed based on the color histogram. Assuming a region has 128 hues, and a certain hue accounts for 0.2%, its entropy contribution can be obtained by accumulating the probabilities. Preferably, the entropy value set reflects the color diversity of each region, and high-entropy regions typically have rich color transitions.

[0073] For example, in this embodiment, the first granularity segmentation grid refers to a fine-grained segmentation grid, and the second granularity segmentation grid refers to a coarse-grained segmentation grid. For comparing the entropy value with the information entropy threshold, the threshold can be set to 2.0. For example, regions with entropy values ​​higher than 2.0 use a 16×16 pixel first-granularity segmentation grid to generate a first-granularity grid region set. This method preserves the details of the target region, facilitating accurate analysis. Conversely, regions with entropy values ​​lower than 2.0 use a 64×64 pixel second-granularity segmentation grid to reduce computational load. Specifically, when calculating the pixel distribution similarity of adjacent regions, the cosine similarity method can be used. For example, assuming the color histogram vector similarity of two regions is higher than 0.9, they are merged into a single second-granularity region. This merging reduces fragmentation of low-complexity regions and improves segmentation efficiency.

[0074] It should be noted that the similarity threshold should be adjusted according to image characteristics to balance accuracy and efficiency. For example, when adjusting the boundaries of segmented regions using a region boundary smoothing algorithm, gradient-based boundary optimization methods can be used. If a region boundary is jagged, the boundary curve can be smoothed through interpolation to make the segmented region more natural. The final generated seventh image segmentation region set includes both first-granularity and second-granularity regions, adaptable to the analysis needs of regions with varying complexity. It is understandable that the combination of first-granularity and second-granularity grids can flexibly adapt to the local characteristics of the image, and the generated segmentation region set provides a reliable foundation for subsequent image processing tasks. Preferably, boundary smoothing improves the visual consistency of region segmentation, making it suitable for scenarios such as object detection or image enhancement.

[0075] Figure 5 A flowchart of a method for obtaining an eighth image is shown, as follows: Figure 5 As shown, it includes the following steps.

[0076] Step S501: The seventh image, which is identified by a set of segmented regions, is segmented again using a third-granularity segmentation grid, and the entropy boundary of each region in the seventh image after the second segmentation is determined.

[0077] Step S502: Using gradient calculation, analyze the changing gradient values ​​between adjacent entropy value boundaries in the seventh image. If there are target adjacent entropy value boundaries that satisfy the changing gradient value being lower than a preset gradient threshold, then each entropy value boundary in the target adjacent entropy value boundaries is determined as a smoothly changing entropy value boundary.

[0078] Step S503: Mark the regions where all entropy value boundaries satisfy smooth change as stable regions to obtain a set of stable regions.

[0079] Step S504: From the set of stable regions, each stable region is mapped to the corresponding position in the seventh image to serve as a stable region marker, thus obtaining the eighth image marked with stable region markers.

[0080] In this embodiment, the focus is on screening and marking stable regions. By analyzing the gradient values ​​between adjacent entropy boundaries, regions with smooth entropy boundary changes can be accurately identified. These regions typically correspond to parts of the image with relatively uniform color transitions. Marking such stable regions not only reduces noise interference but also improves the accuracy of subsequent boundary region marking. By mapping stable regions to their corresponding positions in the original image as markers, a clear guiding framework is formed, which helps to focus on key areas, simplifies subsequent processing, and improves work efficiency.

[0081] In some embodiments, stable regions whose entropy boundaries all satisfy smooth changes are selected and marked from the segmented region set identified in the seventh image to generate an eighth image marked with stable regions. First, the seventh image marked with the segmented region set is re-segmented using a third-granularity segmentation grid, and the entropy boundary of each region in the re-segmented seventh image is determined. Then, the gradient calculation method is used to analyze the gradient values ​​of the changes between adjacent entropy boundaries in the seventh image. If there are target adjacent entropy boundaries whose gradient values ​​are lower than a preset gradient threshold, then each entropy boundary in the target adjacent entropy boundary is determined as a smoothly changing entropy boundary. Then, regions where all entropy boundaries satisfy smooth changes are marked as stable regions, resulting in a set of stable regions. Finally, from the set of stable regions, each stable region is mapped to the corresponding position in the seventh image as a stable region marker, thereby generating an eighth image marked with stable regions.

[0082] As a feasible embodiment, in this application embodiment, the third granularity is set based on actual needs and is generally set to be smaller than the second granularity. For example, when generating a third-granularity segmentation grid from the segmented region set of the seventh image, the image can be divided into grids of a fixed size, such as 16×16 pixels per grid. This grid division aims to capture detailed features of local regions and is suitable for image processing scenarios requiring high-precision analysis, such as tissue segmentation in medical images. After division, the pixel grayscale values ​​within each grid are extracted for subsequent entropy calculation. Grayscale values ​​typically range from 0 to 255. By statistically analyzing the grayscale distribution of pixels within the grid, the complexity of the region can be preliminarily understood. For example, a uniform distribution of grayscale values ​​within a grid indicates that the region may have high color or texture complexity.

[0083] In one specific embodiment, the entropy value of each grid area can be calculated based on the probability distribution of grayscale values. Entropy reflects the degree of disorder in grayscale information within a grid. For example, if grayscale values ​​are concentrated in a few values ​​within a grid, the entropy value is low, indicating a relatively homogeneous area. Conversely, if the grayscale values ​​are dispersed, the entropy value is high, indicating a complex area. Assuming the probability distribution of grayscale values ​​in a grid is: 50% is 100, 30% is 150, and 20% is 200, its information complexity can be quantified by calculating the entropy value. This method is suitable for distinguishing regions with different properties in an image, such as smooth regions and textured regions. Specifically, when analyzing the gradient values ​​of entropy boundary changes, gradient calculation can be used. The gradient reflects the rate of change of entropy between grids. For example, traversing adjacent grids, if the boundary entropy value of a region is 2.5, and the boundary entropy value of its right region is 2.6, the change is small and can be considered a smooth change. A preset threshold, such as 0.3, is set; if the gradient is below this value, it is marked as a smoothly changing region. This method can effectively identify regions with stable entropy values, avoiding misjudgments due to small fluctuations.

[0084] For example, in a 256×256 pixel image, if a region consists of 10 16×16 grids and the entropy gradient of all regions is less than 0.3, then this region is marked as a stable region. This marking helps focus on key areas in subsequent processing, such as highlighting healthy tissue areas in medical images and reducing redundant analysis of complex boundary areas. When generating stable region markings for the eighth image, a marking generation algorithm can be used to map stable regions to their corresponding locations. The mapping process can be implemented using color encoding; for example, stable regions can be marked green, while other regions remain in their original grayscale. Suppose that in a medical image, a stable region corresponds to healthy lung tissue; after marking, the eighth image will be generated, with the green area visually representing the healthy tissue. This method facilitates rapid identification of target areas by subsequent analysts, improves image interpretability, and helps in quickly locating key regions.

[0085] Understandably, the advantage of the above method lies in its ability to accurately distinguish regions of varying complexity within an image through third-granularity grid segmentation, entropy analysis, and gradient calculation. The generated stable regions further enhance image visualization, facilitating rapid understanding of image content by professionals. This method provides an efficient region segmentation and labeling solution for single business scenarios, such as medical image processing, and is suitable for image input at various resolutions.

[0086] Figure 6 A flowchart of a method for obtaining a ninth image is shown, as follows: Figure 6 As shown, it includes the following steps.

[0087] Step S601: In the stable region of the eighth image identifier, perform edge detection on each pixel to obtain a set of edge pixels.

[0088] Step S602: For the set of edge pixels, calculate the local chromaticity gradient value between adjacent edge pixels respectively, and mark the adjacent edge pixels with chromaticity gradient values ​​greater than the preset gradient threshold as target pixels.

[0089] Step S603: Determine the mean value of the neighboring pixels of each target pixel.

[0090] In step S604a, if there is a target pixel whose pixel value is greater than or equal to the average value of neighboring pixels, then the pixel value of the target pixel is replaced with the average value of the pixels in the neighborhood.

[0091] In step S604b, if there is a target pixel whose pixel value and the average value of neighboring pixels are less than a preset difference threshold, then the target pixel is determined to be a smooth boundary pixel.

[0092] In step S605, in response to the fact that the pixel difference between each target pixel and the average value of its neighboring pixels is less than a preset difference threshold, a region growing algorithm is used to connect adjacent target pixels, and the regions with more than a preset number of connected pixels are marked as boundary regions, thus obtaining the ninth image marked with boundary regions.

[0093] In this embodiment, edge detection is performed on each pixel, and target pixels are determined using local chromaticity gradient values. Then, by calculating the mean of neighboring pixels and smoothing boundary pixels, edge regions in the image can be effectively identified. This method not only improves the accuracy of edge detection but also ensures the continuity and integrity of boundary region marking by connecting adjacent target pixels through a region growing algorithm. This strategy is particularly suitable for applications requiring precise edge information, such as tissue boundary detection in medical imaging.

[0094] In some embodiments, boundary region marking is performed in the stable regions identified in the eighth image to generate a ninth image with marked boundary regions. First, edge detection is performed on each pixel from the stable region markings of the eighth image using the Sobel operator, and then... Edge intensity is obtained, resulting in an edge pixel set. Here, G represents the edge intensity, Gx represents the horizontal grayscale change of a pixel, and Gy represents the vertical grayscale change. For each edge pixel set, its neighboring pixels are obtained, and the local chromaticity gradient value is calculated, where local chromaticity is represented by the difference between each channel in the RGB color space. If the chromaticity gradient value is greater than a preset gradient threshold, it is marked as a target pixel, resulting in the target pixel distribution. Based on the target pixel distribution, mean filtering is used to smooth the edge pixels by replacing the pixel value with the mean of the neighboring pixels. If the difference between the replaced pixel value and the neighborhood mean is less than a preset gradient threshold, it is determined as a smoothed boundary pixel, resulting in a smoothed boundary set. Using the smoothed boundary set, a region growing algorithm is used to connect adjacent smoothed boundary pixels. If the number of connected region pixels is greater than a preset threshold, it is marked as a boundary region, ultimately generating a ninth image marked with boundary regions.

[0095] As a feasible implementation, edge detection using the Sobel operator from stable region markers in the eighth image can focus on lung tissue regions in medical images. The Sobel operator calculates the horizontal gradient Gx and vertical gradient Gy using convolution kernels to capture pixel grayscale changes. For example, in a 256×256 pixel lung CT image, a stable region may contain uniform healthy tissue with minimal grayscale variation. After Sobel scanning, Gx and Gy reflect abrupt grayscale changes at edges, such as the boundary between healthy tissue and lesion areas. Edge strength is generated by combining Gx and Gy using a formula, highlighting strong edge pixels and forming a set of edge pixels. This method effectively identifies tissue boundaries, facilitating subsequent analysis.

[0096] In one specific embodiment, when acquiring neighboring pixels and calculating local chromaticity gradient values ​​for an edge pixel set, the RGB color space can be used. For example, an edge pixel may have RGB values ​​of [120, 100, 80], and its neighboring pixels may have values ​​of [130, 110, 90], with channel differences of [10, 10, 10]. A chromaticity gradient value threshold of 15 is set; if the difference is less than the threshold, the pixel is not considered a target pixel. If the difference is [20, 15, 25], it is marked as a target pixel. This marking method can distinguish regions with drastic color transitions, such as the edges of lesions in lung images, enhancing the visibility of boundary features.

[0097] For example, when performing mean filtering based on the target pixel distribution, a 3×3 neighborhood can be used to calculate the pixel mean. For instance, a target pixel with RGB values ​​of [150, 130, 110] has neighborhood mean values ​​of [145, 128, 108], with a difference of [5, 2, 2]. A difference threshold of 10 is set; pixels with differences less than the threshold are marked as having smoothed boundaries. This smoothing optimization reduces noise interference and makes edges more coherent, making it suitable for scenarios in medical imaging where clear boundaries are required, such as lung nodule detection.

[0098] Preferably, when connecting pixels using a region growing algorithm with a smooth boundary set, expansion can begin from a seed pixel. For example, a smooth boundary pixel is selected as a seed; if its adjacent pixels meet the color similarity condition (e.g., RGB difference less than 5), they are included in the same region. A threshold of 50 pixels is set for the number of pixels in a region; if a region contains 60 pixels, it is marked as a boundary region. This method can generate boundary region markers for the ninth image, highlighting key boundaries in lung images, such as the outline of lesions, facilitating rapid localization by doctors.

[0099] Understandably, the above method optimizes boundary features progressively through layer-by-layer processing, from edge detection to region connectivity. Each step is tailored to the precise analysis needs of medical images, ensuring the accuracy and visibility of boundary markings and providing reliable support for subsequent diagnosis. This method not only improves the accuracy of edge detection but also connects adjacent target pixels through a region growing algorithm, ensuring the continuity and integrity of boundary region markings, making it particularly suitable for applications requiring precise edge information.

[0100] Figure 7 A flowchart of a method for acquiring a second image is shown, as follows: Figure 7 As shown, it includes the following steps.

[0101] Step S701: Obtain the Lab value of each boundary pixel in the boundary pixel set.

[0102] Step S702: Determine the Euclidean distance between the Lab value and the Lab reference value of each boundary pixel, and mark the boundary pixels whose Euclidean distance is greater than the preset distance threshold as specified chromaticity pixels.

[0103] Step S703: Using the covariance matrix, extract the feature vectors of the target number from the three-dimensional dataset composed of the Lab values ​​of the specified chromaticity pixels as the basis vectors of the multidimensional space, and project the Lab values ​​of each specified chromaticity pixel into the multidimensional space to obtain a set of multidimensional feature points.

[0104] Step S704: For each feature point in the high-dimensional feature point set, calculate the chromaticity gradient value between the feature point and its neighboring feature points, and mark the feature points whose chromaticity gradient values ​​are greater than a preset gradient threshold as edge chromaticity feature points.

[0105] Step S705: Aggregate the edge chromaticity feature points within the same boundary region to obtain a chromaticity feature vector. Mark the chromaticity feature vector in the ninth image to obtain a second image marked with the chromaticity feature vector.

[0106] In this embodiment, pixels with color anomalies can be effectively identified by calculating the Euclidean distance between the Lab value of the boundary pixel and the reference value. Using the covariance matrix to extract feature vectors and projecting them into a multidimensional space helps capture the main trends in chromaticity features. Calculating the chromaticity gradient value for each feature point in the high-dimensional feature point set and marking edge chromaticity feature points highlights areas with drastic chromaticity changes, providing strong support for subsequent defect detection. Aggregating edge chromaticity feature points within the same boundary region to form a chromaticity feature vector further enhances the accuracy of defect detection.

[0107] In some embodiments, a set of boundary pixels is extracted from the boundary region markers of the ninth image, and a chromaticity feature vector is extracted based on the set of boundary pixels to generate a second image identified by the chromaticity feature vector. First, the set of boundary pixels is obtained. The chromaticity space conversion formulas L = 116f(Y / Yn) - 16, a = 500(f(X / Xn) - f(Y / Yn)), and b = 200(f(Y / Yn) - f(Z / Zn)) convert RGB values ​​to Lab values, and then the Lab values ​​of each boundary pixel are combined into a set of Lab values. Where L represents lightness, a represents red-green axis chromaticity, b represents yellow-blue axis chromaticity, f(t) = t^(1 / 3), Xn, Yn, and Zn are white point reference values, and X, Y, and Z are tristimulus values ​​after RGB conversion. For the Lab value set, the Euclidean distance between the L, a, and b values ​​of each pixel and the preset Lab reference values ​​is calculated using the formula D = √((L-Lm)^2 + (a-am)^2 + (b-bm)^2), where Lm, am, and bm are the preset Lab reference values. If the Euclidean distance is greater than the preset distance threshold, it is marked as a pixel with a specified chromaticity, and a pixel with a specified chromaticity is obtained. Based on the specified chroma pixel distribution, principal component analysis (PCA) is used to calculate the eigenvectors of the Lab value covariance matrix. Several eigenvectors are selected as basis vectors in a multidimensional space, and the Lab values ​​of the specified chroma pixels are projected onto this space to obtain a high-dimensional feature point set. Using this high-dimensional feature point set, the chroma gradient value between each feature point and its neighboring feature points is calculated, where the chroma gradient value is represented by the difference in Lab values ​​between feature points. If the difference is greater than a preset threshold, it is marked as an edge chroma feature point. Edge chroma feature points in the same boundary region are aggregated to obtain a second image labeled with chroma feature vectors.

[0108] As a feasible implementation, obtaining the boundary pixel set is a crucial step in processing boundary region marking of a ninth image in the field of medical image analysis. Boundary pixels are typically located at the boundary between tissue and background or between lesions and healthy tissue in lung CT images. For example, the boundary region of a lung image may contain edge pixels that have been marked as part of the boundary region through preprocessing. When obtaining these pixels, non-zero pixels can be directly extracted by traversing the binary mask of the boundary region to form the boundary pixel set. This method is simple and efficient, ensuring the accuracy of subsequent colorimetric analysis.

[0109] In one specific embodiment, converting the RGB values ​​of boundary pixels to the CIELAB color space is a crucial step. The CIELAB color space more closely approximates human color perception than RGB, making it suitable for analyzing subtle color differences in medical images. For example, if a boundary pixel has RGB values ​​of [140, 120, 100], the X, Y, and Z values ​​are calculated using an RGB-to-XYZ conversion matrix, and then normalized using a white point reference value to obtain the L, a, and b values. The white point can be, for example, a D65 light source. Assuming a pixel has an L value of 70, an a value of 10, and a b value of 5, forming a set of Lab values, this conversion preserves the independence of lightness and chromaticity, facilitating subsequent analysis.

[0110] For example, when calculating Euclidean distance based on a set of Lab values, a preset Lab baseline value needs to be set. For instance, for the typical chromaticity of healthy tissue in lung images, the preset Lab baseline values ​​are Lm = 65, am = 8, and bm = 3. A pixel with a Lab value of [70, 10, 5] is used, and its deviation from the mean is calculated using the Euclidean distance formula. If the distance is greater than a threshold, such as 10, it is marked as a pixel with the specified chromaticity. This method can effectively distinguish chromaticity abnormalities in lesion areas, such as chromaticity abrupt changes at the edge of lung nodules, and generate a distribution of pixels with the specified chromaticity.

[0111] Specifically, when using principal component analysis (PCA) to process a distribution of pixels with a specified chroma, it is necessary to calculate the covariance matrix of the Lab values. For example, suppose a boundary region contains 100 pixels with a specified chroma, and their Lab values ​​form a 3D dataset. By calculating the covariance matrix, the main eigenvectors are extracted, and the first two eigenvectors are selected as basis vectors in the multidimensional space. The pixel Lab values ​​are then projected into this space to generate a high-dimensional set of feature points. This dimensionality reduction process preserves the main gradient values ​​of the chroma distribution, facilitating subsequent feature extraction.

[0112] For example, in one embodiment, when calculating the chromaticity gradient values ​​of high-dimensional feature points, the differences in Lab values ​​between feature points can be analyzed. For instance, a feature point has a Lab value of [72, 12, 6], and its neighboring feature points have values ​​of [68, 9, 4], with a difference of [4, 3, 2]. If the difference exceeds a threshold, such as 3, it is marked as an edge chromaticity feature point. This method can highlight areas with drastic chromaticity changes, such as the chromaticity transition at the edge of a lesion in lung imaging.

[0113] Preferably, when aggregating edge chromaticity feature points of the same boundary region to obtain a second image labeled with a chromaticity feature vector, the Lab values ​​of the feature points can be grouped by region. For example, if a boundary region contains 50 edge chromaticity feature points, their Lab values ​​can be aggregated to form a feature vector. This feature vector can characterize the chromaticity properties of the boundary region, providing support for subsequent diagnosis.

[0114] Understandably, each step of the above method revolves around the needs of colorimetric analysis in lung images, progressing step by step from pixel extraction to feature vector generation to ensure the integrity and discriminative power of colorimetric features, providing a reliable foundation for accurate medical image analysis. This method not only improves the accuracy of colorimetric analysis but also enhances the ability to identify complex boundary regions through feature vector generation, making it particularly suitable for applications requiring precise colorimetric information.

[0115] Figure 8 A flowchart of a method for acquiring a third image is shown, such as... Figure 8 As shown, it includes the following steps.

[0116] Step S801: Classify the feature vector matrix and iteratively calculate the cluster centers, and obtain the classified region groups after the Euclidean distance of the cluster centers converges.

[0117] Step S802: The second image is segmented into multiple sub-regions. For each sub-region, the entropy gradient value between the sub-region and its neighboring sub-regions is calculated, and the sub-regions with entropy gradient values ​​greater than a preset gradient threshold are marked as complex regions.

[0118] Step S803: If there exists a pair of region groups that satisfy the Euclidean distance between cluster centers being greater than a preset distance threshold, and the pair of region groups belong to complex regions respectively, then a jump region label is set for the pair of region groups to obtain a third image marked with jump regions.

[0119] In this embodiment, by analyzing the convergence of the Euclidean distance between cluster centers, regions with similar chromaticity characteristics can be accurately grouped. Calculating the entropy gradient between sub-regions and marking complex regions accordingly helps identify areas with significant color changes. When a pair of region groups simultaneously satisfies a large distance between cluster centers and belongs to a complex region, a transition region label is set. This method effectively identifies regions with abrupt color changes, providing important clues for defect detection.

[0120] In some embodiments, chromaticity features are obtained from the second image, and a feature vector matrix representing the chromaticity distribution of each pixel is generated based on these features. The feature vector matrix is ​​then standardized to obtain a normalized feature vector matrix. Further, a k-means clustering algorithm is used to classify the normalized feature vector matrix, and after iteratively calculating the cluster centers and ensuring the Euclidean distance between the cluster centers converges, a region classification result is generated, resulting in classified region groups. Simultaneously, the second image is segmented into multiple sub-regions using a grid, and the information entropy is calculated for each sub-region to obtain the entropy gradient. If the entropy gradient is greater than a preset threshold, the sub-region is determined to have color complexity, resulting in a set of complex regions. Finally, the classified region groups and the set of complex regions are combined to calculate the Euclidean distance between the cluster centers within each region group. If the Euclidean distance is greater than a preset distance threshold, and the corresponding region belongs to the set of complex regions, a color jump is determined, and a third image identifying the jump region is generated.

[0121] As a feasible implementation, when acquiring chromaticity features from a second image, the chromaticity distribution of pixels can be analyzed using histogram statistics. The core of histogram statistics lies in counting the chromaticity values ​​of image pixels by interval to form a distribution map. For example, assuming the second image is in RGB format, the chromaticity values ​​of each channel can be divided into 256 intervals, and the number of pixels within each interval can be counted to generate a three-dimensional histogram. This method can intuitively reflect the chromaticity concentration trend of the image. Preferably, the histogram data can be organized into a feature vector matrix, where each row represents the chromaticity distribution feature of a pixel, and the number of columns corresponds to the number of histogram intervals, such as 256×3 dimensions.

[0122] In one specific embodiment, the min-max normalization method can be used to standardize the feature vector matrix. Specifically, assuming the maximum value of a column is 255 and the minimum value is 0, all values ​​in that column can be mapped to the range [0,1]. For example, the original value of the R channel of a pixel is 200, and after normalization, it becomes 200 / 255≈0.784. This standardization method can effectively eliminate the dimensional differences between different channels, facilitating subsequent cluster analysis. It can be understood that the standardized feature vector matrix preserves the relative relationship of chromaticity distribution, enhancing the consistency and comparability of features.

[0123] For example, when using the k-means clustering algorithm to classify a normalized feature vector matrix, the number of clusters k can be set to 4, dividing pixels into 4 chromaticity categories. During the iteration process, 4 cluster centers are first randomly initialized. Then, the Euclidean distance between each feature vector and each cluster center is calculated, and the feature vector is assigned to the nearest cluster center. When, after a certain iteration, the change in the cluster center position is less than a preset threshold, such as 0.01, the clustering process is considered to have converged. For example, a cluster center with initial coordinates (0.5, 0.3, 0.7) stabilizes at (0.51, 0.31, 0.69) after multiple iterations, thus generating a region classification result. This classification method can divide an image into multiple regions with similar chromaticity characteristics.

[0124] In one possible implementation, when segmenting the second image into multiple sub-regions using grid partitioning, the image can be divided into 100 grids of 10×10, with each grid serving as a sub-region. The information entropy of each sub-region is calculated to reflect the degree of disorder in the chromaticity distribution within that region. For example, a sub-region with a relatively uniform chromaticity distribution might have a high information entropy, such as 2.5, while another sub-region might have a concentrated chromaticity distribution and a low information entropy, such as 1.2. If the entropy gradient between adjacent sub-regions exceeds a preset threshold, such as 0.5, it is marked as a region with complex color. This method can effectively identify regions with drastic chromaticity changes, providing a foundation for subsequent transition analysis.

[0125] For example, when performing color abrupt change analysis by combining region grouping and complex region sets, the Euclidean distance between two cluster centers can be calculated. Suppose the coordinates of two centers are (0.4, 0.2, 0.6) and (0.7, 0.5, 0.9), and the distance between them is 0.52. If this distance is greater than a preset distance threshold, such as 0.3, and the corresponding region belongs to a complex region set, then a color abrupt change is determined to exist, and a third image identifying the abrupt change region is generated. This abrupt change region reflects a significant feature of abrupt color changes in the image and may correspond to edges or texture transition regions.

[0126] It should be noted that the above method, through a multi-layered image analysis process, forms a complete feature extraction mechanism from chromaticity distribution to regional transitions. Each step supports the others, ensuring comprehensive capture of key chromaticity features in the image. For example, histogram statistics provide basic data support, standardization and clustering enhance the discriminative power of features, and information entropy and transition analysis further highlight the feature representation of complex regions. This logically progressive design structure helps improve the accuracy and robustness of chromaticity feature extraction, making it suitable for visual detection tasks of imaging defects in low grayscale images of OLED displays.

[0127] Preferably, the above method is not only applicable to professional fields such as medical imaging, but can also be widely used in industrial inspection, image enhancement and quality assessment, etc., and has good versatility and scalability.

[0128] Figure 9 A flowchart of a method for obtaining a fourth image is shown, as follows: Figure 9 As shown, it includes the following steps.

[0129] Step S901: For each transition region, determine the chromaticity feature vector according to the chromaticity value data to obtain the feature vector set.

[0130] Step S902: Determine the chromaticity distribution of each transition region through the feature vector set, and determine the chromaticity standard deviation of each transition region according to the chromaticity distribution.

[0131] Step S903: If there is a target transition region that satisfies that the chromaticity standard deviation is higher than the preset standard deviation threshold and the entropy gradient in the target transition region is greater than the preset gradient threshold, then a marker is set for the target transition region to characterize that the dispersion distribution conforms to the preset dispersion range, and a fourth image marked with dispersion distribution is obtained.

[0132] In this embodiment, by calculating the chromaticity standard deviation of each transition region and comparing it with a preset threshold, regions with high dispersion can be distinguished. This method helps identify regions containing multiple color mixtures, providing a basis for further defect analysis. Setting specific markers for target transition regions with high dispersion facilitates rapid location and analysis of potential imaging defects, improving detection efficiency and accuracy.

[0133] In some embodiments, transition regions are extracted from a third image, and a fourth image labeled with discrete distribution information is generated based on these transition regions. First, a region segmentation algorithm is used to identify and extract transition regions from the third image, obtaining chromaticity value data within these regions and calculating chromaticity feature vectors to obtain a feature vector set. For the feature vector set, statistical analysis methods are used to calculate the chromaticity distribution, obtaining the corresponding chromaticity distribution data, and then applying the formula σ=√(Σ(x)). i -μ) 2 The standard deviation is calculated using the formula / N) to obtain the dispersion data. Here, σ is the standard deviation, and x... i Here, μ is the chromaticity value, N is the mean, and N is the number of samples. If the standard deviation is higher than the preset standard deviation threshold, the entropy gradient between adjacent regions is further calculated to determine the change in entropy gradient within the transition region, thereby identifying the data in the high-dispersion region. Finally, based on the data in the high-dispersion region, an image drawing tool is used to generate a fourth image labeled with the dispersion distribution information.

[0134] As a feasible implementation, when extracting abrupt color transition regions from a third image, a region segmentation algorithm, such as a graph-cut-based image segmentation method, can be employed. For example, suppose the third image is an image containing multiple color transitions, and the abrupt color transition region is the boundary portion where the color changes abruptly. Using a graph-cut algorithm, pixels in the image are treated as nodes in a graph, and the chromaticity differences between pixels are used as edge weights, thereby segmenting the abrupt color transition region. For example, the abrupt color transition region might be a rectangular area containing 500 pixels where the color abruptly changes from red to blue. This method can effectively capture significant color transition locations in the image.

[0135] In one specific embodiment, when acquiring the chromaticity value data of the transition region, chromaticity information can be extracted using either the RGB or HSV color space. Preferably, the HSV color space is used because its hue components more intuitively reflect color changes. For example, assuming that the chromaticity values ​​of the transition region are mainly concentrated near blue and green, i.e., the H values ​​are concentrated around 240 and 120, the H value of each pixel is collected, forming a set containing 500 chromaticity values. This acquisition method facilitates subsequent in-depth analysis of color distribution patterns.

[0136] For example, when calculating the chromaticity distribution of a set of feature vectors, a histogram statistical method can be used. Histograms can visually display the frequency distribution of chromaticity values. In one possible implementation, the chromaticity values ​​are divided into 10 intervals, and the number of pixels in each interval is counted. For example, the blue region (H value 230–250) contains 300 pixels, the green region (H value 110–130) contains 150 pixels, and the remaining regions have fewer pixels. This distribution reflects the concentration and transitional characteristics of color in transitional regions.

[0137] It's important to note that standard deviation measures the dispersion of chromaticity values ​​within a transition region. For example, assuming the mean of the chromaticity values ​​is 180, the calculated standard deviation is 40, which is higher than the preset threshold of 30. This indicates that the chromaticity values ​​in the transition region are relatively dispersed, potentially indicating a mixture of multiple colors. Compared to relying solely on mean analysis, standard deviation is more sensitive to capturing color heterogeneity, helping to identify complex regions.

[0138] In one embodiment, if the standard deviation exceeds a set threshold, the entropy gradient between adjacent sub-regions is further calculated to analyze color complexity. Specifically, entropy reflects the randomness of chromaticity distribution. For example, based on histogram data, if the probability of a blue region is 0.6, the probability of a green region is 0.3, and the probability of other regions is 0.1, the entropy value is high, indicating disordered color distribution. The entropy gradient identifies regions with high color complexity by comparing the changes in entropy values ​​of adjacent sub-regions. For example, if the entropy value of a sub-region suddenly increases from 1.2 to 1.8, the gradient change is significant, and it is marked as a highly discrete region.

[0139] Preferably, when generating the fourth image labeled with discrete distribution information, an image rendering tool such as OpenCV can be used for visualization. For example, high-dispersion areas are marked in red, and low-dispersion areas are marked in green, forming a color-coded distribution map. For instance, the distribution map shows that the center of a transitional region is red, indicating a sharp color change. The edge regions are green, indicating a more uniform color. This visualization method allows analysts to quickly identify significant areas of color transition.

[0140] Understandably, the above method, through a multi-layered image analysis process, forms a logically rigorous and mutually supportive analytical chain, from chromaticity distribution to dispersion and then to distribution maps. For example, chromaticity distribution provides the foundation for standard deviation analysis, while entropy gradient further verifies the significance of dispersion, and finally, the analysis results are presented intuitively through image rendering. This progressive analytical structure not only improves the accuracy of identifying complex color regions but also enhances the interpretability of image analysis results, making it suitable for visual detection tasks of imaging defects in low grayscale images of OLED displays.

[0141] Preferably, this method is not limited to medical image analysis, but can also be widely applied to fields such as industrial quality inspection, image enhancement, and quality assessment, and has good versatility and scalability.

[0142] This application also provides system embodiments that follow the above embodiments, for implementing the method steps of the above embodiments. The interpretation of the same names is the same as that of the above embodiments, and they have the same technical effects as those of the above embodiments, so they will not be repeated here.

[0143] like Figure 10 As shown, this application provides a visual inspection system for low grayscale image imaging defects in OLED displays, comprising:

[0144] The data extraction unit 1001 is used to extract grayscale images with an average pixel brightness value lower than a preset brightness threshold from the original image data of the display screen as a first image, and to perform color characteristic analysis on the first image to generate a second image with a chromaticity feature vector.

[0145] Processing unit 1002 is configured to: generate a feature vector matrix representing the chromaticity distribution of each pixel in the second image based on the chromaticity feature vector identified by the second image; perform color jump analysis using the feature vector matrix to obtain a third image with identified jump regions; extract jump regions in the third image and set labels to distinguish different discrete distributions according to the discrete distribution of the jump regions relative to the chromaticity distribution, to obtain a fourth image with identified discrete distributions; and classify pixels in the jump regions based on the discrete distribution identified by the fourth image and in conjunction with chromaticity anomalous pixel regions in the jump regions, and set defect labels for pixels with imaging defects as indicated by the classification results, to obtain a fifth image with labeled defective pixel locations.

[0146] Regarding the system in the above embodiments, the specific manner in which each module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0147] Although the operations are described in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all of the operations shown to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.

[0148] The methods, systems, devices, and storage media of this application can be implemented using standard programming techniques, and various method steps can be implemented using rule-based logic or other logic. It should also be noted that the terms "system" and "module" as used herein and in the claims are intended to include implementations using one or more lines of software code and / or hardware implementations and / or devices for receiving input.

[0149] Any step, operation, or procedure described herein may be performed or implemented using one or more hardware or software modules, either alone or in combination with other devices. In one embodiment, the software module is implemented using a computer program product comprising a computer-readable medium containing computer program code, which is executable by a computer processor to perform any or all of the described steps, operations, or procedures.

[0150] The foregoing description of implementations of this application has been provided for illustrative and descriptive purposes. The foregoing description is not exhaustive and is not intended to limit this application to the exact forms disclosed. Various modifications and variations may exist in accordance with the foregoing teachings, or may arise from practice of this application. These embodiments were chosen and described to illustrate the principles of this application and its practical application, enabling those skilled in the art to utilize this application in various implementations and modifications to suit the specific purpose of the concept.

[0151] Regarding the system in the above embodiments, the specific manner in which each module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0152] It can be further understood that, unless otherwise specified, "connection" includes both direct connections where no other components exist between the two parties and indirect connections where other components exist between them.

[0153] It is further understood that although the operations are described in a specific order in the accompanying drawings in the embodiments of this application, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all the operations shown to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.

[0154] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the field of this application that are not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0155] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

[0156] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A visual detection method for low grayscale image imaging defects in an OLED display, characterized in that, include: For the original image data of the display screen, a grayscale image with an average pixel brightness value lower than a preset brightness threshold is extracted as the first image, and color characteristic analysis is performed on the first image to generate a second image with a chromaticity feature vector. Based on the chromaticity feature vector of the second image identifier, a feature vector matrix is ​​generated to characterize the chromaticity distribution of each pixel in the second image, and color jump analysis is performed through the feature vector matrix to obtain a third image with jump regions identified. Extract the transition region from the third image, and set a marker to distinguish different discrete distributions according to the discrete distribution of the transition region with respect to the chroma distribution, to obtain a fourth image marked with the discrete distribution; Based on the discrete distribution of the fourth image identifier, combined with the color aberration pixel region in the transition region, pixel classification is performed in the transition region, and defect markers are set for pixels that represent imaging defects in the classification results, thus obtaining a fifth image marked with defect pixel locations.

2. The method according to claim 1, characterized in that, The analysis of the color characteristics of the first image to generate a second image identified by a chromaticity feature vector includes: The color complexity distribution feature is predicted on the first image to obtain a sixth image that is identified with the color complexity distribution feature; Based on a preset standard, the sixth image is segmented and merged to obtain a seventh image with a set of segmented regions identified. In the set of segmented regions identified by the seventh image, stable regions whose entropy boundaries all satisfy smooth changes are selected and marked to obtain the eighth image marked with stable regions. Boundary regions are marked in the stable region identified in the eighth image to obtain a ninth image with marked boundary regions. A set of boundary pixels is extracted from the boundary region identified in the ninth image, and a chromaticity feature vector is extracted based on the set of boundary pixels to obtain a second image identified with a chromaticity feature vector.

3. The method according to claim 2, characterized in that, The step of predicting the color complexity distribution features of the first image to obtain a sixth image identified by the color complexity distribution features includes: Based on the pixel distribution of the first image, the first image is divided into multiple local regions, and the pixel color distribution of each local region is calculated to obtain local statistical data. For each of the local regions, calculate the color entropy value and construct an entropy field mapping that includes the color entropy value of each local region; Feature extraction is performed on the entropy field mapping, and local areas with color entropy values ​​higher than a preset threshold are marked as target areas to generate a heat map reflecting color complexity. Based on the heatmap data, a linear interpolation method is used to map the pixel distribution of the first image, and combined with the feature data extracted from the entropy field mapping, the color complexity distribution features of the mapped first image are predicted to obtain a sixth image with color complexity distribution features.

4. The method according to claim 2, characterized in that, The process of segmenting and merging the sixth image based on a preset standard to obtain a seventh image with a set of segmented regions includes: The sixth image is divided into multiple local regions using a two-dimensional sliding window, and the pixel color distribution of each local region is determined according to the color complexity distribution of the sixth image. Based on the pixel color distribution, the information entropy value of each local region is determined, and the information entropy value of each local region is compared with the information entropy threshold. For a first local region in the local region whose information entropy value is higher than the information entropy threshold, a first-granularity segmentation grid is used to segment the first local region. For a second local region in the local region whose information entropy value is lower than the information entropy threshold, a second-granularity segmentation grid is used to segment the second local region. In the sub-regions after the segmentation of the second local region, adjacent sub-regions with a similarity of pixel distribution higher than a preset similarity threshold are merged. The second granularity is greater than the first granularity. A region boundary smoothing algorithm was used to adjust the boundaries of all regions, resulting in a seventh image with a set of segmented regions.

5. The method according to claim 2, characterized in that, In the set of segmented regions identified in the seventh image, stable regions whose entropy boundaries all satisfy smooth changes are selected and marked, resulting in an eighth image marked with stable regions, including: The seventh image, which is identified by a set of segmented regions, is further segmented using a third-granularity segmentation grid, and the entropy boundary of each region in the seventh image after the further segmentation is determined. Using gradient calculation, the gradient values ​​between adjacent entropy value boundaries in the seventh image are analyzed. If there is a target adjacent entropy value boundary that satisfies the gradient value being lower than a preset gradient threshold, then each entropy value boundary in the target adjacent entropy value boundary is determined as a smoothly changing entropy value boundary. Regions in which all the entropy value boundaries satisfy a smooth change are marked as stable regions, thus obtaining a set of stable regions; From the set of stable regions, each stable region is mapped to a corresponding position in the seventh image to serve as a stable region marker, resulting in an eighth image marked with the stable region marker.

6. The method according to claim 2, characterized in that, The step of marking boundary regions in the stable region identified in the eighth image to obtain a ninth image with marked boundary regions includes: In the stable region of the eighth image identifier, edge detection is performed on each pixel to obtain a set of edge pixels; For the set of edge pixels, calculate the local chromaticity gradient value between adjacent edge pixels, and mark the adjacent edge pixels whose chromaticity gradient value is greater than a preset gradient threshold as target pixels; Determine the mean value of the neighboring pixels of each target pixel; If there exists a target pixel whose pixel value is greater than or equal to the average value of its neighboring pixels, then the pixel value of the target pixel is replaced with the average value of the pixels in the neighborhood. If there exists a target pixel whose pixel value and the average value of its neighboring pixels are less than the preset difference threshold, then the target pixel is determined to be a smooth boundary pixel. In response to the fact that the pixel difference between each target pixel and the average value of its neighboring pixels is less than the preset difference threshold, a region growing algorithm is used to connect adjacent target pixels, and regions with more than the preset number of connected pixels are marked as boundary regions, thus obtaining a ninth image with marked boundary regions.

7. The method according to claim 2, characterized in that, The step of extracting chromaticity feature vectors from the boundary pixel set to obtain a second image identified by chromaticity feature vectors includes: Obtain the Lab value of each boundary pixel in the boundary pixel set; Determine the Euclidean distance between the Lab value and the Lab reference value for each boundary pixel, and mark the boundary pixels whose Euclidean distance is greater than a preset distance threshold as specified chromaticity pixels; Using the covariance matrix, feature vectors representing the target number of pixels are extracted from the three-dimensional dataset composed of the Lab values ​​of the specified chromaticity pixels as basis vectors in the multidimensional space. The Lab values ​​of each specified chromaticity pixel are then projected onto the multidimensional space to obtain a set of multidimensional feature points. For each feature point in the high-dimensional feature point set, the chromaticity gradient value between the feature point and its neighboring feature points is calculated, and feature points whose chromaticity gradient value is greater than a preset gradient threshold are marked as edge chromaticity feature points. The edge chromaticity feature points within the same boundary region are aggregated to obtain a chromaticity feature vector. The chromaticity feature vector is then marked in the ninth image to obtain a second image marked with the chromaticity feature vector.

8. The method according to claim 1, characterized in that, The step of performing color transition analysis using the feature vector matrix to obtain a third image marked with transition regions includes: The feature vector matrix is ​​classified and cluster centers are calculated iteratively. After the Euclidean distance of the cluster centers converges, the classified region groups are obtained. The second image is segmented into multiple sub-regions. For each sub-region, the entropy gradient value between the sub-region and its neighboring sub-regions is calculated. Sub-regions whose entropy gradient is greater than a preset gradient threshold are marked as complex regions. If there exists a pair of region groups that satisfy the Euclidean distance between cluster centers being greater than a preset distance threshold, and the pair of region groups respectively belong to the complex region, then a jump region label is set for the pair of region groups to obtain a third image marked with jump regions.

9. The method according to claim 1, characterized in that, The step of setting a marker to distinguish different dispersion distributions based on the dispersion distribution of the chroma distribution in the transition region, and obtaining a fourth image marked with the dispersion distribution, includes: For each of the aforementioned transition regions, a chromaticity feature vector is determined according to the chromaticity value data to obtain a feature vector set; The chromaticity distribution of each transition region is determined by the set of feature vectors, and the chromaticity standard deviation of each transition region is determined according to the chromaticity distribution. If a target transition region exists that satisfies a chromaticity standard deviation value higher than a preset standard deviation threshold, and the entropy gradient within the target transition region is greater than a preset gradient threshold, then a marker is set for the target transition region to characterize that the dispersion distribution conforms to a preset dispersion range, resulting in a fourth image marked with the dispersion distribution.

10. A visual inspection system for low grayscale image imaging defects in an OLED display, characterized in that, include: The data extraction unit is used to extract grayscale images with an average pixel brightness value lower than a preset brightness threshold from the original image data of the display screen as the first image, and to perform color characteristic analysis on the first image to generate a second image with a chromaticity feature vector. The processing unit is configured to generate a feature vector matrix representing the chromaticity distribution of each pixel in the second image based on the chromaticity feature vector of the second image identifier, and perform color jump analysis through the feature vector matrix to obtain a third image with jump regions identified; and to extract the jump regions in the third image, and set labels to distinguish different discrete distributions according to the discrete distribution of the jump regions with respect to the chromaticity distribution, to obtain a fourth image with the discrete distribution identified. And a fifth image is obtained by classifying pixels in the transition region based on the discrete distribution of the fourth image identifier, combined with the chromatic aberration pixel region in the transition region, and setting defect markers for pixels that characterize imaging defects in the classification results.

Citation Information

Cited By

  • Machine vision-based color difference defect detection method for color presswork

    CN121904012A

  • Circuit board production detection method and system based on machine vision and medium

    CN122016866A