1. An image processing apparatus comprising: a block attribute determination unit which determines, for each block including a predetermined number of pixels of a document image, an attribute of the block based on edge features of the block; a block color quantization unit which quantizes color information of each pixel of the block including the predetermined number of pixels of the document image; a block connected area extraction unit which extracts, based on the color information of each pixel quantized by said block color quantization unit, connected areas each included in the block and including connected pixels of the same color; a block background/foreground determination unit which determines whether each connected area is a foreground or a background, based on the block attribute determined by said block attribute determination unit, the color information quantized by said block color quantization unit, and the connected areas acquired by said block connected area extraction unit; a block background/foreground attribute determination unit which determines, based on the block attribute determined by said block attribute determination unit, an attribute of a connected area determined by said block background/foreground determination unit to be the foreground of the block and an attribute of a connected area determined to be the background of the block; and a block background/foreground attribute information recording unit which records and holds information of the attribute of the block determined by said block attribute determination unit and the attribute of each connected area determined by said block background/foreground attribute determination unit.