Automatic Discrimination of Machine Printed and Handwritten Text in Document Images