This invention provides a document processing apparatus and method for
searching, for a specific document image, a database in which a plurality
of document images are registered in correspondence with the attributes
of partial regions. A document image associated with search is segmented
into partial regions. The attribute of each partial region of the
segmented document image associated with search is determined. At least
one document image is selected from document images registered in the
database on the basis of the number of partial regions for each attribute
in the document image associated with search.