A method for identifying document edges collects a predetermined number scanlines
of the document. Both first order and second order statistics are then calculated
based on the scanned data. A first slope value being a function of the difference
between a plurality of the first value and a second slope value being a function
of the difference between a plurality of the second value are calculated. A document
edge is detected using the first and second slope values.