1. A method for coarsely classifying with one or more controllers whether or not an unknown input document belongs to a group with one or more reference documents earlier classified, each defining structured or unstructured formats of text and background, comprising: receiving images at one or more controllers for said each of the unknown input document and the one or more reference documents; determining counts of contours for the images corresponding to the unknown input document and the one or more reference documents; establishing a permissible range for the counts of contours for the images corresponding to the one or more reference documents such that an unknown document belongs or not to the group with the one or more reference documents if falling within the permissible range; comparing the counts of contours between the images corresponding to the unknown input document and the one or more reference documents; and determining inclusion or not of the unknown input document in the group with the one or more referenced documents based on whether the counts of contours for the image corresponding to the unknown input document falls within or not the permissible range for the counts of contours for the images corresponding to the one or more reference documents.