If a false edge will possibly occur at a portion in an image where the input pixel value. Iin is equal to the value (Rj+F), where j=N, S, M, or L, the noise value N is generated when the input pixel value Iin is around the value (Rj+F). The noise value N has a value equal to a product of a random number, the value “rate”, and the value “coefficient”. The value “rate” becomes the maximum value (1) when the input pixel value Iin is equal to the value (Rj+F), and becomes zero (0) when the input pixel value Iin is smaller than or equal to the value (Rj+F)−Range and when the input pixel value Iin is greater than or equal to the value (Rj+F)+Range. The value “coefficient” ensures that the value (Iin+N) will not become smaller than an input minimum value Imin or a threshold that corresponds to another relative value that is smaller than and next to the subject relative value Rj and will not exceed the input maximum value Imax or another threshold that corresponds to still another relative value that is greater than and next to the subject relative value Rj.
|
28. An image processing method, comprising:
receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing step providing the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one adjacent value that is adjacent to the at least one relative value.
1. An image processing device, comprising:
an input portion receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
an input pixel value correcting portion that corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
a noise providing portion that provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
an output portion that compares a noise-value-added corrected input pixel value with at least one of the at least one threshold when the corrected input pixel value is added with the noise value and that compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
an error calculating portion that calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing portion providing the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to at least one of the plurality of relative values and at least one adjacent value that is adjacent to at least one of the relative values.
33. A computer-readable storage medium storing a computer-executable image processing program, the image processing program including:
instructions for receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
instructions for correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
instructions for providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
instructions for comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
instructions for calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing instructions providing the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one adjacent value that is adjacent to the at least one relative value.
32. An image processing method, comprising:
receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing step setting the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next-to-nearest threshold when the at least one threshold includes the lower next-to-nearest threshold, the lower next-to-nearest threshold corresponding to a lower next-to-nearest relative value that is lower than and next to a nearest relative value that is the nearest to the input pixel value among the plurality of relative values, and
the noise providing step setting the noise value to allow the sum of the noise value and the input pixel value to be smaller than or equal to a higher next-to-nearest threshold when the at least one threshold includes the higher next-to-nearest threshold, the higher next-to-nearest threshold corresponding to a higher next-to-nearest relative value that is higher than and next to the nearest relative.
13. An image processing device, comprising:
an input portion receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
an input pixel value correcting portion that corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
a noise providing portion that provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
an output portion that compares a noise-value-added corrected input pixel value with at least one of the at least one threshold when the corrected input pixel value is added with the noise value and that compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
an error calculating portion that calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing portion setting the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next-to-nearest threshold when the at least one threshold includes the lower next-to-nearest threshold, the lower next-to-nearest threshold corresponding to a lower next-to-nearest relative value that is lower than and next to a nearest relative value that is the nearest to the input pixel value among the plurality of relative values, and
the noise providing portion setting the noise value to allow the sum of the noise value and the input pixel value to be smaller than or equal to a higher next-to-nearest threshold when the at least one threshold includes the higher next-to-nearest threshold, the higher next-to-nearest threshold corresponding to a higher next-to-nearest relative value that is higher than and next to the nearest relative.
37. A computer-readable storage medium storing a computer-executable image processing program, the image processing program including:
instructions for receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
instructions for correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
instructions for providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
instructions for comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
instructions for calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing instructions setting the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next-to-nearest threshold when the at least one threshold includes the lower next-to-nearest threshold, the lower next-to-nearest threshold corresponding to a lower next-to-nearest relative value that is lower than and next to a nearest relative value that is the nearest to the input pixel value among the plurality of relative values, and
the noise providing instructions setting the noise value to allow the sum of the noise value and the input pixel value to be smaller than or equal to a higher next-to-nearest threshold when the at least one threshold includes the higher next-to-nearest threshold, the higher next-to-nearest threshold corresponding to a higher next-to-nearest relative value that is higher than and next to the nearest relative.
31. An image processing method, comprising:
receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing step providing the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one shifted value that is shifted from the at least one relative value by a predetermined amount,
the noise providing step setting the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the at least one relative value, and
the noise providing step setting the noise value to allow a sum of the noise value and the input pixel value to be smaller than or equal to a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to the at least one relative value.
9. An image processing device, comprising:
an input portion receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
an input pixel value correcting portion that corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
a noise providing portion that provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
an output portion that compares a noise-value-added corrected input pixel value with at least one of the at least one threshold when the corrected input pixel value is added with the noise value and that compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
an error calculating portion that calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing portion providing the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to at least one of the plurality of relative values and at least one shifted value that is shifted from at least one of the relative values by a predetermined amount,
the noise providing portion setting the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the at least one of the relative values, and
the noise providing portion setting the noise value to allow a sum of the noise value and the input pixel value to be smaller than or equal to a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to at least one of the relative values.
36. A computer-readable storage medium storing a computer-executable image processing program, the image processing program including:
instructions for receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three;
instructions for correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value;
instructions for providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold;
instructions for comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and
instructions for calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels,
the noise providing instructions providing the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one shifted value that is shifted from the at least one relative value by a predetermined amount,
the noise providing instructions setting the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the at least one relative value, and
the noise providing instructions setting the noise value to allow a sum of the noise value and the input pixel value to be smaller than or equal to a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to the at least one relative value.
2. An image processing device as claimed in
wherein the noise providing portion sets the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to at least one of the relative values, and
wherein the noise providing portion sets the noise value to allow a sum of the noise value and the input pixel value to be smaller than or equal to a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to at least one of the relative values.
3. An image processing device as claimed in
4. An image processing device as claimed in
5. An image processing device as claimed in
6. An image processing device as claimed in
7. An image processing device as claimed in
8. An image processing device as claimed in
the noise providing portion sets the noise value dependently on the input pixel value and a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the one relative value, and
the noise providing portion sets the noise value dependently on the input pixel value and a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to the one relative value.
10. An image processing device as claimed in
11. An image processing device as claimed in
12. An image processing device as claimed in
14. An image processing device as claimed in
wherein the noise providing portion sets the noise value to allow the sum of the noise value and the input pixel value to be greater than the lower next-to-nearest threshold when the at least one threshold includes the lower next-to-nearest threshold, and
wherein the noise providing portion sets the noise value to allow the sum of the noise value and the input pixel value to be smaller than the higher next-to-nearest threshold when the at least one threshold includes the higher next-to-nearest threshold.
15. An image processing device as claimed in
16. An image processing device as claimed in
17. An image processing device as claimed in
18. An image processing device as claimed in
19. An image processing device as claimed in
20. An image processing device as claimed in
21. An image processing device as claimed in
22. An image processing device as claimed in
23. An image processing device as claimed in
24. An image processing device as claimed in
25. An image processing device as claimed in
26. An image processing device as claimed in
27. An image processing device as claimed in
29. An image processing method as claimed in
30. An image processing method as claimed in
the noise providing step sets the noise value dependently on the input pixel value and a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the one relative value, and
the noise providing step sets the noise value dependently on the input pixel value and a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to the one relative value.
34. A computer-readable storage medium as claimed in
35. A computer-readable storage medium as claimed in
the noise providing instructions sets the noise value dependently on the input pixel value and a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the one relative value, and
the noise providing instructions sets the noise value dependently on the input pixel value and a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to the one relative value.
|
This application is a Continuation-In-Part of application Ser. No. 10/244,382 filed Sep. 17, 2002. The entire disclosure of the prior application is hereby incorporated by reference herein in its entirety.
1. Field of the Invention
The present invention relates to an image processing device and an image processing method, and more particularly to an image processing device and an image processing method that perform quantization to convert input image data into output image data while distributing error between input image data and output image data to image data of not-yet-processed peripheral pixels.
2. Description of Related Art
Recently, color printers, such as ink-jet printers, that have a print head for ejecting ink of a plurality of colors have become popular as computer output devices, and are widely used for executing multi-color and multi-tone printing of images processed by a computer or the like. The ink-jet printer reproduces tones corresponding to input tone data. (gray-scale data) by controlling the dot generation ratio in each area.
An error distribution method has been proposed to control dot generation on a pixel-by-pixel basis. This method controls dot formation to decrease the density error of an overall image by determining an error that occurs on a pixel due to mismatch between density represented by input tone data and density actually reproduced by the presence or absence of dot formation and by distributing the error to peripheral unprocessed pixels. Presence or absence of dot formation at each pixel is determined based on corrected tone data that is produced by distributing errors to the original input tone data of the subject pixel from already-processed peripheral pixels. With this error distribution method, the overall image error can be made extremely small, and output image quality can be improved.
Recently, there have been proposed ink-jet printers of a type that can reproduce three or more values per dot by varying the dot size, rather than reproducing two values by simply turning a dot on or off. A multi-value error distribution method has been proposed to handle three or more values.
According to the multi-value error distribution method, however, so-called false edges occur in parts of a gradation image where tones vary continuously.
In view of the above-described drawbacks, it is an objective of the present invention to provide an image processing device and an image processing method that can effectively reduce false edges.
In order to attain the above and other objects, the present invention provides an image processing device, including: an input portion; an input pixel value correcting portion; a noise providing portion; an output portion; and an error calculating portion. The input portion receives an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three. The input pixel value correcting portion corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value. The noise providing portion provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold. The output portion compares a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value, and compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one. The error calculating portion calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels. The noise providing portion provides the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one adjacent value that is adjacent to the at least one relative value.
According to another aspect, the present invention provides an image processing device, including: an input portion; an input pixel value correcting portion; a noise providing portion; an output portion; and an error calculating portion. The input portion receives an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three. The input pixel value correcting portion corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value. The noise providing portion provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold. The output portion compares a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value, and compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of, different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one. The error calculating portion calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels. The noise providing portion provides the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one shifted value that is shifted from the at least one relative value by a predetermined amount. The noise providing portion sets the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the at least one relative value. The noise providing portion sets the noise value to allow a sum of the noise value and the input pixel value to be smaller than or equal to a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to the at least one relative value.
According to another aspect, the present invention provides an image processing device, including: an input portion; an input pixel value correcting portion: a noise providing portion; an output portion; and an error calculating portion. The input portion receives an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three. The input pixel value correcting portion corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value. The noise providing portion provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold. The output portion compares a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value, and compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one. The error calculating portion calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels. The noise providing portion sets the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next-to-nearest threshold when the at least one threshold includes the lower next-to-nearest threshold, the lower next-to-nearest threshold corresponding to a lower next-to-nearest relative value that is lower than and next to a nearest relative value that is the nearest to the input pixel value among the plurality of relative values. The noise providing portion sets the noise value to allow the sum of the noise value and the input pixel value to be smaller than or equal to a higher next-to-nearest threshold when the at least one threshold includes the higher next-to-nearest threshold, the higher next-to-nearest threshold corresponding to a higher next-to-nearest relative value that is higher than and next to the nearest relative.
According to another aspect, the present invention provides an image processing method, including: receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three; correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value; providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process Subtracting the noise value from the at least one threshold; comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels, the noise providing step providing the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one adjacent value that is adjacent to the at least one relative value.
According to another aspect, the present invention provides an image processing method, including: receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three; correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value; providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold; comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels, the noise providing step providing the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one shifted value that is shifted from the at least one relative value by a predetermined amount, the noise providing step setting the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the at least one relative value, and the noise providing step setting the noise value to allow a sum of the noise value and the input pixel value to be smaller than or equal to a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to the at least one relative value.
According to another aspect, the present invention provides an image processing method, including: receiving an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three; correcting the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value; providing a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold; comparing a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and comparing the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one; and calculating a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels, the noise providing step setting the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next-to-nearest threshold when the at least one threshold includes the lower next-to-nearest threshold, the lower next-to-nearest threshold corresponding to a lower next-to-nearest relative value that is lower than and next to a nearest relative value that is the nearest to the input pixel value among the plurality of relative values, and the noise providing step setting the noise value to allow the sum of the noise value and the input pixel value to be smaller than or equal to a higher next-to-nearest threshold when the at least one threshold includes the higher next-to-nearest threshold, the higher next-to-nearest threshold corresponding to a higher next-to-nearest relative value that is higher than and next to the nearest relative.
According to another aspect, the present invention provides a storage medium storing an image processing program readable by a computer, the image processing program including: an input pixel value receiving program; a correcting program; a noise providing program; a comparing program; and a difference calculating program. The input pixel value receiving program receives an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three. The correcting program corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value. The noise providing program provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold. The comparing program compares a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one. The difference calculating program calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels. The noise providing program provides the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one adjacent value that is adjacent to the at least one relative value.
According to another aspect, the present invention provides a storage medium storing an image processing program readable by a computer, the image processing program including: an input pixel value receiving program; a correcting program; a noise providing program; a comparing program; and a difference calculating program. The input pixel value receiving program receives an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three. The correcting program corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value. The noise providing program provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold. The comparing program compares a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one. The difference calculating program calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels. The noise providing program provides the noise to the either one of the corrected input pixel value and the at least one threshold when the input pixel value is equal to either one of at least one relative value among the plurality of relative values and at least one shifted value that is shifted from the at least one relative value by a predetermined amount. The noise providing program sets the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next threshold when the at least one threshold includes the lower next threshold, the lower next threshold corresponding to a lower next relative value that is lower than and next to the at least one relative value. The noise providing program sets the noise value to allow a sum of the noise value and the input pixel value to be smaller than or equal to a higher next threshold when the at least one threshold includes the higher next threshold, the higher next threshold corresponding to a higher next relative value that is higher than and next to the at least one relative value.
According to another aspect, the present invention provides a storage medium storing an image processing program readable by a computer, the image processing program including: an input pixel value receiving program; a correcting program; a noise providing program; a comparing program; and a difference calculating program. The input pixel value receiving program receives an input pixel value for one pixel, the input pixel value indicating either one of a first predetermined number of different first tone levels, the first predetermined number being greater than or equal to three. The correcting program corrects the input pixel value for the pixel based on errors that have been generated at already-processed pixels, thereby determining a corrected input pixel value. The noise providing program provides a noise to either one of the corrected input pixel value and at least one threshold by executing either one of a noise value adding process and a noise value subtracting process, the noise value adding process adding a noise value to the corrected input pixel value, the noise value subtracting process subtracting the noise value from the at least one threshold. The comparing program compares a noise-value-added corrected input pixel value with the at least one threshold when the corrected input pixel value is added with the noise value and compares the corrected input pixel value with at least one noise-value-subtracted threshold when the noise value is subtracted from the at least one threshold, thereby outputting an output pixel value based on a compared result, the output pixel value indicating either one of a second predetermined number of different second tone levels, the second predetermined number being smaller than the first predetermined number but being greater than one. The difference calculating program calculates a difference between the corrected input pixel value and a relative value corresponding to the output pixel value, the relative value being either one of a plurality of relative values that correspond to the second predetermined number of different second tone levels. The noise providing program sets the noise value to allow a sum of the noise value and the input pixel value to be greater than or equal to a lower next-to-nearest threshold when the at least one threshold includes the lower next-to-nearest threshold, the lower next-to-nearest threshold corresponding to a lower next-to-nearest relative value that is lower than and next to a nearest relative value that is the nearest to the input pixel value among the plurality of relative values. The noise providing program sets the noise value to allow the sum of the noise value and the input pixel value to be smaller than or equal to a higher next-to-nearest threshold when the at least one threshold includes the higher next-to-nearest threshold, the higher next-to-nearest threshold corresponding to a higher next-to-nearest relative value that is higher than and next to the nearest relative.
The above and other objects, features and advantages of the invention will become more apparent from reading the following description of the preferred embodiment taken in connection with the accompanying drawings in which:
An image processing device and an image processing method according to a preferred embodiment of the present invention will be described while referring to the accompanying drawings wherein like parts and components are designated by the same reference numerals to avoid duplicating description.
The structure of the image processing device 1 of the present embodiment will be described with reference to
The image processing device 1 is constructed from a personal computer. The image processing device 1 is connected to a printer 5 via a network 4.
The image processing device 1 executes the multi-value error distribution processing onto input image data for each of cyan, magenta, yellow, and black inks For each color, the input image data for each pixel (which will be referred to as an “input pixel value Iin” hereinafter) represents either one of 256 different tones of 0 to 255. For each color, the image processing device 1 converts one input pixel value Iin into an output pixel value Iout. The output pixel value Iout represents either one of four different tones. The input pixel value Iin is an eight-bit value and is either one of 256 different values that are greater than or equal to 0 and smaller than or equal to 255. The maximum value and the minimum value, which the input pixel value Iin will possibly become, will be referred to as an input maximum value Imax and an input minimum value Imin, respectively. In this example, the input maximum value Imax is equal to 255 and the input minimum value Imin is equal to zero (0) The output pixel value Iout indicates either one of four different states: output of a large-dot, output of a medium-dot, output of a small-dot, and output of no dot. Based on the output pixel value Iout for each pixel for each color, the printer 5 prints a four-tone pixel image at the subject pixel by the corresponding color ink.
The image processing device 1 includes: a CPU 10, a ROM 12, a RAM 14, a hard disk (HD) 16, a CD-ROM drive 18, a network interface 20, and an input/output interface 22. The input/output interface 22 is connected to a display 24, a keyboard 26, and a mouse 28.
The CPU 10 controls operation of the entire image processing device 1 by executing programs stored in the ROM 12, programs stored in the hard disk (HD) 16, programs supplied via the CD-ROM drive 18 from a CD-ROM (not shown).
The ROM 12 stores therein programs and data required to execute operation of the image processing device 1.
The hard disk (HD) 16 stores therein: a multi-value error distribution processing program 29 according to the present embodiment; a threshold table 30; a relative value table 32; and a distribution matrix 34.
The hard disk (HD) 16 further stores therein application programs for creating image data and for instructing printing of the image data.
A work area is prepared in the RAM 14 for storing image data. An error buffer 36 is also prepared in the RAM 14.
The network interface 20 is connected to the network 4.
The CPU 10 controls the display 24 via the input/output interface 22 to show desired screens and receives a user's instruction inputted via the keyboard 26 and the mouse 28 via the input/output interface 22.
When the user instructs the application program to print an image, the CPU 10 executes the multi-value error distribution processing program 29 to input each input pixel value Iin into an output pixel value Iout and to output the output pixel value Iout to the printer 5.
The printer 5 includes: a network interface 50; a CPU 52; a ROM 54; a RAM 56; and a printing section 58. The network interface 50 is connected to the network 4. The printing section 58 can perform printing by using ink of four colors of cyan, magenta, yellow, and black. The RAM 56 temporarily stores the output pixel values Iout supplied from the image processing device 1. The CPU 52 executes a printing program stored in the ROM 54 to control the printing section 58 to print the output pixel values Iout stored in the RAM 56.
As shown in
An image has a plurality of pixels, The plurality of pixels are arranged two-dimensionally along predetermined X and Y directions, which extend perpendicularly to each other. More specifically, (Xmax+1)×(Ymax+1) number of pixels are arranged by the (Ymax+1) number of rows by the (Xmax+1) number of columns. According to the multi-value error distribution processing, first, all the pixels (0, 0) to (Xmax, 0) located on the first line, which is located on the Y position 0 and which extends along the X direction, are processed pixels one by one from (0, 0) to (Xmax, 0). Next, all the pixels (0, 1) to (Xmax, 1) located on the second line, which is located on the Y position 1 and which extends along the X direction, are processed pixels one by one from (0, 1) to (Xmax, 1). In this way, all the pixels in the lines from Y=0 to Y=Ymax−1 are processed lines one by one. Finally, all the pixels (0, Ymax) to (Xmax, Ymax) located on the last line, which is located on the Y position Ymax and which extends along the X direction, are processed pixels one by one from (0, Ymax) to (Xmax, Ymax).
The distribution matrix 34 stores therein a plurality of (twelve, in this example) weighting coefficients as shown in
As shown in
The CPU 10 executes the multi-value error distribution processing program 29 to operate as shown in
More specifically, when the CPU 10 receives an input pixel value Iin (a value in a range of 0 to 255) for one pixel (X, Y) for one color (cyan, for example), the CPU 10 executes the noise generating process 101 to calculate a noise value N in correspondence with the input pixel value Iin.
Next will be described how to calculate the noise value N.
First, the CPU 10 reads out four relative values RN, RS, RM, and RL (0, 106, 192, 255 in this example) for the subject color (cyan, in this example) from the relative value table 32. The CPU 10 determines values of “first rate,” “second rate,” “third rate,” and “fourth rate” by calculating the following four equations:
first rate=1−[abs(Iin−RN−F)]/Range};
second rate=1−[abs(Iin−RS−F)]/Range};
third rate=1−[abs(Iin−RM−F)]Range}; and
fourth rate=1−[abs(Iin−RL−F)]/Range}.
It is noted that “abs” is an operator for determining an absolute value of a value in the parenthesis. The value “F” is a shift amount, and is equal to two (2) in this example. The value “Range” is a noise-generating range, and is equal to ten (10) in this example. It is also noted that if the calculated result for each of the “first rate,” “second rate,” “third rate,” and “fourth rate” becomes lower than or equal to zero (0), the subject value (“first rate,” “second rate,” “third rate,” or “fourth rate”) is forcibly set to zero (0). For example, if the calculated result of the equation “fourth rate=1−[abs (Iin−RL−F)]/Range}” is lower than or equal to zero (0), the value “fourth rate” is forcibly set to zero (0).
The general equation for the “first rate,” “second rate,” “third rate,” and “fourth rate” is represented by the following equation (1):
ratej=1−[abs(Iin−Rj−F)]/Range) (1),
wherein ratej is the general expression of the “first rate,” “second rate,” “third rate,” and “fourth rate,” and j is either one of N, S, M, or L.
The CPU 10 then selects the maximum value among the “first rate,” “second rate,” “third rate,” and “fourth rate,” and sets the selected value as a value “rate” for the subject input pixel value Iin. Thus, the value “rate” is greater than or equal to zero (0).
Next, the CPU 10 calculates a value “coefficient” in a manner described below.
When the input pixel value Iin is greater than or equal to the input minimum value Imin (0, in this example) and smaller than the value (RN+RS)/2 (53, in this example), the CPU 10 reads out the threshold TSM (106, in this example), and sets the value “coefficient” to the value (TSM−Imin)/G, wherein G is a predetermined normalization constant and is equal to 291 in this example. Accordingly, in this example, the CPU 10 sets the coefficient to the value 106/291.
On the other hand, when the input pixel value Iin is greater than or equal to the value (RN+RS)/2 (53, in this example) and smaller than the value (RS+RM)/2 (149, in this example), the CPU 10 reads out the thresholds TML, TSM, and TNS (192, 106, and 0 in this example), and sets the value “coefficient” to a smaller one of the value (TSM−TNS)/G and the value (TML−TSM)/G. In this example, the CPU 10 sets the value “coefficient” to the value 86/291, which is the smaller one of the values 106/291 and 86/291.
When the input pixel value Iin is greater than or equal to the value (RS+RM)/2 (149, in this example) and smaller than the value (RM+RL)/2 (224, in this example), the CPU 10 reads out the thresholds TML and TSM (192 and 106 in this example), and sets the value “coefficient” to the smaller one of the value (TML−TSM)/G and the value (Imax−TML)/G. In this example, the CPU 10 sets the value “coefficient” to the value 63/291, which is the smaller one of the values 86/291 and 63/291.
When the input pixel value Iin is greater than or equal to the value (RM+RL)/2 (224, in this example) and smaller than or equal to the input maximum value Imax (255, in this example), the CPU 10 reads out the threshold TML (192, in this example), and sets the value “coefficient” to the value (Imax−TML)/G. Accordingly, in this example, the CPU 10 sets the value “coefficient” to the value 63/291.
Next, the CPU 10 generates a random number. It is noted that when the input pixel value Iin is greater than or equal to the input minimum value Imin (0, in this example) and smaller than the value (RN+RS)/2 (53, in this example), the CPU 10 generates the random number in a range of greater than or equal to zero (0) and smaller than or equal to +255.
When the input pixel value Iin is greater than or equal to the value (RN+RS)/2 (53, in this example) and smaller than the value (RM+RL)/2 (224, in this example), the CPU 10 generates the random number in a range of greater than or equal to −255 and smaller than or equal to +255.
When the input pixel value Iin is greater than or equal to the value (RM+RL)/2 (224, in this example) and smaller than or equal to the input maximum value Imax (255, in this example), the CPU 10 generates the random number in a range of greater than or equal to −255 and smaller than or equal to zero (0).
Next, the CPU 10 determines the noise value N by calculating a product of the values “rate,” “coefficient”, and the random number. In other words, the CPU 10 calculates the following formula (2):
Noise N=(rate)×(coefficient)×(random number) (2)
Next, the CPU 10 executes the input pixel value correcting process 102. More specifically, the CPU 10 first reads out, from the error buffer 36, errors that have been occurred at already-processed twelve pixels that are located adjacent to the presently-being-processed pixel (X,Y). The CPU 10 multiplies the weighting coefficients to those errors according to the distribution matrix 34, and adds the resultant weighted sum to the input value Iin for the presently-being-processed pixel (X,Y), thereby determining a corrected input pixel value Iin′.
In other words, the CPU 10 adds, to the input pixel value Iin: a 1/48 part of an error generated at pixel (X−2, Y−2); a 3/48 part of an error generated at pixel (X−1, Y−2); a 5/48 part of an error generated at pixel (X, Y−2); a 3/48 part of an error generated at pixel (X+1, Y−2); a 1/48 part of an error generated at pixel (X+2, Y−2); a 3/48 part of an error generated at pixel (X−2, Y−1); a 5/48 part of an error generated at pixel (X−1, Y−1); a 7/48 part of an error generated at pixel (X, Y−1); a 5/48 part of an error generated at pixel (X+1, Y−1); a 3/48 part of an error generated at pixel (X+2, Y−1); a 5/48 part of an error generated at pixel (X−2, Y); and a 7/48 part of an error generated at pixel (X−1, Y), thereby determining the corrected input pixel value Iin′.
Next, the CPU 10 executes the noise value adding process 104 to add the noise value N to the corrected input pixel value Iin′, thereby determining a value (Iin′+N).
Next, the CPU 10 executes the comparing process 105 as shown in
First, the CPU 10 judges in S10 whether or not the value (Iin′+N) is greater than the threshold TML. If the value (Iin′+N) is greater than the threshold TML (yes in S10), the CPU 10 sets a large dot in S22.
On the other hand, if the value Iin′+N) is smaller than or equal to the threshold TML (no in S10), the CPU 10 judges in S12 whether or not the value (Iin′+N) is greater than the threshold TSM. If the value (Iin′+N) is greater than the threshold TSM (yes in S12), the CPU 10 sets a medium dot in S20.
On the other hand, if the value (Iin′+N) is smaller than or equal to the threshold TSM (no in S12), the CPU 10 judges in S14 whether or not the value (Iin′+N) is greater than the threshold TNS (S14). If the value (Iin′+N) is greater than the threshold TNS (yes in S14), the CPU 10 sets a small dot in S18.
On the other hand, if the value (Iin′+N) is smaller than or equal to the threshold TNS (no in S14), the CPU 10 sets a non-dot in S16.
The CPU 10 outputs the thus determined state (large dot, medium dot, small dot, or non-dot) as an output pixel value Iout to the printer 5.
It is noted that in each judgment process of S10, S12, S14, the CPU 10 judges whether or not the value (Iin′+N) is greater than the corresponding threshold. Accordingly, when the value (Iin′+N) is equal to the corresponding threshold, the judgment results negative, and an output value Iout is determined in the same manner as when the value (Iin′+N) is smaller than the corresponding threshold. However, each judgment process of S10, S12, S14 may be modified so that the CPU 10 judges whether or not the value (Iin′+N) is greater than or equal to the corresponding threshold. In this modification, if the value (Iin′+N) is equal to the corresponding threshold, the judgment results positive, and an output value Iout is determined in the same manner as when the value (Iin′+N) is greater than the corresponding threshold.
Next, the CPU 10 executes the converting process 108 to select one relative value RL, RM, RS, or RN that corresponds to the output pixel value Iout, and reads out the selected relative value from the relative value table 32. More specifically, when the output pixel value Iout is a large dot, the CPU 10 selects and reads out the relative value RL from the relative value table 32. When the output pixel value Iout is a medium dot, the CPU 10 selects and reads out the relative value RM from the relative value table 32. When the output pixel value Iout is a small dot, the CPU 10 selects and reads out the relative value RS from the relative value table 32. When the output pixel value Iout is a non-dot, the CPU 10 selects and reads out the relative value RN from the relative value table 32.
Next, the CPU 10 executes the error calculating process 112 to calculate a difference between the corrected input pixel value Iin′ and the read-out relative value RL, RM, RS, or RN, and records the calculated difference (error) in the error buffer 36.
In this way, processing of the input pixel value Iin for one pixel (X,Y) is completed, and the process goes to processing of the next pixel.
Next, the noise value N generated in the noise generating process 101 will be described in greater detail.
The input pixel value Iin is located in either one of regions DN, DS, DM, and DL, which are defined along the horizontal axis. The region DN is defined as greater than or equal to the input minimum value Imin (0) and smaller than the value (RN+RS)/2, the region DS is defined as greater than or equal to the value (RN+RS)/2 and smaller than the value (RS+RM)/2, the region DM is defined as greater than or equal to the value (RS+RM)/2 and smaller than the value (RM+RL)/2, and the region DL is defined as greater than or equal to the value (RN+RL)/2 and smaller than or equal to the input maximum value Imax (255).
Ranges H1, H2, and H3 are defined along the vertical axis. The range H1 is defined between the thresholds TNS and TSM, the range H2 is defined between the thresholds TSM and TML, and the range H3 is defined between the threshold TML and the input maximum value Imax (255). The ranges. H1, H2, and H3 have widths h1, h2, and h3, respectively. The width h1 is equal to the value (TSM−TNS), the width h2 is equal to the value (TML−TSM), and the width h3 is equal to the value (Imax (255)−TML). Because the threshold TNS is equal to the input minimum value Imin (0) in this example, the value h1 satisfies the following equation:
h1=TSM−TNS=TSM−Imin=TSM.
It is noted that if a multi-value error distribution processing is executed to some image without addition of the noise value N, false edges will possibly occur at such a point where the input pixel value Iin is equal to either one of: the relative values RN, RS, RM, and RL and their neighboring values (RN+F), (RS+F), (RM+F), and (RL+F).
For example, when an image to be processed is a gradation image whose density becomes gradually darker in the Y direction (which will be referred to as a “positive gradation image” hereinafter), as the pixels in the positive gradation image are processed gradually in the Y direction, there occurs delay of dot generation. False edges will possibly occur at portions of the image, where input pixel values Iin are slightly darker than the relative values RN, RS, RM, and RL, respectively. It is therefore known that densities slightly greater than the relative values RN, RS, RM, and RL should be set as false-edge generating density values (RN+F), (RS+F), (RM+F), and (RL+F) and that noise should be generated when the input pixel value Iin is around either one of the false-edge generating density values (RN+F), (RS+F), (RM+F), and (RL+F). In this case, the shift amount F is greater than zero (0). For example, the shift amount F is two (2), for example, with respect to the input pixel value range of 0 to 255.
On the other hand, when an image to be processed is a negative gradation image whose density becomes gradually lighter in the Y direction, as the pixels in the negative gradation image are processed gradually in the Y direction, due to occurrence of dot generation delay, false edges will possibly occur at portions of the image, where input pixel values Iin are equal to the relative values RN, RS, RM, and RL or are slightly lighter than the relative values RN, RS, RM, and RL. It is therefore known that densities equal to or slightly smaller than the relative values RN, RS, RM, and RL should be set as false-edge generating density values (RN+F), (RS+F), (RM+F), and (RL+F) and that noise should be generated when the input pixel value Iin is around either one of the false-edge generating density values (RN+F) (RS+F), (RM+F), and (RL+F). In this case, the shift amount F is equal to or smaller than zero (0).
According to the present embodiment, therefore, in the noise generating process 101, noise is generated when the input pixel value Iin is in a range from the value “(RN+F)−Range” to the value “(RN+F)+Range”, in another range from the value “(RS+F)−Range” to the value “(RS+F)+Range”, in another range from the value “(RM+F)−Range” to the value “(RM+F)+Range”, or in another range from the value “(RL+F)−Range” to the value “(RL+F)+Range”.
It is noted that if the input pixel value Iin falls in the range from the value “(RN+F)−Range” to the value “(RN+F)+Range”, the input pixel value Iin will fall in the region DN, that if the input pixel value Iin falls in the range from the value “(RS+F)−Range” to the value “(RS+F)+Range”, the input pixel value Iin will fall in the region DS, that if the input pixel value Iin falls in the range from the value “(RM+F)−Range” to the value “(RN+F)+Range”, the input pixel value Iin will fall in the region DM, and that if the input pixel value Iin falls in the range from the value “(RL+F)−Range” to the value “(RL+F)+Range”, the input pixel value Iin will fall in the region DL. Accordingly, the input pixel value Iin falling in the range from the value “(RN+F)−Range” to the value “(RN+F)+Range” is the nearest to the relative value RN among all the relative values RN, RS, RM, and RL. The input pixel value Iin falling in the range from the value “(RS+F)−Range” to the value “(RS+F)+Range”is the nearest to the relative value RS among all the relative values RN, RS, RM, and RL. The input pixel value Iin falling in the range from the value “(RM+F)−Range” to the value “(RM+F)+Range” is the nearest to the relative value RM among all the relative values RN, RS, RM, and RL. The input pixel value Iin falling in the range from the value “(RL+F)−Range” to the value “(RL+F)+Range” is the nearest to the relative value RL among all the relative values RN, RS, RM, and RL.
In this way, during the noise generating process 101, noise is generated only when the input pixel value Iin falls within four regions, which are centered on the false-edge generating density values (RN+F), (RS+F), (RM+F), and (RL+F), respectively, and which have a width of 2דRange”. This is because if noise were generated for input pixel values Iin that fall in too wide regions, output images obtained by the output pixel values Iout will become rough and will be damaged. The present inventor performed experiments to confirm that an optimum value for the noise-generating range “Range” is ten (10) with respect to the input pixel value range of 0 to 255.
Next, the noise value N that is generated for each region will be described in greater detail.
The noise N (which will be referred to as NN hereinafter) that is generated when the input pixel value Iin falls in the range greater than or equal to the value “(RN+F)−Range” and smaller than or equal to the value “(RN+F)+Range” is defined by the following formula:
NN=(coefficient)N×(rate)N×(random number)N
The noise value NN is greater than or equal to zero (0).
The value (rate)N is defined by the following formula:
(rate)N={1−[abs(Iin−RN−F)/Range]}.
The value (rate)N becomes the maximum value (1) when the input pixel value Iin is equal to the value (RN+F), gradually decreases as the input pixel value Iin goes away from the value (RN+F), and becomes zero (0) when the input pixel value Iin reaches the value (RN+F)−Range or the value (RN+F)+Range. This ensures that the noise value NN will not become too large, thereby preventing an output image from becoming rough or damaged.
The (random number)N is a white noise with no periodicity and is in a range greater than or equal to zero (0) and smaller than or equal to 255.
The (coefficient)N is such a value that ensures that the sum (Iin+NN) will fall in the range H1, that is, in the range between the input minimum value Imin (0) and the threshold TSM (106). The (coefficient)N of such a value can prevent the output image from becoming rough.
It is sufficient that the sum (Iin+NN) is greater than or equal to the input minimum value Imin (0). If the sum (Iin+NN) became smaller than the input minimum value Imin (0), the output image will tend to become rough and damaged.
It is also sufficient that the sum (Iin+NN) is smaller than or equal to the threshold TSM (106). If the sum (Iin+NN) exceeded the threshold TSM (106), the sum (Iin′+NN) of the corrected input pixel value Iin′ and the noise NN will tend to exceed the threshold TSM (106) (yes in S12), to generate a medium dot erroneously and to make the output image rough.
It is preferable that the sum (Iin+NN) is smaller than the threshold TSM (106). If the sum (Iin+NN) became equal to the threshold TSM (106), the sum (Iin′+NN) will also tend to become equal to the threshold TSM (106). In such a case, if the judgment process of S12 is modified to judge whether the sum (Iin′+NN) is greater than or equal to the threshold TSM (106), a medium dot will erroneously be outputted.
More specifically, the (coefficient)N has such a positive value that depends on the width h1 of the range H1 and that is defined by the following formula:
(coefficient)N=h1/G=(TSM−Imin)/G.
As described later, the normalization constant G is greater than or equal to 255 and is determined dependently on the shift amount F.
The noise N (which will be referred to as NS hereinafter) that is generated when the input pixel value Iin falls in the range greater than or equal to the value “(RS+F)−Range” and smaller than or equal to the value “(RS+F)+Range” is defined by the following formula:
NS=(coefficient)S×(rate)S×(random number)S
The noise value NS can be smaller than zero (0), equal to zero, or greater than zero (0).
The value (rate)S is defined by the following formula:
(rate)S={1−[abs(Iin−RS−F)/Range]}.
The value (rate)S becomes the maximum value (1) when the input pixel value Iin is equal to the value (RS+F), gradually decreases as the input pixel value Iin goes away from the value (RS+F), and becomes zero (0) when the input pixel value Iin reaches the value (RS+F)−Range or the value (RS+F)+Range.
The (random number)S is a white noise with no periodicity and is in a range greater than or equal to −255 and smaller than or equal to 255.
The (coefficient)S is such a value that ensures that the sum (Iin+NS) will fall in a range made up from the range H1 and the range H2, that is, in a range between the threshold TNS (0) and the threshold TML (192). The (coefficient)S of such a value can prevent an output image from becoming rough or damaged.
It is sufficient that the sum (Iin+NS) is greater than or equal to the threshold TNS (0) and smaller than or equal to the threshold TML (192). If the sum (Iin+NS) became smaller than the threshold TNS (0), the sum (Iin′+NS) of the corrected input pixel value Iin′ and the noise NS will tend to become smaller than the threshold TNS (0) (no in S14), to generate a non-dot erroneously and to make the output image rough. Similarly, if the sum (Iin+NS) exceeded the threshold TML (192), the sum (Iin′+NS) of the corrected input pixel value Iin′ and the noise NS will also tend to exceed the threshold TML (192) (yes in S10), to generate a large dot erroneously and to make the output image rough.
It is preferable that the sum (Iin+NS) is greater than the threshold TNS (0) and smaller than the threshold TML (192). If the sum (Iin+NS) became equal to the threshold TNS (0), the sum (Iin′+NS) will also tend to become equal to the threshold TNS (0) (no in S14), to generate a non-dot erroneously. If the sum (Iin+NS) became equal to the threshold TML (192), the sum (Iin′+NS) will also tend to become equal to the threshold TML (192). In such a case, if the judgment process of S10 is modified to judge whether the sum (Iin′+NS) is greater than or equal to the threshold TML (192), a large dot will erroneously be outputted.
More specifically, the (coefficient)S has such a positive value that depends on the width h1 of the range H1 and the width h2 of the range H2 and that is defined by the following formula:
The noise N (which will be referred to as NM hereinafter) that is generated when the input pixel value Iin falls in the range greater than or equal to the value “(RM+F)−Range” and smaller than or equal to the value “(RM+F)+Range” is defined by the following formula:
NM=(coefficient)M×(rate)M×(random number)M
The noise value NM can be smaller than zero (0), equal to zero, or greater than zero (0).
The value (rate)M is defined by the following formula:
(rate)M={1−[abs(Iin−RM−F)/Range]}.
The value (rate)M becomes the maximum value (1) when the input pixel value Iin is equal to the value (RM+F), gradually decreases as the input pixel value Iin goes away from the value (RM+F), and becomes zero (0) when the input pixel value Iin reaches the value (RM+F)−Range or the value (RM+F)+Range.
The (random number)M is a white noise with no periodicity and is in a range greater than or equal to −255 and smaller than or equal to 255.
The (coefficient)M is such a value that ensures that the sum (Iin+NM) will fall in a range made up from the range H2 and the range H3, that is, in a range between the threshold TSM (106) and the input maximum value Imax (255). The (coefficient)M of such a value can prevent an output image from becoming rough or damaged.
It is sufficient that the sum (Iin+NM) is greater than or equal to the threshold TSM (106) and smaller than or equal to the input maximum value Imax (255). If the sum (Iin+NM) exceeded the input maximum value Imax (255), the output image will tend to become rough. If the sum (Iin+NM) became smaller than the threshold TSM (106), the sum (Iin′+NM) of the corrected input pixel value Iin′ and the noise NM will also tend to become smaller than the threshold TSM (106) (no in S12), to generate a small-dot erroneously and to make the output image rough.
It is preferable that the sum (Iin+NM) is greater than the threshold TSM (106). If the sum (Iin+NM) became equal to the threshold TSM (106), the sum (Iin′+NM) will also tend to become equal to the threshold TSM (106) (no in S12), to generate a small-dot erroneously.
More specifically, the (coefficient)M has such a positive value that depends on the width h2 of the range H2 and the width h3 of the range H3 and that is defined by the following formula:
The noise N (which will be referred to as NL hereinafter) that is generated when the input pixel value Iin falls in the range greater than or equal to the value “(RL+F)−Range” and smaller than or equal to the value “(RL+F)+Range” is defined by the following formula:
NL=(coefficient)L×(rate)L×(random number)L
The noise value NL is smaller than or equal to zero (0).
The value (rate)L is defined by the following formula:
(rate)L={1−[abs(Iin−RL−F)/Range]}.
The value (rate)L becomes the maximum value (1) when the input pixel value Iin is equal to the value (RL+F), gradually decreases as the input pixel value Iin goes away from the value (RL+F), and becomes zero (0) when the input pixel value Iin reaches the value (RL+F)−Range or the value (RL+F)+Range.
The (random number)L is a white noise with no periodicity and is in a range greater than or equal to −255 and smaller than or equal to zero (0).
The (coefficient)L is such a value that ensures that the sum (Iin+NL) will fall in the range H3, that is, in a range between the threshold TML (192) and the input maximum value Imax (255). The (coefficient)L of such a value can prevent an output image from becoming rough or damaged.
It is sufficient that the sum (Iin+NL) is greater than or equal to the threshold TML (192) and smaller than or equal to the input maximum value Imax (255). If the sum (Iin+NL) exceeded the input maximum value Imax (255), the output image will tend to become rough. If the sum (Iin+NL) became smaller than the threshold TML (192), the sum (Iin′+NL) of the corrected input pixel value Iin′ and the noise NL will also tend to become smaller than the threshold TML (192) (no in S10), to generate a medium-dot erroneously and to make the output image rough.
It is preferable that the sum (Iin+NL) is greater than the threshold TML (192). If the sum (Iin+NL) became equal to the threshold TML (192), the sum (Iin′+NL) will also tend to become equal to the threshold TML (192) (no in S10), to generate a medium-dot erroneously.
More specifically, the (coefficient)L has such a positive value that depends on the width h3 of the range H3 and that is defined by the following formula:
Next, the normalization constant G will be described in greater detail.
The normalization constant G is a value that is greater than or equal to 255 and that depends on the shift amount F. The normalization constant G can be selected from a range greater than or equal to 256.
If the normalization constant G is set to equal to 255 and if the shift amount F is other than zero (0), the value (Iin+NN) will possibly become smaller than the input minimum value Imin (0) or will possibly exceed the threshold TSM (106), the value (Iin+NS) will possibly become smaller than the threshold TNS (0) or will possibly exceed the threshold TML (192), the value (Iin+NM) will possibly become smaller than the threshold TSM (106) or will possibly exceed the input maximum value Imax (255), and the value (Iin+NL) will possibly be smaller than the threshold TML (192) or will possibly exceed the input maximum value Imax (255). This will possibly make an output image become rough and damaged.
It is noted that if the shift amount F is equal to zero (0), the normalization constant G may be set equal to 255. In such a case, however, the value (Iin+NN) will possibly become equal to the threshold TSM (106), the value (Iin+NS) will possibly become equal to the threshold TNS (0) and the threshold TML (192), the value (Iin+NM) will possibly become equal to the threshold TSM (106), and the value (Iin+NL) will possibly become equal to the threshold TML (192).
The present inventor performed an experiment to confirm that the an optimum value for the normalization constant G is 291 with respect to a combination of the shift amount F of two (2) and the input pixel value range of 0 to 255. By setting the normalization constant G to 291, it is ensured that the value (Iin+NN) becomes greater than or equal to the input minimum value Imin (0) and smaller than the threshold TSM (106), that the value (Iin+NS) becomes greater than the threshold TNS (0) and smaller than the threshold TML (192), that the value (Iin+NM) becomes greater than the threshold TSM (106) and smaller than the input maximum value Imax (255), and that the value (Iin+NL) becomes greater than the threshold TML (192) and smaller than or equal to the input maximum value Imax (255).
It is noted that there is a case where a false edge will possibly occur when the input pixel value Iin is equal to either one of one through three values among the four values (RN+F), (RS+F), (RM+F), (RL+F). In such a case, noise may be generated only when the input pixel value Iin is around the subject one to three values.
For example, if it is suspected that a false edge will possibly occur in a cyan positive gradation image at such a position where the input pixel value Iin is near to the value 108 (=RS+2) or the value 194 (=RM+2), the CPU 10 may generate noise only when the input pixel value Iin is around 108 or 194. In other words, the CPU 10 may generate the noise values NS and NM in a manner described above, while setting the noise values NN and NL compulsively to zero (0).
As described above, according to the present embodiment, if a false edge will possibly occur at a portion in an image where the input pixel value Iin is equal to the value (Rj+F), where j=N, S, M, or L, the noise value N is generated when the input pixel value Iin is around the value (Rj+F). The noise value N has a value equal to a product of a random number, the value “rate”, and the value “coefficient”. The value “rate” becomes the maximum value (1) when the input pixel value Iin is equal to the value (Rj+F), and becomes zero (0) when the input pixel value Iin is smaller than or equal to the value (Rj+F)−Range and when the input pixel value Iin is greater than or equal to the value (Rj+F)+Range. The value “coefficient” ensures that the value (Iin+N) will not become smaller than the input minimum value Imin or a threshold (lower next threshold) that corresponds to another relative value (lower next relative value) that is smaller than and next to the subject relative value Rj and will not exceed the input maximum value Imax or another threshold (higher next threshold) that corresponds to still another relative value (higher next relative value) that is greater than and next to the subject relative value Rj.
For example, if a false edge will possibly occur at a portion in an image where the input pixel value Iin is around 106 (=RS(=106)+F(=0)), which is equal to the relative value RS (106), the noise value NS is generated when the input pixel value Iin is around the relative value RS (106). The noise value NS has a value equal to a product of a random number, the value (rate)S, and the value (coefficient)S. The value (rate)S becomes the maximum value (1) when the input pixel value Iin is equal to the subject relative value RS (106), and becomes zero (0) when the input pixel value Iin is smaller than or equal to the value “RS(106)+F(0)−Range” and when the input pixel value Iin is greater than or equal to the value “RS(106)+F(0)−Range”. The value (coefficient)S ensures that the value (Iin+NS) will not become smaller than the input minimum value Imin or the threshold TNS (0) that corresponds to the relative value RN (0) that is smaller than and next to the subject relative value RS (106) among the four relative values RN (0), RS (106), RM (192), and RL (255), and that the value (Iin+NS) will not exceed the input maximum value Imax or the threshold TML (192) that corresponds to the relative value RM (192) that is greater than and next to the subject relative value RS (106) among the four relative values RN (0), RS (106), RM (192), and RL (255).
Or, if a false edge will possibly occur at a portion in an image where the input pixel value Iin is around 108 (=RS(=106)+F(=2)), which is adjacent to the relative value RS (106), the noise value NS is generated when the input pixel value Iin is around the value (108). The noise value NS has a value equal to a product of a random number, the value (rate)S, and the value (coefficient)S. The value (rate)S becomes the maximum value (1) when the input pixel value Iin is equal to the value “RS(106)+F(2)”, which is adjacent to the relative value RS (106), and becomes zero (0) when the input pixel value Iin is smaller than or equal to the value “RS(106)+F(2)−Range” and when the input pixel value Iin is greater than or equal to the value “RS(106)+F(2)+Range”. The value (coefficient)S ensures that the value (Iin+NS) will not become smaller than the input minimum value Imin or the threshold TMS (0) that corresponds to the relative value RN (0) that is smaller than and next to the subject relative value RS (106) and will not exceed the input maximum value Imax or the threshold TML (192) that corresponds to the relative value RM (192) that is greater than and next to the subject relative value RS (106).
In other words, the noise N is generated when the input pixel value Iin is around a false-edge generating density value. One relative value (nearest relative value) is the nearest to the input pixel value Iin among all of the four relative values. The noise has the value N equal to a product of a random number, the value (rate), and the value (coefficient). The value (rate) becomes the maximum value (1) when the input pixel value Iin is equal to the false-edge generating density value, and becomes zero (0) when the input pixel value Iin is smaller than or equal to the value “(false-edge generating density value)−Range” and when the input pixel value Iin is greater than or equal to the value “(false-edge generating density value)+Range”. The value (coefficient) ensures that the value (Iin+N) will not become smaller than the input minimum value Imin or a lower threshold that corresponds to: a lower relative value that is smaller than and next to the nearest relative value and will not exceed the input maximum value Imax or a higher threshold that corresponds to a higher relative value that is greater than and next to the nearest relative value.
In other words, the noise value NN, which is generated when the input pixel value Iin falls in the range of (RN+F)−Range≦Iin≦(RN+F)+Range along the horizontal direction, falls in a range of (h1/G)×(Rate)N×0 to (h1/G)×(Rate)N×255 along the vertical direction. The noise value NS, which is generated when the input pixel value Iin falls in the range of (RS+F)−Range≦Iin≦(RS+F)+Range along the horizontal direction, falls in a range of {(the smaller one of h1 and h2)/G}×(Rate)S×(−255) to ((the smaller one of h1 and h2)/G}×(Rate)S×255 along the vertical direction. The noise value NM, which is generated when the input pixel value Iin falls in the range of (RM+F)−Range≦Iin≦(RM+F)+Range in the horizontal direction, falls in a range of {(the smaller one of h2 and h3)/G}×(Rate)M×(−255) to {(the smaller one of h2 and h3)/G}×(Rate)M×255 along the vertical direction. The noise value NL, which is generated when the input pixel value Iin falls in the range of (RL+F)−Range≦Iin≦(RL+F)+Range in the horizontal direction, falls in a range of (h3/G)×(Rate)L×(−255) to (h3/G)×(Rate)L×0 in the vertical direction.
Each (Rate)j (where j=N, S, M, or L) becomes maximum when the input pixel value Iin is equal to the value (Rj+F) (where j=N, S, M, or L) and decreases as the input pixel value Iin goes away from the value (Rj+F). Accordingly, the noise value Nj (where j=N, S, M, or L) falls in the range indicated as the hatched or shaded portion in
The present inventor executed an experiment in a manner described below.
A cyan positive gradation image was processed according to the multi-value error distribution processing of the present embodiment, and a resultant output image was printed by the printer 5. This original positive gradation image was such a gradation image whose density (input pixel value Iin) gradually increased from the printing position Y to the printing position Y=355 in the Y direction. One X-directional line located in each printing position Y had a plurality of pixels (0, Y) to (Xmax, Y), whose densities (input pixel values Iin) were equal to one another. Around printing position Y=0, the input pixel values Iin were zero. Around printing position Y=170, the input pixel values Iin were equal to the small-dot relative value RS (106). Around printing position Y=310, the input pixel values Iin were equal to the medium-dot relative value RM (192). Around printing position Y=355, the input pixel values Iin were equal to 255. During this experiment, the noise values NS and NM were added when the input density value Iin was around the value (RS+F) or the value (RM+F) It is noted that the shift amount F was set to two (2), the value “Range” was set to ten (10), and the normalization constant G was set to 291. Accordingly, the (coefficient)S was set to 86/291, and the (coefficient)M was set to 63/291. The noise values NN and NL were set compulsively to zero (0)
The present inventor also executed a comparative experiment. During this comparative experiment, a cyan positive gradation image the same as that used in the above-described experiment was processed according to a comparative multi-value error distribution processing, which is the same as the multi-value error distribution processing of the present embodiment except that no noises were added. That is, all the noise values NN, NS, NM, and NL were set compulsively to zero (0).
As shown in
False edges occur at the boundary between the regions 163 and 165, at the boundary between the regions 165 and 167, at the boundary between the regions 167 and 169, and at the boundary between the regions 169 and 171. As apparent from
It is apparent from
As apparent from
According to the above-described experiments, it is confirmed that by setting the shift amount F to two (2), by setting the “Range” to ten (10), and by setting the normalization constant G to 291, it is ensured that a sum of the input pixel value Iin around the relative value RS and the noise value NS does not exceed the threshold TML (192) corresponding to the relative value RM (192) and does not become smaller than the threshold TNS (0) corresponding to the relative value RN (0) and that a sum of the input pixel value Iin around the relative value RM and the noise value NM does not exceed the input maximum value Imax (255) and does not become smaller than the threshold TSM (106) corresponding to the relative value RS (106), thereby preventing the output image from becoming rough and diminishing the false edge.
The present inventor further performed additional experiments to add noises when input pixel values were around the relative value RL for the cyan-ink large dot and when input pixel values were for other colors of black, magenta, and yellow. It is confirmed that advantages were obtained in the same manner as when noises were added when the input pixel values were around the relative values RS and RM for the cyan-ink small and medium dots as described above.
It is noted that if a too large amount of noise value N were added to the input pixel value Iin, which is around the value (Rj+F), where j=N, S, M, or L, the value (Iin+N) will possibly become smaller than the input minimum value Imin or the lower next threshold that corresponds to the lower next relative value that is smaller than and next to the subject relative value Rj and will possibly exceed the input maximum value Imax or the higher next threshold that corresponds to the higher next relative value that is greater than and next to the subject relative value Rj. This will possibly damage an output image and a false edge will possibly occur.
The present inventor executed another comparative experiment onto a cyan positive gradation image that is the same as that used in the above-described experiments. The cyan positive gradation image was processed according to another comparative multi-value error distribution processing, which is the same as the multi-value error distribution processing of the present embodiment except that the values (coefficient)S and the (coefficient)M of the noise values NS and NM were set equal to 0.5 and the noise values NN and NL were set compulsively to zero (0). A resultant output image was printed as shown in
While the invention has been described in detail with reference to the specific embodiment thereof, it would be apparent to those skilled in the art that various changes and modifications may be made therein without departing from the spirit of the invention.
For example, in the above-described embodiment, in the noise value adding process 104, the corrected input pixel value Iin′ is added with the noise value. N, and in the comparing process 105, the added result (Iin′+N) is compared with the thresholds TNS, TSM, and TML. However, as shown in
The value “rate” may not be defined by the formula (1) if the value “rate” becomes the maximum of one (1) when the input pixel value Iin is equal to the value (Rj+F), where j=N, S, M, or L and the value “rate” gradually decreases as the input pixel value Iin moves away from the value (Rj+F) and the value “rate” becomes equal to zero (0) when the input pixel value Iin is less than or equal to the value (Rj+F)−Range and is greater than or equal to the value (Rj+F)+Range. For example, the value “rate” may become the maximum when the input pixel value Iin is equal to the value (Rj+F) and gradually decrease in a Gaussian curve as the input pixel value Iin moves away from the value (Rj+F).
In the embodiment, the random number in the range of −255 to +255 is generated when the input density value is within the region DS or DM. However, a random number in a range greater than or equal to 0 and smaller than or equal to +255 or a random number in a range of greater than or equal to −255 and smaller than or equal to 0 may be generated even when the input density value is within the region DS or DM.
In the embodiment, in the noise generating process 101, the CPU 10 calculates the rate and the coefficient with respect to the input pixel value Iin, generates a random number, and determines a noise value as a product of the random number, the rate, and the coefficient. However, the CPU 10 may determine a range in which the noise value falls, by calculating the rate and the coefficient, and by multiplying a product of the rate and the coefficient by the maximum value and the minimum value of the random number generating range. In this case, the range in which the noise value falls will become the same as the range indicated as the hatched or shaded portion in
In the above-described embodiment, the input pixel value Iin is represented by eight bits and is either one value in a range of 0 to 255. However, the input pixel value Iin may be represented by sixteen bits and may be either one value falling in a range of 0 to 65,535.
In the above-described embodiment, the threshold values TNS, TSM, and TML are equal to the corresponding relative values RN, RS, RM, respectively. However, the threshold values TNS, TSM, and TML may differ from the corresponding relative values RN, RS, RM. More specifically, the threshold values TNS, TSM, and TML may be shifted from the corresponding relative values RN, RS, RM, respectively, by an amount in the range of about −1% to about +1% of the range of the input pixel values. For example, when the input pixel value is represented by eight bits and therefore ranges from 0 to 255, the threshold values TNS, TSM, and TML may be shifted from the corresponding relative values RN, RS, RM, respectively, by an amount in the range of about −2.56 to about +2.56. When the input pixel value is represented by sixteen bits and therefore ranges from 0 to 65,535, the threshold values TNS, TSM, and TML may be shifted from the corresponding relative values RN, RS, RM, respectively, by an amount in the range of about −655.35 to about +655.35.
In the embodiment, for each color, an input pixel value in for each pixel, which is either one of 256 different values in the range of 0 to 255, is subjected to the multi-value error distribution processing of the present embodiment to be converted into an output pixel value Iout, which is either one of four different values. However, the multi-value error distribution processing of the present embodiment may be modified to convert an m-tone input pixel value Iin, which is either one of “m” number of different values (where m is greater than or equal to four (4)), into an n-tone output pixel value Iout, which is either one of “n” number of different values (where n is smaller than m and is greater than or equal to three (3)), by using the (n−1) number of different thresholds.
Additionally, the multi-value error distribution processing of the present embodiment may be modified into a two-value error distribution processing to convert the p-tone input pixel value Iin, which is either one of “p” number of different values (where p is greater than or equal to three (3)), into a two-tone output pixel value Iout, which is either one of two different values, by using one threshold only.
In the embodiment, the multi-value error distribution processing program 29, the threshold table 30, the relative value table 32, and the distribution matrix 34 are stored in the hard disk (HD) 16. However, the multi-value error distribution processing program 29, the threshold table 30, the relative value table 32, and the distribution matrix 34 may be stored in the ROM 12, instead. Or, the multi-value error distribution processing program 29, the threshold table 30, the relative value table 32, and the distribution matrix 34 may be originally stored in a CD-ROM (not shown) and be supplied to the image processing device 1 via the CD-ROM drive 19.
The multi-value error distribution processing program 29 may be stored in various types of storage media that are readable by a computer. The image processing device 1 may be provided with a drive for reading the multi-value error distribution processing program from these various types of storage media. Or, the multi-value error distribution processing program 29 may be downloaded from a network such as the Internet to the image processing device 1.
The image processing device according to the embodiment may be other than a computer, but may include components that attain the multi-value error distribution processing of the present embodiment.
The multi-value error distribution processing program 29 may be installed in the ROM 54 in the printer 5. In this example, the image processing device 1 supplies the 256 tone image data Iin as it is to the printer 5. The printer 5 executes the multi-value error distribution processing program 29 to convert the 256 tone image data Iin into four tone image data Iout.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
5530561, | Apr 15 1994 | FUJIFILM Corporation | Method of and apparatus for binarizing image signal |
6310588, | Jul 24 1997 | Matsushita Electric Industrial Co., Ltd. | Image display apparatus and image evaluation apparatus |
6943918, | Jun 26 1998 | Seiko Epson Corporation | Printer-system, method of printing, and recording medium for implementing the method |
7298525, | Sep 18 2001 | Brother Kogyo Kabushiki Kaisha | Image processing device and image processing program for processing a plurality of color signals formed of a plurality of color components |
20010028468, | |||
20030053098, | |||
JP11239273, | |||
JP11261819, | |||
JP200022951, | |||
JP2000244737, | |||
JP2001144961, | |||
JP2001285634, | |||
JP200392689, | |||
JP9107472, | |||
JP998290, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Sep 09 2004 | KUNO, MASASHI | Brother Kogyo Kabushiki Kaisha | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 015783 | /0574 | |
Sep 10 2004 | Brother Kogyo Kabushiki Kaisha | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Oct 04 2012 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Oct 27 2016 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Sep 28 2020 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
May 05 2012 | 4 years fee payment window open |
Nov 05 2012 | 6 months grace period start (w surcharge) |
May 05 2013 | patent expiry (for year 4) |
May 05 2015 | 2 years to revive unintentionally abandoned end. (for year 4) |
May 05 2016 | 8 years fee payment window open |
Nov 05 2016 | 6 months grace period start (w surcharge) |
May 05 2017 | patent expiry (for year 8) |
May 05 2019 | 2 years to revive unintentionally abandoned end. (for year 8) |
May 05 2020 | 12 years fee payment window open |
Nov 05 2020 | 6 months grace period start (w surcharge) |
May 05 2021 | patent expiry (for year 12) |
May 05 2023 | 2 years to revive unintentionally abandoned end. (for year 12) |