1. A method for identifying areas in a document image, the method comprising: generating a binarized document image based on the document image; generating gradient images based on the document image, the gradient images comprising: a first gradient image based on a horizontal component of a gradient of the document image, a second gradient image based on a vertical component of the gradient of the document image, and a third gradient image being a combination of said first gradient image and said second gradient image, preliminary segmenting the binarized document image into areas; and classifying, prior to a final segmentation of the document image, the preliminary segmented areas in the document image into classes based on attributes computed from the binarized document image, and the first, second and third gradient images, wherein each of the document classes is associated with a picture area, a text area, or a noise area, wherein the attributes comprise an average number of white holes in closed black contours on the third gradient image, wherein the white holes are white gaps with more than a threshold number of pixels that represent low contrast in brightness on the document image, and wherein the closed black contours represent high contrast in brightness on the document image.