1.  Field of the Invention
The present invention relates to a technology to appropriately correct a result of screen processing to output high quality halftone images. 
2.  Description of the Related Art
In recent years, image data has been commonly printed out after being processed by a computer.  Sometimes, however, an output apparatus such as a printer or a display offer a tone number that is smaller than that of image data.  A tone number is related to the number of tones that an output device can produce.  Accordingly, halftone processing is performed to convert the tone number of the image data into the one that is acceptable in the output apparatus for expression. 
As an examples of the halftone processing, screen processing (ordered dither method) is known, in which an output value is determined by comparing image data to a threshold that periodically changes.  A screen image is obtained by the screen processing in which tone is expressed by area coverage modulation.  The screen image has high quality especially at its flat area having little change in tone due to uniform halftone dots at equal intervals.  However, after the screen processing, the image data often has visible repetition patterns (moiré), which may lead to degradation of image quality.  Further, if the image includes thin lines, the lines cannot be well reproduced depending on their density and angle. 
Techniques have been discussed to suppress the degradation of image quality and obtain good results from the screen processing.  Examples of the techniques include a method to suppress moiré by detecting positions in an image where moiré is likely to occur, and removing high frequency components that cause moiré from areas where moiré is likely to occur before halftone processing (see Japanese Patent Application Laid-Open No.  9-238259). 
Further, combination of the screen processing (ordered dither method) and an error diffusion method has been also discussed.  For example, the combination can be used to reduce error bias before and after a dither process (see Japanese Patent Application Laid-Open No.  2005-252583). 
However, in the method described in Japanese Patent Application Laid-Open No.  9-238259, high frequency components are eliminated at some areas while generation of moiré is reduced.  The elimination of high frequency components from edge areas having a middle tone level may result in lower contrast at the edge areas and a faint image as a whole and desirable image quality is not obtained. 
In addition, the method described in Japanese Patent Application Laid-Open No.  2005-252583 selects one of the dither processing and the error diffusion processing, as processing to be performed on each pixel.  However, the selection of appropriate halftone processing requires complicated steps.