Image processing method and system for laser printers

By performing printer DPI matching and local frequency analysis on single-channel image data, combined with blue noise jitter and error diffusion techniques, the resolution mismatch and artifact problems in laser printer image processing were solved, achieving high-quality image output.

CN120580163BActive Publication Date: 2025-10-28ZHEJIANG CANGTIAN INTELLIGENT INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511081354.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-10-28
Estimated Expiration
2045-08-04

AI Technical Summary

Technical Problem

Existing laser printer image processing methods suffer from detail loss, edge distortion, and artifacts caused by resolution mismatch when processing single-channel grayscale images. They also lack the ability to dynamically analyze image content, making it difficult to achieve a dynamic balance between detail preservation and noise suppression in high-precision graphic output scenarios.

Method used

By matching printer DPI to single-channel image data and performing local frequency analysis, combined with blue noise jitter and error diffusion techniques, the results of the local frequency analysis are used for linear interpolation and mixing to optimize the processing strategies for low-frequency and high-frequency regions.

Benefits of technology

It effectively eliminates the loss of detail and edge distortion caused by resolution differences, balances image detail preservation and artifact suppression, and improves the output quality of laser printers in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120580163B_ABST
    Figure CN120580163B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method and system for a laser printer, which relates to the field of image processing technology. It performs printer DPI matching on single-channel image data to eliminate detail loss and edge distortion caused by resolution differences, and then perceives local feature differences in the image through local frequency analysis to determine adaptive processing strategies for different regions. Based on this, blue noise dithering and error diffusion technology are used for binarization processing respectively. The former is used to retain the sharpness of high-frequency textures, and the latter is used to optimize the smooth transition of low-frequency regions. Finally, the two binarization processing results are linearly interpolated and mixed according to the results of local frequency analysis to achieve a precise combination of processing advantages in different regions. In this way, through the coordination of multiple links, the image detail retention and artifact suppression are effectively balanced, and the output quality and adaptability of laser printers in complex scenes such as graphics, texts, and photos are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to an image processing method and system for a laser printer. Background Art

[0002] With the deepening development of the digital information age, laser printers, as efficient and high-quality output devices, have been widely used in various fields such as offices, education, and homes. Laser printers form an electrostatic latent image on a photosensitive drum using a laser beam and transfer it to a medium; its output is essentially a binary image. However, actual input image data often exists in single-channel grayscale form, such as scanned documents and grayscale photos. Furthermore, the resolution of the original image often does not match the printer's physical DPI (dots per inch). Direct output can lead to problems such as loss of detail, jagged edges, or texture distortion. In addition, the imaging characteristics of laser printers make them sensitive to local frequency changes in images. For example, smooth areas and high-frequency texture areas need to be processed differently during binarization; otherwise, regular artifacts or contrast imbalances can easily occur. Moreover, as users' demands for print quality increase, how to achieve fine-grained control of local image features while ensuring processing speed has become a critical technical bottleneck that urgently needs to be overcome in the field of laser printer image processing.

[0003] In existing technologies, image processing for laser printers is primarily based on single halftone techniques, such as stencil dithering or error diffusion. Specifically, stencil dithering maps continuous grayscale values ​​to binary patterns using a predefined threshold matrix. While computationally efficient and easy to implement, the fixed threshold matrix often results in regular checkerboard or striped artifacts, particularly noticeable moiré patterns in low-frequency regions (such as large color blocks). Error diffusion algorithms, such as the Floyd-Steinberg algorithm, simulate grayscale levels by spreading quantization errors to neighboring pixels, preserving good detail in high-frequency regions (such as complex textures). However, error diffusion suffers from error accumulation, leading to slight overall image blurring. Furthermore, the fixed diffusion direction can introduce directional artifacts, manifesting as visible graininess in smooth areas, significantly reducing image visual quality. In addition, existing technologies generally lack dynamic analysis capabilities for image content, making it difficult to achieve a dynamic balance between detail preservation, noise suppression, and edge sharpness, thus limiting the application potential of laser printers in high-precision graphic output scenarios.

[0004] Therefore, there is an urgent need for an optimized image processing method and system for laser printers. Summary of the Invention

[0005] This application is made in order to solve the above-mentioned technical problems.

[0006] According to one aspect of this application, an image processing method for a laser printer is provided, comprising: performing printer DPI matching on acquired single-channel image data to obtain single-channel image data matching the printer DPI; performing local frequency analysis on the single-channel image data matching the printer DPI to obtain a hybrid weight map; performing template dithering on the single-channel image data matching the printer DPI based on a predefined blue noise texture map to obtain a blue noise dithering binarized map; performing error diffusion with error shaping on the single-channel image data matching the printer DPI based on the hybrid weight map to obtain an error diffusion binarized map; and performing linear interpolation mixing of the blue noise dithering binarized map and the error diffusion binarized map based on the hybrid weight map to obtain a final single-channel binary bitmap.

[0007] According to another aspect of this application, an image processing system for a laser printer is provided, comprising: a printer DPI matching module for matching the acquired single-channel image data to the printer DPI to obtain single-channel image data matching the printer DPI; a local frequency analysis module for performing local frequency analysis on the single-channel image data matching the printer DPI to obtain a mixed weight map; a template dithering module for performing template dithering on the single-channel image data matching the printer DPI based on a predefined blue noise texture map to obtain a blue noise dithering binarized map; an error diffusion module for performing error diffusion with error shaping on the single-channel image data matching the printer DPI based on the mixed weight map to obtain an error diffusion binarized map; and a linear interpolation mixing module for linearly interpolating and mixing the blue noise dithering binarized map and the error diffusion binarized map based on the mixed weight map to obtain a final single-channel binary bitmap.

[0008] Compared with existing technologies, this application provides an image processing method and system for laser printers. It matches the printer's DPI to single-channel image data to eliminate detail loss and edge distortion caused by resolution differences. Then, it uses local frequency analysis to perceive local feature differences in the image and determines appropriate processing strategies for different regions. Based on this, it performs binarization processing using blue noise dithering and error diffusion techniques respectively. The former preserves high-frequency texture sharpness, while the latter optimizes smooth transitions in low-frequency regions. Finally, it performs linear interpolation to mix the two binarization results based on the local frequency analysis results, achieving a precise combination of the processing advantages of different regions. In this way, through multi-stage collaboration, it effectively balances image detail preservation and artifact suppression, improving the output quality and adaptability of laser printers in complex scenarios such as text, images, and photographs. Attached Figure Description

[0009] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0010] Figure 1 This is a flowchart of an image processing method for a laser printer according to an embodiment of this application.

[0011] Figure 2 This is a data flow diagram of an image processing method for a laser printer according to an embodiment of this application.

[0012] Figure 3 This is a flowchart of sub-step S1 of an image processing method for a laser printer according to an embodiment of this application.

[0013] Figure 4 This is a flowchart of sub-step S2 of the image processing method for a laser printer according to an embodiment of this application.

[0014] Figure 5 This is a flowchart of sub-step S3 of the image processing method for a laser printer according to an embodiment of this application.

[0015] Figure 6 This is a flowchart of sub-step S4 of the image processing method for a laser printer according to an embodiment of this application.

[0016] Figure 7 This is a flowchart of sub-step S44 of the image processing method for a laser printer according to an embodiment of this application.

[0017] Figure 8 This is a block diagram of an image processing system for a laser printer according to an embodiment of this application. Detailed Implementation

[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0019] To address the problems mentioned above in the background art, this application proposes an image processing method for laser printers. Figure 1This is a flowchart of an image processing method for a laser printer according to an embodiment of this application. Figure 2 This is a data flow diagram of an image processing method for a laser printer according to an embodiment of this application. For example... Figure 1 and Figure 2 As shown, the image processing method for a laser printer includes the following steps: S1, matching the acquired single-channel image data to the printer DPI to obtain single-channel image data matching the printer DPI; S2, performing local frequency analysis on the single-channel image data matching the printer DPI to obtain a mixed weight map; S3, performing template dithering on the single-channel image data matching the printer DPI based on a predefined blue noise texture map to obtain a blue noise dithering binarized map; S4, performing error diffusion with error shaping on the single-channel image data matching the printer DPI based on the mixed weight map to obtain an error diffusion binarized map; S5, performing linear interpolation mixing of the blue noise dithering binarized map and the error diffusion binarized map based on the mixed weight map to obtain a final single-channel binary bitmap.

[0020] In the image processing method for laser printers described above, step S1 involves matching the acquired single-channel image data to the printer's DPI to obtain single-channel image data that matches the printer's DPI. It should be understood that by adjusting the resolution of the single-channel image data to match the target printer's DPI, the resulting single-channel image data that matches the printer's DPI eliminates potential problems such as detail loss and edge distortion caused by resolution mismatch. This allows subsequent local frequency analysis to accurately perceive local feature differences in the image, providing reliable image data for determining appropriate processing strategies for different regions.

[0021] In particular, in one specific embodiment, Figure 3 This is a flowchart of sub-step S1 of an image processing method for a laser printer according to an embodiment of this application. Figure 3 As shown, step S1 includes: S11, checking the resolution of the single-channel image data and determining whether it matches the DPI of the target printer; S12, in response to a mismatch with the DPI of the target printer, scaling the single-channel image data using the Lanczos-3 interpolation algorithm to obtain single-channel image data matching the printer's DPI.

[0022] Specifically, in step S11, the resolution of the single-channel image data is checked, and it is determined whether it matches the DPI of the target printer. Specifically, by comparing the resolution information of the single-channel image data with the DPI parameters of the target printer, it is determined whether the current single-channel image data is compatible with the printer's hardware characteristics, and the resolution of the single-channel image data is accurately identified as consistent with the DPI of the target printer.

[0023] Specifically, in one possible embodiment, step S11 is implemented as follows: The target DPI of the laser printer is 600, and a single-channel image of a grayscale contract document acquired by a 300DPI scanner needs to be processed. First, by reading the metadata information of the single-channel image data, such as the resolution field in the EXIF ​​data, its horizontal and vertical resolutions are extracted to be 300 pixels / inch. Next, the printer driver interface is called to obtain the physical DPI parameters of the target printer, and its horizontal and vertical DPIs are found to be 600. Subsequently, the horizontal resolution of the image (300) is compared with the printer's horizontal DPI (600), and the same applies to the vertical direction, revealing a difference between the two values. Logical judgment confirms that the resolution of the single-channel image data does not match the DPI of the target printer, thus indicating that subsequent scaling processing is required. In another scenario, when the input single-channel image data is a grayscale drawing generated by a 600DPI scanner, its resolution is extracted to be 600 pixels / inch, compared with the target printer's 600DPI, and it is determined that they match. In this case, scaling is not triggered, and the process directly proceeds to the local frequency analysis stage.

[0024] Specifically, in step S12, in response to a mismatch between the DPI of the target printer and the image resolution, the single-channel image data is scaled using the Lanczos-3 interpolation algorithm to obtain single-channel image data matching the printer's DPI. It should be understood that when the resolutions do not match, there is a difference between the image pixel density and the printer's physical dot density. This causes high-frequency details, such as text edges and photo textures, to be unable to be accurately represented by the printer's physical dots during printing, while low-frequency areas, such as large color blocks, will exhibit artifacts due to pixel stretching. Based on this, this application introduces the Lanczos-3 interpolation algorithm, which effectively preserves high-frequency information and suppresses aliasing by incorporating a large range of neighboring pixels during scaling. This adjusts the resolution of the mismatched single-channel image data to match the DPI of the target printer, ensuring a precise correspondence between the image pixel density and the printer's physical dot density. The resulting single-channel image data matching the printer's DPI retains the high-frequency details of the original image to the greatest extent possible, such as the sharpness of text strokes and subtle textures in photos, while avoiding edge blurring and artifacts, providing high-quality input for subsequent processing.

[0025] Specifically, in one possible embodiment, step S12 is implemented as follows: First, the scaling ratio is determined to be 2 based on the horizontal resolution of the image (300) and the printer's horizontal DPI (600), meaning the width and height of the image need to be magnified to twice their original size. The algorithm processes each target pixel in the image, corresponding to its pixel position at 600 DPI: Taking the target pixel's mapped position in the original image as the center, a 6×6 range of neighboring pixels is selected, and the weight of each neighboring pixel is calculated. Pixels closer to the center have larger weights, and the total weights are normalized to 1. The grayscale value of the neighboring pixels is multiplied by their corresponding weights and summed to obtain the grayscale value of the target pixel. For image edge regions, such as pixels at document edges, when the neighborhood exceeds the original image range, a mirror filling strategy is used to supplement virtual pixels to ensure the integrity of the kernel function. After pixel-by-pixel calculation, 600 DPI single-channel image data is finally generated.

[0026] In the image processing method for laser printers described above, step S2 involves performing local frequency analysis on the single-channel image data matching the printer's DPI to obtain a hybrid weight map. It should be understood that the requirements for binarization processing differ significantly across image features in different regions. High-frequency texture regions need to retain sharpness to avoid blurring, such as text edges and photo details, while low-frequency smooth regions need to achieve smooth transitions to reduce artifacts, such as large color blocks and gradient backgrounds. Therefore, this application identifies the feature differences between different regions through local frequency analysis, providing a basis for differentiated processing. Specifically, by analyzing the frequency characteristics of the neighborhood of each pixel in the single-channel image data matching the printer's DPI, a hybrid weight map is generated that reflects which binarization strategy is suitable for different regions. The weight value of each pixel corresponds to the degree of dependence of its region on the binarization result of blue noise jitter or error diffusion, ensuring that high-frequency regions retain more of the sharpness advantage brought by blue noise jitter, and low-frequency regions better reflect the smoothness advantage brought by error diffusion. This provides a quantitative basis for the accurate mixing of the two binarization results, achieving a targeted combination of the processing advantages of different regions.

[0027] In particular, in one specific embodiment, Figure 4 This is a flowchart of sub-step S2 of the image processing method for a laser printer according to an embodiment of this application. Figure 4 As shown, step S2 includes: S21, taking the pixel at position (x,y) in the single-channel image data of the matching printer DPI as the center, and taking a neighborhood window of size N×N; S22, calculating the local entropy of all pixels in the neighborhood window to obtain the feature value at position (x,y) in the local entropy map; S23, normalizing the local entropy map to obtain the hybrid weight map.

[0028] Specifically, in step S21, a neighborhood window of size N×N is taken, centered on the pixel at position (x,y) in the single-channel image data of the matching printer DPI. That is, a spatial analysis unit is defined for each pixel, and the set of pixels within this window is used to characterize the local region features at position (x,y). This determines the neighborhood range for local frequency analysis for each pixel, ensuring that subsequent calculations of local entropy are based on sufficient and appropriate pixel distribution information, accurately reflecting the local frequency characteristics at that position.

[0029] Specifically, in one possible embodiment, step S21 is implemented as follows: First, N=7 is selected, i.e., a 7×7 neighborhood window is used. For the pixel at position (x=100, y=200) in the image, i.e., in the leaf texture area of ​​the photo, the pixel is used as the center, and the area is expanded 3 pixels to the left, right, top, and bottom. A pixel area is selected from x=97 to x=103 horizontally and from y=197 to y=203 vertically to form a 7×7 neighborhood window. This window covers the grayscale information of the leaf pixel and its 48 surrounding neighboring pixels. For pixels at the image edge, such as (x=2, y=3), i.e., in the sky area at the edge of the photo, when expanding from the pixel as the center, some directions exceed the image boundary. In this case, a symmetrical filling method is used, and the grayscale value of the virtual pixel outside the image boundary is set to the grayscale value of the actual pixel at its symmetrical position to ensure that a complete 7×7 neighborhood window can still be formed. In this way, a 7×7 neighborhood window is determined for each pixel in the image. The set of pixels within the window fully reflects the gray-level distribution around each location, providing a reliable analysis unit for subsequent local entropy calculation.

[0030] Specifically, in step S22, the local entropy of all pixels within the neighborhood window is calculated to obtain the feature value at position (x,y) in the local entropy map. That is, entropy is calculated for the pixel grayscale distribution within each N×N neighborhood window, transforming the spatial features within the window into a single numerical value, resulting in a local entropy map of the same size as the original image. The value of each pixel in the map accurately reflects the frequency characteristics of its neighborhood; high-frequency regions exhibit high entropy values, and low-frequency regions exhibit low entropy values, clearly distinguishing different frequencies in the image, thereby quantifying the local frequency characteristics of each position.

[0031] Specifically, in one possible embodiment, step S22 is implemented as follows: For a 7×7 window at position (x=100, y=200) in the leaf texture area, firstly, the grayscale values ​​(range 0-255) of the 49 pixels within the window are counted to obtain the frequency of each grayscale value, such as grayscale value 120 appearing 5 times, 130 appearing 8 times, 150 appearing 6 times, etc. Then, the frequency is divided by the total number of pixels, 49, to obtain the probability distribution of each grayscale value. This is based on the entropy calculation formula. ,in For the first The probability of a grayscale value. For local entropy, The local entropy of the window is calculated using a base-2 logarithmic operation. Due to the large variation in pixel grayscale values ​​and the dispersed probability distribution of the leaf texture, the calculated entropy value is 6.8. For the 7×7 window at position (x=2, y=3) in the sky region, the pixel grayscale values ​​within the window are concentrated between 200-210. For example, the grayscale value 205 appears 30 times and 206 appears 15 times, indicating a concentrated probability distribution, and the calculated entropy value is 1.2. The above operation is performed on all 7×7 neighboring windows in the image one by one. That is, the grayscale probability distribution of each window is first calculated, and then the entropy is calculated by substituting it into the entropy formula. Finally, a local entropy map with the same size as the original image is generated. In the image, the entropy value of the leaf region is concentrated between 6-7, and the entropy value of the sky region is concentrated between 1-2, accurately quantifying the local frequency characteristics at each location.

[0032] Specifically, step S23 involves normalizing the local entropy map to obtain the hybrid weight map. It should be understood that the local entropy values ​​of each pixel in the local entropy map fluctuate significantly due to differences in image content. Direct use of this value can lead to an imbalance in the weight ratios of different regions, making it impossible to accurately combine the advantages of the two binarization results. Therefore, this application converts the entropy values ​​in the local entropy map to a unified standardized range, typically 0 to 1. This allows the weight value of each pixel to quantitatively and intuitively reflect the dependence of the region on the binarization result of blue noise jitter or error diffusion. High entropy values ​​correspond to higher weights to emphasize the detail preservation advantage of error diffusion, while low entropy values ​​correspond to lower weights to emphasize the artifact suppression advantage of blue noise jitter. This provides unified and effective weight parameters for subsequent pixel-level linear interpolation mixing, improving the output quality of laser printers in complex scenarios such as text, images, and photos.

[0033] Specifically, in one possible embodiment, step S23 is implemented as follows: First, all pixels in the local entropy map are traversed to determine the global maximum and minimum entropy values. Statistically, the maximum entropy value of 7.2 in the local entropy map is located in the dense leaf texture region, and the minimum entropy value of 0.8 is located in the uniform sky region. Based on the normalization formula... ,in These are the normalized weight values. The entropy value of the current pixel. The global maximum entropy value. The entropy value is calculated for each pixel to obtain the global minimum entropy value. For the leaf texture region (x=100, y=200), the entropy value is 6.8. Substituting this into the formula yields... The value is close to 1, indicating that this location is a high-frequency region and should rely more on blue noise jitter processing. For the sky region (x=2, y=3) with an entropy value of 1.2, the calculated... The value is close to 0, indicating that the location is a low-frequency region and should rely more on error diffusion processing. The above calculation is performed on all pixels in the image to generate a mixed weight map. All pixel values ​​in the map are in the range of [0,1] and are consistent with the frequency characteristics of the local entropy map, providing accurate weight parameters for the subsequent linear interpolation mixing of the two binarization results.

[0034] Specifically, in a preferred embodiment, step S2 includes: taking a neighborhood window of size N×N centered on the pixel at position (x,y) in the single-channel image data matching the printer DPI; calculating the local entropy of all pixels within the neighborhood window to obtain the feature value at position (x,y) in the local entropy map; normalizing the local entropy map to obtain an initial mixed weight map; normalizing the local entropy map to obtain the initial mixed weight map; performing order sliding equalization on the initial mixed weight map based on the same size neighborhood window to obtain a local entropy equalization map; and optimizing the initial mixed weight map in the form of conditional entropy using the matrix weight values ​​of the local entropy equalization map as conditions to obtain the mixed weight map.

[0035] Specifically, when normalizing the local entropy map, such as during maximum value normalization, the normalization relative to the maximum local entropy value will exhibit a propagation discrete offset due to the non-uniform distribution of local entropy throughout the image. That is, local entropy exhibits a non-discrete symmetric distribution across the entire image plane. Therefore, to improve the information retention characteristics of local entropy with respect to normalization, this application normalizes the local entropy map to obtain an initial mixed weight map, and then optimizes the initial mixed weight map.

[0036] Specifically, the initial mixed weight map is a matrix This indicates that the weight value of each matrix is... Then, the initial mixed weight map is subjected to order sliding equalization based on the same size neighborhood window to obtain a local entropy equalization map, that is: ;here, Represents the initial mixed weight map The matrix weights of the positions, and They are respectively The mean and variance of the matrix weights of the neighborhood window. Represents the local entropy equalization graph The matrix weights of the positions, and The normalized heterogeneity representation parameter, for example, is represented as follows when normalizing the maximum value: ;in, and These are the minimum and maximum eigenvalues ​​in the local entropy graph, respectively.

[0037] In other words, the order-based sliding equalization can stabilize the in-plane invariance of its dynamic equalization by enhancing the representation equalization of features within the local neighborhood based on order-based statistics, i.e., by constraining the dynamic change range of the sliding window. Furthermore, the normalized heterogeneity representation parameter can compensate for the truncation of probabilistic values ​​by the probability distribution heterogeneity that may exist during normalization. Specifically, in this way, the local entropy values ​​of different regions are mapped to the range of [0,1], so that the weight difference between high-entropy regions such as text edges and low-entropy regions such as light gray backgrounds can be quantified. Based on the order-based sliding equalization processing with the same size neighborhood window, statistical equalization of the initial mixed weight map within the sliding window can eliminate the extreme value interference that may exist in the local entropy map, making the weight change of the text and background transition regions smoother. The resulting local entropy equalization map can more coherently reflect the spatial distribution of regional frequency characteristics.

[0038] Then, using the matrix weight values ​​of the local entropy equalization graph as conditions, the initial mixed weight graph is optimized in the form of conditional entropy to obtain the mixed weight graph, i.e.: ;in Represents the normalization function. Represents the initial mixed weight map The matrix weights of the positions, Represents the local entropy equalization graph The matrix weights of the positions, Represents the hybrid weight graph The matrix weights of the positions are used to mitigate the distortion of the local structure of the weight distribution caused by the propagation of non-discrete symmetric distribution characteristics and discrete offset through order sliding equalization. Furthermore, normalized heterogeneity representation parameters are used to avoid the loss of edge information, thus serving as a constraint on the information reliability of the weight map and improving information retention characteristics, resulting in an optimized hybrid weight map. Specifically, this approach, while preserving the basic characteristics of high weight in text regions and low weight in background regions, further refines the weight distribution by combining statistical correlations within the neighborhood window. For example, at the turning points of text strokes, conditional entropy calculation is used to strengthen the influence of local high-frequency features on the weights, while within the background, the weight disturbance caused by small entropy fluctuations is weakened. The resulting hybrid weight map can more accurately adapt to the needs of different regions for blue noise jitter and error diffusion binarization strategies, allowing text edges to retain more of the sharpness of blue noise jitter during mixing, and the background region to better reflect the smoothness of error diffusion, effectively reducing text edge artifacts and background region graininess.

[0039] In the image processing method for laser printers described above, step S3 involves template dithering of the single-channel image data matching the printer's DPI based on a predefined blue noise texture map to obtain a blue noise dithered binarized image. It should be understood that the blue noise texture map has the characteristics of uniform high-frequency energy distribution and low-frequency energy. Compared to traditional threshold matrices, it can reduce regular artifacts, such as moiré patterns, and especially retain sharper sharpness in high-frequency texture areas of the image, such as text edges and photo details, avoiding the blurring of details that may be caused by single error diffusion in high-frequency areas. Therefore, this application utilizes the characteristics of the predefined blue noise texture map to convert the single-channel image data matching the printer's DPI into a binarized image through template dithering, maintaining the sharpness of high-frequency texture areas during binarization while suppressing artifacts, providing the foundational data for subsequent mixing with the error diffusion binarized image, highlighting the advantages of high-frequency processing.

[0040] In particular, in one specific embodiment, Figure 5 This is a flowchart of sub-step S3 of the image processing method for a laser printer according to an embodiment of this application. Figure 5 As shown, step S3 includes: S31, comparing the pixel value of each pixel in the single-channel image data matching the printer DPI with the noise value at the corresponding position in the predefined blue noise texture map; S32, if the noise value is greater than the pixel value, setting the value of the blue noise jitter binarization map at the corresponding pixel position to zero; S33, if the noise value is less than the pixel value, setting the value of the blue noise jitter binarization map at the corresponding pixel position to one.

[0041] Specifically, in step S31, the pixel value of each pixel in the single-channel image data matching the printer DPI is compared with the noise value at the corresponding position in the predefined blue noise texture map. Specifically, pixel-by-pixel comparison enables adaptive binarization based on noise distribution, avoiding stair-step artifacts caused by fixed thresholds. It provides a dynamic threshold judgment basis based on blue noise characteristics for each pixel. By comparing the noise value at the corresponding position with the pixel value, the basic logic for determining whether the pixel should appear as 0 or 1 in the binarized image is determined, ensuring that the binarization process can adapt to the grayscale characteristics of the pixels. This allows pixels in high-frequency texture areas to retain sharpness based on noise distribution, and pixels in low-frequency smooth areas to form a uniform dot matrix distribution.

[0042] Specifically, in one possible embodiment, step S31 is implemented as follows: A single-channel image of a grayscale architectural drawing compatible with a 600 DPI laser printer is processed. This image contains dense line textures in high-frequency areas and large blank areas in low-frequency areas. A predefined 600 DPI blue noise texture map is used, with a noise value ranging from 0 to 255, the same size as the image. For a pixel at a line intersection point in the drawing (x=300, y=400), its pixel value is 180, indicating a brighter image requiring more black pixels to represent the line. The corresponding noise value at the blue noise texture map (x=300, y=400) is extracted to be 150. 180 is compared with 150 to determine that the pixel value is greater than the noise value. For a pixel in a blank area in the drawing (x=500, y=200), its pixel value is 50, indicating a darker image requiring fewer black pixels. The noise value at the corresponding position in the blue noise texture map is 80. 50 is compared with 80 to determine that the pixel value is less than the noise value. For pixels at the edge of lines (x=350, y=380), the pixel value is 120, and the corresponding noise value is 100. After comparison, the pixel value is greater than the noise value. However, for adjacent edge transition pixels (x=351, y=380), the pixel value is 90, and the corresponding noise value is 110. After comparison, the pixel value is less than the noise value. By performing the above comparison pixel by pixel, a basis for binarization is established for all locations in the image. The comparison results in high-frequency line areas are mostly pixel values ​​greater than noise values, while in low-frequency blank areas, pixel values ​​are mostly less than noise values, providing a precise basis for the subsequent generation of the binarized image.

[0043] Specifically, in steps S32 and S33, if the noise value is greater than the pixel value, the value of the blue noise jitter binarized image at the corresponding pixel position is set to zero; if the noise value is less than the pixel value, the value of the blue noise jitter binarized image at the corresponding pixel position is set to one. It should be understood that the relationship between the noise value and the pixel value directly reflects the black and white state that the position should present. When the noise value is greater than the pixel value, it indicates that the pixel has a low grayscale, i.e., it is dark, and should be presented as 0 (white) to match its grayscale characteristics. When the noise value is less than the pixel value, the pixel has a high grayscale, i.e., it is bright, and should be presented as 1 (black) to preserve details. The noise distribution of the blue noise texture image is irregular, which can avoid periodic artifacts caused by fixed thresholds or ordered jitter, allowing the binarization result to retain sharpness in the high-frequency region and form a uniform dot matrix in the low-frequency region.

[0044] Specifically, in one possible embodiment, steps S32 and S33 are implemented as follows: First, when predefining a 600DPI blue noise texture map, a noise matrix with the same size as the single-channel image to be processed is generated based on the target printer DPI. Specifically, an iterative point distribution optimization algorithm is used: a two-dimensional array of the same size as the image is initialized, such as 4962×6984 pixels corresponding to an A4-sized 600DPI image, and initial noise points are randomly distributed. By calculating the energy field between each point, the point positions are iteratively adjusted to ensure uniform energy distribution in high-frequency regions while suppressing low-frequency components and avoiding regular stripes. After optimization, the noise value is mapped to the range of 0-255, achieved through a linear transformation formula: Noise value = (original energy value - minimum energy) / (maximum energy - minimum energy) × 255, thus ensuring matching with the pixel value range of the single-channel image. Mirror expansion processing is applied to the edge regions to ensure that the blue noise texture map is seamless when tiled; for example, the virtual pixel values ​​outside the image edges are symmetrical with adjacent boundary pixels. After generation, Fourier transform verification showed that the energy proportion of the high-frequency region in the spectrum was >85%, and it exhibited a uniform ring distribution, while the energy proportion of the low-frequency region was <5%, ensuring that the noise distribution was irregular. This blue noise texture map perfectly matched the size of a 600DPI grayscale architectural drawing, accurately covering the noise value range of 0-255. Its high-frequency uniformity avoided step-like artifacts and adapted to the differentiated binarization requirements of high-frequency lines and low-frequency blank areas.

[0045] Then, for the pixels at the line intersections (x=300, y=400), since the pixel value of 180 is greater than the noise value of 150, the corresponding position in the blue noise jitter binarization image is set to 1, presenting the details of the intersection in black. For the pixels in the blank area (x=500, y=200), since the pixel value of 50 is less than the noise value of 80, they are set to 0, presenting the blank characteristics in white. For the pixels at the line edges (x=350, y=380), since the pixel value of 120 is greater than the noise value of 100, they are set to 1 to ensure the continuity of the line edges. For the pixels of adjacent edge transitions (x=351, y=380), since the pixel value of 90 is less than the noise value of 110, they are set to 0, making the line edges form a natural transition rather than a harsh step. For another high-frequency texture area in the drawing, such as the annotation text "Φ100", the pixel value of the center of the text strokes is mostly 200-230, and the corresponding noise value is mostly 150-180. After comparison, all are set to 1 to ensure the strokes are clear. The transition pixel value for the text edge is 100-150. Some values ​​are greater than the noise value and are set to 1, while others are less than the noise value and are set to 0, to create a smooth edge transition.

[0046] In the image processing method for laser printers described above, step S4 involves performing error diffusion with error shaping on the single-channel image data matching the printer's DPI, based on the hybrid weight map, to obtain an error diffusion binarized map. It should be understood that error diffusion with error shaping can dynamically adjust the degree and range of error diffusion based on the hybrid weight map. It enhances the error diffusion effect in low-frequency regions to optimize smooth transitions, and weakens the impact of errors in high-frequency regions to reduce detail blur, thus adapting to the processing needs of different regions. The resulting error diffusion binarized map presents a uniform grayscale transition simulation in low-frequency smooth regions, effectively suppressing artifacts. In high-frequency texture regions, it reduces excessive blurring due to error shaping, complementing the blue noise jitter binarized map and laying the foundation for balancing detail preservation and artifact suppression in the final hybrid result.

[0047] In particular, in one specific embodiment, Figure 6 This is a flowchart of sub-step S4 of the image processing method for a laser printer according to an embodiment of this application. Figure 6 As shown, step S4 includes: S41, initializing the cumulative error buffer; S42, extracting the pixel value at the starting position from the single-channel image data matching the printer DPI; S43, correcting the pixel value at the starting position based on the cumulative error value at the starting position in the cumulative error buffer to obtain a corrected input value; S44, binarizing the corrected input value based on a binarization threshold to obtain a binarization result; S45, calculating the quantization error based on the binarization result; S46, calculating the plasticity error based on the weight value of the hybrid weight map at the starting position; S47, diffusing the plasticity error based on the diffusion matrix and accumulating it to various positions of the cumulative error buffer to update the state of the cumulative error buffer.

[0048] Specifically, step S41 initializes the accumulated error buffer. Specifically, by creating a buffer with the same size as the single-channel image data matching the printer's DPI, the initial values ​​at all positions are set to 0, eliminating the interference of initial errors on subsequent processing. This provides a reference state for error accumulation and propagation during subsequent pixel processing, ensuring that error propagation starts from a stable state without initial errors.

[0049] Specifically, in one possible embodiment, step S41 is implemented as follows: First, a 3×3 cumulative error buffer is created according to the image size, with the number of rows and columns matching the 3×3 image. Through memory allocation, the initial value of each position in the buffer is set to 0.0, i.e., the first row and three columns are 0.0, 0.0, 0.0 respectively; the second row is 0.0, 0.0, 0.0 respectively; and the third row is 0.0, 0.0, 0.0 respectively. This buffer will be used to record the errors generated during the processing of each subsequent pixel that need to be propagated to neighboring pixels. Initially, there is no error accumulation, ensuring that error propagation starts from the baseline state and avoiding error offset in the first pixel processing due to a non-zero initial value.

[0050] Specifically, step S42 involves extracting the pixel value at the starting position from the single-channel image data matching the printer's DPI. That is, obtaining the grayscale value of the first pixel to be processed, which serves as the initial input data for error diffusion, clearly defining the first processing target for error diffusion, and providing the initial basis for subsequent steps such as correction and binarization based on this pixel value.

[0051] Specifically, step S43 involves correcting the pixel value at the starting position based on the accumulated error value in the accumulated error buffer to obtain a corrected input value. In a specific example of this application, step S43 includes calculating the sum of the accumulated error value at the starting position and the pixel value at the starting position as the corrected input value. Specifically, by summing the accumulated error value at the starting position and the pixel value at that position, the obtained corrected input value more accurately reflects the grayscale representation of the starting position compared to the original pixel value. This provides a precise basis for subsequent judgment based on a binarization threshold, thus providing an input basis closer to the true grayscale level for subsequent binarization processing. This avoids grayscale distortion caused by solely relying on the original pixel value, reduces binarization deviation caused by errors not being included, and ensures the continuity of grayscale balance during error diffusion.

[0052] Specifically, in one possible embodiment, step S43 is implemented as follows: First, the pixel value at position (0,0) is extracted from the image, and its grayscale value is read as 130, ranging from 0 to 255. Simultaneously, the accumulated error buffer, which is the same size as the image and has been initialized, is invoked, and the accumulated error value at position (0,0) is 0.0. According to the correction rule, the correction input value is calculated by adding the accumulated error value at this position to the pixel value, i.e., 130 + 0.0 = 130, resulting in the correction input value of 130. In another scenario, the accumulated error buffer at position (0,0) may have an accumulated error value of -10.0 due to preprocessing of neighboring pixels, such as pre-propagation under a special traversal order. Similarly, the pixel value at this position, 140, is extracted. In this case, the correction input value is 140 + (-10.0) = 130. This value combines the original pixel value of 140 and the accumulated error of -10.0, more accurately reflecting the grayscale level requiring binarization. Regardless of whether the initial error is zero, the corrected input value obtained through summation can balance the original gray level and the error compensation, providing a reliable input for the subsequent binarization step. This ensures that the binarization result at position (0,0) not only matches the original image gray level but also takes into account the overall impact of error propagation, laying the foundation for gray level restoration in smooth areas.

[0053] Specifically, in step S44, the corrected input value is binarized based on a binarization threshold to obtain a binarization result. It should be understood that, in order to adapt to the output characteristics of the printer, this application converts the corrected input value into binary pixels by comparing it with a threshold, obtaining the binarization result at the starting position to achieve grayscale to binary conversion, thereby meeting the printer's output requirements and providing a basis for subsequent quantization error calculation.

[0054] In particular, in one specific embodiment, Figure 7 This is a flowchart of sub-step S44 of the image processing method for a laser printer according to an embodiment of this application. Figure 7 As shown, step S44 includes: S441, if the corrected input value is greater than the binarization threshold, then the binarization result is 255; S442, calculating the quantization error based on the binarization result, including: subtracting the binarization result from the corrected input value to obtain the quantization error.

[0055] More specifically, in step S441, if the corrected input value is greater than the binarization threshold, the binarization result is 255. Specifically, by comparing the corrected input value with the binarization threshold 128, when the corrected input value is greater than the threshold, 255 is output. This converts continuous grayscale information into binary pixels that meet the printer's output requirements, accurately reflecting the brightness characteristics corresponding to the corrected input value, conforming to the binary output specifications of laser printers, and providing a clear basis for subsequent quantization error calculation, ensuring the continuity of grayscale conversion during error propagation.

[0056] Specifically, in one possible embodiment, step S441 is implemented as follows: First, for a pixel (1,1) in a high-frequency region with rich texture, the corrected input value of the pixel is obtained. This value is obtained by adding the original pixel value 160 to the accumulated error value -30.0 at position (1,1) in the accumulated error buffer, i.e., 160 + (-30.0) = 130. The binarization threshold is set to 128 to distinguish between black and white output. The corrected input value 130 is compared with the threshold 128. Since 130 > 128, according to the rule, the binarization result of the pixel is determined to be 255 (white). This result serves as the pixel value at position (1,1) in the error diffusion binarization map, accurately reflecting the bright grayscale characteristics at that position, consistent with the brightness trend of the pixel in the original image. If the corrected input value is less than or equal to the threshold, for example, the corrected input value of a pixel in a smooth region is 120, the result is 0 (black).

[0057] More specifically, step S442, calculating the quantization error based on the binarization result, includes: subtracting the binarization result from the corrected input value to obtain the quantization error. That is, by calculating the difference between the corrected input value and the binarization result, the obtained quantization error clearly reflects the degree of grayscale loss during the binarization process, providing a quantization basis for subsequent error shaping based on the hybrid weight map. This ensures that error propagation can accurately adapt to the frequency characteristics of different regions, guaranteeing the effectiveness of the error diffusion technology in grayscale restoration.

[0058] Specifically, in one possible embodiment, step S442 is implemented as follows: For the pixel at position (1,1), the corrected input value is 130, and the binarization result is 255. According to the calculation rules of quantization error, the corrected input value needs to be subtracted from the binarization result, i.e., 130-255=-125, to obtain the quantization error -125. This value is negative, indicating that the binarization result (255) is higher than the corrected input value (130), and there is an overexpression of grayscale 125. This overexpression needs to be compensated to neighboring pixels through error propagation.

[0059] Specifically, in step S45, the quantization error is calculated based on the binarization result. That is, by calculating the difference between the correction input value and the binarization result, the quantization error obtained in this application accurately reflects the grayscale loss caused by the binarization of the current pixel, and will be used as the basic data for subsequent propagation to neighboring pixels to compensate for the grayscale of neighboring pixels.

[0060] Specifically, in one possible embodiment, step S45 is implemented as follows: the correction input value at the starting position (0,0) is 130, and the binarization result is 255. According to the quantization error calculation formula, the quantization error is equal to the correction input value minus the binarization result, i.e., 130-255=-125. This value is negative, indicating that the binarization result (255) is higher than the correction input value (130), and there is an overexpression of grayscale 125. This error needs to be propagated to neighboring pixels to balance the overall grayscale and avoid the excessive white at this position affecting the brightness restoration of the surrounding area.

[0061] Specifically, step S46 calculates the plasticity error based on the weight value of the hybrid weight map at the starting position. In a specific example of this application, step S46 includes: multiplying the weight value of the hybrid weight map at the starting position by the quantization error to obtain the plasticity error. Specifically, multiplying the weight value at the starting position of the hybrid weight map by the quantization error at that position yields a weight-adjusted plasticity error. This maintains a larger value in the high-frequency region to support sufficient error propagation, while maintaining a smaller value in the low-frequency region to reduce unnecessary error accumulation. This achieves dynamic control of error propagation, ensuring detail preservation in the high-frequency region while suppressing artifact generation in the low-frequency region, laying the foundation for improving the quality of the error diffusion binarization map.

[0062] Specifically, in one possible embodiment, step S46 is implemented as follows: For a 3×3 grid grayscale image matching a 600DPI laser printer, the starting position is set to (1,1), which is located in a high-frequency region with rich texture. First, the quantization error at this position is obtained, which is obtained by subtracting the correction input value 130 from the binarization result 255, i.e., 130-255=-125. At the same time, the weight value reflecting the frequency characteristics of this region is extracted. Since (1,1) is a high-frequency region, its weight value is 0.9. According to the shaping rule, the shaping error needs to be calculated by multiplying the weight value by the quantization error, i.e., -125×0.9=-112.5, resulting in a shaping error of -112.5. If the starting position of the processing is (0,0), which is in a smooth low-frequency region, its quantization error is also -125, but the corresponding weight value is 0.1. In this case, the shaping error is -125×0.1=-12.5.

[0063] Specifically, step S47 involves diffusing the shaping error based on the diffusion matrix and accumulating it at various positions of the accumulated error buffer to update the state of the accumulated error buffer. In a specific example of this application, the diffusion matrix is: ;in, This is the diffusion matrix. That is, based on the weights of the diffusion matrix, the shaping error is distributed to the cumulative error buffers of neighboring pixels such as the right, bottom right, bottom, and bottom left. The positions of neighboring pixels in the cumulative error buffers are assigned corresponding error values, updating the buffer state and providing error compensation for the subsequent processing of these neighboring pixels, thus achieving overall grayscale balance.

[0064] In particular, in one possible embodiment, the implementation process of step S47 is as follows: First, the shaping error of the starting position (0,0) is -12.5, and the Floyd-Steinberg diffusion matrix is ​​used, with the weights being 7 / 16 (right neighbor), 3 / 16 (lower left neighbor), 5 / 16 (lower right neighbor), and 1 / 16 (lower right neighbor) in sequence. According to the matrix, the error increment of the right neighbor (1,0) is -12.5×7 / 16≈-5.47, and the position (1,0) in the buffer is updated from 0.0 to -5.47. The lower left neighbor has no valid position, meaning it is outside the image range, so no error is assigned. The error increment of the directly lower neighbor (0,1) is -12.5×5 / 16≈-3.91, and the position (0,1) in the buffer is updated from 0.0 to -3.91. The error increment of the lower right neighbor (1,1) is -12.5×1 / 16≈-0.78, and the position (1,1) in the buffer is updated from 0.0 to -0.78. After the update, the cumulative error buffer accurately records the error propagated to each neighboring pixel, providing error compensation for subsequent correction processing of these pixels and ensuring balanced restoration of the overall grayscale.

[0065] In the image processing method for laser printers described above, step S5 involves linearly interpolating and mixing the blue noise jitter binarization image and the error diffusion binarization image based on the hybrid weight map to obtain a final single-channel binary bitmap. Specifically, in the hybrid weight map, the weight value of high-frequency texture regions is close to 1, resulting in a higher proportion of the error diffusion binarization image, leveraging its advantage in optimizing detail preservation in high-frequency regions; the weight value of low-frequency smooth regions is close to 0, resulting in a higher proportion of the blue noise jitter binarization image, leveraging its characteristics in suppressing artifacts and achieving smooth transitions in low-frequency regions. By using the weight values ​​of each pixel in the hybrid weight map to perform pixel-level linear interpolation on the blue noise jitter binarization image and the error diffusion binarization image, the advantages of the two binarization processes can be precisely combined in different regions. This ensures that the final single-channel binary bitmap retains the sharpness of high-frequency details while guaranteeing smooth transitions in low-frequency regions, effectively improving the output quality of the laser printer.

[0066] In summary, the image processing method for laser printers based on the embodiments of this application is explained. It eliminates detail loss and edge distortion caused by resolution differences by matching the printer's DPI to single-channel image data. Then, it perceives local feature differences in the image through local frequency analysis and determines appropriate processing strategies for different regions. Based on this, it performs binarization processing using blue noise dithering and error diffusion techniques respectively. The former preserves high-frequency texture sharpness, while the latter optimizes smooth transitions in low-frequency regions. Finally, it performs linear interpolation to mix the two binarization results based on the local frequency analysis results, achieving a precise combination of the processing advantages of different regions. Thus, through multi-stage collaboration, it effectively balances image detail preservation and artifact suppression, improving the output quality and adaptability of laser printers in complex scenarios such as text, images, and photographs.

[0067] Figure 8 This is a block diagram of an image processing system for a laser printer according to an embodiment of this application. Figure 8 As shown, an image processing system 100 for a laser printer according to an embodiment of this application includes: a printer DPI matching module 110, used to perform printer DPI matching on acquired single-channel image data to obtain single-channel image data matching the printer DPI; a local frequency analysis module 120, used to perform local frequency analysis on the single-channel image data matching the printer DPI to obtain a mixed weight map; a template dithering module 130, used to perform template dithering on the single-channel image data matching the printer DPI based on a predefined blue noise texture map to obtain a blue noise dithering binarized map; an error diffusion module 140, used to perform error diffusion with error shaping on the single-channel image data matching the printer DPI based on the mixed weight map to obtain an error diffusion binarized map; and a linear interpolation mixing module 150, used to linearly interpolate and mix the blue noise dithering binarized map and the error diffusion binarized map based on the mixed weight map to obtain a final single-channel binary bitmap.

[0068] As described above, the image processing system 100 for a laser printer according to embodiments of this application can be implemented in various wireless terminals, such as servers with image processing algorithms for laser printers. In one possible implementation, the image processing system 100 for a laser printer according to embodiments of this application can be integrated into a wireless terminal as a software module and / or a hardware module. For example, the image processing system 100 for a laser printer can be a software module in the operating system of the wireless terminal, or it can be an application developed for the wireless terminal; of course, the image processing system 100 for a laser printer can also be one of many hardware modules of the wireless terminal.

[0069] Alternatively, in another example, the image processing system 100 for the laser printer and the wireless terminal may also be separate devices, and the image processing system 100 for the laser printer may be connected to the wireless terminal via wired and / or wireless networks and transmit interactive information in accordance with an agreed data format.

[0070] Here, those skilled in the art will understand that the specific operations of each step in the image processing system for laser printers described above have been referenced above. Figures 1 to 7 The image processing method for laser printers is described in detail therein, and therefore its repeated description will be omitted.

Claims

1. An image processing method for a laser printer, characterized in that, include: The acquired single-channel image data is matched to the printer DPI to obtain single-channel image data that matches the printer DPI. Local frequency analysis is performed on the single-channel image data of the matched printer DPI to obtain a hybrid weight map; Based on a predefined blue noise texture map, template jitter is applied to the single-channel image data of the matching printer DPI to obtain a blue noise jitter binarized map. Based on the hybrid weight map, error diffusion with error shaping is performed on the single-channel image data of the matching printer DPI to obtain an error diffusion binarization map. Based on the hybrid weight map, the blue noise jitter binarization map and the error diffusion binarization map are linearly interpolated and mixed to obtain the final single-channel binary bitmap; The process of performing local frequency analysis on the single-channel image data of the matched printer DPI to obtain a hybrid weight map includes: Centered on the pixel at position (x,y) in the single-channel image data of the matching printer DPI, take a neighborhood window of size N×N; Calculate the local entropy of all pixels within the neighborhood window to obtain the feature value at position (x,y) in the local entropy map; The local entropy map is normalized to obtain the hybrid weight map.

2. The image processing method for a laser printer according to claim 1, characterized in that, The acquired single-channel image data is matched to the printer DPI to obtain single-channel image data that matches the printer DPI, including: Check the resolution of the single-channel image data and determine whether it matches the DPI of the target printer; In response to a DPI mismatch with the target printer, the single-channel image data is scaled using the Lanczos-3 interpolation algorithm to obtain single-channel image data with a matching printer DPI.

3. The image processing method for a laser printer according to claim 1, characterized in that, Based on a predefined blue noise texture map, template dithering is performed on the single-channel image data matching the printer's DPI to obtain a blue noise dithering binarized map, including: The pixel value of each pixel in the single-channel image data matching the printer DPI is compared with the noise value at the corresponding position in the predefined blue noise texture map; If the noise value is greater than the pixel value, then the value of the blue noise jitter binarized image at the corresponding pixel position is set to zero; If the noise value is less than the pixel value, then the value of the blue noise jitter binarized image at the corresponding pixel position is set to one.

4. The image processing method for a laser printer according to claim 1, characterized in that, Based on the hybrid weight map, error diffusion with error shaping is performed on the single-channel image data of the matched printer DPI to obtain an error diffusion binarization map, including: Initialize the accumulated error buffer; Extract the pixel value at the starting position from the single-channel image data of the matching printer DPI; Based on the accumulated error value at the starting position in the accumulated error buffer, the pixel value at the starting position is corrected to obtain the corrected input value; The modified input value is binarized based on the binarization threshold to obtain the binarization result; The quantization error is calculated based on the binarization result. The shaping error is calculated based on the weight values ​​of the hybrid weight map at the starting position; The shaping error is diffused out based on the diffusion matrix and accumulated at various positions of the accumulated error buffer to update the state of the accumulated error buffer.

5. The image processing method for a laser printer according to claim 4, characterized in that, Based on the accumulated error value at the starting position in the accumulated error buffer, the pixel value at the starting position is corrected to obtain a corrected input value, including: The sum of the cumulative error value at the starting position in the cumulative error buffer and the pixel value at the starting position is calculated as the correction input value.

6. The image processing method for a laser printer according to claim 5, characterized in that, Binarizing the corrected input value based on a binarization threshold to obtain a binarization result includes: If the corrected input value is greater than the binarization threshold, then the binarization result is 255; Calculating the quantization error based on the binarization result includes: subtracting the binarization result from the corrected input value to obtain the quantization error.

7. The image processing method for a laser printer according to claim 6, characterized in that, Based on the weight values ​​of the hybrid weight map at the starting position, the shaping error is calculated, including: The shaping error is obtained by multiplying the weight value of the hybrid weight map at the starting position by the quantization error.

8. The image processing method for a laser printer according to claim 7, characterized in that, The diffusion matrix is: ;in, Here is the diffusion matrix.

9. An image processing system for a laser printer, characterized in that, include: The printer DPI matching module is used to match the acquired single-channel image data with the printer DPI to obtain single-channel image data that matches the printer DPI. The local frequency analysis module is used to perform local frequency analysis on the single-channel image data of the matched printer DPI to obtain a hybrid weight map. The template dithering module is used to perform template dithering on the single-channel image data of the matching printer DPI based on a predefined blue noise texture map to obtain a blue noise dithering binarized map. The error diffusion module is used to perform error diffusion with error shaping on the single-channel image data of the matching printer DPI based on the hybrid weight map to obtain an error diffusion binarization map. A linear interpolation mixing module is used to linearly interpolate and mix the blue noise jitter binarization map and the error diffusion binarization map based on the mixing weight map to obtain a final single-channel binary bitmap; The process of performing local frequency analysis on the single-channel image data of the matched printer DPI to obtain a hybrid weight map includes: Centered on the pixel at position (x,y) in the single-channel image data of the matching printer DPI, take a neighborhood window of size N×N; Calculate the local entropy of all pixels within the neighborhood window to obtain the feature value at position (x,y) in the local entropy map; The local entropy map is normalized to obtain the hybrid weight map.

Citation Information

Patent Citations

  • Adaptive halftone scheme to preserve image smoothness and sharpness with region identification

    CN1578381A