Monochrome liquid crystal display module image processing method and system
By adjusting the image of the monochrome liquid crystal display module, greying, sharpening and multi-scale pyramid downsampling, combining entropy calculation and optimal threshold analysis, dynamic graying and binarization of the image are achieved, solving the problem of insufficient image hierarchy and contrast in traditional methods, and improving the detailed expression and contrast of the image.
Patent Information
- Application Number
- CN202510572954.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-05-06
AI Technical Summary
The traditional grayscale method in the prior art cannot dynamically adjust the color weight, resulting in the image losing important color information after grayscale, unable to accurately reflect the image level, and lack targeted details processing during the binarization process, resulting in insufficient contrast and detailed expression of the final image.
A monochrome liquid crystal display module image processing method is proposed, including acquiring the source image and performing sizing and grayscale processing, followed by sharpening the grayscale image and downsampling of the multi-scale pyramid, analyzing the texture characteristics of each layer and determining the optimal threshold through entropy calculation, and finally performing binarization processing by comprehensive optimal threshold.
By dynamically adjusting the grayscale weight, maintaining the natural brightness level and contrast of the image, improving the global contrast and detail expressiveness of the image, and optimizing the effect of detection and analysis functions.
Smart Images

Figure CN120107240A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of monochrome image processing, and in particular to a monochrome liquid crystal display module image processing method and system. Background Art
[0002] As an important display technology, liquid crystal display technology has been widely used and developed in recent years. With the advancement of science and technology, the performance of liquid crystal display modules has been continuously improved, and the application fields have become increasingly extensive. However, in the prior art, traditional grayscale usually uses fixed color weights, which cannot be dynamically adjusted according to the image content, resulting in some images losing important color information after grayscale, and unable to accurately reflect the image hierarchy. In addition, during the binarization process, there is a lack of targeted detail processing, resulting in insufficient contrast and detail expression of the final image. Summary of the invention
[0003] In view of the technical problems in the above background technology, the present invention proposes a monochrome liquid crystal display module image processing method and system, and the technical solutions adopted are as follows: A method for processing a monochrome liquid crystal display module image, the method comprising: S1: Acquire a source image, resize the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and grayscale the resized source image to obtain a grayscale image; S2: sharpen the grayscale image to obtain a grayscale image with clear details; S3: downsampling the processed grayscale image, arranging the grayscale image in a pyramid from top to bottom according to different resolutions, so as to capture the texture features at different resolutions; S4: perform entropy calculation on each layer of the pyramid, determine the optimal threshold of each layer according to the value obtained by entropy calculation, and combine the weight of each layer to obtain a comprehensive optimal threshold. Binarize the grayscale image obtained in S1 through the optimal threshold to obtain a black and white image.
[0004] Preferably, the S1 includes: S11: Acquire 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 color distribution features in the source image, and obtain the ratio of red pixels, green pixels, and blue pixels to the total pixels in the source image, and assign weights of the three colors in the image grayscale process according to the ratio of the three colors.
[0005] Preferably, the S2 includes: S21: convolve the grayscale image through the filter to obtain enhanced details, and add the enhanced details to the grayscale image; S22: Crop the sharpened image so that the pixel value of the sharpened image is between [1,255].
[0006] Preferably, S3 includes: S31: Construct a multi-scale image pyramid. The top image of the pyramid maintains the original resolution. As the pyramid goes down, the resolution of each layer of the image is lower than that of the previous layer, forming an image pyramid. S32: For each layer of the pyramid, the texture features of the image are analyzed to obtain the texture feature values of the image.
[0007] Preferably, the S32 includes: analyzing the texture features of the image, and the analysis method includes: binary local analysis, specifically in the following manner: Step 1: For each pixel in each layer of the image, a circle with a radius of r is set as the neighborhood, and the pixel closest to the center of the circle is taken as the center pixel. As the number of pyramid layers decreases, that is, the image resolution decreases, the radius of the circle decreases accordingly. Step 2: Compare the grayscale value of the pixels in 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, it is marked as 1; otherwise, it is marked as 0; Step 3: For each pixel in the image, perform the calculations from step 1 to step 2 to obtain a local binary histogram; Step 4: According to the local binary histogram, variance calculation is performed to obtain texture feature values of each layer of the image.
[0008] Preferably, the S4 includes: S41: In any layer of the image pyramid, traverse all gray values T as thresholds, and divide the image of the layer into foreground and background, wherein the gray value range of pixels in [0, T] belongs to the foreground, and the gray value range of pixels in [T+1, 255] belongs to the background; S42: Determine the entropy values of the foreground and the background, and obtain the entropy value of the current layer image according to the entropy values of the foreground and the background and the texture feature value of the current layer. When the entropy value of the current layer image reaches a maximum value, select the gray value T as the optimal threshold; S43: Determine the optimal threshold of 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 grayscale value of the pixel in the image is less than the comprehensive optimal threshold, the pixel is set to black. When the grayscale value of the pixel in the image is greater than the comprehensive optimal threshold, the pixel is set to white.
[0009] A monochrome liquid crystal display module image processing system, characterized in that the system comprises: Image grayscale system: obtains a source image, resizes the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and grayscales the resized source image to obtain a grayscale image; Sharpening system: sharpens the grayscale image to obtain a grayscale image with clear details; Downsampling system: Downsampling is performed on the processed grayscale image, and the grayscale image is arranged from top to bottom in a pyramid in accordance with different resolutions, so as to capture the texture features at different resolutions; Binarization system: Entropy calculation is performed on each layer of the pyramid, and the optimal threshold of each layer is determined based on the value obtained by entropy calculation. The weight of each layer is combined to obtain a comprehensive optimal threshold. The grayscale image obtained by S1 is binarized using the optimal threshold to obtain a black and white image.
[0010] Preferably, the image grayscale system comprises: A size adjustment system: obtaining size parameters of the monochrome liquid crystal display module and adjusting the resolution of the source image to be consistent with the size of the monochrome liquid crystal display module; Color weight adjustment system: obtains the color distribution characteristics of the source image, and dynamically adjusts the weights in the grayscale process according to the proportion of the red, green and blue components in the source image.
[0011] Preferably, the sharpening system comprises: Detail enhancement system: convolve the grayscale image with a filter to obtain enhanced details and add the enhanced details to the grayscale image; Image cropping system: crops the sharpened image so that the pixel value of the sharpened image is between [1,255].
[0012] Preferably, the reduction system comprises: Image pyramid construction system: constructs a multi-scale image pyramid. The top layer 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: For each layer of the pyramid, analyze the texture features of the image and obtain the texture feature values of the image.
[0013] Beneficial effects of the present invention: The present invention dynamically adjusts the grayscale weight according to the proportion of red, green and blue components in the image, so that the grayscale image is closer to the real scene and reflects a more natural brightness level and contrast. Entropy calculation is performed on each layer of the image, and the optimal global threshold is selected for binarization processing to improve the global contrast of the image. Through comprehensive weight analysis, the optimal threshold of multiple layers of images is adjusted, which has a significant optimization effect on the detection and analysis functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 The present invention provides a method for processing images of a monochrome liquid crystal display module. DETAILED DESCRIPTION
[0015] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0016] One embodiment of the present invention provides a method for processing a monochrome liquid crystal display module image, the method comprising: S1: Acquire a source image, resize the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and grayscale the resized source image to obtain a grayscale image; S2: sharpen the grayscale image to obtain a grayscale image with clear details; S3: downsampling the processed grayscale image, arranging the grayscale image in a pyramid from top to bottom according to different resolutions, so as to capture the texture features at different resolutions; S4: perform entropy calculation on each layer of the pyramid, determine the optimal threshold of each layer according to the value obtained by entropy calculation, and combine the weight of each layer to obtain a comprehensive optimal threshold. Binarize the grayscale image obtained in S1 through the optimal threshold to obtain a black and white image.
[0017] The working principle and effect of the above technical solution are as follows: the source image is obtained from an input device or file. The image size is modified to meet the resolution requirements of the monochrome liquid crystal display module to ensure that the image is displayed on the display module without deformation. The resized image is converted into a grayscale image. Grayscale is achieved by calculating the brightness of each pixel of the original image and dynamically adjusting the weighted value of the color channel. After the image size is adjusted, the details of the image edge will be lost, so a sharpening filter is used to increase the edge and details of the image and highlight the edge of the image. The sharpened grayscale image is multi-level downsampled to create an image pyramid. The resolution of each layer of the image is reduced step by step. The texture features of the image are significantly different at different resolutions. Through each layer of the pyramid, the difference features are used to keep the features intact while adapting to the resolution change. At each layer of the pyramid, entropy is calculated based on the probability distribution of pixel grayscale. The entropy value is used to quantify the complexity or information content of the image. For each layer of the image, the optimal binarization threshold is determined by maximizing the entropy of the foreground and background. Combined with the optimal thresholds of each layer, the final comprehensive optimal threshold is calculated. The grayscale image initially obtained is processed using the comprehensive optimal threshold, and the pixels with grayscale values below the threshold are set to black, and the other pixels are set to white to generate the final black and white image. By resizing the image to match the specifications of the display module and sharpening it, the edges and details of the image are emphasized, ensuring that the image is not deformed or distorted. Capturing texture features at different resolutions through an image pyramid can retain most of the image features while reducing computational complexity. The optimal threshold for each layer is selected using entropy calculations, ensuring 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.
[0018] In one embodiment of the present invention, the S1 includes: S11: Acquire 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 color distribution features in the source image, and obtain the ratio of red pixels, green pixels, and blue pixels to the total pixels in the source image, and assign weights of the three colors in the image grayscale process according to the ratio of the three colors.
[0019] The working principle and effect of the above technical solution are as follows: first, the physical size and resolution of the monochrome liquid crystal display module are obtained from the hardware configuration or system interface. According to the size parameters of the display module, the source image is scaled. The resolution of the image is matched with the display module to ensure that the image is not distorted or stretched in monochrome display. For the source image, the total number of red, green and blue pixels is calculated one by one. The proportion of red, green and blue pixels to the total number of pixels is calculated respectively. And the proportion is used as the weight of the image grayscale and allocated to the three colors in the grayscale process. By dynamically calculating the weight, the grayscale process is adjusted according to the actual color distribution of the image, so that 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 represented in the grayscale image, especially when the proportion of different colors in the image is quite different.
[0020] In one embodiment of the present invention, S2 includes: S21: convolve the grayscale image through the filter to obtain enhanced details, and add the enhanced details to the grayscale image; S22: Crop the sharpened image so that the pixel value of the sharpened image is between [1,255].
[0021] The working principle and effect of the above technical solution are as follows: a high-frequency enhancement filter is selected to convolve the grayscale image, and the resulting image represents the enhanced part of the detail features and edge information. The enhanced detail image is combined with the original grayscale image. This is done by simply 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]. In order 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 image is an image with detail enhancement and all pixel values are within the legal range [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 structure, edges and textures in the image more obvious, and the pixel values of the sharpened image are clipped to the range of [1,255] to ensure that the output image is within the capability of the display device and prevent saturation or overflow caused by excessively high or low pixel values.
[0022] In one embodiment of the present invention, the S32 includes: analyzing the texture features of the image, and the analysis method includes: binary local analysis, specifically in the following manner: Step 1: For each pixel in each layer of the image, a circle with a radius of r is set as the neighborhood, and the pixel closest to the center of the circle is taken as the center pixel. As the number of pyramid layers decreases, that is, the image resolution decreases, the radius of the circle decreases accordingly. Step 2: Compare the grayscale value of the pixels in 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, it is marked as 1; otherwise, it is marked as 0; Step 3: For each pixel in the image, perform the calculations from step 1 to step 2 to obtain a local binary histogram; Step 4: According to the local binary histogram, variance calculation is performed to obtain texture feature values of each layer of the image.
[0023] The working principle and effect of the above technical solution are as follows: For each pixel of each layer of the pyramid image, 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 reduced accordingly to adapt to the new scale. Compare the grayscale value of each pixel in the circular neighborhood with the central pixel. If the value of the neighborhood pixel is greater than or equal to the value of the central pixel, the position is marked as 1, otherwise it is marked as 0. This will generate a pattern consisting of 0 and 1, which captures the local structural information of the pixel neighborhood. Traverse each pixel in the image and execute steps 1 and 2. -For the generated binary patterns, count the frequency of occurrence of each pattern to form a local binary histogram. Calculate the variance from the local binary histogram as the texture feature value of the image of this layer. The variance measures the degree of grayscale change in the local area. A higher variance indicates an area with richer texture, while a lower variance indicates a relatively flat area. The image pyramid allows analysis at multiple scales, from global to local, to capture changes in different features. Binary local analysis can effectively extract local detail changes and provide useful information about texture and structural features.
[0024] In one embodiment of the present invention, the S4 includes: S41: In any layer of the image pyramid, traverse all gray values T as thresholds, and divide the image of the layer into foreground and background, wherein the gray value range of pixels in [0, T] belongs to the foreground, and the gray value range of pixels in [T+1, 255] belongs to the background; S42: Determine the entropy values of the foreground and the background, and obtain the entropy value of the current layer image according to the entropy values of the foreground and the background and the texture feature value of the current layer. When the entropy value of the current layer image reaches a maximum value, select the gray value T as the optimal threshold; S43: Determine the optimal threshold of 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 grayscale value of the pixel in the image is less than the comprehensive optimal threshold, the pixel is set to black. When the grayscale value of the pixel in the image is greater than the comprehensive optimal threshold, the pixel is set to white. And the detailed calculation steps are as follows: Step 1: Obtain grayscale frequency, and the grayscale frequency calculation formula includes: ; Among them, µ(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.
[0025] The frequency of occurrence of each gray level is counted to obtain a gray level histogram, and the gray level frequency probability distribution is calculated based on the gray level histogram.
[0026] Step 2: Calculate the entropy values of the foreground and background, and the entropy value calculation formula of the foreground is as follows: ; in, represents the entropy value of the foreground, L(i) represents the texture feature value of the i-th gray level, represents the adjustment coefficient of gray level T in the foreground, and The value range is [0,0.5), α represents the texture feature weight coefficient, which is used to represent the influence of texture feature value on foreground entropy value, and the value range of α is [0,1]; The background entropy value calculation formula is as follows: ; in, represents the adjustment coefficient of gray level T in the background, And the value range is [0.5,1].
[0027] Step 3: Obtain the entropy value of each layer of the image, and the entropy value calculation formula of the current layer is as follows: ; in, Represents the entropy value of the kth layer.
[0028] Step 4: Select all values of T and repeat steps 1 to 3 until the value of T is The value of reaches the maximum value, and T at this time is the optimal threshold of the kth layer.
[0029] Step 5: Repeat steps 1 to 4 to obtain the best threshold T of each layer, sum and average the best threshold T of each layer, and the result obtained is the best comprehensive threshold.
[0030] The working principle and effect of the above technical solution are as follows: the formula not only considers the probability p(i) of pixel value i, but also introduces the local binary pattern L(i), which enables the model to capture the statistical characteristics of pixel values and local texture features at the same time. 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 difference between smaller probabilities can be amplified, thereby enhancing the sensitivity of the model. For each layer of the image pyramid, all possible grayscale values T are traversed, and for each T, the layer image is divided into foreground and background. The foreground is a pixel with a grayscale value range of [0,T], and the background is a pixel with a grayscale value range of [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. The T value of the current layer is recorded each time. 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. The average of these optimal thresholds is taken to obtain a comprehensive optimal threshold, which represents the optimal segmentation point of the entire image. The image is binarized using the comprehensive optimal threshold. For each pixel in the grayscale image: if the grayscale value of the pixel is less than the comprehensive optimal threshold, set the pixel to black (0). If the grayscale value of the pixel is greater than the comprehensive optimal threshold, set the pixel to white (255). The use of image pyramids allows the analysis of textures and features in the image at multiple scales. A variety of image features can be captured at different resolution levels, which is suitable for processing images with complex backgrounds and foregrounds. By traversing all possible grayscale thresholds and combining the entropy maximization strategy, the selected threshold is more reasonable. This ensures that the image segmentation is optimal in terms of information volume, thereby improving segmentation accuracy. The optimal threshold is calculated by combining the entropy value and texture feature value of the foreground and background, which can effectively distinguish the foreground and background in the image, thereby retaining more important details during segmentation. The comprehensive analysis of the optimal threshold of each layer can cope with images with different regional characteristics. The comprehensive optimal threshold allows the method to be flexibly applied to a variety of types of images.
[0031] An embodiment of the present invention is a monochrome liquid crystal display module image processing system, characterized in that the system comprises: Image grayscale system: obtains a source image, resizes the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and grayscales the resized source image to obtain a grayscale image; Sharpening system: sharpens the grayscale image to obtain a grayscale image with clear details; Downsampling system: Downsampling is performed on the processed grayscale image, and the grayscale image is arranged from top to bottom in a pyramid in accordance with different resolutions, so as to capture the texture features at different resolutions; Binarization system: Entropy calculation is performed on each layer of the pyramid, and the optimal threshold of each layer is determined based on the value obtained by entropy calculation. The weight of each layer is combined to obtain a comprehensive optimal threshold. The grayscale image obtained by S1 is binarized using the optimal threshold to obtain a black and white image.
[0032] The working principle and effect of the above technical solution are as follows: the source image is obtained from an input device or file. The image size is modified to meet the resolution requirements of the monochrome liquid crystal display module to ensure that the image is displayed on the display module without deformation. The resized image is converted into a grayscale image. Grayscale is achieved by calculating the brightness of each pixel of the original image and dynamically adjusting the weighted value of the color channel. After the image size is adjusted, the details of the image edge will be lost, so a sharpening filter is used to increase the edge and details of the image and highlight the edge of the image. The sharpened grayscale image is multi-level downsampled to create an image pyramid. The resolution of each layer of the image is reduced step by step. The texture features of the image are significantly different at different resolutions. Through each layer of the pyramid, the difference features are used to keep the features intact while adapting to the resolution change. At each layer of the pyramid, entropy is calculated based on the probability distribution of pixel grayscale. The entropy value is used to quantify the complexity or information content of the image. For each layer of the image, the optimal binarization threshold is determined by maximizing the entropy of the foreground and background. Combined with the optimal thresholds of each layer, the final comprehensive optimal threshold is calculated. The grayscale image initially obtained is processed using the comprehensive optimal threshold, and the pixels with grayscale values below the threshold are set to black, and the other pixels are set to white to generate the final black and white image. By resizing the image to match the specifications of the display module and sharpening it, the edges and details of the image are emphasized, ensuring that the image is not deformed or distorted. Capturing texture features at different resolutions through an image pyramid can retain most of the image features while reducing computational complexity. The optimal threshold for each layer is selected using entropy calculations, ensuring 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.
[0033] In one embodiment of the present invention, the image grayscale system comprises: A size adjustment system: obtaining size parameters of the monochrome liquid crystal display module and adjusting the resolution of the source image to be consistent with the size of the monochrome liquid crystal display module; Color weight adjustment system: obtains the color distribution characteristics of the source image, and dynamically adjusts the weights in the grayscale process according to the proportion of the red, green and blue components in the source image.
[0034] The working principle and effect of the above technical solution are as follows: first, the physical size and resolution of the monochrome liquid crystal display module are obtained from the hardware configuration or system interface. According to the size parameters of the display module, the source image is scaled. The resolution of the image is matched with the display module to ensure that the image is not distorted or stretched in monochrome display. For the source image, the total number of red, green and blue pixels is calculated one by one. The proportion of red, green and blue pixels to the total number of pixels is calculated respectively. And the proportion is used as the weight of the image grayscale and allocated to the three colors in the grayscale process. By dynamically calculating the weight, the grayscale process is adjusted according to the actual color distribution of the image, so that 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 represented in the grayscale image, especially when the proportion of different colors in the image is quite different.
[0035] In one embodiment of the present invention, the sharpening system comprises: Detail enhancement system: convolve the grayscale image with a filter to obtain enhanced details and add the enhanced details to the grayscale image; Image cropping system: crops the sharpened image so that the pixel value of the sharpened image is between [1,255].
[0036] The working principle and effect of the above technical solution are as follows: a high-frequency enhancement filter is selected to convolve the grayscale image, and the resulting image represents the enhanced part of the detail features and edge information. The enhanced detail image is combined with the original grayscale image. This is done by simply 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]. In order 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 image is an image with detail enhancement and all pixel values are within the legal range [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 structure, edges and textures in the image more obvious, and the pixel values of the sharpened image are clipped to the range of [1,255] to ensure that the output image is within the capability of the display device and prevent saturation or overflow caused by excessively high or low pixel values.
[0037] In one embodiment of the present invention, the adoption reduction system comprises: Image pyramid construction system: constructs a multi-scale image pyramid. The top layer 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: For each layer of the pyramid, analyze the texture features of the image and obtain the texture feature values of the image.
[0038] The working principle and effect of the above technical solution are as follows: for each pixel of each layer of the pyramid image, 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 reduced accordingly to adapt to the new scale. Compare the grayscale value of each pixel in the circular neighborhood with the central pixel. If the value of the neighborhood pixel is greater than or equal to the value of the central pixel, the position is marked as 1, otherwise it is marked as 0. This will generate a pattern consisting of 0 and 1, capturing the local structural information of the pixel neighborhood. Traverse each pixel in the image and execute steps one and two. For the generated binary patterns, the frequency of occurrence of each pattern is counted to form a local binary histogram. Calculate the variance from the local binary histogram as the texture feature value of the layer image. The variance measures the degree of grayscale change in the local area. A higher variance indicates an area with richer texture, while a lower variance indicates a relatively flat area. The image pyramid allows analysis at multiple scales, from global to local, to capture changes in different features. Binary local analysis can effectively extract local detail changes and provide useful information about texture and structural features.
[0039] 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 equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A monochrome liquid crystal display module image processing method, characterized in that: The method comprises: S1: Acquire a source image, resize the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and grayscale the resized source image to obtain a grayscale image; S2: sharpen the grayscale image to obtain a grayscale image with clear details; S3: downsampling the processed grayscale image, arranging the grayscale image in a pyramid from top to bottom according to different resolutions, so as to capture the texture features at different resolutions; S4: perform entropy calculation on each layer of the pyramid, determine the optimal threshold of each layer according to the value obtained by entropy calculation, and combine the weight of each layer to obtain a comprehensive optimal threshold. Binarize the grayscale image obtained in S1 through the optimal threshold to obtain a black and white image.
2. The method for processing a monochrome liquid crystal display module image according to claim 1, characterized in that: The S1 includes: S11: Acquire 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 color distribution features in the source image, and obtain the ratio of red pixels, green pixels, and blue pixels to the total pixels in the source image, and assign weights of the three colors in the image grayscale process according to the ratio of the three colors.
3. The method for processing a monochrome liquid crystal display module image according to claim 1, characterized in that: The S2 includes: S21: convolve the grayscale image through the filter to obtain enhanced details, and add the enhanced details to the grayscale image; S22: Crop the sharpened image so that the pixel value of the sharpened image is between [1,255].
4. The method for processing a monochrome liquid crystal display module image according to claim 1, characterized in that: The S3 includes: S31: Construct a multi-scale image pyramid. The top image of the pyramid maintains the original resolution. As the pyramid goes down, the resolution of each layer of the image is lower than that of the previous layer, forming an image pyramid. S32: For each layer of the pyramid, the texture features of the image are analyzed to obtain the texture feature values of the image.
5. The method for processing a monochrome liquid crystal display module image according to claim 4, characterized in that: The S32 includes: analyzing the texture features of the image, the analysis method includes: binary local analysis, the specific method is as follows: Step 1: For each pixel in each layer of the image, a circle with a radius of r is set as the neighborhood, and the pixel closest to the center of the circle is taken as the center pixel. As the number of pyramid layers decreases, that is, the image resolution decreases, the radius of the circle decreases accordingly. Step 2: Compare the grayscale value of the pixels in 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, it is marked as 1; otherwise, it is marked as 0; Step 3: For each pixel in the image, perform the calculations from step 1 to step 2 to obtain a local binary histogram; Step 4: According to the local binary histogram, variance calculation is performed to obtain texture feature values of each layer of the image.
6. The method for processing a monochrome liquid crystal display module image according to claim 1, characterized in that: The S4 includes: S41: In any layer of the image pyramid, traverse all gray values T as thresholds, and divide the image of this layer into foreground and background, wherein the gray value range of pixels in [0, T] belongs to the foreground, and the gray value range of pixels in [T+1, 255] belongs to the background; S42: Determine the entropy values of the foreground and the background, and obtain the entropy value of the current layer image according to the entropy values of the foreground and the background and the texture feature value of the current layer. When the entropy value of the current layer image reaches a maximum value, select the gray value T as the optimal threshold; S43: Determine the optimal threshold of 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 grayscale value of the pixel in the image is less than the comprehensive optimal threshold, the pixel is set to black. When the grayscale value of the pixel in the image is greater than the comprehensive optimal threshold, the pixel is set to white.
7. A monochrome liquid crystal display module image processing system, characterized in that: The system comprises: Image grayscale system: obtains a source image, resizes the source image so that the size of the source image is consistent with the size of the monochrome liquid crystal display module, and grayscales the resized source image to obtain a grayscale image; Sharpening system: sharpens the grayscale image to obtain a grayscale image with clear details; Downsampling system: Downsampling is performed on the processed grayscale image, and the grayscale image is arranged from top to bottom in a pyramid in accordance with different resolutions, so as to capture the texture features at different resolutions; Binarization system: Entropy calculation is performed on each layer of the pyramid, and the optimal threshold of each layer is determined based on the value obtained by entropy calculation. The weight of each layer is combined to obtain a comprehensive optimal threshold. The grayscale image obtained by S1 is binarized using the optimal threshold to obtain a black and white image.
8. The monochrome liquid crystal display module image processing system according to claim 7, characterized in that: The image grayscale system comprises: A size adjustment system: obtaining size parameters of the monochrome liquid crystal display module and adjusting the resolution of the source image to be consistent with the size of the monochrome liquid crystal display module; Color weight adjustment system: obtains the color distribution characteristics of the source image, and dynamically adjusts the weights in the grayscale process according to the proportion of the red, green and blue components in the source image.
9. The monochrome liquid crystal display module image processing system according to claim 7, characterized in that: The sharpening system comprises: Detail enhancement system: convolve the grayscale image with a filter to obtain enhanced details and add the enhanced details to the grayscale image; Image cropping system: crops the sharpened image so that the pixel value of the sharpened image is between [1,255].
10. The monochrome liquid crystal display module image processing system according to claim 7, characterized in that: The adoption system comprises: Image pyramid construction system: constructs a multi-scale image pyramid. The top layer 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: For each layer of the pyramid, analyze the texture features of the image and obtain the texture feature values of the image.
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