A monochromatic liquid crystal display module image processing method and system
By adjusting the image size, sharpening processing and building an image pyramid, combining entropy calculation and dynamic threshold adjustment, the problem of insufficient image hierarchy and detailed performance in traditional grayscale methods is solved, and a more natural brightness hierarchy reflection and contrast improvement is achieved.
Patent Information
- Application Number
- CN202510572954.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-05-06
AI Technical Summary
In the prior art, traditional grayscale methods cannot dynamically adjust the color weight according to the image content, resulting in some images losing important color information after grayscale, unable to accurately reflect the image hierarchy, and lack targeted details processing during the binarization process, resulting in insufficient contrast and detailed expression of the final image.
By acquiring the source image and adjusting its size to match the resolution of the monochrome liquid crystal display module, after graying, using sharpening filters to enhance details, construct a multi-scale image pyramid, analyze texture features and calculate entropy values, dynamically adjust the threshold for binary processing, and dynamically adjust the weights based on color distribution features.
The brightness level reflection of grayscale images is realized closer to the real scene, improving the contrast and detail expressiveness of the image, and enhancing the image detection and analysis functions.
Smart Images

Figure CN120107240B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of monochromatic image processing, and particularly to a method and system for processing images of a monochromatic liquid crystal display module. Background Art
[0002] As an important display technology, liquid crystal display technology has been widely applied and developed in recent years. With the progress of technology, the performance of liquid crystal display modules has been continuously improved, and the application fields have also become increasingly extensive. However, in the prior art, traditional grayscale processing usually uses fixed color weights and cannot be dynamically adjusted according to the image content, resulting in the loss of important color information in some images after grayscale processing and being unable to accurately reflect the levels of the images. Moreover, in the binarization process, there is a lack of targeted detail processing, resulting in insufficient contrast and detail expressiveness in the final image. Summary of the Invention
[0003] In view of the technical problems in the above background art, the present invention proposes a method and system for processing images of a monochromatic liquid crystal display module, and the technical solutions adopted are as follows:
[0004] A method for processing images of a monochromatic liquid crystal display module, the method comprising:
[0005] S1: Obtain a source image, adjust the size of the source image so that the size of the source image is consistent with the size of the monochromatic liquid crystal display module, and perform grayscale processing on the source image after size adjustment to obtain a grayscale image;
[0006] S2: Perform sharpening processing on the grayscale image to obtain a grayscale image with clear details;
[0007] S3: Perform downsampling processing on the processed grayscale image, arrange the grayscale image in a pyramid form from top to bottom in descending order of resolution according to different resolutions to capture texture features at different resolutions;
[0008] S4: Calculate the entropy of each layer of the pyramid, determine the optimal threshold for each layer according to the value obtained from the entropy calculation, and combine the weights of each layer to obtain a comprehensive optimal threshold, and perform binarization processing on the grayscale image obtained in S1 through the optimal threshold to obtain a black-and-white image.
[0009] Preferably, the S1 includes:
[0010] S11: Obtain the size parameters of the monochromatic liquid crystal display module, and adjust the resolution of the source image to be consistent with the size of the monochromatic liquid crystal display module;
[0011] S12: Obtain the color distribution characteristics in the source image, obtain the ratios of red pixels, green pixels, and blue pixels in the source image to the total number of pixels, and allocate the weights of the three colors during the image grayscale conversion according to the ratios of the three colors.
[0012] Preferably, the S2 includes:
[0013] S21: Convolve the grayscale image through a filter to obtain enhanced details, and add the enhanced details to the grayscale image;
[0014] S22: Crop the sharpened image so that the pixel values of the sharpened image are between [1, 255].
[0015] Preferably, the S3 includes:
[0016] S31: Construct a multi-scale image pyramid. The top-layer image in the pyramid maintains the original resolution, and as the pyramid goes down, the resolution of each layer of the image is lower than the previous layer, forming an image pyramid;
[0017] S32: Analyze the texture features of the image for each layer of the pyramid to obtain the texture feature values of the image.
[0018] Preferably, the S32 includes: Analyze the texture features of the image. The analysis method includes: binary local analysis, and the specific method is as follows:
[0019] Step 1: For each pixel in each layer of the image, set a circle with a radius of r as the neighborhood, and use the pixel closest to the center of the circle as the central pixel. As the pyramid layer decreases, that is, as the image resolution decreases, the radius of the circle also decreases accordingly;
[0020] Step 2: Compare the grayscale values of the pixels within the circular neighborhood with the grayscale value of the central pixel. If the value of the neighborhood pixel is greater than or equal to the value of the central pixel, mark it as 1; otherwise, mark it as 0;
[0021] Step 3: For each pixel in the image, perform the calculations in Step 1 to Step 2 to obtain a local binary histogram;
[0022] Step 4: Perform variance calculation according to the local binary histogram to obtain the texture feature values of each layer of the image.
[0023] Preferably, the S4 includes:
[0024] S41: In any layer of the image pyramid, traverse all grayscale values T as thresholds to divide the image of this layer into foreground and background. Among them, the pixel grayscale values in the range of [0, T] belong to the foreground, and the pixel grayscale values in the range of [T + 1, 255] belong to the background;
[0025] S42: Determine the entropy values of the foreground and background, and based on the entropy values of the foreground and background and the texture feature values of the current layer, obtain the entropy value of the current layer image. After the entropy value of the current layer image reaches the maximum value, select the gray value T as the optimal threshold;
[0026] S43: Determine the optimal threshold for each layer and obtain the comprehensive optimal threshold. Compare each pixel in the grayscale image with the comprehensive optimal threshold according to the comprehensive optimal threshold. When the pixel grayscale value in the image is less than the comprehensive optimal threshold, set the pixel to black. When the pixel grayscale value in the image is greater than the comprehensive optimal threshold, set the pixel to white.
[0027] A monochrome liquid crystal display module image processing system, characterized in that the system includes:
[0028] Image grayscale system: Obtain the source image, adjust the size of the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and perform grayscale processing on the resized source image to obtain a grayscale image;
[0029] Sharpening system: Perform sharpening processing on the grayscale image to obtain a grayscale image with clear details;
[0030] Downsampling system: Perform downsampling processing on the processed grayscale image, arrange the grayscale image in a pyramid form from top to bottom in descending order of resolution according to different resolutions to capture texture features at different resolutions;
[0031] Binarization system: Calculate the entropy for each layer of the pyramid, determine the optimal threshold for each layer according to the calculated entropy value, and combine the weights of each layer to obtain the comprehensive optimal threshold. Perform binarization processing on the grayscale image obtained in S1 through the optimal threshold to obtain a black and white image.
[0032] Preferably, the image grayscale system includes:
[0033] Size adjustment system: Obtain the size parameters of the monochrome liquid crystal display module and adjust the resolution of the source image to be consistent with the size of the monochrome liquid crystal display module;
[0034] Color weight adjustment system: Obtain the color distribution characteristics in the source image, and dynamically adjust the weights during the grayscale process according to the proportion of the components of the three primary colors of red, green, and blue in the source image.
[0035] Preferably, the sharpening system includes:
[0036] Detail enhancement system: Convolve the grayscale image through a filter to obtain enhanced details and add the enhanced details to the grayscale image;
[0037] Image Cropping System: Crop the sharpened image so that the pixel values of the sharpened image are between [1, 255].
[0038] Preferably, the downsampling system includes:
[0039] Image Pyramid Construction System: Construct a multi-scale image pyramid. The top-level image of the pyramid maintains the original resolution, and as the pyramid goes down, the resolution of each layer of the image is lower than the previous layer, forming an image pyramid;
[0040] Image Texture Analysis System: Analyze the texture features of the image for each layer of the pyramid to obtain the texture feature values of the image.
[0041] Advantages of the present invention: The present invention dynamically adjusts the grayscale weight according to the proportion of the red, green, and blue components in the image, making the grayscale image closer to the real scene and reflecting a more natural brightness level and contrast. Calculate the entropy for each layer of the image, select the optimal global threshold for binarization processing, and improve the global contrast of the image. Through comprehensive weight analysis, reconcile the optimal thresholds of multiple layers of images, and the optimization effect on the detection and analysis functions is significant. Description of the Drawings
[0042] Figure 1 This is a method for processing images of a monochromatic liquid crystal display module according to the present invention. Detailed Embodiments
[0043] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only for the purpose of illustrating and explaining the present invention, and are not used to limit the present invention.
[0044] An embodiment of the present invention, a method for processing images of a monochromatic liquid crystal display module, the method includes:
[0045] S1: Obtain the source image, adjust the size of the source image so that the size of the source image is consistent with the size of the monochromatic liquid crystal display module, and perform grayscale processing on the resized source image to obtain a grayscale image;
[0046] S2: Perform sharpening processing on the grayscale image to obtain a grayscale image with clear details;
[0047] S3: Perform downsampling processing on the processed grayscale image, arrange the grayscale image in a pyramid form from top to bottom according to different resolutions from large to small, so as to capture the texture features at different resolutions;
[0048] S4: Calculate the entropy for each layer of the pyramid, determine the optimal threshold for each layer based on the calculated entropy value, and combine the weights of each layer to obtain a comprehensive optimal threshold. Binarize the grayscale image obtained in S1 using the optimal threshold to obtain a black-and-white image.
[0049] The working principle and effects of the above technical solution are as follows: Obtain the source image from an input device or file. Modify the image size to meet the resolution requirements of the monochrome liquid crystal display module to ensure that the image is displayed without distortion on the display module. Convert the resized image to a grayscale image. Grayscale conversion is achieved by calculating the brightness of each pixel in the original image and dynamically adjusting the weighting values of the color channels. After the image size is adjusted, details at the image edges will be lost. Therefore, a sharpening filter is used to enhance the edges and details of the image, highlighting the edges of the image. Perform multi-level downsampling on the sharpened grayscale image to create an image pyramid. The resolution of each layer of the image decreases gradually. At different resolutions, the texture features of the image are significantly different. Through each layer of the pyramid, by utilizing the differential features, while adapting to the resolution change, the features are kept intact. At each layer of the pyramid, calculate the entropy based on the pixel grayscale probability distribution. The entropy value is used to quantify the complexity or information content of the image. For each layer of the image, determine the optimal binarization threshold by maximizing the entropy of the foreground and background. Combine the optimal thresholds of each layer to calculate the final comprehensive optimal threshold. Process the initially obtained grayscale image using the comprehensive optimal threshold, set the pixels with grayscale values lower than the threshold to black, and other pixels to white, thereby generating the final black-and-white image. By adjusting the image size to match the specifications of the display module and through sharpening, the edges and details of the image are emphasized, ensuring that the image is not distorted or deformed. By capturing the texture features at different resolutions through the image pyramid, most of the image features can be retained while reducing the computational complexity. Using entropy calculation to select the optimal threshold for each layer ensures a binarization result that maximizes information retention. Entropy optimization not only improves the accuracy of image segmentation but also enhances the consistency of image features in the final display.
[0050] In an embodiment of the present invention, the S1 includes:
[0051] S11: Obtain the size parameters of the monochrome liquid crystal display module, and adjust the resolution of the source image to be consistent with the size of the monochrome liquid crystal display module;
[0052] S12: Obtain the color distribution characteristics in the source image, obtain the ratios of red pixels, green pixels, and blue pixels in the source image to the total number of pixels, and allocate the weights of the three colors during the image grayscale conversion according to the ratios of the three colors.
[0053] The working principle and effects of the above technical solution are as follows: First, obtain the physical size and resolution of the monochrome liquid crystal display module from the hardware configuration or system interface. According to the size parameters of the display module, scale the source image. Make the resolution of the image match the display module to ensure that the image is not distorted or stretched in monochrome display. For the source image, calculate the total number of red, green, and blue pixels one by one. Calculate the proportion of red, green, and blue pixels in the total number of pixels respectively. And use the said proportion as the weight for image grayscale conversion, and assign it to the three colors in the grayscale conversion process. By dynamically calculating the weight and adjusting the grayscale conversion process according to the actual color distribution of the image, the grayscale image can more realistically maintain the brightness and contrast characteristics of the original image. The details of the source image can be better presented in the grayscale image, especially when the proportions of different colors in the image vary greatly.
[0054] In one embodiment of the present invention, S2 includes:
[0055] S21: Convolve the grayscale image through a filter to obtain enhanced details, and add the enhanced details to the grayscale image;
[0056] S22: Crop the sharpened image so that the pixel values of the sharpened image are between [1, 255].
[0057] The working principle and effects of the above technical solution are as follows: Select a high-frequency enhancement filter to convolve the grayscale image, and the resulting image represents the enhanced part of the detail features and edge information. Combine the enhanced detail image with the original grayscale image. This is completed simply by adding the two images. The result is a detail-enhanced image that reflects more edge and texture information. Due to the convolution and superposition operations in the previous step, the sharpened image may contain some pixel values that exceed the range of [0, 255]. To ensure that all pixels are within the legal range, these values need to be cropped. Traverse the sharpened image, set all pixel values below 1 to 1, and set all pixel values above 255 to 255. The finally obtained image is an image with enhanced details and all pixel values within the legal range of [1, 255]. Through the action of the high-frequency enhancement filter, the important edges and details in the grayscale image are enhanced. The enhanced details can make the structures, edges, and textures in the image more obvious. Cropping the pixel values of the sharpened image to the range of [1, 255] ensures that the output image is within the capabilities of the display device and prevents saturation or overflow phenomena caused by too high or too low pixel values.
[0058] In one embodiment of the present invention, S32 includes: Analyze the texture features of the image, and the analysis method includes: Binary local analysis, and the specific method is as follows:
[0059] Step 1: For each pixel in each layer of the image, set a circle with a radius of r as the neighborhood, and take the pixel closest to the center of the circle as the central pixel. As the number of pyramid layers decreases, that is, as the image resolution decreases, the radius of the circle also decreases accordingly;
[0060] Step 2: Compare the gray values of the pixels within the circular neighborhood with the gray value of the central pixel. If the value of the neighborhood pixel is greater than or equal to the value of the central pixel, mark it as 1; otherwise, mark it as 0;
[0061] Step 3: For each pixel in the image, perform the calculations in Step 1 to Step 2 to obtain a local binary histogram;
[0062] Step 4: According to the local binary histogram, perform variance calculation to obtain the texture feature value of each layer of the image.
[0063] The working principle and effects of the above technical solution are as follows: For each pixel in each layer of the image in the pyramid, a circular neighborhood with a radius of r is defined. As the level decreases, that is, as the resolution decreases, the radius r of the circle also needs to decrease accordingly to adapt to the new scale. Compare the gray values of each pixel within the circular neighborhood with the gray value of the central pixel. If the value of the neighborhood pixel is greater than or equal to the value of the central pixel, this position is marked as 1, otherwise marked as 0. This will generate a pattern consisting of 0s and 1s, capturing the local structural information of the neighborhood of this pixel. Traverse each pixel in the image and execute Step 1 and Step 2. For the generated binary pattern, count the frequencies of each pattern occurrence to form a local binary histogram. Calculate the variance from the local binary histogram as the texture feature value of this layer of the image. The variance measures the degree of gray value change within the local area. A higher variance indicates a region with richer texture, while a lower variance indicates a relatively flat region. The image pyramid allows analysis at multiple scales, from global to local, capturing changes in different features. Binary local analysis can effectively extract local detail changes and provide useful information about texture and structural features.
[0064] In one embodiment of the present invention, S4 includes:
[0065] S41: In any layer of the image pyramid, traverse all gray values T as thresholds to divide the image of this layer into foreground and background. Among them, pixels with gray values in the range of [0, T] belong to the foreground, and pixels with gray values in the range of [T + 1, 255] belong to the background;
[0066] S42: Determine the entropy values of the foreground and background, and based on the entropy values of the foreground and background and the texture feature value of the current layer, obtain the entropy value of the image of the current layer. After the entropy value of the image of the current layer reaches the maximum value, the selected gray value T is used as the optimal threshold;
[0067] S43: Determine the optimal threshold for each layer and obtain the comprehensive optimal threshold. According to the comprehensive optimal threshold, compare each pixel in the grayscale image with the comprehensive optimal threshold. When the pixel grayscale value in the image is less than the comprehensive optimal threshold, set the pixel to black; when the pixel grayscale value in the image is greater than the comprehensive optimal threshold, set the pixel to white. And the detailed calculation steps are as follows:
[0068] The first step: Obtain the grayscale frequency, and the grayscale frequency calculation formula includes:
[0069] ;
[0070] where μ(i) represents the grayscale frequency of the i-th grayscale level, and h(i) represents the number of pixels of the i-th grayscale level.
[0071] Statistically count the frequency of each grayscale level to obtain the grayscale level histogram, and calculate the grayscale frequency probability distribution according to the grayscale level histogram;
[0072] The second step: Calculate the entropy values of the foreground and the background, and the entropy value calculation formula of the foreground is as follows:
[0073] ;
[0074] where, represents the entropy value of the foreground, L(i) represents the texture feature value of the i-th grayscale level, represents the adjustment coefficient of the grayscale level T in the foreground, and the value range of is [0, 0.5), α represents the texture feature weight coefficient, which is used to represent the influence of the texture feature value on the foreground entropy value, and the value range of α is [0, 1];
[0075] The entropy value calculation formula of the background is as follows:
[0076] ;
[0077] where, represents the adjustment coefficient of the grayscale level T in the background, and the value range of is [0.5, 1].[[]END]]
[0078] The third step: Obtain the entropy value of the image of each layer, and the entropy value calculation formula of the current layer is as follows:
[0079] ;
[0080] where, represents the entropy value of the k-th layer.
[0081] The fourth step: Select all values of T, and continuously repeat the first step to the third step until the value of T makes The value reaches the maximum, and at this time, T is the optimal threshold of the k-th layer.
[0082] Step 5: Repeat Steps 1 to 4 to obtain the optimal threshold T for each layer, sum up the optimal thresholds T for each layer and take the average, and the obtained result is the optimal comprehensive threshold.
[0083] The working principle and effect of the above technical solution are as follows: The formula not only considers the probability p(i) of the pixel value i, but also introduces the local binary pattern L(i), which enables the model to capture both the statistical characteristics of the pixel value and the local texture features simultaneously. The logarithmic operation in the formula is used to measure the difference between the probability distribution and the weighted L(i). Through the logarithmic operation, the differences between smaller probabilities can be amplified, thereby enhancing the sensitivity of the model. For each layer of the image pyramid, all possible gray values T are traversed. For each T, the layer image is divided into foreground and background. The foreground is the pixels with gray values in the range [0, T], and the background is the pixels with gray values in the range [T + 1, 255]. The entropy values of the foreground and background are combined with the texture feature value of the current layer to obtain an entropy value that measures the overall information content of the current layer image. Record the T value of each current layer. When the entropy value of the current layer reaches the maximum, the corresponding T value is the optimal threshold of the current layer. In each layer of the pyramid, a threshold that maximizes the image entropy is determined. Take the average of these optimal thresholds to obtain a comprehensive optimal threshold, which represents the optimal segmentation point of the entire image. Use the comprehensive optimal threshold to binarize the image. For each pixel in the grayscale image: If the gray value of the pixel is less than the comprehensive optimal threshold, set the pixel to black (0). If the gray value of the pixel is greater than the comprehensive optimal threshold, set the pixel to white (255). Using the image pyramid allows for the analysis of textures and features in the image at multiple scales. Diverse image features can be captured at different resolution levels, which is suitable for processing images with complex backgrounds and foregrounds. By traversing all possible gray thresholds and combining the entropy maximization strategy, the selected threshold is more reasonable. This can ensure that the segmentation of the image is optimal in terms of information content, thereby improving the segmentation accuracy. Combining the entropy values of the foreground and background and the texture feature value to calculate the optimal threshold can effectively distinguish the foreground and background in the image, thereby retaining more important details during segmentation. The comprehensive analysis of the optimal threshold for each layer can handle images with different regional characteristics. The comprehensive optimal threshold enables the method to be flexibly applied to various types of images.
[0084] An embodiment of the present invention, an image processing system for a monochrome liquid crystal display module, is characterized in that the system includes:
[0085] Image grayscale system: Obtain the source image, adjust the size of the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and perform grayscale processing on the resized source image to obtain a grayscale image;
[0086] Sharpening system: Perform sharpening processing on the grayscale image to obtain a grayscale image with clear details;
[0087] Downsampling system: Perform downsampling processing on the processed grayscale image, arrange the grayscale image in a pyramid form from top to bottom according to different resolutions in descending order of resolution, to capture texture features at different resolutions;
[0088] Binarization system: Calculate the entropy for each layer of the pyramid, determine the optimal threshold for each layer based on the calculated entropy value, and combine the weights of each layer to obtain a comprehensive optimal threshold. Perform binarization processing on the grayscale image obtained in S1 using the optimal threshold to obtain a black-and-white image.
[0089] The working principle and effects of the above technical solutions are as follows: Obtain the source image from an input device or file. Modify the image size to meet the resolution requirements of the monochrome liquid crystal display module to ensure that the image is displayed without distortion on the display module. Convert the resized image to a grayscale image. Grayscale conversion is achieved by calculating the brightness of each pixel in the original image and dynamically adjusting the weighting values of the color channels. After the image size is adjusted, details at the image edges will be lost. Therefore, a sharpening filter is used to increase the edges and details of the image and highlight the edges of the image. Perform multi-level downsampling on the sharpened grayscale image to create an image pyramid. The resolution of each layer of the image decreases gradually. At different resolutions, the texture features of the image are significantly different. Through each layer of the pyramid, using the differential features, while adapting to the resolution change, the features are kept intact. For each layer of the pyramid, calculate the entropy based on the pixel grayscale probability distribution. The entropy value is used to quantify the complexity or information content of the image. For each layer of the image, determine the optimal binarization threshold by maximizing the entropy of the foreground and background. Combine the optimal thresholds of each layer to calculate the final comprehensive optimal threshold. Use the comprehensive optimal threshold to process the initially obtained grayscale image, set the pixels with grayscale values lower than the threshold to black, and other pixels to white, thereby generating the final black-and-white image. By adjusting the image size to match the specifications of the display module and through sharpening processing, the edges and details of the image are emphasized, ensuring that the image is not deformed or distorted. By capturing the texture features at different resolutions through the image pyramid, most of the image features can be retained while reducing the computational complexity. Using entropy calculation to select the optimal threshold for each layer ensures a binarization result that maximizes information retention. Entropy optimization not only improves the accuracy of image segmentation but also enhances the consistency of image features in the final display.
[0090] An embodiment of the present invention, the image grayscale system includes:
[0091] Size adjustment system: Obtain the size parameters of the monochrome liquid crystal display module, and adjust the resolution of the source image to be consistent with the size of the monochrome liquid crystal display module;
[0092] Color weight adjustment system: Obtain the color distribution characteristics in the source image, and dynamically adjust the weights in the grayscale process according to the proportion of the components of red, green, and blue in the source image.
[0093] The working principle and effect of the above technical solution are as follows: First, obtain the physical size and resolution of the monochrome liquid crystal display module from the hardware configuration or system interface. According to the size parameters of the display module, scale the source image. Make the resolution of the image match the display module to ensure that the image is not distorted or stretched in monochrome display. For the source image, calculate the total number of red, green, and blue pixels one by one. Calculate the proportion of red, green, and blue pixels in the total number of pixels respectively. And use the proportion as the weight of image grayscale, and assign it to the three colors in the grayscale process. By dynamically calculating the weights, adjust the grayscale process according to the actual color distribution of the image, so that the grayscale image can more truly maintain the brightness and contrast characteristics of the original image. The details of the source image can be better presented in the grayscale image, especially when the proportions of different colors in the image vary greatly.
[0094] An embodiment of the present invention, the sharpening system includes:
[0095] Detail enhancement system: Convolve the grayscale image through a filter to obtain enhanced details, and add the enhanced details to the grayscale image;
[0096] Image cropping system: Crop the sharpened image so that the pixel values of the sharpened image are between [1, 255].
[0097] The working principle and effects of the above technical solution are as follows: Select a high-frequency enhancement filter to perform convolution on the grayscale image, and the resulting image represents the enhanced part of the detail features and edge information. Combine the enhanced detail image with the original grayscale image. This is completed by simply adding the two images. The result is an image with enhanced details, showing more edge and texture information. Due to the convolution and superposition operations in the previous step, the sharpened image may contain some pixel values outside the range of [0, 255]. To ensure that all pixels are within the legal range, these values need to be clipped. Traverse the sharpened image, set all pixel values below 1 to 1, and set all pixel values above 255 to 255. The final obtained image is an image with enhanced details and all pixel values within the legal range of [1, 255]. Through the action of the high-frequency enhancement filter, the important edges and details in the grayscale image are enhanced. The enhanced details can make the structures, edges, and textures in the image more obvious. Clipping the pixel values of the sharpened image to the range of [1, 255] ensures that the output image is within the capabilities of the display device and prevents saturation or overflow phenomena caused by too high or too low pixel values.
[0098] In an embodiment of the present invention, the system for reduction includes:
[0099] Image pyramid construction system: Construct a multi-scale image pyramid. The top-layer image of the pyramid maintains the original resolution, and as the pyramid goes down, the resolution of each layer of the image is lower than the previous layer, forming an image pyramid;
[0100] Image texture analysis system: For each layer of the pyramid, analyze the texture features of the image to obtain the texture feature values of the image.
[0101] The working principle and effects of the above technical solution are as follows: For each pixel in each layer of the image in the pyramid, a circular neighborhood with a radius of r is defined. As the level decreases, that is, the resolution decreases, the radius r of the circle also needs to be correspondingly reduced to adapt to the new scale. Compare the gray values of each pixel in the circular neighborhood with the gray value of the central pixel. If the value of the neighborhood pixel is greater than or equal to the value of the central pixel, this position is marked as 1, otherwise it is marked as 0. This will generate a pattern composed of 0s and 1s, capturing the local structural information of the neighborhood of this pixel. Traverse each pixel in the image and execute Step 1 and Step 2. For the generated binary pattern, count the frequencies of each pattern occurrence to form a local binary histogram. Calculate the variance from the local binary histogram as the texture feature value of this layer of the image. Variance measures the degree of gray value change in the local area. A higher variance indicates a region with richer texture, while a lower variance indicates a relatively flat region. The image pyramid allows analysis at multiple scales, from global to local, capturing changes in different features. Binary local analysis can effectively extract local detail changes and provide useful information about texture and structural features.
[0102] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these changes and modifications therein.
Claims
1. A method for image processing of a monochromatic liquid crystal display module, characterized in that The method includes: S1: Obtain the source image, adjust the size of the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and perform grayscale processing on the resized source image to obtain a grayscale image; and, S1 includes: S11: Obtain the size parameters of the monochrome liquid crystal display module, and adjust the resolution of the source image to be consistent with the size of the monochrome liquid crystal display module; S12: Obtain the color distribution characteristics in the source image, obtain the ratios of red pixels, green pixels, and blue pixels in the source image to the total pixels, and allocate the weights of the three colors in the image grayscale process according to the ratios of the three colors; S2: Perform sharpening processing on the grayscale image to obtain a grayscale image with clear details; S3: Perform downsampling processing on the processed grayscale image, arrange the grayscale image in the form of a pyramid from top to bottom in descending order of resolution according to different resolutions to capture texture features at different resolutions; and, S3 includes: S31: Construct a multi-scale image pyramid, keep the original resolution for the top layer image of the pyramid, and as the pyramid goes down, the resolution of each layer of the image is lower than the previous layer to form an image pyramid; S32: Analyze the texture features of each layer of the pyramid to obtain the texture feature values of the image; S4: Calculate the entropy for each layer of the pyramid, determine the optimal threshold for each layer according to the value obtained from the entropy calculation, and combine the weights of each layer to obtain a comprehensive optimal threshold. Perform binarization processing on the grayscale image obtained in S1 through the optimal threshold to obtain a black and white image, and, S4 includes: S41: In any layer of the image pyramid, traverse all grayscale values T as thresholds, and divide the image of this layer into foreground and background. Among them, the pixel grayscale value range within [0, T] belongs to the foreground, and the pixel grayscale value range within [T + 1, 255] belongs to the background; S42: Determine the entropy values of the foreground and background, and obtain the entropy value of the current layer image according to the entropy values of the foreground and background and the texture feature value of the current layer. When the entropy value of the current layer image reaches the maximum value, select the grayscale value T as the optimal threshold; S43: Determine the optimal threshold for each layer and obtain a comprehensive optimal threshold. Compare each pixel in the grayscale image with the comprehensive optimal threshold according to the comprehensive optimal threshold. When the pixel grayscale value in the image is less than the comprehensive optimal threshold, set the pixel to black. When the pixel grayscale value in the image is greater than the comprehensive optimal threshold, set the pixel to white.
2. The image processing method of a monochromatic liquid crystal display module according to claim 1, characterized in that The S2 includes: S21: Convolve the grayscale image through a filter to obtain enhanced details, and add the enhanced details to the grayscale image; S22: Crop the sharpened image so that the pixel values of the sharpened image are between [1, 255].
3. A method for processing images of a monochromatic liquid crystal display module according to claim 1, characterized in that, The S32 includes: Analyze the texture features of the image, and the analysis method includes: binary local analysis, and the specific method is as follows: Step 1: For each pixel in each layer of the image, set a circle with a radius of r as the neighborhood, and take the pixel closest to the center of the circle as the central pixel. As the pyramid layer decreases, that is, the image resolution decreases, the radius of the circle also decreases accordingly; Step 2: Compare the gray values of the pixels within the circular neighborhood with the gray value of the central pixel. If the value of the neighborhood pixel is greater than or equal to the value of the central pixel, mark it as 1; otherwise, mark it as 0; Step 3: For each pixel in the image, perform the calculations in Step 1 to Step 2 to obtain the local binary histogram; Step 4: According to the local binary histogram, perform variance calculation to obtain the texture feature value of each layer of the image.
4. A monochromatic liquid crystal display module image processing system, characterized in that, The system includes: Image grayscale system: Obtain the source image, adjust the size of the source image to be the same as the size of the monochrome liquid crystal display module, and perform grayscale processing on the resized source image to obtain a grayscale image; and, the image grayscale system includes: Size adjustment system: Obtain the size parameters of the monochrome liquid crystal display module, and adjust the resolution of the source image to be the same as the size of the monochrome liquid crystal display module; Color weight adjustment system: Obtain the color distribution characteristics in the source image, and dynamically adjust the weights during the grayscale process according to the proportion of the red, green, and blue components in the source image; Sharpening system: Perform sharpening processing on the grayscale image to obtain a grayscale image with clear details; Downsampling system: Perform downsampling processing on the processed grayscale image, arrange the grayscale image in the form of a pyramid from top to bottom according to different resolutions from large to small to capture texture features at different resolutions; and, the downsampling system includes: Image pyramid construction system: Construct a multi-scale image pyramid. The top layer image of the pyramid maintains the original resolution, and as the pyramid goes down, the resolution of each layer of the image is lower than the previous layer, forming an image pyramid; Image texture analysis system: Analyze the texture features of each layer of the pyramid to obtain the texture feature value of the image; Binarization system: Perform entropy calculation on each layer of the pyramid, determine the optimal threshold for each layer according to the value obtained from the entropy calculation, and combine the weights of each layer to obtain the comprehensive optimal threshold. Binarize the grayscale image obtained in S1 through the optimal threshold to obtain a black and white image. The binarization system includes, In any layer of the image pyramid, traverse all gray values T as the threshold, and divide the image of this layer into foreground and background. Among them, the pixel gray value range within [0, T] belongs to the foreground, and the pixel gray value range within [T + 1, 255] belongs to the background; Determine the entropy values of the foreground and background, and obtain the entropy value of the current layer image according to the entropy values of the foreground and background and the texture feature value of the current layer. When the entropy value of the current layer image reaches the maximum value, select the gray value T as the optimal threshold; Determine the optimal threshold for each layer and obtain the comprehensive optimal threshold. According to the comprehensive optimal threshold, compare each pixel in the grayscale image with the comprehensive optimal threshold. When the pixel grayscale value in the image is less than the comprehensive optimal threshold, set the pixel to black; when the pixel grayscale value in the image is greater than the comprehensive optimal threshold, set the pixel to white.
5. The image processing system of a monochromatic liquid crystal display module according to claim 4, wherein, The sharpening system includes: Detail enhancement system: Convolve the grayscale image through a filter to obtain enhanced details and add the enhanced details to the grayscale image; Image cropping system: Crop the sharpened image so that the pixel values of the sharpened image are between [1, 255].
Citation Information
Patent Citations
Infrared and visible light image fusion method based on saliency analysis and adaptive filter
CN112215787A
Method for generating high resolution depth images from low resolution depth images using edge information
US20130202194A1