1. A computer implemented method of identifying at least one of a photo region and a graphics region in a colour bitmap image of a compound document, said method comprising: (a) connecting similarly coloured pixels of said image into connected components and placing the connected components in an enclosure tree, the enclosure tree forming a hierarchy of ancestor and descendent connected components where an ancestor connected component encloses a descendent connected component wherein each node of the enclosure tree is a connected component; (b) classifying each connected component into one of a plurality of classes wherein at least one class represents non-text connected components; (c) selecting a connected component from one of the non-text connected components of the enclosure tree; (d) calculating context statistics for the selected connected component based on descendent and touching sibling connected components of the selected connected component; (e) identifying whether the selected connected component contains at least one of a photo region and a graphics region based on the context statistics; and (f) storing the selected connected component identified as either graphics or photo object to memory.