Image processing method and device, and display device
By performing grayscale grading and iterative optimization on the original image, a multi-tone image is generated, which solves the problems of image detail loss, texture distortion and dynamic refresh flicker in halftone display, and achieves smoother image transition and reduced flicker effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI TIANMA MICRO ELECTRONICS CO LTD
- Filing Date
- 2026-06-18
- Publication Date
- 2026-07-31
AI Technical Summary
Existing halftone display technology is prone to graininess, texture distortion, and flickering when processing image details and dynamic refreshes, making it difficult to meet the requirements for high-quality image display.
Multi-level grayscale mapping is introduced to classify the grayscale of the original image, and the binary image is iteratively optimized until the error converges, generating a multi-tone image to reduce visual errors.
The generated multi-tone image has multiple grayscale levels, which enhances the image's sense of depth, makes the transition of details smoother, effectively suppresses edge artifacts and mesh textures, and reduces global flicker.
Smart Images

Figure CN122493798A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image display technology, and in particular to an image processing method and apparatus, and a display device. Background Technology
[0002] Due to material and driving limitations, each pixel in electronic paper can typically only present a limited range of states, such as black and white. To display traditional continuous-tone images, halftone technology is needed to simulate rich grayscale or color levels. By controlling the spatial distribution and density of binary pixels, the illusion of continuous grayscale is created using the characteristics of the human eye. However, this halftone image relies on the contrast between the density of dots or pixels, making it prone to graininess and artifacts. When processing images with rich details or smooth gradients, it can easily lead to loss of detail and texture distortion. It is also prone to flickering and dynamic refresh artifacts when displaying video. Summary of the Invention
[0003] This application provides an image processing method and apparatus, and a display device, to solve the technical problems of image detail loss, texture distortion, and dynamic refresh flicker in existing halftone display images.
[0004] On one hand, embodiments of this application provide an image processing method, the method comprising: Obtain the original image; Perform grayscale grading on the original image to determine the grayscale levels; Generate a binary image of the original image; The binary image is iteratively optimized to determine the multi-tone image based on the gray level corresponding to the optimized binary image, and the error between the multi-tone image and the original image is calculated until the error converges and the iterative optimization stops. The optimized binary image is output as the target image.
[0005] Optionally, performing equal-interval grayscale grading on the original image includes performing equal-interval grayscale grading on the original image.
[0006] Optionally, the gray level L is 8, 16, or 32.
[0007] Optionally, the range of pixel values in the multi-tone image is: [0 / (L-1), (L-1) / (L-1)].
[0008] Optionally, generating the binary image of the original image includes: generating the binary image of the original image using a halftone algorithm.
[0009] Optionally, the halftone algorithm includes any one of the following: error diffusion algorithm, DBS algorithm.
[0010] Optionally, generating a binary image of the original image using a halftone algorithm includes: generating a binary image of the original image using the same or different halftone algorithms for different gray levels.
[0011] Optionally, the iterative optimization of the binary image includes: performing optimization processing on each pixel in the binary image sequentially.
[0012] Optionally, the optimization process includes: sequentially attempting a flip operation and a swap operation.
[0013] Optionally, determining the multi-tone image based on multiple gray levels corresponding to the optimized binary image includes: Determine a mapping model based on the gray level and the binary image; The grayscale value of each pixel in the optimized binary image is calculated to be mapped to the multi-tone image using the mapping model. Based on the calculated grayscale values of each pixel, an optimized binary image corresponding to a multi-grayscale multitone image is generated.
[0014] Optionally, the mapping model is: ; in, Represents the pixels in the binary image. express The corresponding pixels of the original image, express The corresponding pixels of the multi-tone image.
[0015] Optionally, the original image is a moving image.
[0016] Optionally, the original image is a color image.
[0017] On the other hand, embodiments of this application also provide an image processing apparatus, the apparatus comprising: The image acquisition module is used to acquire the original image; The grading module is used to perform equal-interval gray-level grading on the original image and determine the gray-level; The binary image generation module is used to generate a binary image of the original image; An optimization processing module is used to iteratively optimize the binary image, determine the multi-tone image based on the gray level corresponding to the optimized binary image, and calculate the error between the multi-tone image and the original image until the error converges and then the iterative optimization stops. The output module is used to output the optimized binary image as the target image.
[0018] Optionally, the original image is a color image; the apparatus further includes: The color space conversion module is used to convert the original color image from a first color space to a second color space that separates luminance and chrominance, to obtain a luminance channel image and at least one chrominance channel image. The grading module performs equal-interval gray-level grading on the brightness channel image to determine the gray-level; The output module merges the optimized luminance channel image with the processed chrominance channel image to output the target color image.
[0019] On the other hand, embodiments of this application also provide a display device, including a display array composed of multiple display units and a processor, wherein the processor is configured to execute instructions to implement the image processing method described above to obtain a target image; The display array is used to display the target image.
[0020] The image processing method, apparatus, and display device provided in this application introduce multi-level grayscale mapping based on halftone algorithms. They iteratively optimize the binary image of the original image, determine the multi-tone image based on multiple grayscale levels corresponding to the optimized binary image, and calculate the error between the multi-tone image and the original image. Iterative optimization stops when the error converges, resulting in the target image. Using this solution, each level of the binary image can be optimized, minimizing the perceptual error between the final multi-tone image, after filtering by the human visual system, and the original grayscale image. Compared to traditional binary halftone images, the multi-tone image generated by this solution has multiple grayscale levels, transitioning the image display from a black-and-white dot matrix to a multi-grayscale display. This enhances the image's sense of depth, smooths detail transitions, effectively suppresses edge artifacts and mesh textures, and reduces the appearance of large-area, high-contrast alternating black-and-white blocks. It also significantly reduces global flicker during dynamic image refresh.
[0021] Compared to traditional binary halftone images, the multitone images generated using the proposed solution have multiple grayscale levels, enabling the image display to transition from black and white dot matrix to multi-grayscale display. This results in a stronger sense of image hierarchy, smoother detail transitions, and effectively suppresses edge artifacts and mesh textures. It also reduces the occurrence of large-area, high-contrast alternating black and white blocks, thereby significantly reducing global flicker during refresh. Attached Figure Description
[0022] Figure 1 This is a flowchart of an image processing method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the process of determining a multi-tone image based on multiple gray levels in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application; Figure 4 This is another schematic diagram of the image processing apparatus provided in the embodiments of this application; Figure 5 This is a schematic diagram of a display device provided in an embodiment of this application. Detailed Implementation
[0023] To make the above-mentioned objectives, features, and beneficial effects of this application more apparent and understandable, specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only configured to explain this application and are not configured to limit this application. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0024] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0025] Electronic paper halftone images are an image format that balances the hardware limitations of electronic paper with the desired visual experience. They balance display quality, power consumption, and refresh efficiency, and are one of the core technologies for presenting image content in electronic paper devices. Electronic paper halftone images use halftone algorithms to convert continuous-tone images (such as grayscale or color images) into images composed of a finite number of tones (usually black and white dots or a small number of color dots), and utilize the visual mixing effect of the human eye to simulate the details and grayscale levels of the original image.
[0026] On the one hand, existing halftone techniques, when processing smooth edges and fine textures in images, rely solely on the distribution density of black and white pixels to represent grayscale. This means that in areas with gradual grayscale changes or edge transitions, the small differences in grayscale between pixels make it difficult for halftone algorithms to effectively distinguish between them using binary combinations. Consequently, they cannot accurately represent continuous tonal variations and are prone to producing noticeable stair-step artifacts (such as jagged edges or stripes) or graininess. This results in the loss of subtle layer information in the image, leading to visual blurring and distortion, making it difficult to meet the requirements for high-quality image display.
[0027] On the other hand, in halftone display mode, the generated image appears as a high-frequency, interleaved distribution of black and white pixels. When electronic paper displays video or dynamically refreshes, the significant changes in pixel states between consecutive frames, due to the significantly different black and white pixel arrangements used to simulate different gray levels, result in visual flicker that is perceptible to the human eye. Simultaneously, the relatively slow response characteristics of electronic paper further exacerbate motion artifacts and ghosting, severely impacting the viewing experience of moving images.
[0028] To this end, this application provides an image processing method and apparatus that introduces multi-level grayscale mapping on the basis of halftone algorithm, performs grayscale classification on the original image, iteratively optimizes the binary image, determines the multi-tone image based on the grayscale level corresponding to the optimized binary image after each iteration optimization, and calculates the error between the multi-tone image and the original image until the error converges and the iterative optimization stops to obtain the final target image.
[0029] The image processing method and apparatus provided in this application can be applied to limited grayscale display devices or image processing scenarios such as electronic paper. The following description uses electronic paper images as an example.
[0030] like Figure 1 The diagram shown is a flowchart of an image processing method provided in an embodiment of this application, including the following steps: In step 101, the original image is obtained.
[0031] The original image can be a black and white image or a color image, and this application embodiment does not limit this.
[0032] In step 102, the original image is graded in grayscale to determine the grayscale level.
[0033] In this embodiment of the application, the original image may be graded with equal intervals of gray levels or with non-equal intervals of gray levels. This embodiment of the application does not limit the specific application in this regard.
[0034] When the original image is graded into equal-interval gray levels, the gray-level dynamic range of the original image (usually [0, 255] or the normalized [0, 1] interval) is divided into L-1 intervals with equal steps, forming L discrete gray levels. For example, if L=4, the gray levels are 0, 1 / 3, 2 / 3, 1; if L=256, the gray levels are 0, 1 / 255, 2 / 255, ..., 1.
[0035] Equal-interval grading ensures uniform visual differences between adjacent gray levels, avoiding situations where certain gray level intervals are too dense or too sparse, which may occur with non-linear grading. Overly dense gray level intervals lead to processing complexity and increased computational load; overly sparse gray level intervals can cause visible jumps. Furthermore, it simplifies the complexity of subsequent mapping models and error calculations used to establish the correspondence between binary and multi-tone images, facilitating hardware implementation.
[0036] In practice, the grayscale level L can be 8, 16, or 32 to adapt to different application scenarios and hardware computing power requirements. For example: When L=8, the grayscale granularity is relatively coarse, but the computational load is small and the convergence speed is fast, making it suitable for scenarios with high real-time requirements or low computing power platforms.
[0037] When L=16, the gray levels are relatively rich, which can achieve a good balance between image quality and processing efficiency, and can be applied to most general scenarios.
[0038] When L=32, the grayscale is delicate and can present a visual effect close to continuous tones, which is suitable for offline scenarios of high-quality image processing.
[0039] It should be noted that in some embodiments, the grayscale level L can be dynamically adjusted based on the complexity of the original image, transmission bandwidth, or the power status of the display device. For example, a high-quality mode with L=32 is used when the battery is fully charged; a power-saving mode with L=8 is switched when the battery is low; and the L value is dynamically adjusted based on the bandwidth when transmitting images over a network. By dynamically adjusting the L value, an adaptive balance between image quality and system resources (such as computing power, power consumption, and bandwidth) can be achieved.
[0040] When performing non-uniformly spaced grayscale grading on the original image, there are several possible methods, such as: (1) Non-uniform adaptive gray level grading: Based on the gray level histogram distribution of the original image, more gray level levels (i.e., finer grading step size) are allocated in gray level ranges with dense pixel distribution, and fewer gray level levels are allocated in gray level ranges with sparse pixel distribution. For example, for an image with dark details, the 0-0.3 range is subdivided into 8 levels, while the 0.7-1.0 range is only allocated 2 levels.
[0041] (2) Nonlinear grading based on human visual characteristics: a smaller grading step size is used in low-brightness areas and a larger grading step size is used in high-brightness areas. This method can match the distribution of discrete gray levels with the nonlinear perception characteristics of the human eye, and obtain better subjective visual effects with the same number of gray levels. It is especially suitable for medical images or night scene images with rich dark scenes.
[0042] (3) Content-Adaptive Grading: The grading strategy is dynamically adjusted based on the local content features of the original image. Specifically, the original image is divided into blocks: finer grayscale grading is used in smooth areas to suppress banded artifacts; coarser grayscale grading is used in textured areas to ensure edge sharpness; and standard grading is used in flat areas. This method can allocate differentiated grayscale resolutions according to the image characteristics of different areas, maximizing local perceptual quality under the condition of limited overall grayscale.
[0043] In step 103, a binary image of the original image is generated.
[0044] In this embodiment, a halftone algorithm can be used to generate a binary image of the original image, i.e., an initial binary image. The halftone algorithm can convert a continuous-tone image into a black-and-white binary dot matrix. Although it has inherent problems such as texture and artifacts, as the starting point for iterative optimization, its quality is far superior to random initialization, which can significantly reduce the number of iterations required for subsequent optimization and accelerate the convergence speed.
[0045] For example, in some embodiments, an error diffusion algorithm can be used: the binarization error of the current pixel is diffused to adjacent unprocessed pixels according to a preset weight. This algorithm is simple to calculate, fast to process, and suitable for real-time applications.
[0046] For example, in some embodiments, the DBS (Direct Binary Search) algorithm can be used: iterative optimization directly finds the optimal binary pixel arrangement. This algorithm generates higher quality binary images with less graininess, but it is computationally intensive and suitable for offline processing or scenarios with high image quality requirements.
[0047] For example, in some embodiments, an ordered dithering algorithm can be used: specifically, a Bayer dithering matrix or a blue noise mask is used to perform threshold comparisons on the original image to generate an initial binary image. The ordered dithering algorithm has advantages such as simple computation, parallelizability, and no error propagation, making it particularly suitable for hardware parallel implementation and real-time processing scenarios.
[0048] It should be noted that the same halftone algorithm can be used to generate binary images with different gray levels to ensure consistency in processing logic; or different algorithms can be used according to the characteristics of each gray level. For example, for low gray level areas (close to black), the DBS algorithm is preferred to preserve details in dark areas; for intermediate gray level areas, the error diffusion algorithm is used to improve processing speed; and for high gray level areas (close to white), a simple ordered dithering algorithm can be used.
[0049] By employing differentiated processing strategies, more computing resources can be allocated to visually sensitive areas to ensure quality, while faster algorithms can be used to improve efficiency in non-sensitive areas. This enhances the flexibility of the solution and optimizes the overall utilization efficiency of computing resources, making it particularly suitable for embedded devices with limited computing power.
[0050] In step 104, the binary image is iteratively optimized to determine the multi-tone image based on gray levels corresponding to the optimized binary image, and the error between the multi-tone image and the original image is calculated until the error converges and the iterative optimization stops.
[0051] After obtaining L discrete gray levels through grayscale grading, the normalization range of pixel values in a multi-tone image based on grayscale levels can be limited to [0 / (L-1), (L-1) / (L-1)], that is, the value of each pixel is limited to the set [0 / (L-1), (L-1) / (L-1)]. In this case, the minimum value is 0, the maximum value is 1, and the step size between adjacent gray levels is 1 / (L-1).
[0052] The normalization range is consistent with the commonly used representation range of the original image (i.e., the [0,1] interval), which facilitates direct pixel-level error calculation.
[0053] When iteratively optimizing a binary image, each pixel can be optimized sequentially in a preset order (preferably raster scan order, i.e., from left to right and from top to bottom). After completing one round of traversal, if the error has not yet converged, the next round of traversal is performed until the convergence condition is met.
[0054] In some embodiments, the optimization process may include sequentially attempting a flip operation and a swap operation.
[0055] The flip operation selects the current pixel and modifies its grayscale value to that of an adjacent pixel, creating a candidate image. The perceptual error between the candidate image and the original image is calculated. If the error decreases, the flip is accepted; otherwise, it is canceled. The flip operation can adjust the overall brightness level of a local area, making the grayscale distribution of a multi-tone image approximate that of the original image.
[0056] The swap operation involves selecting the current pixel and another candidate pixel (either within a neighborhood or according to rules) and exchanging their grayscale values to form a candidate image. The perceptual error is calculated. If the error decreases, the swap is accepted; otherwise, it is cancelled. The swap operation can optimize the spatial arrangement of pixels and improve texture and edge smoothness without changing the overall grayscale distribution.
[0057] The flip and swap operations are complementary and executed alternately, thereby controlling brightness and optimizing structure, so that the optimized binary image gradually approximates the original image after iteration. It should be noted that after each operation, an evaluation is required to decide whether to keep or cancel, ensuring the monotonically decreasing error and ensuring rapid convergence.
[0058] In some embodiments, the optimization process may include only a flip operation, without a swap operation. That is, for each pixel, its grayscale value is tried to be changed sequentially (flipped to an adjacent grayscale), the perceptual error is calculated, and a flip is accepted only when the error decreases. This mode can reduce the computational complexity in the iteration process, shorten the time of each iteration, and achieve faster processing speed with a slight loss of quality. It is suitable for scenarios with extremely high computational speed requirements or where the implementation cost of swap operations is high.
[0059] In some embodiments, the optimization process may only include swapping operations, without flipping. That is, the overall grayscale histogram of the image remains unchanged, and the spatial arrangement is optimized only by swapping pixel positions. This mode can optimize detailed textures without changing the overall brightness and contrast of the image, reducing computational complexity. It is suitable for images that already have a correct grayscale distribution but need to optimize texture arrangement, and can avoid grayscale distribution drift that may be caused by flipping operations.
[0060] In some embodiments, the specific operation for optimization can be adaptively selected based on the current optimization stage. For example, when the error is large in the early stages of optimization, the flip operation is prioritized to quickly adjust the grayscale distribution; when the error is close to convergence in the later stages of optimization, the swap operation is prioritized to finely optimize the texture; when a certain type of operation fails to reduce the error after multiple consecutive iterations, that type of operation is paused, and another type of operation is used in focus. This adaptive optimization approach allows the optimization process to match the most suitable operation at different stages, improving the convergence speed and final quality.
[0061] In this embodiment, the multi-tone image based on multiple gray levels can be determined using a mapping model, which will be discussed in detail later. Figure 2 Please provide a detailed explanation.
[0062] In step 105, the optimized binary image is output as the target image.
[0063] like Figure 2The diagram shown is a flowchart for determining a multi-tone image based on multiple gray levels in an embodiment of this application, including the following steps: In step 201, a mapping model based on gray levels and binary images is determined.
[0064] In some embodiments, the following mapping model may be used: ; in, This represents a pixel in the binary image (the pixel value is 0 or 1). express The corresponding pixels of the original image (pixel values normalized to the [0,1] range). express The corresponding pixels of the multi-tone image. The physical meaning of this mapping model is as follows: when When the original pixel value is rounded down to the nearest discrete gray level; when When the original pixel value is rounded up to the nearest discrete gray level, the original pixel value is rounded up.
[0065] In some embodiments, a deep learning-based mapping model may also be employed. Specifically, a lightweight convolutional neural network is trained, taking a binary image and its corresponding grayscale parameters as input, and outputting a multi-tone image. Deep learning-based mapping models can learn more complex mapping relationships, including nonlinear mappings that consider neighborhood context, and can achieve better results than formulaic mappings on certain complex texture images.
[0066] In some embodiments, multiple mapping models can be pre-configured, such as the mapping model described above, a LUT (Look-Up Table) based mapping model, a polynomial-based mapping model, etc. Before optimizing each image, the performance of each model is evaluated using a small number of samples, and the optimal mapping model is automatically selected for the complete processing of that image, which can avoid the problem of uneven performance of a single model across all images.
[0067] In step 202, the gray values of each pixel in the optimized binary image are calculated to the multi-tone image using a mapping model.
[0068] In step 203, a multi-tone image based on multiple gray levels is generated according to the calculated gray values of each pixel.
[0069] By establishing a mapping model between binary images and multi-tone images, the multi-grayscale optimization problem can be transformed into a binary optimization problem, thus enabling efficient optimization. Using the multi-tone image as an intermediate representation, the optimization process of the binary image can be linked to the perceptual characteristics of the original image: in each iteration, the binary image is first converted into a multi-tone image through the mapping model, and then the perceptual error between the multi-tone image and the original image is calculated. This makes optimizing the binary image equivalent to minimizing the perceptual difference between the multi-tone image and the original image, thereby quantifying visual quality into a computable objective function—the error between the multi-tone image and the original image. This gives the iterative optimization a clear direction and enhances the feasibility of the solution.
[0070] The image processing method provided in this application introduces grayscale grading to discretize a continuous-tone image into a finite number of gray levels, providing a clear target space for subsequent optimization. By performing iterative optimization in the binary image domain with the goal of minimizing perceptual error, the final output binary image visually approximates the original image to the greatest extent possible. This method is independent of specific display hardware and has good versatility and portability.
[0071] It should be noted that the image processing method provided in this application embodiment can be applied not only to offline image batch processing scenarios, such as e-book content production and other application scenarios that require high-quality preprocessing; but also to real-time video stream processing scenarios, such as video playback, real-time monitoring and other dynamic image scenarios that require high processing speed, and can achieve a controllable balance between image quality and processing efficiency.
[0072] When processing dynamic images, a temporal consistency constraint can be further introduced into the aforementioned optimization objective. Specifically, when calculating the perceptual error, not only the difference between the current frame and the original image is considered, but also the difference between the current frame and the optimization result of the previous frame, with appropriate weighting coefficients assigned. This makes the pixel state changes between adjacent frames as smooth as possible, effectively suppressing visual flicker caused by differences in optimization results between adjacent frames.
[0073] It should be noted that the image processing method provided in this application embodiment is applicable not only to black and white images, but also to color images.
[0074] In some embodiments, for color images, the RGB color space can first be converted to a luminance-chrominance separated color space, such as YUV or Lab. Then, the aforementioned grayscale grading and iterative optimization method is applied separately to the luminance channel; a lower resolution processing strategy can be used for the chrominance channel (because the human eye is less sensitive to chrominance changes than luminance changes). Finally, the optimized luminance channel and the processed chrominance channel are merged to obtain the color output image. By adopting a luminance and chrominance separation strategy, computational resources can be preferentially allocated to the luminance channel, which is most sensitive to the human eye, to obtain the best visual quality under limited output conditions. Reducing the resolution of the chrominance channel significantly reduces the computational load without significantly affecting color perception.
[0075] In some embodiments, the image processing method of this application can also be applied independently to the R, G, and B channels of a color image. Each channel is subjected to grayscale grading and iterative optimization, and then the results are merged into a color image output. The grayscale level L of each channel can be the same, or it can be set to different values according to the human eye sensitivity of different channels, such as L=32 for the G channel and L=16 for the R and B channels.
[0076] Accordingly, embodiments of this application also provide an image processing apparatus, such as... Figure 3 The image shown is a schematic diagram of one structure of the image processing device.
[0077] The image processing apparatus 300 of this embodiment includes: an image acquisition module 301, a grading module 302, a binary image generation module 303, an optimization processing module 304, and an output module 305. Wherein: Image acquisition module 301 is used to acquire the original image; The grading module 302 is used to perform equal-interval gray-level grading on the original image and determine the gray-level. Binary image generation module 303 is used to generate a binary image of the original image; The optimization processing module 304 is used to iteratively optimize the binary image, determine the multi-tone image based on the gray level corresponding to the optimized binary image, and calculate the error between the multi-tone image and the original image until the error converges and then the iterative optimization stops. The output module 305 is used to output the optimized binary image as the target image.
[0078] The original image may be a black and white image or a color image, and this application embodiment does not limit this.
[0079] The grading module 302 can perform equal-interval gray-level grading on the original image, or perform non-equal-interval gray-level grading on the original image. Moreover, non-equal-interval gray-level grading can be performed in various ways, which are not limited in this embodiment.
[0080] In some embodiments, the binary image generation module 303 may use a halftone algorithm to generate a binary image of the original image, such as an error diffusion algorithm, a DBS algorithm, an ordered dithering algorithm, etc. This application embodiment does not limit this.
[0081] In some embodiments, the binary image generation module 303 may also employ different algorithms according to the characteristics of each gray level, that is, for different gray levels, differentiated algorithms are used to generate binary images of the original image. For details, please refer to the description in the previous embodiments of the image processing method of this application, which will not be repeated here.
[0082] The optimization processing module 304 can perform iterative optimization processing on the binary image in various ways. For example, it can perform flipping and / or swapping operations on each pixel in a certain order. After each operation, it determines the multi-tone image based on the gray level corresponding to the optimized binary image and calculates the error between the multi-tone image and the original image. If the calculated error does not converge, iterative optimization processing continues; otherwise, iterative optimization process stops. The currently optimized binary image is used as the target image.
[0083] Furthermore, the optimization processing module 304 can determine a multi-tone image based on multiple gray levels using a mapping model between gray levels and binary images. The mapping model can be a function-based model or a deep learning-based model, etc., and this embodiment of the application does not limit the specific model.
[0084] The image processing apparatus provided in this application introduces grayscale grading to discretize a continuous-tone image into a finite number of gray levels, providing a clear target space for subsequent optimization. Through iterative optimization in the binary image domain, with the goal of minimizing perceptual error, the final output binary image visually approximates the original image to the greatest extent possible. This method is independent of specific display hardware and has good versatility and portability. This image processing apparatus can be applied not only to offline batch image processing scenarios but also to real-time video stream processing scenarios.
[0085] As mentioned above, the original image in the embodiments of this application can be a black and white image or a color image.
[0086] In some embodiments, for a color image, multiple channels can be set, and each channel is subjected to grayscale grading and iterative optimization of a single color by the aforementioned image processing device, and then merged into a color image output. Moreover, the grayscale level L of each channel can be the same, or it can be set to different values according to the human eye sensitivity of different channels.
[0087] In some embodiments, for color images, the RGB color space can be converted to a luminance-chrominance separated color space, and the aforementioned grayscale grading and iterative optimization method can be applied separately to the luminance channel; while a lower resolution processing strategy can be used for the chrominance channel. The following section combines... Figure 4 The illustrated embodiments provide a detailed description of this.
[0088] like Figure 4 The diagram shown is a schematic diagram of another structure of an image processing apparatus provided in an embodiment of this application.
[0089] and Figure 3 Compared to the illustrated embodiment, in this embodiment, the image processing device 300 further includes: a color space conversion module 401 and a chroma processing module 402. Wherein: Image acquisition module 301 is used to acquire the original image; Color space conversion module 401 is used to convert the original color image from a first color space to a second color space that separates luminance and chrominance, to obtain a luminance channel image and at least one chrominance channel image; the second color space may be, for example, YUV color space, Lab color space, etc. The grading module 302 is used to perform equal-interval gray-level grading on the brightness channel image to determine the gray-level. Binary image generation module 303 is used to generate a binary image of the original image; The optimization processing module 304 is used to iteratively optimize the binary image, determine the multi-tone image based on the gray level corresponding to the optimized binary image, and calculate the error between the multi-tone image and the original image until the error converges and then stop the iterative optimization to obtain the optimized binary image. The chroma processing module 402 is used to process or directly transmit the chroma channel image, wherein the processing resolution is lower than the resolution of the luminance channel image processing. For example, the following processing can be performed: Downsampling: The chroma channel image is spatially downsampled, then the downsampled image is processed, and finally upsampled to restore the original resolution; Low-precision quantization: The chroma channel image is quantized using a lower gray level than the luminance channel. The output module 305 is used to merge the optimized luminance channel image and the processed chrominance channel image to output the target color image.
[0090] The image processing apparatus of this embodiment employs a luminance and chrominance separation strategy for color images. This strategy prioritizes the allocation of computational resources to the luminance channel, which is most sensitive to the human eye, thereby achieving optimal visual quality with limited output. The chrominance channel undergoes resolution reduction processing, significantly decreasing the computational load without substantially affecting color perception.
[0091] Accordingly, embodiments of this application also provide a display device, such as... Figure 5 The diagram shown is a structural schematic of the display device.
[0092] The display device 500 includes a display array 501 composed of multiple display units 51 and a processor 502. The processor 502 is configured to execute instructions to implement the image processing methods described in the preceding embodiments to obtain a target image. The display array 501 is used to display the target image.
[0093] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article indicates that the preceding and following related objects have an "or" relationship.
[0094] In the embodiments of this application, "multiple" refers to two or more.
[0095] The descriptions of "first," "second," etc., appearing in the embodiments of this application are for illustrative purposes and to distinguish the objects being described. They have no order and do not indicate any special limitation on the number of devices in the embodiments of this application, nor do they constitute any limitation on the embodiments of this application.
[0096] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0097] While this application discloses the above information, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of this application; therefore, the scope of protection of this application shall be determined by the scope defined in the claims.
Claims
1. An image processing method, characterized in that, The method includes: Obtain the original image; Perform grayscale grading on the original image to determine the grayscale levels; Generate a binary image of the original image; The binary image is iteratively optimized to determine the multi-tone image based on the gray level corresponding to the optimized binary image, and the error between the multi-tone image and the original image is calculated until the error converges and the iterative optimization stops. The optimized binary image is output as the target image.
2. The image processing method according to claim 1, characterized in that, The step of performing equal-interval grayscale grading on the original image includes: The original image is then subjected to equal-interval grayscale grading.
3. The image processing method according to claim 1, characterized in that, The gray level L is 8, 16, or 32.
4. The image processing method according to claim 2, characterized in that, The range of pixel values in the multi-tone image is: [0 / (L-1), (L-1) / (L-1)].
5. The image processing method according to claim 1, characterized in that, The process of generating a binary image of the original image includes: generating a binary image of the original image using a halftone algorithm.
6. The image processing method according to claim 5, characterized in that, The halftone algorithm includes any one of the following: error diffusion algorithm, DBS algorithm.
7. The image processing method according to claim 5, characterized in that, The process of generating a binary image of the original image using a halftone algorithm includes: The original image is generated using the same or different halftone algorithms for different gray levels.
8. The image processing method according to claim 1, characterized in that, The iterative optimization of the binary image includes: Each pixel in the binary image is then optimized sequentially.
9. The image processing method according to claim 8, characterized in that, The optimization process includes: Try performing flip and / or swap operations in sequence; or The flipping or swapping operation is adaptively selected based on the current optimization stage.
10. The image processing method according to claim 1, characterized in that, The determination of the multi-tone image based on multiple gray levels corresponding to the optimized binary image includes: Determine a mapping model based on the gray level and the binary image; The grayscale value of each pixel in the optimized binary image is calculated to be mapped to the multi-tone image using the mapping model. Based on the calculated grayscale values of each pixel, an optimized binary image corresponding to a multi-grayscale multitone image is generated.
11. The image processing method according to claim 10, characterized in that, The mapping model is as follows: ; in, Represents the pixels in the binary image. express The corresponding pixels of the original image, express The corresponding pixels of the multi-tone image.
12. The image processing method according to any one of claims 1 to 11, characterized in that, The original image is a dynamic image.
13. The image processing method according to any one of claims 1 to 11, characterized in that, The original image is a color image.
14. An image processing apparatus, characterized in that, The device includes: The image acquisition module is used to acquire the original image; The grading module is used to perform equal-interval gray-level grading on the original image and determine the gray-level; The binary image generation module is used to generate a binary image of the original image; An optimization processing module is used to iteratively optimize the binary image, determine the multi-tone image based on the gray level corresponding to the optimized binary image, and calculate the error between the multi-tone image and the original image until the error converges and then the iterative optimization stops. The output module is used to output the optimized binary image as the target image.
15. The image processing apparatus according to claim 14, characterized in that, The original image is a color image; the device further includes: The color space conversion module is used to convert the original color image from a first color space to a second color space that separates luminance and chrominance, to obtain a luminance channel image and at least one chrominance channel image. The grading module performs equal-interval gray-level grading on the brightness channel image to determine the gray-level; The output module merges the optimized luminance channel image with the processed chrominance channel image to output the target color image.
16. A display device, characterized in that, The device includes a display array consisting of multiple display units and a processor, wherein the processor is configured to execute instructions to implement the image processing method as described in any one of claims 1 to 13 to obtain a target image; The display array is used to display the target image.