1. Technical Field
The present invention relates to an image processing apparatus, image processing method and recording medium that are capable of extracting foreground pixels from input image data with good accuracy when performing image processing such as image compression based on layer separation.
2. Description of Related Art
Conventionally, image formation apparatuses such as copy machines or multi-function peripherals that form images by using electronic photographic methods, inkjet methods or the like have been widely used. Moreover, recently, multi-function peripherals are becoming even more highly functionalized, with functions such as saving documents read by a scanner as electronic data, managing saved document files, transmitting document data as electronic mail and the like in demand. Documents that are read by a scanner are saved as image data, however, the size of this image data is generally large. Therefore, when storing or transmitting image data, technology for compressing images in order to reduce the amount of data is absolutely necessary.
One kind of image compression technology for achieving a high compression ratio is compression technology such as MRC (Mixed Raster Content) that separates an image into layers and compresses the image data. This compression technology separates the image related to the inputted image data into two layers of image data, a foreground layer and a background layer, and then compresses the image data of each layer. It is possible to increase the compression ratio of the final compressed image. The foreground layer is an image comprising text or line arts (hereafter referred to as text or the like), and compression by a lossless compression method such as JBIG (Joint Bi-level Image experts Group), MMR (Modified Modified Read) or LZW (Lempel Ziv Welch) is suitable. The background layer is an image of everything other than text or line arts, and compression by a lossy compression method such as JPEG (Joint Photographic Experts Group) is suitable.
Japanese patent application 2005-20227 (hereafter referred to as public document 1) discloses an image compression apparatus with the object of compressing read image data of color document images that include text or photographs at a high compression ratio without a decrease in legibility of text or the like. This image compression apparatus examines the drawn state of pixels that form a drawn object such as text or graphic from image data of a color document image read by a scanner or the like, and extracts a group of connected drawn pixels as a connected pixel group. Based on the characteristics of the pixels that make up the extracted connected pixel group, the image compression apparatus classifies an image into a foreground image that is suited for a compression method that places importance on resolution, and a background image that is suited for a compression method that places importance on color tone characteristics, and then compresses each image by the most suitable compression method.