Image processing device, image processing method, and program

JP7919947B2Active Publication Date: 2026-09-14CANON KK
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022122596
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-08-01
Publication Date
2026-09-14
Estimated Expiration
2042-08-01

AI Technical Summary

Benefits of technology

【0008】 本発明によれば、中間階調値のハッチングパターンのような高周波パターンの画像であっても、量子化の処理の際に領域としての濃度を保持することができるようになる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007919947000001
    Figure 0007919947000001
  • Figure 0007919947000002
    Figure 0007919947000002
  • Figure 0007919947000003
    Figure 0007919947000003
Patent Text Reader

Abstract

To provide a technique that can maintain density as an area during quantization processing even if an image has a high frequency pattern.SOLUTION: An image processing apparatus acquires an area value corresponding to a target pixel to be quantized according to pixel values of pixels located in an area including the target pixel, and on the basis of the acquired area value, determines a first activity ratio indicating a degree of causing a two-dimensional matrix to affect the quantization and a second activity ratio indicating the degree of causing a cumulative error, which is a cumulative value of quantization error values occurring through the quantization of pixels around the target pixel, to affect the quantization. The image processing apparatus executes the quantization by using the two-dimensional matrix according to the first activity ratio and by using the cumulative error according to the second activity ratio.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image processing apparatus, an image processing method, and a program that perform quantization processing.

Background Art

[0002] To print an image with a printer, quantization processing on the image is generally required. Quantization processing is halftone processing that converts an image expressed in continuous gradations into the number of gradations that can be expressed by a printer. Conventionally, dithering processing and error diffusion processing are known as quantization processing, for example.

[0003] Further, conventionally, a method of performing quantization using both dithering processing and error diffusion processing is known. For example, Patent Document 1 discloses a quantization technique that allocates the influences of dithering processing and error diffusion processing using dither matrix noise, a noise usage rate that is a parameter indicating the degree to which cumulative error influences quantization processing, and an error usage rate for quantization.

Prior Art Literature

Patent Literature

[0004]

Patent Document 1

Summary of the Invention

Problem to be Solved by the Invention

[0005] However, for example, in an image of a high-frequency pattern such as a hatching pattern with a halftone value, the noise usage rate and the error usage rate vary within the region. For this reason, despite being processed by error diffusion, depending on the error usage rate, there is little error propagation or no error propagation at all, and the density may not be maintained as a region in some cases.

[0006] This invention has been made in view of the above problems, and aims to provide a technology that can maintain the density of regions during quantization processing, even in images of high-frequency patterns. [Means for solving the problem]

[0007] To achieve the above objective, one embodiment of the present invention is a program that causes a computer to function as an image processing device that quantizes the pixel values ​​of each pixel in an input image, wherein the computer comprises: pixel selection means for selecting a pixel of interest to be quantized; region value acquisition means for acquiring a region value corresponding to the pixel of interest according to the pixel value of each pixel located in a target region including the pixel of interest; a first usage rate indicating the degree to which a two-dimensional matrix is ​​influenced by the quantization based on the region value; and a cumulative error, which is the cumulative value of the quantization error values ​​that occur in the quantization of pixels surrounding the pixel of interest, being influenced by the quantization. The system is characterized by functioning as: a usage rate determination means for determining a second usage rate indicating the degree to which the system should be used; an applied error value acquisition means for acquiring an applied error value to be applied to the quantization of the pixel of interest based on the cumulative error corresponding to the pixel of interest and the second usage rate; a cumulative pixel value acquisition means for acquiring a cumulative pixel value based on the applied error value and the pixel value of the pixel of interest; a threshold acquisition means for acquiring a quantization threshold to be applied to the quantization of the pixel of interest based on the two-dimensional matrix and the first usage rate; and a quantization value acquisition means for acquiring a quantized value and a quantization error value based on the cumulative pixel value and the quantization threshold. [Effects of the Invention]

[0008] According to the present invention, even images with high-frequency patterns, such as hatching patterns of intermediate tonal values, can retain density as regions during quantization processing. [Brief explanation of the drawing]

[0009] [Figure 1] A diagram illustrating the quantization process performed in printing and image processing systems. [Figure 2]This figure shows an example of an image resulting from the input image and quantization processing. [Figure 3] This figure shows an example of input values ​​in an input image and output values ​​after quantization processing. [Figure 4] A flowchart illustrating the processing routine for quantization. [Figure 5] Diagram explaining the order of pixel selection [Figure 6] Diagram illustrating the calculation method for noise usage rate and error usage rate. [Figure 7] Flowchart showing the processing routine for the first calculation process. [Figure 8] Flowchart showing the processing routine for the second calculation process. [Figure 9] A flowchart showing the processing routine for quantization execution. [Figure 10] A diagram showing a diffusion filter and an example of error distribution using a diffusion filter. [Figure 11] Flowchart showing the error distribution processing routine. [Figure 12] A diagram illustrating other forms of quantization processing performed by image processing equipment. [Figure 13] Figure showing another example of an image resulting from input image and quantization processing. [Modes for carrying out the invention]

[0010] Hereinafter, an example of an embodiment of the image processing apparatus, image processing method, and program will be described in detail with reference to the attached drawings. Note that the following embodiments are not intended to limit the present invention, and not all combinations of features described in these embodiments are essential to the solutions of the present invention. Furthermore, the positions and shapes of the components described in the embodiments are merely illustrative and are not intended to limit the scope of this invention to them alone.

[0011] (First Embodiment) A printing system equipped with an image processing device according to the first embodiment will be described with reference to Figures 1 to 11.

[0012] <Configuration of Printing System> FIG. 1(a) is a diagram showing an example of a printing system including an image processing apparatus according to the present embodiment. The printing system 10 in FIG. 1(a) includes a printing apparatus 12 that performs printing on a print medium, and an image processing apparatus 14 capable of generating printable data that can be executed for printing by the printing apparatus 12 based on input print data. The printing apparatus 12 is, for example, an inkjet printer, and performs printing on a print medium based on printable data input from the image processing apparatus 14. In addition, the printing apparatus 12 performs color printing using cyan ink, magenta ink, yellow ink, and black ink as process colors. Note that the printing apparatus 12 may be configured to eject, in addition to process color inks, inks of other colors or a treatment liquid that applies predetermined treatment to ejected ink.

[0013] Although not shown in the figure, the image processing apparatus 14 includes at least a central processing unit (CPU), a ROM that stores programs for various processes executed by the CPU, and a RAM used as a work memory for the CPU. In addition, the image processing apparatus 14 includes a storage unit capable of storing various types of information. The image processing apparatus 14 executes image formation processing such as RIP (Raster Image Processor) processing, for example. Specifically, the image processing apparatus 14 develops an original image indicated by print data to generate printable data representing an image in a format interpretable by the printing apparatus 12.

[0014] In the present embodiment, in image forming processing, the image processing apparatus 14 quantizes density values indicating color density, which are pixel values of each pixel in at least an original image. Accordingly, in the present embodiment, the image processing apparatus 14 performs quantization for each process color used in the printing apparatus 12, and forms a halftone image corresponding to each process color based on print data. Note that the image processing apparatus 14 is, for example, a host apparatus that controls the printing apparatus 12, and operates as an image processing apparatus according to a predetermined program. The image processing apparatus 14 may receive print data from, for example, an external apparatus connected to the image processing apparatus 14. Alternatively, the image processing apparatus 14 may be configured to allow a user to create print data.

[0015] <Outline of Quantization> Next, an outline of quantization processing executed by the image processing apparatus 14 will be described. FIG. 1(b) is a diagram illustrating an outline of quantization processing executed by the image processing apparatus 14. The image processing apparatus 14 forms a pseudo halftone image, which is a halftone image, by quantizing the original image for each process color. This quantization is processing for converting a density value In(x, y) at each coordinate of the original image into a quantized value out(x, y) at the same coordinate in the pseudo halftone image.

[0016] As quantization, the image processing apparatus 14 performs hybrid error diffusion processing using both dither matrix noise D(i, j) and cumulative error E(x, y). The image processing apparatus 14 also uses, as parameters related to the dither matrix noise D(i, j) and the cumulative error E(x, y), a noise usage rate Rn and an error usage rate Re which are each set to a value between 0 and 1 inclusive, that is, a value within a range of 0% to 100%.

[0017] The noise utilization rate Rn is a parameter that indicates the degree to which the two-dimensional matrix dither matrix noise D(i, j) influences the quantization process. The noise utilization rate Rn applied to the pixel to be quantized is calculated according to the region value, which is calculated from the intensity values ​​of each pixel in the region including the pixel to be quantized and its surrounding pixels. The image processing device 14 does not use the dither matrix noise D(i, j) directly, but performs quantization using the product of the dither matrix D(i, j) and the noise utilization rate Rn. In other words, the image processing device 14 uses the dither matrix noise D(i, j) according to the noise utilization rate Rn corresponding to the pixel to be quantized.

[0018] The error usage rate Re is a parameter that indicates the degree to which the cumulative error E(x, y) affects the quantization process. The error usage rate Re applied to the pixels to be quantized is calculated according to the region value, which is calculated from the intensity values ​​of each pixel in the region including the pixels to be quantized and the surrounding pixels. The image processing device 14 does not use the cumulative error E(x, y) directly, but calculates an error-corrected input value In'(x, y) corresponding to the intensity value In(x, y) of each pixel using the product of the cumulative error E(x, y) and the error usage rate Re. Then, it performs the quantization process using the calculated error-corrected input value In'(x, y). In other words, the image processing device 14 uses the cumulative error E(x, y) according to the error usage rate Re corresponding to the pixels to be quantized. Details of the quantization process will be described later.

[0019] <Concerns regarding prior art> Here, we will explain the printing results when printing using data that has been quantized using a known technique. In the known technique (for example, the technique disclosed in Patent Document 1), the noise usage rate Rn and error usage rate Re for a pixel are determined by the density value In(x, y) of that pixel. Figure 2 shows the difference in printing results depending on the processing result of the input image. Figure 2(a) shows the input image printed with a predetermined process color. Figure 2(b) shows the printing result depending on the processing result of the input image using the known technique. Figure 2(c) shows the printing result depending on the processing result of the input image using the technique of this embodiment. Figure 3 shows the quantization result of an image cropped into 5x5 pixels from the input image in Figure 2(a). Figure 3(a) shows the image of the input image in Figure 2(a) near the midtones (density value of pixels with density is 125 (8 bits)). Figure 3(b) shows the result of quantization using the known technique. Figure 3(c) shows the result of quantization according to this embodiment.

[0020] The input image has pixels with and without density arranged in a staggered pattern, and the density of the pixels with density gradually increases from one side of the image to the other (see Figure 2(a)). In the image obtained by cropping the midtones of this input image with 5x5 pixels, as shown in Figure 3(a), pixels with a density value of 125 are surrounded by pixels with a density value of 0. For pixels with density (density value of 125), the error usage rate is 100% and the noise usage rate is 0%. The diffusion filter used is the diffusion filter 102 shown in Figure 1(b). The ratio of the error usage rate and noise usage rate to the density value is, for example, as shown in Figure 6, and the details will be described later. The result of quantization of the image in Figure 3(a) using known techniques is shown in Figure 3(b).

[0021] In other words, in Figure 3(a), pixel 302 has a density value of 0. Therefore, pixel 302 has a noise utilization rate of 100% and an error utilization rate of 0%. When pixel 302 is quantized, there is a pixel 304 with a density value of 125 nearby, so the cumulative error E applied to pixel 302 will be a non-zero value due to the propagation of errors generated in the surrounding pixels. However, since the error utilization rate for pixel 302 is 0%, the cumulative error E is not reflected in the input value, and the error-diffused input value becomes 0 (0+0). Therefore, if the dither matrix value of pixel 302 is -108 and the initial threshold is 128, the noise-corrected threshold becomes 20 (=-108 × 1.0 + 128). As a result, the input value (density value) of 0 and the threshold of 20 are compared, and since the input value is less than the threshold, the quantization result is 0 (see Figure 3(b)). Then, 0 (0-0) is calculated as the error, so there is no error diffusing to the surroundings.

[0022] On the other hand, in Figure 3(a), pixel 304 has a density value of 125. Therefore, pixel 304 has a noise utilization rate of 0% and an error utilization rate of 100%. Since the pixels surrounding pixel 304 have a density of 0, there is no error generated in the quantization of the surrounding pixels. Therefore, the cumulative error E applied to pixel 304 is 0. And although the error utilization rate for pixel 304 is 100%, since the cumulative error E is 0, the error-diffused input value becomes 125 (125 + 0). Thus, if the dither matrix value of pixel 304 is -64 and the initial threshold is 128, the noise-corrected threshold becomes 128 (= -64 × 0.0 + 128). As a result, the input value (density value) of 125 and the threshold of 128 are compared, and since the input value is less than the threshold, the quantization result is 0 (see Figure 3(b)). Then, an error of +125 (125 - 0) is calculated, and the error is diffused to the surrounding pixels by the diffusion filter.

[0023] Thus, in quantization using publicly known techniques, the image in Figure 3(a) shows that errors generated in pixels with density are diffused but not applied to surrounding pixels. As a result, as shown in Figure 3(b), all output values ​​in a region become 0, and density is no longer preserved in that region. Therefore, in the case of input values ​​(density values) where the error usage rate is 100% and the noise usage rate is 0%, the density resulting from quantization changes abruptly at a reference threshold in the error diffusion process (see Figure 2(b)). Furthermore, in gradations with a low noise usage rate, density may not be preserved in a region as a result of quantization.

[0024] As shown in Figure 2(b), in the bright areas (left side of the figure), some of the quantization results are 255, while in the dark areas (right side of the figure), some of the quantization results are 0 where they should be 255. This is because, as the noise usage rate approaches 100%, pixels occur where: bright areas: noise-corrected threshold < pixel density value, dark areas: noise-corrected threshold > pixel density value. In other words, comparing Figure 2(a) and Figure 2(b), it can be seen that in Figure 2(b), the density gradation is not preserved, the density changes abruptly near the center, and there are even areas where the density is reversed between the bright and dark areas.

[0025] <Summary of the technology according to this embodiment> Therefore, in this embodiment, a region value corresponding to the pixel to be quantized is calculated from the density value of each pixel in the region including the pixel to be quantized and the surrounding pixels. Then, the nozzle usage rate Rn and error usage rate Re corresponding to the pixel to be quantized are determined according to the calculated region value.

[0026] This allows, for example, the spatial frequency characteristics of the dithering process to influence the spatial frequency characteristics of the error diffusion process (error diffusion characteristics). Furthermore, quantization can be performed by incorporating dithering characteristics into the error diffusion characteristics. In this case, unlike simply switching between dithering and error diffusion processes, the generation of boundary lines associated with process switching can be suppressed.

[0027] Furthermore, noise utilization rates Rn and error utilization rates Re, which take into account the preservation of region density, can be applied to the pixels undergoing quantization. As a result, in high-frequency patterns such as hatching patterns of midtone values ​​where noise utilization rate Rn and pixel utilization rate Re vary within a region, the density of the region can be preserved. Therefore, for example, it becomes possible to appropriately utilize the strengths of error diffusion processing and dithering processing, while preserving the density of the region during quantization.

[0028] In this embodiment, the dither matrix noise D(i, j) is a two-dimensional matrix, and is a value specified by, for example, a pre-set dither matrix. Furthermore, the dither matrix noise D(i, j) may be the same as, for example, the dither matrix noise used in conventional dithering. In addition, it is preferable to use, for example, blue noise characteristics for the dither matrix noise D(i, j). In the image processing apparatus 14, it is preferable to change the dither matrix used for each process color.

[0029] In this embodiment, the cumulative error E(x, y) is the cumulative value of the quantization error Q(x, y), which is the error that occurs during quantization of surrounding pixels (i.e., the cumulative value of the quantization error), and is calculated using a pre-set diffusion filter (diffusion matrix). The calculated cumulative error E(x, y) is stored, for example, in a cumulative error buffer. The image processing device 14 calculates the cumulative error E(x, y) using, for example, the same or similar method as the cumulative error used in conventional error diffusion processing.

[0030] <Quantization process> Next, the quantization process performed in the image processing apparatus 14 according to this embodiment will be described. This quantization process is a process that performs quantization on each pixel in the original image. Figure 4 is a flowchart showing the detailed processing routine of the quantization process performed in the image processing apparatus 14. In the image processing apparatus 14, the quantization process shown in Figure 4 is performed for each process color. The series of processes shown in the flowchart of Figure 4 are performed by the CPU expanding the program code stored in ROM into RAM and executing it. Alternatively, some or all of the functions of the steps in Figure 4 may be performed by hardware such as an ASIC or electrical circuit. In the description of each process, the symbol S means a step in the flowchart (the same applies hereafter in this specification).

[0031] When the quantization process begins, first, in S402, the CPU performs a pixel selection process to select a pixel of interest from the original image that will be quantized. In this embodiment, the CPU of the image processing device 14 functions as a pixel of interest selection unit. Next, in S404, the CPU performs a region value calculation process to calculate a region value corresponding to the pixel to be quantized from the density values, which are the pixel values ​​of each pixel in the target region containing the pixel to be quantized. In this embodiment, the CPU of the image processing device 14 functions as a region value acquisition unit to acquire the region value corresponding to the pixel to be quantized. Subsequently, in S406, the CPU performs a usage rate calculation process to calculate the noise usage rate Rn and the error usage rate Re corresponding to the pixel to be quantized, based on the calculated region value. In this embodiment, the CPU of the image processing device 14 functions as a usage rate determination unit to determine the noise usage rate Rn and the error usage rate Re corresponding to the pixel to be quantized, based on the region value. Details of the pixel selection process, region value calculation process, and usage rate calculation process described above will be described later.

[0032] Then, in S408, the CPU calculates the error-corrected input value In'(x,y), which is the density value after correction by the cumulative error E(x,y). In this process, for example, the applied error value, which is the product of the error usage rate Re corresponding to the pixel selected in the pixel selection process in S402 and the cumulative error E(x,y), is added to the density value In(x,y) of that pixel. The value after addition is then obtained as the cumulative pixel value, the error-corrected input value In'(x,y). Thus, in this embodiment, the CPU of the image processing device 14 functions as an applied error value acquisition unit that acquires the applied error value. Also, in this embodiment, the CPU of the image processing device 14 functions as a cumulative pixel value acquisition unit (error-corrected input value calculation unit) that acquires the cumulative pixel value (error-corrected input value).

[0033] Furthermore, in S410, the CPU calculates a noise-corrected threshold Th', which is a threshold that reflects the dither matrix noise D(i,j) as the threshold used for quantization. In this process, for example, the product of the noise usage rate Rn corresponding to the pixel selected in the pixel selection process in S402 and the dither matrix noise D(i,j) is added to a pre-set initial threshold Th. The value after addition is then obtained as the noise-corrected threshold Th', which is the quantization threshold. Thus, in this embodiment, the CPU of the image processing device 14 functions as a threshold acquisition unit (noise-corrected threshold calculation unit) that acquires the quantization threshold (noise-corrected threshold).

[0034] Next, in S412, the CPU compares the calculated noise-corrected threshold Th' with the error-corrected input value In'(x,y) and performs a quantization execution process to calculate a quantized value by executing quantization on the pixel selected in the pixel selection process in S402. In S412, the quantization error Q(x,y) is also calculated. Subsequently, in S414, the CPU performs an error distribution process S107 to distribute the quantization error Q(x,y) generated by the quantization of this pixel to the surrounding pixels according to the diffusion filter. In this error distribution process, the quantization error Q(x,y) is accumulated by multiplying it by the diffusion filter value corresponding to the distribution destination coordinates of the surrounding pixels, and the cumulative error E(x,y) value corresponding to each of the surrounding pixels is updated. Thus, in this embodiment, the CPU of the image processing device 14 functions as a quantization value acquisition unit that acquires the quantized value and the quantization error value.

[0035] Then, in S416, the CPU determines whether the pixel that has undergone quantization is the last pixel of the original image. If it is determined in S416 to be the last pixel, the quantization process is terminated. If it is determined in S416 to be not the last pixel, the process returns to the pixel selection process in S402, the next pixel is selected, and the subsequent processing is executed. Details of the quantization execution process and the error distribution process will be described later.

[0036] =Pixel selection process= Figure 5 shows an example of the order in which pixels are selected during the pixel selection process. In the pixel selection process of S402, for example, as shown in Figure 5, lines of pixels are selected sequentially, and pixels within the selected lines are selected sequentially along a predetermined processing direction. The processing direction is switched for each adjacent line. For example, for odd-numbered lines, pixels are selected sequentially from one side to the other, and for even-numbered lines, pixels are selected sequentially from the other side to the first side. In this way, when quantization is performed in a bidirectional process where the order of quantization to pixels between adjacent lines of the original image is reversed, the direction of error diffusion is not constant, so the dots can be distributed more appropriately. As a result, compared to, for example, when quantization is performed in a unidirectional process where the order of quantization to pixels between adjacent lines of the original image is only in one direction, it becomes possible to suppress the generation of dot delay and worm noise.

[0037] =Usage Rate Calculation Process= Next, the utilization rate calculation process performed in S406 will be described with reference to Figures 6 to 8. Figure 6 is a diagram showing an example of a graph and calculation formula that associates the error utilization rate Re and the noise utilization rate Rn with the input value (domain value). Figure 7 is a flowchart showing the detailed processing routine of the first calculation process for calculating the error utilization rate Re. Figure 8 is a flowchart showing the detailed processing routine of the second calculation process for calculating the noise utilization rate Rn. The series of processes shown in the flowcharts of Figures 7 and 8 are performed by the CPU expanding the program code stored in ROM into RAM and executing it. Alternatively, some or all of the functions of the steps in Figures 7 and 8 may be performed by hardware such as an ASIC or electrical circuit.

[0038] • Overview of the usage rate calculation process The error usage rate Re and the noise usage rate Rn are calculated based on a function that continuously changes with respect to region values in a range from 0, which is the minimum input value MinIn, to the maximum input value MaxIn, inclusive. The maximum input value MaxIn and the minimum input value MinIn are, for example, the maximum and minimum values of the possible range of the region value which is an input value. Further, in this function, the following three items are used as references for indicating the range of region values in a highlight portion. ·Hes: a highlight-side minimum error usage rate region value, which is an example of a third highlight reference value ·Hn: a highlight-side maximum noise usage rate region value, which is an example of a first highlight reference value ·He: a highlight-side maximum error usage rate region value, which is an example of a second highlight reference value

[0039] Further, the following three items are used as references for indicating the range of region values in a shadow portion. ·Se: a shadow-side maximum error usage rate region value, which is an example of a first shadow reference value ·Sn: a shadow-side maximum noise usage rate region value, which is an example of a second shadow reference value ·Ses: a shadow-side minimum error usage rate region value, which is an example of a third shadow reference value Furthermore, a highlight-side 0% noise usage rate region value Hnz, a shadow-side 0% noise usage rate region value Snz, a first halftone reference value C1, and a second halftone reference value C2 are used as references for indicating a range of region values sandwiching the initial threshold Th at the center of a halftone portion.

[0040] Further, these parameters are set at least so that Hes ≤ Hn < He < Se < Sn ≤ Ses and Hn < Hnz < Snz < Sn are satisfied. Also, in the present embodiment, these parameters are set according to the magnitude relationship shown in the graph so that 0 (MinIn) < Hes ≤ Hn < He < C1 < Hnz < Th < Snz < C2 < Se < Sn ≤ Ses < MaxIn holds.

[0041] Then, the error usage rate Re and the noise usage rate Rn are obtained based on the calculation formula shown in Figure 6. If the noise usage rate Rn calculated by the calculation formula shown in Figure 6 is smaller than a predetermined minimum noise usage rate RnMin, the noise usage rate Rn is set to the minimum noise usage rate RnMin. As a result, the noise usage rate Rn will always be greater than or equal to the minimum noise usage rate RnMax, regardless of the input value. The error usage rate Re and the noise usage rate Rn are set to values ​​within the range of 0 to 100% (values ​​from 0 to 1). In the calculation formula shown in Figure 6, if the result is 100% or more, it is set to 100%, and if it is 0% or less, it is set to 0%.

[0042] Furthermore, the minimum noise utilization rate RnMin is pre-set to a value greater than 0, for example, during parameter setting adjustments. For example, the minimum noise utilization rate RnMin can be set to a value of 0.1 (10%) or higher. Preferably, the minimum noise utilization rate RnMin is set to 0.1 to 0.2 (10 to 20%). Also, as can be seen from the graph in Figure 6, when the input value In is equal to the first intertone reference value C1 or the second intertone reference value C2, the noise utilization rate Rn calculated by the formula will be equal to the minimum noise utilization rate RnMin.

[0043] Using the above method, for example, if the input value In is greater than or equal to the maximum highlight-side error usage value He, and less than or equal to the maximum shadow-side error usage value Se, the error usage rate Re is set to 1 (100%). Also, for example, if the input value In is less than or equal to the minimum highlight-side error usage value Hes, the error usage rate Re is set to 0. Furthermore, if the input value In is greater than or equal to the minimum highlight-side error usage value Hes, and less than or equal to the maximum highlight-side error usage value He, the error usage rate Re is set to a value calculated as (In-Hes) / (He-Hes). As a result, for example, if the input value In is less than or equal to the maximum highlight-side error usage value He, the error usage rate Re is a value between 0 and 1 (100%), and is set to a value that gradually decreases from 1 depending on the difference between the maximum highlight-side error usage value He and the input value In.

[0044] Furthermore, for example, if the input value In is greater than or equal to the maximum shadow error usage range value Se, and less than or equal to the minimum shadow error usage range value Ses, the error usage rate Re is set to a value calculated as (Ses-In) / (Ses-Se). Additionally, if the input value In is greater than or equal to the minimum shadow error usage range value Ses, the error usage rate Re is set to 0. As a result, for example, if the input value In is greater than or equal to the maximum shadow error usage range value Se, the error usage rate Re is a value between 0 and 1 (100%), and is set to a value that is gradually decreased from 1 depending on the difference between the input value In and the maximum shadow error usage range value Se.

[0045] In this case, the error usage rate Re from the highlight area to the midtone area gradually increases with respect to the input value In, for example, from the minimum error usage rate on the highlight side He, and reaches its maximum value at the maximum error usage rate on the highlight side He. Similarly, the error usage rate Re from the midtone area to the shadow area gradually decreases with respect to the input value In, from the maximum error usage rate on the shadow side Se, and reaches its minimum value at the minimum error usage rate on the shadow side Ses.

[0046] As a result, for example, when the input value In corresponds to either the highlight or shadow area, the error usage rate Re is set to a smaller value than when the input value corresponds to the midtone area. In this case, the error usage rate Re changes such that, for example, the value is 0 (0%) at both ends of the range of area values, and the value becomes 1 (100%) in the range of texture generation areas Hd and Sd, which are the ranges of area values ​​where textures specific to dithering occur. With this configuration, for example, a configuration in which the error usage rate Re is mainly used in the midtone area can be appropriately realized.

[0047] Furthermore, for example, if the input value In is less than or equal to the maximum noise usage value Hn on the highlight side, or greater than or equal to the maximum noise usage value Sn on the shadow side, the noise usage rate Rn is set to 1 (100%). Also, if the input value In is greater than or equal to the first midtone reference value C1 and less than or equal to the second midtone reference value C2, the noise usage rate Rn is set to the minimum noise usage rate RnMin. Moreover, for example, if the input value In is greater than or equal to the maximum noise usage value Hn on the highlight side, and less than or equal to the first midtone reference value C1, the noise usage rate Rn will be greater than or equal to the minimum noise usage rate RnMin and less than or equal to 1 (100%). Then, it is set to a value that is gradually decreased from 1 according to the difference between the input value In and the maximum noise usage value Hn on the highlight side. Furthermore, for example, if the input value In is greater than or equal to the second midtone reference value C2 and less than or equal to the maximum shadow noise usage value Sn, the noise usage value Rn will be greater than or equal to the minimum noise usage value RnMin and less than or equal to 1 (100%). Then, it will be set to a value that is gradually increased from the minimum noise usage value RnMin according to the difference between the input value In and the second midtone reference value C2.

[0048] As a result, for example, when the input value In corresponds to either the highlight or shadow area, the noise usage rate Rn is set to a larger value than when it corresponds to the midtone area. In this case, the noise usage rate Rn changes so that, for example, the value in the highlight and shadow areas is 1 (100%), and the value gradually decreases as you move towards the midtones.

[0049] In this way, by obtaining the error usage rate Re and the noise usage rate Rn, for example, in the highlight (bright) and shadow (dark) areas where dot delay is likely to occur due to the strong influence of error diffusion characteristics, the noise usage rate Rn is increased and the error usage rate Re is decreased. As a result, the influence of dithering characteristics, which allow dots to be dispersed, becomes greater in the highlight and shadow areas, and the occurrence of dot delay can be suppressed. Furthermore, if there is a first region value when the pixel value of all pixels in the region including the pixel of interest and its surrounding pixels is a first pixel value that is brighter (or darker) than the median value, and a second region value when the pixel value is a second pixel value that is closer to the median value than the first pixel value, the following condition is met. That is, there exists a pair of region values ​​in which the error usage rate for the first region value is lower than the error usage rate for the second region value, and the noise usage rate for the first region value is higher than the noise usage rate for the second region value. The median value is the value in the middle when the input value is in the range of 0 to 255, as in this embodiment, for example, 128 is taken as the median value. In other words, in this embodiment, the noise utilization rate Rn is higher when the first region value is a first pixel value where the pixel value of all pixels in the target region is different from the median value, than when the second region value is a second pixel value where the pixel value is closer to the median value than the first pixel value. Also, the error utilization rate Re is lower when the first region value is used than when the second region value is used.

[0050] Furthermore, by increasing the influence of error diffusion characteristics and performing quantization processing in the midtone section, for example, a more natural pseudo-gradation can be obtained. Also, for example, by lowering the noise usage rate Rn and increasing the error usage rate Re in the range of values ​​that become the texture generation area, the arrangement of dots can be changed. This also suppresses the generation of texture. Moreover, by setting a minimum noise usage rate RnMin and ensuring that the noise usage rate Rn does not become 0, for example, in the midtone section, the influence of error diffusion characteristics can be increased while slightly influencing the dithering characteristics. This suppresses the generation of pattern noise.

[0051] Furthermore, the magnitude of the influence of the dithering characteristic and the magnitude of the influence of the error diffusion characteristic are gradually changed according to the calculation formulas for the error usage rate Re and the noise usage rate Rn. As a result, it is possible to suppress the occurrence of a boundary line at the transition point between the region where the dithering characteristic is dominant and the region where the error diffusion characteristic is dominant. This allows for a smooth transition between the quantization processing methods. Therefore, according to this embodiment, for example, the error usage rate Re and the noise usage rate Rn can be appropriately set according to the region value. This makes it possible to perform quantization processing that more appropriately utilizes the strengths of each process, error diffusion processing and dithering processing.

[0052] • First calculation process and second calculation process Here, we will explain the specific processing details of each process for calculating the error usage rate Re and the noise usage rate Rn. In S404, the first calculation process and the second calculation process are executed to calculate the error usage rate Re and the noise usage rate Rn for each pixel to be quantized, according to the corresponding region value.

[0053] First, let's explain the first calculation process for calculating the error usage rate Re. When the first calculation process starts, in S702, the CPU first determines whether the input value In, which is the region value of the target pixel, is within the range of He (maximum region value for highlight side error usage rate) and Se (maximum region value for shadow side error usage rate). If it is determined in S702 that it is within this range, that is, He ≤ In ≤ Se is satisfied, the process proceeds to S704, where the CPU sets the error usage rate Re to the maximum usage rate of 1 (100%).

[0054] Also, if it is determined in S702 that In is not within the range, that is, He≤In≤Se is not satisfied, the process proceeds to S706. In S706, the CPU determines whether the input value In is in a range that is larger than the minimum highlight-side error usage region value Hes and smaller than the maximum highlight-side error usage region value He. If it is determined in S706 that In is within the range, that is, Hes<In<He is satisfied, the process proceeds to S708, and the CPU sets the error usage rate Re to a value calculated by (In-Hes) / (He-Hes).

[0055] Also, if it is determined in S706 that In is not within the range, that is, Hes<In<He is not satisfied, the process proceeds to S710. In S710, the CPU determines whether the input value In is in a range that is larger than the maximum shadow-side error usage region value Se and smaller than the minimum shadow-side error usage region value Ses. If it is determined in S710 that In is within the range, that is, Se<In<Ses is satisfied, the process proceeds to S712, and the CPU sets the error usage rate Re to a value calculated by (Ses-In) / (Ses-Se).

[0056] Also, if it is determined in S710 that In is not within the range, that is, Se<In<Ses is not satisfied, the process proceeds to S714, and the CPU sets the error usage rate Re to 0 (0%). Then, after the error usage rate Re is set in S704, S708, S712, or S714, the process proceeds to S716, and the CPU adopts the set error usage rate Re as the error usage rate Re of the pixel corresponding to the input value In, that is, with the input value In as the region value.

[0057] Next, a second calculation process for calculating the noise usage rate Rn will be described. When the second calculation process is started, first in step S802, the CPU determines whether an input value In, which is the region value of a target pixel, falls within a range that is larger than the highlight-side maximum noise usage rate region value Hn and smaller than the highlight-side 0% noise usage rate region value Hnz. If it is determined in S802 that the input value In is within said range, that is, satisfies Hn<In<Hnz, the process proceeds to S804, and the CPU sets the noise usage rate Rn to a value calculated by (Hnz-In) / (Hnz-Hn).

[0058] Further, if it is determined in S802 that the input value In is not within said range, that is, does not satisfy Hn<In<Hnz, the process proceeds to S806. In S806, the CPU determines whether the input value In falls within a range that is larger than the shadow-side 0% noise usage rate region value Snz and smaller than the shadow-side maximum noise usage rate region value Sn. If it is determined in S806 that the input value In is within said range, that is, satisfies Snz<In<Sn, the process proceeds to S808, and the CPU sets the noise usage rate Rn to a value calculated by (In-Snz) / (Sn-Snz).

[0059] After the noise usage rate Rn is set in S804 or S808, the process proceeds to S810, and the CPU determines whether or not the set noise usage rate Rn is larger than the minimum noise usage rate RnMin, which is the minimum usage rate. If it is determined in S810 that Rn>RnMin is satisfied, the process proceeds to S816 described later. Further, if it is determined in S810 that Rn>RnMin is not satisfied, the process proceeds to S812, the CPU changes the noise usage rate Rn to the minimum noise usage rate RnMin, and then the process proceeds to S816.

[0060] Further, if it is determined in S806 that the input value In is not within said range, that is, does not satisfy Snz<In<Sn, the process proceeds to S814, the CPU sets the noise usage rate Rn to 1 (100%), which is the maximum usage rate, and then the process proceeds to S816. In S816, the CPU adopts the set noise usage rate Rn as the noise usage rate Rn of the pixel corresponding to the input value In, that is, the pixel having the input value In as its region value.

[0061] =Quantization execution process= Next, the quantization execution process performed in S412 will be described. Figure 9 is a flowchart showing the detailed processing routine of the quantization execution process. The series of processes shown in the flowchart of Figure 9 are performed by the CPU loading the program code stored in ROM into RAM and executing it. Alternatively, some or all of the functions of the steps in Figure 9 may be performed by hardware such as an ASIC or electrical circuit.

[0062] When the quantization process begins, in S902, the CPU first determines whether the input value In (the pixel density value selected in S402) matches the maximum input value MaxIn. If S902 determines that the input value In matches the maximum input value MaxIn, the process proceeds to S904, where the CPU sets the output value (quantized value) indicating the quantization result to 1. The value "1" set as the output value in S904 is an example of a value that should be output when the input value In is greater than the threshold Th. In S904, along with setting the output value, the CPU sets the error value used in the error distribution process executed in S414 to In'-MaxIn, which is the difference between the error-corrected input value In' and the maximum input value MaxIn.

[0063] Furthermore, in S902, if it is determined that the input value In and the maximum input value MaxIn do not match, the process proceeds to S906, where the CPU determines whether the input value In and the minimum input value MinIn match. In S906, if it is determined that the input value In and the minimum input value MinIn match, the process proceeds to S908, where the CPU sets the output value to 0. The value "0" set as the output value in S908 is an example of a value that should be output when the input value In is smaller than the threshold Th. In S908, along with setting the output value, the CPU also sets the error value to the error-corrected input value In'.

[0064] Furthermore, if it is determined in S906 that the input value In and the minimum input value MinIn do not match, the process proceeds to S910, where the CPU determines whether the error correction input value In' is greater than the noise-corrected threshold Th'. If it is determined in S910 that the error correction input value In' is greater than the noise-corrected threshold Th', the process proceeds to S912, where the CPU sets the output value to 1 and the error value to In'-MaxIn. If it is determined in S910 that the error correction input value In' is less than or equal to the noise-corrected threshold Th', the process proceeds to S914, where the CPU sets the output value to 0 and the error value to In'. Then, once the output value (quantized value) and error value are set in S904, S908, S912, or S914, the process proceeds to S916, where the CPU retrieves the set output value and error value and terminates the quantization execution process.

[0065] =Area Value Calculation Process= Next, the region value calculation process performed in S404 will be described. The region value corresponding to the pixel to be quantized is calculated based on the density values ​​of the pixels in the target region, which includes the pixel to be quantized and the pixels surrounding that pixel. In this embodiment, the target region is defined as a 3x3 pixel region including the pixel to be quantized and one surrounding pixel. Therefore, as shown in Figure 3(a), when the pixel to be quantized is pixel 304, the target region becomes region 306.

[0066] Therefore, in order to calculate the region value corresponding to pixel 304, the density values ​​of all pixels in region 306 are used. In this embodiment, the average value of the density values ​​of each pixel is used as the region value, and then the noise usage rate Rn and the error usage rate Re are calculated from the calculated region value using the method described above.

[0067] Specifically, the region value is calculated by multiplying the intensity value of each pixel in the target region by 1 / 9 and summing these values, as shown in Figure 1(b). In Figure 1(b), this is similar to a filter operation and is therefore labeled as input value filter 104. That is, the region value corresponding to pixel 304 is (0 × 1 / 9) × 8 + 125 × 1 / 9 = 14 (rounded to the nearest whole number in this embodiment). Then, using the region value 14 as the input value in the method described above, the noise usage rate Rn and the error usage rate Re corresponding to pixel 304 are calculated, resulting in a noise usage rate Rn of 100% and an error usage rate Re of 0%. In the case of known techniques, the intensity value 125 is the input value, and the noise usage rate Rn is 0% and the error usage rate Re is 100%.

[0068] Therefore, if the dither matrix value of pixel 304 is -64 and the initial threshold is 128, then in the known technique, the noise-corrected threshold becomes 128 (= -64 × 0.0 + 128). As a result, the input value 125 (the density value of pixel 304) is compared with the threshold 128, and since the input value is less than the threshold, the quantization result is 0 (see Figure 3(b)). On the other hand, in this embodiment, the noise-corrected threshold becomes 64 (= -64 × 1.0 + 128). As a result, the input value 125 is compared with the threshold 64, and since the input value is greater than or equal to the threshold, the quantization result is 255 (see Figure 3(c)). Consequently, when the input image is as shown in Figures 2(a) and 3(a), the known technique results in Figures 2(b) and 3(b), while the technique according to this embodiment results in Figures 2(c) and 3(c). In other words, the technology according to this embodiment makes it possible to obtain quantization results that preserve the density of the region compared to known technologies.

[0069] The region value is calculated using the average of the intensity values ​​of all pixels in the target region, which includes the pixel being quantized and its surrounding pixels, but it is not limited to this. In other words, any method that can smooth the intensity values ​​of all pixels in the target region is acceptable. For example, the region value could be the median of the intensity values ​​of all pixels in the target region arranged in order, or it could be the intensity value with the highest frequency, i.e., the most abundant intensity value. Alternatively, as shown in Figure 1(b), filters for the region size can be created individually and used.

[0070] =Error distribution process= Next, the error distribution process performed in S414 will be described. Figure 10 is a diagram illustrating the error distribution process, where (a) is a diagram showing an example of a diffuse filter and (b) is a diagram showing an example of an error distribution method. In this embodiment, the diffuse filter is, for example, a Jarvis, Judice & Ninke matrix. Different diffuse filters are used in each direction of the bidirectional processing. Figure 10(a) shows the diffuse filter used in the main scanning direction from one side of the image to the other, and the diffuse filter used in the sub-scanning direction from the other side of the image to the first side. The position of the symbol * in the diffuse filter is the coordinate [0,0] (origin) of the input value In, and the numerical values ​​in each matrix of the diffuse filter are the distribution ratio when distributing the error to the surrounding pixels.

[0071] As shown in Figure 10(b), in the process of distributing errors to surrounding pixels, if the coordinates to which the errors are distributed are outside the image width, the coordinates to which the errors are distributed are changed to the coordinates of the beginning of the next line. The same process is performed if the coordinates on the opposite side are outside the range. Furthermore, if there is no line to which the errors are distributed, no errors are distributed. In addition, if the coordinates to which the errors are distributed are already processed pixels, no errors are distributed.

[0072] Figure 11 is a flowchart detailing the error distribution process. The series of processes shown in the flowchart of Figure 11 are performed by the CPU loading program code stored in ROM into RAM and executing it. Alternatively, some or all of the steps in Figure 11 may be performed by hardware such as an ASIC or electrical circuit.

[0073] When the error distribution process begins, the CPU executes a loop between S1102 and S1126 in the flowchart of Figure 11, sequentially changing the Y coordinate (the coordinate in the height direction of the image). In this loop, the value of Y is increased by 1 from 0 to diffuse height - 1 (the value indicating the diffuse height minus 1). Here, the diffuse height (the value indicating the diffuse height) is, for example, the height calculated by the diffuse matrix height. The diffuse matrix height is the number of rows in the matrix used as the diffuse filter. Therefore, if the diffuse filter in Figure 10 is used, the value of Y will be increased by 1 from "0" to "2", which is the value obtained by subtracting 1 from the diffuse height value of 3.

[0074] Furthermore, a loop is executed between S1104 and S1124 to sequentially change the X coordinate (the coordinate in the width direction of the image). In this loop, the value of X is increased by 1 from the value indicating the negative diffusion width to the value indicating the positive diffusion width. Here, the value indicating the diffusion width is, for example, the value calculated by (diffusion matrix width - 1) / 2. The diffusion matrix width is the number of columns in the matrix used as a diffusion filter. Therefore, when using the diffusion filter in Figure 10, the diffusion matrix width is 5, so the value indicating the diffusion width is (5 - 1) / 2, and X is increased by 1 from "-2" to "+2".

[0075] Then, in S1106, the CPU sets the coordinates (X', Y') of the distribution destination and sets the distribution ratio based on the diffusion filter. That is, if the coordinates of the input pixel (the pixel where the asterisk is located in Figure 10(b)) are (x, y), then X' = x + X. Note that X is the value set in S1104. Also, Y' = y + Y. Note that Y is the value set in S1102, S1120, S1122, etc. Furthermore, the distribution ratio is a value corresponding to the matrix of coordinates (X, Y) in the diffusion filter.

[0076] Next, in S1108, the CPU determines whether the distribution ratio is greater than 0. If it is determined in S1108 that the distribution ratio is 0 or less, the process returns to S1104 without distributing the error. If it is determined in S1108 that the distribution ratio is greater than 0, the process proceeds to S1110, where the CPU determines whether the destination coordinate X' is smaller than the image width.

[0077] In S1110, if it is determined that the destination coordinate X' is smaller than the image width, the process proceeds to S1112, where the CPU determines whether the coordinate X' is greater than or equal to 0. In S1112, if it is determined that the coordinate X' is greater than or equal to 0, the process proceeds to S1114, where the CPU determines whether the destination coordinate Y' is smaller than the image height. In S1114, if it is determined that the destination coordinate Y' is smaller than the image height, the process proceeds to S1116, where the CPU sets the distribution error value (quantization error value) to the product of the error value and the distribution ratio. Then, in S1218, the CPU adds the set distribution error value to the cumulative error stored in the cumulative error buffer and updates the cumulative error stored in the cumulative error buffer. As a result, the cumulative error is updated according to the generated quantization error value.

[0078] In S1110, if it is determined that the coordinate X' is greater than or equal to the image width, in S1120 the CPU sets the coordinate X' = X' - image width and the coordinate Y' = Y' + 1, and proceeds to S1114. Also, in S1112, if it is determined that the coordinate X' is less than 0, in S1122 the CPU sets the coordinate X' = X' + image width and the coordinate Y' = Y' + 1, and proceeds to S1114. Furthermore, in S1114, if it is determined that the coordinate Y' is greater than or equal to the image height, the process proceeds to S1104 without distributing the error. In this way, the error diffusion process calculates the cumulative error by multiplying the value stored in the cumulative error buffer by the quantization error value.

[0079] In this embodiment, when determining the noise utilization rate Rn and error utilization rate Re corresponding to the pixels to be quantized, a region value calculated from the density values ​​of all pixels in the target region, including the pixels to be quantized and their surrounding pixels, is used. Then, by adding the cumulative error E, obtained by multiplying the determined error utilization rate Re by the density value In, the degree to which the error diffusion characteristics are influenced is adjusted. Furthermore, by adding the dither matrix noise D, obtained by multiplying the determined noise utilization rate Rn by the initial threshold Th, the degree to which the dither characteristics are influenced is adjusted. This makes it possible to set, for example, the degree to which the error diffusion characteristics and dither characteristics are influenced according to the input density value In(x, y) and the density values ​​of the surrounding pixels. In addition, it is possible to perform quantization processing that appropriately utilizes the strengths of each of the error diffusion and dithering processes.

[0080] Furthermore, when only typical error diffusion processing is performed, problems such as dot delay occur in areas such as highlights and shadows. Similarly, when only dithering is performed, problems such as textures specific to dithering occur. Moreover, when simply switching between dithering and error diffusion processing, for example, between highlights and midtones, or between midtones and shadows, problems such as the appearance of boundary lines due to the switching occur. In contrast, in this embodiment, where the noise usage rate and error usage rate are gradually changed and the processing is performed by switching, dot delay in areas such as highlights and shadows can be appropriately suppressed. Furthermore, the appearance of textures in midtones and the appearance of boundary lines due to switching can also be appropriately prevented. Therefore, according to this embodiment, quantization processing can be performed more appropriately.

[0081] Furthermore, in this embodiment, the density values ​​of all pixels in the target region are smoothed to obtain region values, and the noise usage rate and error usage rate corresponding to the pixels to be quantized are determined based on these region values. Therefore, when quantizing pixels, it becomes possible to apply applicable noise usage rates and applicable error usage rates that take into account the preservation of the region's density. As a result, even in images of high-frequency patterns such as midtone hatching patterns, where the noise usage rate and error usage rate vary within the region in known techniques, it is possible to obtain quantization results that preserve the density of the region better than before.

[0082] (Second Embodiment) Next, a printing system equipped with an image processing apparatus according to the second embodiment will be described with reference to Figure 12. In the following description, components that are the same as or equivalent to those in the image processing apparatus according to the first embodiment described above will be referred to with the same reference numerals as those used in the first embodiment, and their detailed explanation will be omitted.

[0083] In the first embodiment, the density values ​​of all pixels in the target region were smoothed to obtain the region value. In contrast, in the second embodiment, the density values ​​of the pixels to be quantized were emphasized from the density values ​​of all pixels in the target region to obtain the region value. Figure 12 is a diagram showing an overview of the quantization process performed by the image processing apparatus according to the second embodiment. In this embodiment, the input value filter is an edge enhancement filter 1202. The region value is then obtained using this edge enhancement filter 1202, and the noise usage rate and error usage rate are determined based on the region value. Note that this embodiment differs from the first embodiment only in that the input value filter for obtaining the region value is an edge enhancement filter. Therefore, since everything except the method of obtaining the region value is the same as in the first embodiment, the explanation will be omitted in the following description.

[0084] In this embodiment, the region value is obtained by using an edge enhancement filter to transform the intensity values ​​of all pixels in region 306 and summing them up. Specifically, according to the edge enhancement filter 1202, the intensity value of the pixel to be quantized is multiplied by 9, the intensity values ​​of the surrounding pixels are multiplied by -1, and these values ​​are summed up to obtain the region value. That is, the region value corresponding to pixel 304 is 9 × 125 + (0 × -1) × 8 = 1125, but the decimal part is rounded, and if the calculated result exceeds 255, it is clipped to 255, so it becomes 255.

[0085] Then, using the region value 255 as the input value, the noise usage rate Rn and error usage rate Re corresponding to pixel 304 are calculated, and the noise usage rate Rn is 100% and the error usage rate Re is 0%. Note that when using known techniques, the density value 125 is the input value, and the noise usage rate Rn is 0% and the error usage rate is 100%.

[0086] Therefore, if the dither matrix value of pixel 304 is -64 and the initial threshold is 128, then in the known technique, the noise-corrected threshold becomes 128 (= -64 × 0.0 + 128). As a result, the input value 125 (the density value of pixel 304) is compared with the threshold 128, and since the input value is less than the threshold, the quantization result is 0 (see Figure 3(b)). On the other hand, in this embodiment, the noise-corrected threshold becomes 64 (= -64 × 1.0 + 128). As a result, the input value 125 is compared with the threshold 64, and since the input value is greater than or equal to the threshold, the quantization result is 255 (see Figure 3(c)). Consequently, when the input image is as shown in Figures 2(a) and 3(a), the known technique results in Figures 2(b) and 3(b), while the technique according to this embodiment results in Figures 2(c) and 3(c). In other words, the technology according to this embodiment makes it possible to obtain quantization results that preserve the density of the region compared to known technologies.

[0087] In this embodiment, the region value is calculated using the edge enhancement filter 1202, but the invention is not limited to this, as long as the region value can be obtained by enhancing the intensity value of the pixels to be quantized from the intensity values ​​of all pixels in the target region.

[0088] Thus, in this embodiment, a region value is obtained that emphasizes the density value of the pixels to be quantized in the target region, and the noise usage rate Rn and error usage rate Re corresponding to the pixels to be quantized are determined based on this region value. This results in the same effects as in the first embodiment.

[0089] (Other embodiments) Although this embodiment has been described above, the technical scope of this embodiment is not limited to the scope described above. It will be apparent to those skilled in the art that various modifications or improvements can be made to the above embodiment. It will be clear from the description of the claims that such modified or improved forms may also be included in the technical scope of the present invention.

[0090] Furthermore, the above explanation of the quantization process was given for the case where the number of grayscale levels after quantization is 2. However, quantization using a similar method can also be applied to cases where the number of grayscale levels is 3 or more. Cases where the number of grayscale levels is 3 or more refer to cases where three or more different dot sizes are used. In this case, for example, the quantization process corresponding to each dot size is performed using both dither matrix noise and cumulative error, according to the applied noise usage rate Rna and the applied error usage rate Rea, in the same or similar manner as in the case of 2 grayscale levels. Then, the output results corresponding to each dot size are compared, and the dot with the largest size is taken as the final output. In this way, for example, even when the number of grayscale levels is 3 or more, the density of the region can be preserved while performing the quantization process.

[0091] Furthermore, in this embodiment, as shown in Figures 2(a) to (c), we have illustrated the processing of a highlight image in which pixels with density 0 and pixels with density are arranged in a staggered pattern. The technology according to this embodiment is not limited to this, but can also be used to obtain quantization results that preserve the density of the region compared to conventional methods, including processing of shadow images as shown in Figures 13(a) to (c) and other grayscale patterns.

[0092] Furthermore, in this embodiment, the region value corresponding to the pixel to be quantized is obtained from the pixel values ​​of all pixels in a 3x3 target region centered on the pixel to be quantized, but this is not the only way. In other words, the size of the target region can be any size as long as it includes the pixel to be quantized and its surrounding pixels, and does not have to be a rectangle as in this embodiment. By setting the size according to the error diffusion range, it may be possible to use noise usage rates and error usage rates that take into account the effect of error propagation, thereby improving the density reproducibility of the region. Also, by using processed pixels for the region, it may be possible to reduce the memory capacity and speed up the processing.

[0093] This disclosure can also be implemented by supplying a program that implements one or more of the functions of the embodiments described above to a system or device via a network or printed medium, and by having one or more processors in the computer of that system or device read and execute the program. It can also be implemented by a circuit (e.g., an ASIC) that implements one or more functions.

[0094] The above-disclosed embodiments include the following configurations and methods.

[0095] (Composition 1) A program that causes a computer to function as an image processing device that quantizes the pixel values ​​of each pixel in an input image, wherein the computer is configured to function as an image processing device that quantizes the pixel values ​​of each pixel in an input image. A pixel selection means for selecting a pixel of interest to be quantized, A region value acquisition means that acquires a region value corresponding to the pixel of interest according to the pixel value of each pixel located in the target region including the pixel of interest, A usage rate determination means that determines, based on the aforementioned region value, a first usage rate indicating the degree to which the two-dimensional matrix influences the quantization, and a second usage rate indicating the degree to which the cumulative error, which is the cumulative value of the quantization error values ​​that occur in the quantization of pixels surrounding the pixel of interest, influences the quantization. An applied error value acquisition means for acquiring an applied error value to be applied to the quantization of the pixel of interest based on the cumulative error corresponding to the pixel of interest and the second usage rate, A cumulative pixel value acquisition means that acquires a cumulative pixel value based on the applied error value and the pixel value of the pixel of interest, A threshold acquisition means for acquiring a quantization threshold to be applied to the quantization of the pixel of interest based on the two-dimensional matrix and the first utilization rate, A program characterized by functioning as a quantization value acquisition means that acquires a quantized value and a quantization error value based on the cumulative pixel value and the quantization threshold.

[0096] (Configuration 2) The first utilization rate is higher when the first region value is such that the pixel values ​​of all pixels in the target region are different from the median value, than when the second region value is such that the pixel values ​​are closer to the median value than the first pixel values. The program according to configuration 1, characterized in that the second utilization rate is lower when it is the first domain value than when it is the second domain value.

[0097] (Composition 3) The program according to configuration 1 or 2, characterized in that the target region includes at least 3x3 pixels centered on the pixel of interest.

[0098] (Composition 4) The program according to any one of configurations 1 to 3, characterized in that the region value is a value obtained by smoothing the pixel value of each pixel in the target region.

[0099] (Composition 5) The program according to configuration 4, characterized in that the region value is the average value of the pixel values ​​of each pixel in the target region.

[0100] (Composition 6) The program according to configuration 4, characterized in that the region value is the median value of the pixel values ​​of each pixel in the target region.

[0101] (Composition 7) The program according to configuration 4, characterized in that the region value is the most frequently occurring value among the pixel values ​​of each pixel in the target region.

[0102] (Composition 8) The program according to any one of configurations 1 to 3, characterized in that the region value is a value obtained by emphasizing the density value of the pixel of interest from the pixel value of each pixel in the target region.

[0103] (Composition 9) The program according to configuration 8, characterized in that the aforementioned region value is obtained using an edge enhancement filter.

[0104] (Composition 10) A pixel selection means for selecting a pixel of interest to be quantized from each pixel of an input image, A region value acquisition means that acquires a region value corresponding to the pixel of interest according to the pixel value of each pixel located in the target region including the pixel of interest, A usage rate determination means that determines, based on the aforementioned region value, a first usage rate indicating the degree to which the two-dimensional matrix influences the quantization, and a second usage rate indicating the degree to which the cumulative error, which is the cumulative value of the quantization error values ​​that occur in the quantization of pixels surrounding the pixel of interest, influences the quantization. An applied error value acquisition means for acquiring an applied error value to be applied to the quantization of the pixel of interest based on the cumulative error corresponding to the pixel of interest and the second usage rate, A cumulative pixel value acquisition means that acquires a cumulative pixel value based on the applied error value and the pixel value of the pixel of interest, A threshold acquisition means for acquiring a quantization threshold to be applied to the quantization of the pixel of interest based on the two-dimensional matrix and the first utilization rate, An image processing apparatus characterized by having a quantization value acquisition means that acquires a quantization value and a quantization error value based on the cumulative pixel value and the quantization threshold.

[0105] (Composition 11) An image processing method in an image processing device that quantizes the pixel value of each pixel in an input image, Select the pixel of interest to be quantized, Depending on the pixel value of each pixel located in the target region including the aforementioned pixel of interest, the region value corresponding to the aforementioned pixel of interest is obtained. Based on the aforementioned region value, a first usage rate is determined that indicates the degree to which the two-dimensional matrix influences the quantization, and a second usage rate is determined that indicates the degree to which the cumulative error, which is the cumulative value of the quantization error values ​​that occur in the quantization of pixels surrounding the pixel of interest, influences the quantization. Based on the cumulative error corresponding to the pixel of interest and the second utilization rate, an applied error value is obtained to be applied to the quantization of the pixel of interest. Based on the aforementioned application error value and the pixel value of the pixel of interest, the cumulative pixel value is obtained. A quantization threshold is obtained to be applied to the quantization of the pixel of interest based on the two-dimensional matrix and the first utilization rate. An image processing method characterized by obtaining a quantized value and a quantization error value based on the cumulative pixel value and the quantization threshold.

[0106] (Composition 12) A program that causes a computer to quantize the density values ​​that represent the color density of each pixel in an image, A pixel selection process that sequentially selects pixels to be quantized, A region value acquisition process that acquires a region value corresponding to the pixels sequentially selected in the pixel selection process, according to the density value of each pixel located in the target region including the pixels sequentially selected in the pixel selection process, A process for determining a noise usage rate, which indicates the degree to which dither matrix noise, which is noise specified by a pre-set dither matrix, affects the quantization process, and an error usage rate, which indicates the degree to which cumulative error, which is the cumulative error of quantization errors that occur in the quantization of surrounding pixels, affects the quantization process, comprising a usage rate determination process that determines the noise usage rate and the error usage rate corresponding to the pixels sequentially selected in the pixel selection process according to the region values ​​obtained in the region value acquisition process, The computer is instructed to perform a quantization execution process which involves quantizing the density values ​​of the pixels sequentially selected in the pixel selection process, using dither matrix noise according to the noise usage rate corresponding to the pixel, and using the accumulated error according to the error usage rate corresponding to the pixel. The program applies to the pixels that are sequentially selected in the pixel selection process. This process calculates an error-corrected input value, which is the density value after correction by the cumulative error, and includes an error-corrected input value calculation process that calculates the error-corrected input value by adding the product of the error usage rate corresponding to the pixel and the cumulative error to the density value of the pixel, The process involves calculating a noise-corrected threshold, which is a threshold that reflects the dither matrix noise as the threshold used in the quantization, and further involves causing the computer to execute a noise-corrected threshold calculation process, which calculates the noise-corrected threshold by adding the product of the noise utilization rate corresponding to the pixel and the dither matrix noise to a preset initial threshold, and then executing this process. The quantization execution process performs the quantization by comparing the noise-corrected threshold and the error-corrected input value. The aforementioned utilization rate determination process, in determining the noise utilization rate and the error utilization rate, The noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, is set to a value greater than the noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region, which is between the highlight and shadow regions. A program characterized by setting the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow portion, to a value smaller than the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone portion.

[0107] (Composition 13) The program according to configuration 12, characterized in that the region value acquisition process acquires a region value obtained by smoothing the density value of each pixel located in the target region.

[0108] (Composition 14) The program according to configuration 12, characterized in that the region value acquisition process acquires a region value which is an enhanced value obtained from the density values ​​of each pixel located in the target region, and from the density values ​​of the pixels sequentially selected in the pixel selection process.

[0109] (Composition 15) The aforementioned quantization execution process is: A maximum value determination process that determines whether the intensity value of the pixel, which is the input value for the quantization, is equal to the maximum value within the range of possible intensity values, A minimum value determination process that determines whether the input value, which is the density value of the pixel, is equal to the minimum value within the range of possible values ​​for the density value, The process includes a quantization value acquisition process that acquires a quantized value which is the result of the quantization, If the maximum value determination process determines that the input value and the maximum value are equal, the quantized value acquisition process obtains the value that should be output when the concentration value is greater than the threshold, as the quantized value. The program according to any one of configurations 12 to 14, characterized in that, if the minimum value determination process determines that the input value and the minimum value are equal, the quantized value acquisition process acquires a value as the quantized value that should be output when the concentration value is smaller than the threshold.

[0110] (Composition 16) The program according to any one of configurations 12 to 14, characterized in that the utilization rate determination process sets the noise utilization rate to a value greater than or equal to a minimum noise utilization rate that is set to a value greater than 0 in any case of the domain value.

[0111] (Composition 17) The aforementioned usage rate determination process is: As a reference for indicating the range of the area value in the highlighted area, a preset first highlight reference value and a second highlight reference value that is larger than the first highlight reference value are used. As a reference for indicating the range of the region value in the shadow area, a preset first shadow reference value and a second shadow reference value that is larger than the first shadow reference value are used. As a reference for indicating the range of the region value in the center of the midtone area, a first midtone reference value that is greater than the second highlight reference value and smaller than the first shadow reference value, and a second midtone reference value that is greater than the first midtone reference value and smaller than the first shadow reference value are used. If the region value is less than or equal to the first highlight reference value, or greater than or equal to the second shadow reference value, the noise usage rate is set to 1. If the region value is greater than or equal to the first intermediate tone reference value and less than or equal to the second intermediate tone reference value, the noise usage rate is set to the minimum noise usage rate. If the region value is greater than or equal to the first highlight reference value and less than or equal to the first midtone reference value, the noise usage rate is set to a value greater than or equal to the minimum noise usage rate and less than or equal to 1, and is gradually decreased from 1 according to the difference between the region value and the first highlight reference value. If the domain value is greater than or equal to the second midtone reference value and less than or equal to the second shadow reference value, the noise usage rate is set to a value greater than or equal to the minimum noise usage rate and less than or equal to 1, and is gradually increased from the minimum noise usage rate according to the difference between the domain value and the second midtone reference value. If the region value is greater than or equal to the second highlight reference value and less than or equal to the first shadow reference value, the error usage rate is set to 1. If the region value is less than or equal to the second highlight reference value, the error usage rate is set to a value between 0 and 1, and is gradually decreased from 1 according to the difference between the second highlight reference value and the region value. The program according to configuration 16, characterized in that, if the region value is greater than or equal to the first shadow reference value, the error usage rate is set to a value between 0 and 1, and is gradually decreased from 1 according to the difference between the region value and the first shadow reference value.

[0112] (Composition 18) The aforementioned usage rate determination process is: As a criterion for indicating the range of the area value in the highlighted portion, a third highlight reference value greater than 0 and less than or equal to the first highlight reference value is further used. As a criterion for indicating the range of the region value in the shadow portion, a third shadow criterion value is further used that is greater than or equal to the second shadow criterion value and smaller than the maximum value of the range that the region value can take. If the aforementioned region value is less than or equal to the third highlight reference value, the error usage rate is set to 0. If the region value is greater than or equal to the third highlight reference value and less than or equal to the second highlight reference value, the error usage rate is set to the value obtained by dividing the difference between the region value and the third highlight reference value by the difference between the second highlight reference value and the third highlight reference value. If the region value is greater than or equal to the first shadow reference value and less than or equal to the third shadow reference value, the error usage rate is set to the value obtained by dividing the difference between the third shadow reference value and the region value by the difference between the third shadow reference value and the first shadow reference value. The program according to configuration 17, characterized in that the error usage rate is set to 0 when the region value is greater than or equal to the third shadow reference value.

[0113] (Composition 19) An image processing device that quantizes the density value indicating the color density of each pixel in an image, A pixel selection processing unit that sequentially selects pixels to be quantized, A region value acquisition unit acquires a region value corresponding to the pixels sequentially selected in the pixel selection process, according to the density value of each pixel located in the target region including the pixels sequentially selected in the pixel selection process. A processing unit that determines a noise usage rate, which indicates the degree to which dither matrix noise, which is noise specified by a pre-set dither matrix, affects the quantization process, and an error usage rate, which indicates the degree to which cumulative error, which is the cumulative error of quantization errors that occur in the quantization of surrounding pixels, affects the quantization process, and a usage rate determination processing unit that determines the noise usage rate and the error usage rate corresponding to the pixels sequentially selected by the pixel selection processing unit according to the region values ​​acquired by the region value acquisition unit, A processing unit that performs quantization on the density values ​​of the pixels sequentially selected by the pixel selection processing unit, the quantization execution processing unit that uses dither matrix noise according to the noise usage rate corresponding to the pixel and uses the cumulative error according to the error usage rate corresponding to the pixel, A processing unit that calculates an error-corrected input value, which is the density value after correction by the cumulative error, for the pixels sequentially selected by the pixel selection processing unit, and an error-corrected input value calculation processing unit that calculates the error-corrected input value by adding the product of the error usage rate corresponding to the pixel and the cumulative error to the density value of the pixel, The processing unit calculates a noise-corrected threshold for each pixel sequentially selected by the pixel selection processing unit, which is a threshold that reflects the dither matrix noise as a threshold used in the quantization, and includes a noise-corrected threshold calculation processing unit that calculates the noise-corrected threshold by adding the product of the noise utilization rate and the dither matrix noise corresponding to the pixel to a preset initial threshold. The quantization execution processing unit performs the quantization by comparing the noise-corrected threshold value with the error-corrected input value. The aforementioned utilization rate determination processing unit, in determining the noise utilization rate and the error utilization rate, The noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, is set to a value greater than the noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region, which is between the highlight and shadow regions. An image processing apparatus characterized in that the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, is set to a smaller value than the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region.

[0114] (Composition 20) An image processing method that quantizes the density value indicating the color density of each pixel in an image, A pixel selection processing step in which pixels to be quantized are sequentially selected, A region value acquisition process step in which a region value corresponding to the pixel selected in the pixel selection process step is acquired according to the density value of each pixel located in the target region including the pixel sequentially selected in the pixel selection process step, A processing step in which a noise usage rate, which indicates the degree to which dither matrix noise, which is noise specified by a pre-set dither matrix, affects the quantization process, and an error usage rate, which indicates the degree to which cumulative error, which is the cumulative error of quantization errors that occur in the quantization of surrounding pixels, affects the quantization process, is determined, and a usage rate determination processing step in which the noise usage rate and the error usage rate corresponding to the pixels sequentially selected in the pixel selection processing step are determined according to the region values ​​obtained in the region value acquisition processing step, A quantization execution step which is a processing step which is performed on the density values ​​of the pixels sequentially selected in the pixel selection processing step, and which is performed using dither matrix noise according to the noise usage rate corresponding to the pixel and using the cumulative error according to the error usage rate corresponding to the pixel, A processing step for calculating an error-corrected input value, which is the density value after correction by the cumulative error for each pixel sequentially selected in the pixel selection processing step, comprising an error-corrected input value calculation processing step in which the product of the error usage rate corresponding to the pixel and the cumulative error is added to the density value of the pixel to calculate the error-corrected input value, A noise-corrected threshold calculation step is a process step in which, for each pixel sequentially selected in the pixel selection process step, a noise-corrected threshold is calculated, which is a threshold that reflects the dither matrix noise as the threshold used in the quantization, and the product of the noise utilization rate corresponding to the pixel and the dither matrix noise is added to a preset initial threshold to calculate the noise-corrected threshold. Equipped with, The quantization execution processing step performs quantization by comparing the noise-corrected threshold and the error-corrected input value. The aforementioned utilization rate determination process step involves determining the noise utilization rate and the error utilization rate, The noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, is set to a value greater than the noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region, which is between the highlight and shadow regions. An image processing method characterized by making the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, smaller than the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region. [Explanation of symbols]

[0115] 14 Image Processing Device

Claims

1. A program that causes a computer to function as an image processing device that quantizes the pixel values ​​of each pixel in an input image, wherein the computer is configured to function as an image processing device that quantizes the pixel values ​​of each pixel in an input image. A pixel selection means for selecting a pixel of interest to be quantized, A region value acquisition means that acquires a region value corresponding to the pixel of interest according to the pixel value of each pixel located in the target region including the pixel of interest, A usage rate determination means that determines, based on the aforementioned region value, a first usage rate indicating the degree to which the two-dimensional matrix influences the quantization, and a second usage rate indicating the degree to which the cumulative error, which is the cumulative value of the quantization error values ​​that occur in the quantization of pixels surrounding the pixel of interest, influences the quantization. An applied error value acquisition means for acquiring an applied error value to be applied to the quantization of the pixel of interest based on the cumulative error corresponding to the pixel of interest and the second usage rate, A cumulative pixel value acquisition means that acquires a cumulative pixel value based on the applied error value and the pixel value of the pixel of interest, A threshold acquisition means for acquiring a quantization threshold to be applied to the quantization of the pixel of interest based on the two-dimensional matrix and the first utilization rate, A program characterized by functioning as a quantization value acquisition means that acquires a quantized value and a quantization error value based on the cumulative pixel value and the quantization threshold.

2. The first utilization rate is higher when the first region value is such that the pixel values ​​of all pixels in the target region are different from the median value, than when the second region value is such that the pixel values ​​are closer to the median value than the first pixel values. The program according to claim 1, characterized in that the second utilization rate is lower when it is the first domain value than when it is the second domain value.

3. The program according to claim 1 or 2, characterized in that the target region includes at least 3x3 pixels centered on the pixel of interest.

4. The program according to claim 1 or 2, characterized in that the region value is a value obtained by smoothing the pixel value of each pixel in the target region.

5. The program according to claim 4, characterized in that the region value is the average value of the pixel values ​​of each pixel in the target region.

6. The program according to claim 4, characterized in that the region value is the median value of the pixel values ​​of each pixel in the target region.

7. The program according to claim 4, characterized in that the region value is the most frequently occurring value among the pixel values ​​of each pixel in the target region.

8. The program according to claim 1 or 2, characterized in that the region value is a value obtained by emphasizing the density value of the pixel of interest from the pixel value of each pixel in the target region.

9. The program according to claim 8, characterized in that the region value is obtained using an edge enhancement filter.

10. A pixel selection means for selecting a pixel of interest to be quantized from each pixel of an input image, A region value acquisition means that acquires a region value corresponding to the pixel of interest according to the pixel value of each pixel located in the target region including the pixel of interest, A usage rate determination means that determines, based on the aforementioned region value, a first usage rate indicating the degree to which the two-dimensional matrix influences the quantization, and a second usage rate indicating the degree to which the cumulative error, which is the cumulative value of the quantization error values ​​that occur in the quantization of pixels surrounding the pixel of interest, influences the quantization. An applied error value acquisition means for acquiring an applied error value to be applied to the quantization of the pixel of interest based on the cumulative error corresponding to the pixel of interest and the second usage rate, A cumulative pixel value acquisition means that acquires a cumulative pixel value based on the applied error value and the pixel value of the pixel of interest, A threshold acquisition means for acquiring a quantization threshold to be applied to the quantization of the pixel of interest based on the two-dimensional matrix and the first utilization rate, An image processing apparatus characterized by having a quantization value acquisition means that acquires a quantization value and a quantization error value based on the cumulative pixel value and the quantization threshold.

11. An image processing method in an image processing device that quantizes the pixel value of each pixel in an input image, Select the pixel of interest to be quantized, Depending on the pixel value of each pixel located in the target region including the aforementioned pixel of interest, the region value corresponding to the aforementioned pixel of interest is obtained. Based on the aforementioned region value, a first usage rate is determined that indicates the degree to which the two-dimensional matrix influences the quantization, and a second usage rate is determined that indicates the degree to which the cumulative error, which is the cumulative value of the quantization error values ​​that occur in the quantization of pixels surrounding the pixel of interest, influences the quantization. Based on the cumulative error corresponding to the pixel of interest and the second utilization rate, an applied error value is obtained to be applied to the quantization of the pixel of interest. Based on the aforementioned application error value and the pixel value of the pixel of interest, the cumulative pixel value is obtained. Based on the two-dimensional matrix and the first utilization rate, a quantization threshold is obtained to be applied to the quantization of the pixel of interest. An image processing method characterized by obtaining a quantized value and a quantization error value based on the cumulative pixel value and the quantization threshold.

12. A program that causes a computer to quantize the density values ​​that represent the color density of each pixel in an image, A pixel selection process that sequentially selects pixels to be quantized, A region value acquisition process that acquires a region value corresponding to the pixels sequentially selected in the pixel selection process, according to the density value of each pixel located in the target region including the pixels sequentially selected in the pixel selection process, A process for determining a noise usage rate, which indicates the degree to which dither matrix noise, which is noise specified by a pre-set dither matrix, affects the quantization process, and an error usage rate, which indicates the degree to which cumulative error, which is the cumulative error of quantization errors that occur in the quantization of surrounding pixels, affects the quantization process, comprising a usage rate determination process that determines the noise usage rate and the error usage rate corresponding to the pixels sequentially selected in the pixel selection process according to the region values ​​obtained in the region value acquisition process, The computer is instructed to perform a quantization execution process which involves quantizing the density values ​​of the pixels sequentially selected in the pixel selection process, using dither matrix noise according to the noise usage rate corresponding to the pixel, and using the accumulated error according to the error usage rate corresponding to the pixel. The program applies to the pixels that are sequentially selected in the pixel selection process. This process calculates an error-corrected input value, which is the density value after correction by the cumulative error, and includes an error-corrected input value calculation process that calculates the error-corrected input value by adding the product of the error usage rate corresponding to the pixel and the cumulative error to the density value of the pixel, The process involves calculating a noise-corrected threshold, which is a threshold that reflects the dither matrix noise as the threshold used in the quantization, and further involves causing the computer to execute a noise-corrected threshold calculation process, which calculates the noise-corrected threshold by adding the product of the noise utilization rate corresponding to the pixel and the dither matrix noise to a preset initial threshold, and then executing this process. The quantization execution process performs the quantization by comparing the noise-corrected threshold and the error-corrected input value. The aforementioned utilization rate determination process, in determining the noise utilization rate and the error utilization rate, The noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, is set to a value greater than the noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region, which is between the highlight and shadow regions. A program characterized by setting the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow portion, to a value smaller than the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone portion.

13. The program according to claim 12, characterized in that the region value acquisition process acquires a region value obtained by smoothing the density value of each pixel located in the target region.

14. The program according to claim 12, characterized in that the region value acquisition process acquires a region value which is an enhanced value obtained from the density values ​​of each pixel located in the target region, and from the density values ​​of the pixels sequentially selected in the pixel selection process.

15. The aforementioned quantization execution process is: A maximum value determination process that determines whether the intensity value of the pixel, which is the input value for the quantization, is equal to the maximum value within the range of possible intensity values, A minimum value determination process that determines whether the input value, which is the density value of the pixel, is equal to the minimum value within the range of possible values ​​for the density value, The process includes a quantization value acquisition process that acquires a quantized value which is the result of the quantization, If the maximum value determination process determines that the input value and the maximum value are equal, the quantized value acquisition process acquires the value that should be output when the concentration value is greater than the threshold, as the quantized value. The program according to any one of claims 12 to 14, characterized in that, if the minimum value determination process determines that the input value and the minimum value are equal, the quantization value acquisition process acquires a value as the quantization value that should be output when the concentration value is smaller than the threshold.

16. The program according to any one of claims 12 to 14, characterized in that the utilization rate determination process sets the noise utilization rate to a value greater than or equal to a minimum noise utilization rate that is set to a value greater than 0 in any case of the region value.

17. The aforementioned usage rate determination process is: As a reference for indicating the range of the area value in the highlighted area, a preset first highlight reference value and a second highlight reference value that is larger than the first highlight reference value are used. As a reference for indicating the range of the region value in the shadow area, a preset first shadow reference value and a second shadow reference value that is larger than the first shadow reference value are used. As a reference for indicating the range of the region value in the center of the midtone area, a first midtone reference value that is greater than the second highlight reference value and smaller than the first shadow reference value, and a second midtone reference value that is greater than the first midtone reference value and smaller than the first shadow reference value are used. If the region value is less than or equal to the first highlight reference value, or greater than or equal to the second shadow reference value, the noise usage rate is set to 1. If the region value is greater than or equal to the first intermediate tone reference value and less than or equal to the second intermediate tone reference value, the noise usage rate is set to the minimum noise usage rate. If the region value is greater than or equal to the first highlight reference value and less than or equal to the first midtone reference value, the noise usage rate is set to a value greater than or equal to the minimum noise usage rate and less than or equal to 1, and is gradually decreased from 1 according to the difference between the region value and the first highlight reference value. If the region value is greater than or equal to the second midtone reference value and less than or equal to the second shadow reference value, the noise usage rate is set to a value greater than or equal to the minimum noise usage rate and less than or equal to 1, and is gradually increased from the minimum noise usage rate according to the difference between the region value and the second midtone reference value. If the region value is greater than or equal to the second highlight reference value and less than or equal to the first shadow reference value, the error usage rate is set to 1. If the region value is less than or equal to the second highlight reference value, the error usage rate is set to a value between 0 and 1, and is gradually decreased from 1 according to the difference between the second highlight reference value and the region value. The program according to claim 16, characterized in that, if the region value is greater than or equal to the first shadow reference value, the error usage rate is set to a value between 0 and 1, and is gradually decreased from 1 according to the difference between the region value and the first shadow reference value.

18. The aforementioned usage rate determination process is: As a criterion for indicating the range of the area value in the highlighted area, a third highlight reference value greater than 0 and less than or equal to the first highlight reference value is further used. As a criterion for indicating the range of the region value in the shadow portion, a third shadow criterion value is further used, which is greater than or equal to the second shadow criterion value and smaller than the maximum value of the range that the region value can take. If the region value is less than or equal to the third highlight reference value, the error usage rate is set to 0. If the region value is greater than or equal to the third highlight reference value and less than or equal to the second highlight reference value, the error usage rate is set to the value obtained by dividing the difference between the region value and the third highlight reference value by the difference between the second highlight reference value and the third highlight reference value. If the region value is greater than or equal to the first shadow reference value and less than or equal to the third shadow reference value, the error usage rate is set to the value obtained by dividing the difference between the third shadow reference value and the region value by the difference between the third shadow reference value and the first shadow reference value. The program according to claim 17, characterized in that the error usage rate is set to 0 when the region value is equal to or greater than the third shadow reference value.

19. An image processing device that quantizes the density value indicating the color density of each pixel in an image, A pixel selection processing unit that sequentially selects pixels to be quantized, A region value acquisition unit acquires a region value corresponding to the pixel sequentially selected by the pixel selection processing unit, according to the density value of each pixel located in the target region including the pixel sequentially selected by the pixel selection processing unit. A processing unit that determines a noise usage rate, which indicates the degree to which dither matrix noise, which is noise specified by a pre-set dither matrix, affects the quantization process, and an error usage rate, which indicates the degree to which cumulative error, which is the cumulative error of quantization errors that occur in the quantization of surrounding pixels, affects the quantization process, and a usage rate determination processing unit that determines the noise usage rate and the error usage rate corresponding to the pixels sequentially selected by the pixel selection processing unit according to the region values ​​acquired by the region value acquisition unit, A processing unit that performs quantization on the density values ​​of the pixels sequentially selected by the pixel selection processing unit, the quantization execution processing unit that uses dither matrix noise according to the noise usage rate corresponding to the pixel and uses the cumulative error according to the error usage rate corresponding to the pixel, A processing unit that calculates an error-corrected input value, which is the density value after correction by the cumulative error, for the pixels sequentially selected by the pixel selection processing unit, and an error-corrected input value calculation processing unit that calculates the error-corrected input value by adding the product of the error usage rate corresponding to the pixel and the cumulative error to the density value of the pixel, The processing unit calculates a noise-corrected threshold for each pixel sequentially selected by the pixel selection processing unit, which is a threshold that reflects the dither matrix noise as a threshold used in the quantization, and includes a noise-corrected threshold calculation processing unit that calculates the noise-corrected threshold by adding the product of the noise utilization rate and the dither matrix noise corresponding to the pixel to a preset initial threshold. The quantization execution processing unit performs the quantization by comparing the noise-corrected threshold value with the error-corrected input value. The aforementioned utilization rate determination processing unit, in determining the noise utilization rate and the error utilization rate, The noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, is set to a value greater than the noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region, which is between the highlight and shadow regions. An image processing apparatus characterized in that the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, is set to a smaller value than the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region.

20. An image processing method that quantizes the density value indicating the color density of each pixel in an image, A pixel selection processing step in which pixels to be quantized are sequentially selected, A region value acquisition process step in which a region value corresponding to the pixel selected in the pixel selection process step is acquired according to the density value of each pixel located in the target region including the pixel sequentially selected in the pixel selection process step, A processing step in which a noise usage rate, which indicates the degree to which dither matrix noise, which is noise specified by a pre-set dither matrix, affects the quantization process, and an error usage rate, which indicates the degree to which cumulative error, which is the cumulative error of quantization errors that occur in the quantization of surrounding pixels, affects the quantization process, is determined, and a usage rate determination processing step in which the noise usage rate and the error usage rate corresponding to the pixels sequentially selected in the pixel selection processing step are determined according to the region values ​​obtained in the region value acquisition processing step, A quantization execution step which is a processing step which is performed on the density values ​​of the pixels sequentially selected in the pixel selection processing step, and which is performed using dither matrix noise according to the noise usage rate corresponding to the pixel and using the cumulative error according to the error usage rate corresponding to the pixel, A processing step for calculating an error-corrected input value, which is the density value after correction by the cumulative error for each pixel sequentially selected in the pixel selection processing step, comprising an error-corrected input value calculation processing step in which the product of the error usage rate corresponding to the pixel and the cumulative error is added to the density value of the pixel to calculate the error-corrected input value, A noise-corrected threshold calculation step is a process step in which, for each pixel sequentially selected in the pixel selection process step, a noise-corrected threshold is calculated, which is a threshold that reflects the dither matrix noise as the threshold used in the quantization, and the product of the noise utilization rate corresponding to the pixel and the dither matrix noise is added to a preset initial threshold to calculate the noise-corrected threshold. Equipped with, The quantization execution step performs quantization by comparing the noise-corrected threshold and the error-corrected input value. The aforementioned utilization rate determination process step involves determining the noise utilization rate and the error utilization rate, The noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, is set to a value greater than the noise utilization rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region, which is between the highlight and shadow regions. An image processing method characterized by making the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to either the highlight or shadow region, smaller than the error usage rate based on the region value, where the density value of each pixel in the target region corresponds to the midtone region.

Citation Information

Patent Citations

  • Apparatus and method for image processing, and program for making computer execute the method

    JP2005039483A

  • Image processor, image processing method and program

    JP2006279296A

  • Image processing device, printing device, image processing method, and image processing program

    JP2012204967A

  • Program, image processing device, and image processing method

    WO2011036735A1