Image processing device, image processing method, and program
Patent Information
- Application Number
- JP2022122595
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-08-01
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-08-01
AI Technical Summary
【0008】 本発明によれば、中間階調値のハッチングパターンのような高周波パターンの画像であっても、量子化の処理の際に領域としての濃度を保持することができるようになる。
Smart Images

Figure 0007906481000001 
Figure 0007906481000002 
Figure 0007906481000003
Abstract
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] In order to print an image by a printer, quantization processing for the image is usually required. Quantization processing is halftone processing that converts an image expressed in continuous tones into the number of tones that a printer can express. Conventionally, for example, dither processing and error diffusion processing are known as quantization processing.
[0003] Also, conventionally, a method of performing quantization using both dither processing and error diffusion processing is known. For example, Patent Document 1 discloses a technique of performing quantization by allocating the influences of dither processing and error diffusion processing using dither matrix noise, a noise usage rate that is a parameter indicating the degree to which the cumulative error affects the quantization processing, and an error usage rate.
Prior Art Documents
Patent Documents
[0004]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0005] However, for example, in an image of a high-frequency pattern such as a halftone pattern of an intermediate tone value, the noise usage rate and the error usage rate vary within the region. Therefore, even though it is being processed by error diffusion, depending on the error usage rate, the propagation of error may be less or the error may not be propagated, and the density may not be maintained as a region.
[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 value of each pixel in an input image, the program comprising: a pixel selection means for selecting a pixel of interest to be quantized; a usage rate determination means for determining, at least for 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 influences the quantization, and a second usage rate indicating the degree to which cumulative error, which is the cumulative value of quantization error values generated in the quantization of pixels surrounding the pixel of interest, influences the quantization; and a first usage rate to apply to the quantization of the pixel of interest based on the first usage rate of each pixel located in the target region. The system is characterized by functioning as: an application utilization rate determination means that determines an application utilization rate and a second application utilization rate to be applied to the quantization of the pixel of interest based on the second application utilization rate of each pixel located in the target area; an application error value acquisition means that acquires an application 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 application utilization rate; a cumulative pixel value acquisition means that acquires a cumulative pixel value based on the application error value and the pixel value of the pixel of interest; a threshold acquisition means that acquires a quantization threshold to be applied to the quantization of the pixel of interest based on the two-dimensional matrix and the first application utilization rate; and 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. [Effects of the Invention]
[0008] According to the present invention, even images with high-frequency patterns, such as hatching patterns of intermediate grayscale values, can retain their 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] This figure shows the noise usage rate and error usage rate for each pixel in the target region. [Figure 11] A diagram showing a diffusion filter and an example of error distribution using a diffusion filter. [Figure 12] Flowchart showing the error distribution processing routine. [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] (Printing system configuration) Figure 1(a) shows an example of a printing system equipped with an image processing device according to this embodiment. The printing system 10 in Figure 1(a) includes a printing device 12 that performs printing on a printing medium, and an image processing device 14 that generates printable data that enables printing by the printing device 12 based on input print data. The printing device 12 is, for example, an inkjet printer, and performs printing on the printing medium based on the printable data input from the image processing device 14. The printing device 12 also performs color printing using cyan ink, magenta ink, yellow ink, and black ink as process colors. In addition to process color inks, the printing device 12 may also be configured to discharge other colored inks or processing liquids that perform predetermined processing on the discharged ink.
[0012] Although not shown in the diagram, the image processing device 14 comprises at least a central processing unit (CPU), a ROM for storing programs for various processes executed by the CPU, and RAM used as the CPU's work memory. The image processing device 14 also includes a storage unit capable of storing various types of information. The image processing device 14 performs image formation processes, such as RIP (Raster Image Processor) processing. Specifically, the image processing device 14 unfolds the original image shown by the print data to form printable data that represents the image in a format that the printing device 12 can interpret.
[0013] In this embodiment, the image processing apparatus 14 performs quantization of density values indicating the density of colors, which are pixel values of each pixel in at least the original image, in the image forming process. Therefore, in this 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 the 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.
[0014] (Overview of Quantization) Next, an overview of the quantization process executed by the image processing apparatus 14 will be described. FIG. 1(b) is a diagram showing an overview of the quantization process executed by the image processing apparatus 14. The image processing apparatus 14 forms a pseudo halftone image, which is a halftone image, by quantization of the original image for each process color. This quantization is a process of converting the density value In(x, y) at each coordinate of the original image into a quantized value out(x, y) at the same coordinate of the pseudo halftone image.
[0015] The image processing apparatus 14 performs a hybrid error diffusion process using both dither matrix noise D(i, j) and cumulative error E(x, y) as quantization. Also, the image processing apparatus 14 uses a noise usage rate Rn and an error usage rate Re, which are set as values in the range of 0 or more and 1 or less, that is, 0% to 100%, respectively, as parameters related to the dither matrix noise D(i, j) and the cumulative error E(x, y).
[0016] The noise utilization rate Rn is a parameter that indicates the degree to which the two-dimensional matrix dither matrix noise D(i, j) affects the quantization process. This noise utilization rate Rn is determined according to the intensity value. In this embodiment, the applicable noise utilization rate Rna is obtained to be applied to the pixels to be quantized. The applicable noise utilization rate Rna is calculated from the noise utilization rate Rn corresponding to the intensity values In(x, y) of the pixels to be quantized and the 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 applicable noise utilization rate Rna. That is, the image processing device 14 uses the dither matrix noise D(i, j) according to the applicable noise utilization rate Rna corresponding to the pixels to be quantized.
[0017] The error usage rate Re is a parameter that indicates the degree to which the cumulative error E(x, y) affects the quantization process. This error usage rate Re is determined according to the intensity value. In this embodiment, the applied error usage rate Rea is obtained to be applied to the pixel to be quantized. The applied error usage rate Rea is calculated from the error usage rate Re corresponding to the intensity values In(x, y) of the pixel to be quantized and the surrounding pixels. The image processing device 14 does not use the cumulative error E(x, y) directly, but calculates the 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 applied error usage rate Rea. Then, the quantization process is performed 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 applied error usage rate Rea corresponding to the pixel to be quantized. Details of the quantization process will be described later.
[0018] (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.
[0019] 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).
[0020] 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.
[0021] 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.
[0022] 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 the 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 the reference threshold in the error diffusion process. In grayscales with a low noise usage rate, density may no longer be preserved in the region as a result of quantization.
[0023] 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.
[0024] (Summary of the technology according to this embodiment) Therefore, in this embodiment, the applied noise usage rate Rna and applied error usage rate Rea are determined from the noise usage rate Rn and error usage rate Re corresponding to the respective density values of the pixel to be quantized and the surrounding pixels. Then, the quantization process is performed on the target pixel using the determined applied noise usage rate Rna and applied error usage rate Rea.
[0025] 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.
[0026] Furthermore, an applied noise utilization rate Rna and an applied error utilization rate Rea, which take into account the preservation of regional density, can be applied to the pixels undergoing quantization. As a result, in high-frequency patterns such as midtone hatching patterns where the noise utilization rate Rn and error 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.
[0027] 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.
[0028] 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.
[0029] (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).
[0030] 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 usage rate calculation process to calculate the noise usage rate Rn and the error usage rate Re for each pixel in the target region containing the pixel to be quantized, according to the density value, which is the pixel value of each pixel. In this embodiment, the CPU of the image processing device 14 functions as a usage rate determination unit that determines the noise usage rate Rn and the error usage rate Re according to the density value of the pixel. Subsequently, in S406, the CPU performs an applied usage rate determination process to determine the applied noise usage rate Rna and the applied error usage rate Rea to be applied to the pixel to be quantized, using the calculated noise usage rate Rn and error usage rate Re. Thus, in this embodiment, the CPU of the image processing device 14 functions as an applicable usage rate determination unit that determines the applicable noise usage rate Rna and applicable error usage rate Rea corresponding to the pixels to be quantized, based on the noise usage rate Rn and error usage rate Re of each pixel in the target region. Details of the pixel selection process, usage rate calculation process, and applicable usage rate determination process described above will be described later.
[0031] 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 applied error usage rate Rea 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).
[0032] 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 applicable noise usage rate Rna 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).
[0033] 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.
[0034] 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.
[0035] <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.
[0036] <Usage Rate Calculation Process> Next, the utilization rate calculation process performed in S404 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 concentration value. Figure 7 is a flowchart detailing the processing routine of the first calculation process for calculating the error utilization rate Re. Figure 8 is a flowchart detailing the 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 loading 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.
[0037] =Overview of Usage Rate Calculation Process= The error usage rate Re and the noise usage rate Rn are calculated based on functions that continuously change with respect to density values within the range of 0 or more, which is the minimum input value MinIn, and less than or equal to the maximum input value MaxIn. The maximum input value MaxIn and the minimum input value MinIn are, for example, the maximum value and the minimum value within the range that the density value, which is the input value, can take. Also, in this function, the following three are used as criteria indicating the density range in the highlight part. · The highlight-side error usage rate minimum density value Hes, which is an example of the third highlight criterion value · The highlight-side noise usage rate maximum density value Hn, which is an example of the first highlight criterion value · The highlight-side error usage rate maximum density value He, which is an example of the second highlight criterion value
[0038] Also, the following three are used as criteria indicating the density range in the shadow part. · The shadow-side error usage rate maximum density value Se, which is an example of the first shadow criterion value · The shadow-side noise usage rate maximum density value Sn, which is an example of the second shadow criterion value · The shadow-side error usage rate minimum density value Ses, which is an example of the third shadow criterion value Furthermore, as criteria indicating the density range that sandwiches the initial threshold Th at the center of the halftone part, the highlight-side noise usage rate 0% density value Hnz, the shadow-side noise usage rate 0% density value Snz, the first halftone criterion value C1, and the second halftone criterion value C2 are used.
[0039] Also, these parameters are set such that at least Hes ≦ Hn < He < Se < Sn ≦ Ses, and Hn < Hnz < Snz < Sn. Also, in this embodiment, these parameters are set in the magnitude relationship shown in the graph such that 0 (MinIn) < Hes ≦ Hn < He < C1 < Hnz < Th < Snz < C2 < Se < Sn ≦ Ses < MaxIn.
[0040] Then, the error usage rate Re and 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 be greater than or equal to the minimum noise usage rate RnMax in all cases of pixel density value. The error usage rate Re and 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%.
[0041] 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.
[0042] Using the above method, for example, if the input value In is greater than or equal to the maximum highlight-side error usage density value He, and less than or equal to the maximum shadow-side error usage density value Se, the error usage density 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 density value Hes, the error usage density Re is set to 0. Furthermore, if the input value In is greater than or equal to the minimum highlight-side error usage density value Hes, and less than or equal to the maximum highlight-side error usage density value He, the error usage density 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 density value He, the error usage density 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 density value He and the input value In.
[0043] Furthermore, for example, if the input value In is greater than or equal to the maximum shadow error usage concentration value Se, and less than or equal to the minimum shadow error usage concentration value Ses, the error usage rate Re is set to a value calculated as (Ses-In) / (Ses-Se). In addition, if the input value In is greater than or equal to the minimum shadow error usage concentration 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 concentration value Se, the error usage rate Re is set to a value between 0 and 1 (100%), and is gradually decreased from 1 depending on the difference between the input value In and the maximum shadow error usage concentration value Se.
[0044] In this case, the error usage rate Re from the highlights to the midtones gradually increases with respect to the input value In, for example, from the minimum highlight-side error usage rate density value He, and reaches its maximum value at the maximum highlight-side error usage rate density value He. Similarly, the error usage rate Re from the midtones to the shadows gradually decreases with respect to the input value In, from the maximum shadow-side error usage rate density value Se, and reaches its minimum value at the minimum shadow-side error usage rate density value Ses.
[0045] As a result, for example, when the input value In corresponds to a density value in either the highlight or shadow area, the error usage rate Re is set to a smaller value than when the input value corresponds to a density value in 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 density range, and the value becomes 1 (100%) in the texture generation area Hd and Sd, which are density ranges where a texture specific to dithering occurs. 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.
[0046] Furthermore, for example, if the input value In is less than or equal to the maximum noise usage density value Hn on the highlight side, or greater than or equal to the maximum noise usage density value Sn on the shadow side, the noise usage density 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 density Rn is set to the minimum noise usage density RnMin. Moreover, for example, if the input value In is greater than or equal to the maximum noise usage density value Hn on the highlight side, and less than or equal to the first midtone reference value C1, the noise usage density Rn will be greater than or equal to the minimum noise usage density 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 density value Hn on the highlight side. Furthermore, for example, if the input value In is greater than or equal to the second intertone reference value C2 and less than or equal to the maximum shadow noise usage density value Sn, 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 will be set to a value that is gradually increased from the minimum noise usage rate RnMin according to the difference between the input value In and the second intertone reference value C2.
[0047] As a result, for example, when the input value In corresponds to a density value in either the highlight or shadow area, the noise usage rate Rn is set to a larger value than when the input value corresponds to a density value in 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.
[0048] 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, thus suppressing the occurrence of dot delay. Furthermore, if there is a first pixel value that is brighter (or darker) than the median value and a second pixel value that is closer to the median value than the first pixel value, the error usage rate for the first pixel value is lower than the error usage rate for the second pixel value. Moreover, there are pairs of pixels where the noise usage rate for the first pixel value is higher than the noise usage rate for the second pixel value. The median value is defined as 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 pixel value is different from the median value than when the second pixel value is closer to the median value than the first pixel value, and the error utilization rate Re is lower when the first pixel value is lower than when the second pixel value is used.
[0049] Furthermore, by increasing the influence of error diffusion characteristics and performing quantization processing in the midtone range, for example, more natural pseudo-gradation can be obtained. Also, for example, in the density range where texture occurs, by lowering the noise usage rate Rn and increasing the error usage rate Re, 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 range, the influence of error diffusion characteristics can be increased while slightly influencing the dithering characteristics. This suppresses the generation of pattern noise.
[0050] 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 pixel density value. This makes it possible to perform quantization processing that more appropriately utilizes the strengths of each process, error diffusion processing and dithering processing.
[0051] =First calculation process and second calculation process= Here, we will explain the specific processing steps 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, respectively, for the pixel being quantized and its surrounding pixels, according to the density value.
[0052] • Calculate the error usage rate Re (first calculation process) When the first calculation process begins, in S702, the CPU first determines whether the input value In, which is the density value of the target pixel, is within the range of He being greater than or equal to the maximum density value of the highlight side error usage rate, and Se being less than or equal to the maximum density value of the 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%).
[0053] Also, in S702, if it is determined that the value is not within the range, that is, it does not satisfy He≦In≦Se, the process proceeds to S706. In S706, the CPU determines whether the input value In is within a range that is greater than the highlight-side error usage rate minimum concentration value Hes and less than the highlight-side error usage rate maximum concentration value He. In S706, if it is determined that the value is within the range, that is, it satisfies Hes<In<He, the process proceeds to S708, and the CPU sets the error usage rate Re to the value calculated by (In - Hes) / (He - Hes).
[0054] Also, in S706, if it is determined that the value is not within the range, that is, it does not satisfy Hes<In<He, the process proceeds to S710. In S710, the CPU determines whether the input value In is within a range that is greater than the shadow-side error usage rate maximum concentration value Se and less than the shadow-side error usage rate minimum concentration value Ses. In S710, if it is determined that the value is within the range, that is, it satisfies Se<In<Ses, the process proceeds to S712, and the CPU sets the error usage rate Re to the value calculated by (Ses - In) / (Ses - Se).
[0055] Also, in S710, if it is determined that the value is not within the range, that is, it does not satisfy Se<In<Ses, the process proceeds to S714, and the CPU sets the error usage rate Re to 0 (0%). Then, when 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 concentration value.
[0056] ·Second calculation process for calculating the noise usage rate Rn When the second calculation process starts, first, in S802, the CPU determines whether the input value In, which is the density value of the target pixel, is in the range greater than the highlight-side noise usage rate maximum density value Hn and less than the highlight-side noise usage rate 0% density value Hnz. In S802, if it is determined that it is in the range, that is, it satisfies Hn < In < Hnz, the process proceeds to S804, and the CPU sets the noise usage rate Rn to the value calculated by (Hnz - In) / (Hnz - Hn).
[0057] Also, in S802, if it is determined that it is not in the range, that is, it does not satisfy Hn < In < Hnz, the process proceeds to S806. In S806, the CPU determines whether the input value In is in the range greater than the shadow-side noise usage rate 0% density value Snz and less than the shadow-side noise usage rate maximum density value Sn. In S806, if it is determined that it is in the range, that is, it satisfies Snz < In < Sn, the process proceeds to S808, and the CPU sets the noise usage rate Rn to the value calculated by (In - Snz) / (Sn - Snz).
[0058] When the noise usage rate Rn is set in S804 or S808, the process proceeds to S810, and the CPU determines whether the set noise usage rate Rn is greater than the minimum usage rate, the lowest noise usage rate RnMin. In S810, if it is determined that it satisfies Rn > RnMin, the process proceeds to S816 described later. Also, in S810, if it is determined that it does not satisfy Rn > RnMin, the process proceeds to S812, and the CPU changes the noise usage rate Rn to the lowest noise usage rate RnMin, and then the process proceeds to S816.
[0059] Also, in S806, if it is determined that it is not in the above range, that is, it does not satisfy Snz < In < Sn, the process proceeds to S814, and 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 with the input value In as the density value.
[0060] <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.
[0061] When the quantization process begins, in S902, the CPU first determines whether the input value In matches the maximum input value MaxIn. If it is determined in S902 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.
[0062] 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'.
[0063] 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.
[0064] <Process for determining applicable usage rate> Next, the application utilization rate determination process executed in S406 will be described. Figure 10 shows the noise utilization rate Rn and error utilization rate Re in the 3x3 pixel region of Figure 3(a). The application noise utilization rate Rna and the application error utilization rate Rea are calculated from the density utilization rate Rn and error utilization rate Re, which correspond to the density values of each pixel in the target region, including the pixel to be quantized and the surrounding pixels of that pixel. In this embodiment, the target region is 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.
[0065] Therefore, in order to determine the applicable noise utilization rate Rna and applicable error utilization rate Rea for pixel 304, the noise utilization rate Rn and error utilization rate Re of all pixels in region 306 are used. The noise utilization rate Rn and error utilization rate Re of each pixel are calculated in the utilization rate calculation process. The noise utilization rate Rn and error utilization rate Re of each pixel in region 306 are as shown in Figure 10. Specifically, for pixel 304, the noise utilization rate Rn is 0% and the error utilization rate Re is 100%. Also, for each pixel surrounding pixel 304, the noise utilization rate Rn is 100% and the error utilization rate is 0%.
[0066] In this embodiment, the applied noise utilization rate Rn and the applied error utilization rate Re are calculated from the average of the noise utilization rate Rn and the error utilization rate Re of each pixel. Specifically, the applied noise utilization rate Rna and the applied error utilization rate Rea are obtained by multiplying the noise utilization rate Rn and the error utilization rate Re of each pixel in the target region by 1 / 9 and adding the resulting values, as shown in Figure 1(b). In Figure 1(b), these are labeled as Rn filter 104 and Re filter 106 because they are similar to filter operations. That is, the applied noise utilization rate Rna of pixel 304 is (100 × 1 / 9) × 8 + 0 × 1 / 9 = 89% (rounded to the nearest whole number in this embodiment). The applied error utilization rate Rea of pixel 304 is (0 × 1 / 9) × 8 + 100 × 1 / 9 = 11% (rounded to the nearest whole number in this embodiment).
[0067] When quantizing pixel 304, known techniques apply a noise usage rate Rn 0% and an error usage rate Re 100%, but in this embodiment, an applied noise usage rate Rn 89% and an applied error usage rate 11% are applied. Therefore, if the dither matrix value of pixel 304 is -64 and the initial threshold is 128, in known techniques, 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 71 (-64 × 0.89 + 128). As a result, the input value 125 is compared with the threshold 71, and since the input value is greater than or equal to the threshold, the quantization result is 255 (see Figure 3(c)). As a result, when the input images are as shown in Figures 2(a) and 3(a), the known technique yields results as shown in Figures 2(b) and 3(b), while the technique according to this embodiment yields results as shown in Figures 2(c) and 3(c). In other words, the technique according to this embodiment makes it possible to obtain quantization results that preserve the density of the regions compared to the known technique.
[0068] The applied noise utilization rate Rna and applied error utilization rate Rea are calculated using the average values of the noise utilization rate Rn and error utilization rate Re of the pixels being quantized and their surrounding pixels (i.e., each pixel in the target region). However, the method for determining the applied noise utilization rate Rna and applied error utilization rate Rea is not limited to this. In other words, any method is acceptable as long as it is possible to obtain the applied noise utilization rate Rna and applied error utilization rate Rea corresponding to the density of the target region including the pixels being quantized and their surrounding pixels. For example, the applied noise utilization rate Rna may be the median value when the noise utilization rates Rn of each pixel in the target region are arranged in order, or the value with the highest frequency, i.e., the most frequently occurring value, among the noise utilization rates Rn may be used as the applied noise utilization rate Rna. Similarly, the applied error utilization rate Rea may be the median value when the error utilization rates Re of each pixel in the target region are arranged in order, or the value with the highest frequency, among the error utilization rates Re, may be used as the applied error utilization rate Rea. In addition, as shown in Figure 1(b), filters of the region size may be created individually and these filters may be used.
[0069] <Error distribution processing> Next, the error distribution process performed in S414 will be described. Figure 11 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, the Jarvis, Judice & Ninke matrix. Different diffuse filters are used in each direction of the bidirectional processing. Figure 11(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.
[0070] As shown in Figure 11(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.
[0071] Figure 12 is a flowchart illustrating the detailed processing steps of the error distribution process. The series of processes shown in the flowchart of Figure 12 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 12 may be performed by hardware such as an ASIC or electrical circuit.
[0072] When the error distribution process begins, the CPU executes a loop between S1202 and S1226 in the flowchart of Figure 12, which sequentially changes 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 obtained by subtracting 1 from the value indicating the diffuse height). 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 a diffuse filter. Therefore, if the diffuse filter in Figure 11 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.
[0073] Furthermore, a loop is executed between S1204 and S1224 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 11, 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".
[0074] Then, in S1206, 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 11(b)) are (x, y), then X' = x + X. Note that X is the value set in S1204. Also, Y' = y + Y. Note that Y is the value set in S1202, S1220, S1222, etc. Furthermore, the distribution ratio is a value corresponding to the matrix of coordinates (X, Y) in the diffusion filter.
[0075] Next, in S1208, the CPU determines whether the distribution ratio is greater than 0. If it is determined in S1208 that the distribution ratio is 0 or less, the process returns to S1204 without distributing the error. If it is determined in S1208 that the distribution ratio is greater than 0, the process proceeds to S1210, where the CPU determines whether the destination coordinate X' is smaller than the image width.
[0076] In S1210, if it is determined that the destination coordinate X' is smaller than the image width, the process proceeds to S1212, where the CPU determines whether the coordinate X' is greater than or equal to 0. In S1212, if it is determined that the coordinate X' is greater than or equal to 0, the process proceeds to S1214, where the CPU determines whether the destination coordinate Y' is smaller than the image height. In S1214, if it is determined that the destination coordinate Y' is smaller than the image height, the process proceeds to S1216, 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, updating the cumulative error stored in the cumulative error buffer. As a result, the cumulative error is updated according to the generated quantization error value.
[0077] In S1210, if it is determined that the coordinate X' is greater than or equal to the image width, in S1220 the CPU sets the coordinate X' = X' - image width and the coordinate Y' = Y' + 1, and proceeds to S1214. Also, in S1212, if it is determined that the coordinate X' is less than 0, in S1222 the CPU sets the coordinate X' = X' + image width and the coordinate Y' = Y' + 1, and proceeds to S1214. Furthermore, in S1214, if it is determined that the coordinate Y' is greater than or equal to the image height, the process proceeds to S1204 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.
[0078] In this embodiment, the degree to which the error diffusion characteristics are influenced is adjusted by adding the cumulative error E, obtained by multiplying the density value In of the pixel being quantized and its surrounding pixels by the applicable error usage rate Rea, to the density value In of the pixel being quantized. Furthermore, the degree to which the dithering characteristics are influenced is adjusted by adding the dither matrix noise D, obtained by multiplying the density value Rna, obtained by multiplying the density value of the pixel being quantized and its surrounding pixels by the applicable noise usage rate Rna, to the initial threshold Th. This allows, for example, the degree to which the error diffusion characteristics and dithering characteristics are influenced can be set according to the input density value In(x,y) and the density values of the surrounding pixels. In addition, quantization processing can be performed by appropriately utilizing the strengths of each of the error diffusion and dithering processes.
[0079] 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.
[0080] Furthermore, in this embodiment, the applicable noise usage rate and applied error usage rate for the pixel to be quantized are determined from the noise usage rate and applied error usage rate corresponding to the respective density values of the pixel to be quantized and the surrounding pixels. Therefore, when quantizing a pixel, it becomes possible to apply an applicable noise usage rate and applied error usage rate that take into account the preservation of the density of the region. As a result, even in high-frequency pattern images such as midtone hatching patterns where the noise usage rate and error usage rate vary within the region, it is possible to obtain quantization results that preserve the density of the region better than in conventional methods.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] Furthermore, in this embodiment, the applicable noise utilization rate and applicable error utilization rate were calculated in a 3x3 pixel area centered on the pixel being quantized, but this is not the only way to do so. In other words, the size of the target area can be any size as long as it includes the pixel being 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 applicable noise utilization rates and applicable error utilization rates that take into account the effect of error propagation, which may improve the density reproducibility of the area. In addition, by using processed pixels for the area, it may be possible to reduce the memory capacity and speed up the processing.
[0085] Furthermore, in this embodiment, when calculating the usage rates (error usage rate Re and noise usage rate Rn) for each pixel to be quantized, the usage rates for the pixel to be quantized and its surrounding pixels are calculated, but this is not limited to this. For example, the usage rates for all pixels may be calculated and the results stored, and when calculating the usage rates for each pixel to be quantized, the previously calculated usage rates for each necessary pixel may be referenced.
[0086] 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.
[0087] The above disclosure of embodiments includes the following configurations and methods.
[0088] (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, At least for each pixel located in the target region including the pixel of interest, a usage rate determination means determines, according to the pixel 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 application utilization rate determination means for determining a first application utilization rate to be applied to the quantization of the pixel of interest based on the first utilization rate of each pixel located in the target region, and for determining a second application utilization rate to be applied to the quantization of the pixel of interest based on the second utilization rate of each pixel located in the target region, An application error value acquisition means for acquiring an application 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 application 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 applicable usage 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.
[0089] (Configuration 2) The first utilization rate is higher when the first pixel value is different from the median value than when the second pixel value is closer to the median value than the first pixel value. The program according to configuration 1, characterized in that the second utilization rate is lower when the first pixel value is used than when the second pixel value is used.
[0090] (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.
[0091] (Composition 4) The first applicable utilization rate is the average value of the first utilization rates of each pixel in the target region. The program according to any one of configurations 1 to 3, characterized in that the second applicable utilization rate is the average value of the second utilization rates of each pixel in the target region.
[0092] (Composition 5) The first applicable utilization rate is the median of the first utilization rates of each pixel in the target region. The program according to any one of configurations 1 to 3, characterized in that the second applicable utilization rate is the median value of the second utilization rates of each pixel in the target region.
[0093] (Composition 6) The first application utilization rate is the value that is most frequently present among the first utilization rates of each pixel in the target region. The program according to any one of configurations 1 to 3, characterized in that the second applicable utilization rate is the value that is most frequently present among the second utilization rates of each pixel in the target region.
[0094] (Composition 7) A pixel selection means for selecting a pixel of interest to be quantized from each pixel of an input image, At least for each pixel located in the target region including the pixel of interest, a usage rate determination means determines, according to the pixel 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 application utilization rate determination means for determining a first application utilization rate to be applied to the quantization of the pixel of interest based on the first utilization rate of each pixel located in the target region, and for determining a second application utilization rate to be applied to the quantization of the pixel of interest based on the second utilization rate of each pixel located in the target region, An application error value acquisition means for acquiring an application 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 application 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 applicable usage 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.
[0095] (Composition 8) 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, At a minimum, for each pixel located in the target region including the pixel of interest, a first usage rate is determined according to the pixel value, indicating the degree to which the two-dimensional matrix influences the quantization, and a second usage rate is determined, 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. A first applicable usage rate to be applied to the quantization of the pixel of interest is determined based on the first usage rate of each pixel located in the target region, and a second applicable usage rate to be applied to the quantization of the pixel of interest is determined based on the second usage rate of each pixel located in the target region. Based on the cumulative error corresponding to the pixel of interest and the second application usage rate, an application 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 application 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.
[0096] (Composition 9) 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 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 for determining the noise usage rate and the error usage rate according to the density value of the pixels sequentially selected in the pixel selection process, An application usage rate determination process that determines the application noise usage rate and application error usage rate to be applied to the quantization of the pixel selected in the pixel selection process, based on the noise usage rate and the error usage rate corresponding to each pixel of the pixel and surrounding pixels selected in the pixel selection 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 applicable noise usage rate corresponding to the pixel, and using the cumulative error according to the applicable 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 applied 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 applicable noise usage 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 usage rate when the density value of the pixel corresponds to either the highlight or shadow area is set to a value greater than the noise usage rate when the density value corresponds to the midtone area between the highlight and shadow areas. A program characterized by setting the error usage rate when the density value of the pixel corresponds to either the highlight or shadow portion to a smaller value than the error usage rate when the density value corresponds to the midtone portion.
[0097] (Composition 10) 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 configuration 9, 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.
[0098] (Composition 11) The program according to configuration 9 or 10, 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 density value of the pixel.
[0099] (Composition 12) The aforementioned usage rate determination process is: As a reference for indicating the density range in the highlight area, a preset first highlight reference value and a second highlight reference value that is greater than the first highlight reference value are used. As a reference for indicating the concentration range 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 to indicate the density range in the center of the midtones, 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 density value of the aforementioned pixel 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 density value of the pixel is greater than or equal to the first halftone reference value and less than or equal to the second halftone reference value, the noise usage rate is set to the minimum noise usage rate. If the density value of the pixel 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 density value of the pixel and the first highlight reference value. If the density value of the pixel is greater than or equal to the second halftone 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 density value of the pixel and the second halftone reference value. If the density value of the aforementioned pixel 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 density value of the pixel 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 density value. The program according to configuration 11, characterized in that, if the density value of the pixel is equal to or greater than 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 density value of the pixel and the first shadow reference value.
[0100] (Composition 13) The aforementioned usage rate determination process is: As a reference for indicating the density range in the highlight 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 reference for indicating the concentration range in the shadow area, a third shadow reference value is further used, which is greater than or equal to the second shadow reference value and smaller than the maximum value within the range of possible concentration values. If the density value of the aforementioned pixel is less than or equal to the third highlight reference value, the error usage rate is set to 0. If the density value of the pixel 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 density value and the third highlight reference value by the difference between the second highlight reference value and the third highlight reference value. If the density value of the pixel 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 density value by the difference between the third shadow reference value and the first shadow reference value. The program according to configuration 12, characterized in that if the density value of the pixel is equal to or greater than the third shadow reference value, the error usage rate is set to 0.
[0101] (Composition 14) 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 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 according to the density value of the pixels sequentially selected by the pixel selection processing unit, An application usage rate determination processing unit that determines the application noise usage rate and application error usage rate to be applied to the pixel selected by the pixel selection processing unit during quantization, based on the noise usage rate and the error usage rate corresponding to each pixel of the pixel and surrounding pixels selected by the pixel selection processing unit, A processing unit that performs quantization on the density values of pixels sequentially selected by the pixel selection processing unit, the quantization execution processing unit that uses dither matrix noise according to the applicable noise usage rate corresponding to the pixel, and uses the cumulative error according to the applicable 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 applicable 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 the processing unit calculates the noise-corrected threshold by adding the product of the applicable noise usage rate corresponding to the pixel and the dither matrix noise to a preset initial threshold, which is then used as the noise-corrected 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 usage rate when the density value of the pixel corresponds to either the highlight or shadow area is set to a value greater than the noise usage rate when the density value corresponds to the midtone area between the highlight and shadow areas. An image processing apparatus characterized in that the error usage rate when the density value of the pixel corresponds to either the highlight area or the shadow area is set to a smaller value than the error usage rate when the density value corresponds to the midtone area.
[0102] (Composition 15) An image processing method that quantizes the density value indicating the color density of each pixel in an image, A pixel selection process step in which pixels to be quantized are sequentially selected, A processing step 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 processing step for determining the noise usage rate and the error usage rate according to the density value of the pixels sequentially selected in the pixel selection processing step, An applied usage rate determination step, which determines the applied noise usage rate and applied error usage rate to be applied to the pixel selected in the pixel selection step during quantization, based on the noise usage rate and the error usage rate corresponding to each pixel of the pixel and its surrounding pixels selected in the pixel selection step, A processing step which performs quantization on the density values of the pixels sequentially selected in the pixel selection processing step, wherein the quantization is performed using dither matrix noise according to the applicable noise usage rate corresponding to the pixel, and using the cumulative error according to the applicable 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 applicable error usage rate corresponding to the pixel and the cumulative error is added to the density value of the pixel and the result is calculated as 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 applicable noise usage 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 usage rate when the density value of the pixel corresponds to either the highlight or shadow area is set to a value greater than the noise usage rate when the density value corresponds to the midtone area between the highlight and shadow areas. An image processing method characterized by setting the error usage rate when the density value of the pixel corresponds to either a highlight or a shadow to a smaller value than the error usage rate when the density value corresponds to a midtone. [Explanation of Symbols]
[0103] 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, At least for each pixel located in the target region including the pixel of interest, a usage rate determination means determines, according to the pixel 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 generated in the quantization for pixels surrounding the pixel of interest, influences the quantization. An application utilization rate determination means that determines a first application utilization rate to be applied to the quantization of the pixel of interest based on the first utilization rate of each pixel located in the target region, and determines a second application utilization rate to be applied to the quantization of the pixel of interest based on the second utilization rate of each pixel located in the target region, An application error value acquisition means for acquiring an application 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 application 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 applicable usage 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 pixel value is different from the median value than when the second pixel value is closer to the median value than the first pixel value. The program according to claim 1, characterized in that the second utilization rate is lower when the first pixel value is used than when the second pixel value is used.
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 first applicable utilization rate is the average value of the first utilization rates of each pixel in the target region. The program according to claim 1 or 2, characterized in that the second applicable utilization rate is the average value of the second utilization rates of each pixel in the target region.
5. The first applicable utilization rate is the median of the first utilization rates of each pixel in the target region. The program according to claim 1 or 2, characterized in that the second applicable utilization rate is the median value of the second utilization rates of each pixel in the target region.
6. The first applicable utilization rate is the value that is most frequently present among the first utilization rates of each pixel in the target region. The program according to claim 1 or 2, characterized in that the second applicable utilization rate is the value that is most frequently present among the second utilization rates of each pixel in the target region.
7. A pixel selection means for selecting a pixel of interest to be quantized from each pixel of an input image, At least for each pixel located in the target region including the pixel of interest, a usage rate determination means determines, according to the pixel 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 generated in the quantization for pixels surrounding the pixel of interest, influences the quantization. An application utilization rate determination means that determines a first application utilization rate to be applied to the quantization of the pixel of interest based on the first utilization rate of each pixel located in the target region, and determines a second application utilization rate to be applied to the quantization of the pixel of interest based on the second utilization rate of each pixel located in the target region, An application error value acquisition means for acquiring an application 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 application 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 applicable usage 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.
8. 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, At a minimum, for each pixel located in the target region including the pixel of interest, a first usage rate is determined according to the pixel value, indicating the degree to which the two-dimensional matrix influences the quantization, and a second usage rate is determined, 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. A first applicable usage rate to be applied to the quantization of the pixel of interest is determined based on the first usage rate of each pixel located in the target region, and a second applicable usage rate to be applied to the quantization of the pixel of interest is determined based on the second usage rate of each pixel located in the target region. Based on the cumulative error corresponding to the pixel of interest and the second application usage rate, an application 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 applicable usage 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.
9. 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 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 for determining the noise usage rate and the error usage rate according to the density value of the pixels sequentially selected in the pixel selection process, An application usage rate determination process that determines the application noise usage rate and application error usage rate to be applied to the quantization of the pixel selected in the pixel selection process, based on the noise usage rate and the error usage rate corresponding to each pixel of the pixel and surrounding pixels selected in the pixel selection 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 applicable noise usage rate corresponding to the pixel, and using the cumulative error according to the applicable 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 applied 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 applicable noise usage 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 usage rate when the density value of the pixel corresponds to either the highlight or shadow area is set to a value greater than the noise usage rate when the density value corresponds to the midtone area between the highlight and shadow areas. A program characterized by setting the error usage rate when the density value of the pixel corresponds to either the highlight or shadow portion to a smaller value than the error usage rate when the density value corresponds to the midtone portion.
10. 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 claim 9, 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.
11. The program according to claim 9 or 10, characterized in that the usage rate determination process sets the noise usage rate to a value greater than or equal to a minimum noise usage rate that is set to a value greater than 0, in any case of the density value of the pixel.
12. The aforementioned usage rate determination process is: As a reference for indicating the density range in the highlight area, a preset first highlight reference value and a second highlight reference value that is greater than the first highlight reference value are used. As a reference for indicating the concentration range 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 to indicate the density range in the center of the midtones, 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 density value of the aforementioned pixel 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 density value of the pixel is greater than or equal to the first halftone reference value and less than or equal to the second halftone reference value, the noise usage rate is set to the minimum noise usage rate. If the density value of the pixel 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 density value of the pixel and the first highlight reference value. If the density value of the pixel 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 density value of the pixel and the second midtone reference value. If the density value of the aforementioned pixel 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 density value of the pixel 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 density value. The program according to claim 11, characterized in that, if the density value of the pixel is equal to or greater than 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 density value of the pixel and the first shadow reference value.
13. The aforementioned usage rate determination process is: As a reference for indicating the density range in the highlight 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 reference for indicating the concentration range in the shadow area, a third shadow reference value is further used, which is greater than or equal to the second shadow reference value and smaller than the maximum value within the range of possible concentration values. If the density value of the aforementioned pixel is less than or equal to the third highlight reference value, the error usage rate is set to 0. If the density value of the pixel 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 density value and the third highlight reference value by the difference between the second highlight reference value and the third highlight reference value. If the density value of the pixel 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 density value by the difference between the third shadow reference value and the first shadow reference value. The program according to claim 12, characterized in that if the density value of the pixel is equal to or greater than the third shadow reference value, the error usage rate is set to 0.
14. 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 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 according to the density value of the pixels sequentially selected by the pixel selection processing unit, An application usage rate determination processing unit that determines the application noise usage rate and application error usage rate to be applied to the pixel selected by the pixel selection processing unit during quantization, based on the noise usage rate and the error usage rate corresponding to each pixel of the pixel and surrounding pixels selected by the pixel selection processing unit, A processing unit that performs quantization on the density values of pixels sequentially selected by the pixel selection processing unit, the quantization execution processing unit that uses dither matrix noise according to the applicable noise usage rate corresponding to the pixel, and uses the cumulative error according to the applicable 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 applicable 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 the processing unit calculates the noise-corrected threshold by adding the product of the applicable noise usage rate corresponding to the pixel and the dither matrix noise to a preset initial threshold, which is then used as the noise-corrected 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 usage rate when the density value of the pixel corresponds to either the highlight or shadow area is set to a value greater than the noise usage rate when the density value corresponds to the midtone area between the highlight and shadow areas. An image processing apparatus characterized in that the error usage rate when the density value of the pixel corresponds to either the highlight area or the shadow area is set to a smaller value than the error usage rate when the density value corresponds to the midtone area.
15. An image processing method that quantizes the density value indicating the color density of each pixel in an image, A pixel selection process step in which pixels to be quantized are sequentially selected, A processing step 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 processing step for determining the noise usage rate and the error usage rate according to the density value of the pixels sequentially selected in the pixel selection processing step, An applied usage rate determination step, which determines the applied noise usage rate and applied error usage rate to be applied to the pixel selected in the pixel selection step during quantization, based on the noise usage rate and the error usage rate corresponding to each pixel of the pixel and its surrounding pixels selected in the pixel selection step, A processing step which performs quantization on the density values of the pixels sequentially selected in the pixel selection processing step, wherein the quantization is performed using dither matrix noise according to the applicable noise usage rate corresponding to the pixel, and using the cumulative error according to the applicable 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 applicable error usage rate corresponding to the pixel and the cumulative error is added to the density value of the pixel and the result is calculated as 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 applicable noise usage 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 usage rate when the density value of the pixel corresponds to either the highlight or shadow area is set to a value greater than the noise usage rate when the density value corresponds to the midtone area between the highlight and shadow areas. An image processing method characterized by setting the error usage rate when the density value of the pixel corresponds to either a highlight or a shadow to a smaller value than the error usage rate when the density value corresponds to a midtone.
Citation Information
Patent Citations
Image processing method, image processing apparatus and storage medium
JP2001292320A
Image processing device, printing device, image processing method, and image processing program
JP2012204967A
Printing device, printing method, program, and image processing device
JP2014236460A
Program, image processing device, and image processing method
WO2011036735A1