Patent ID: 7376265

Claim:
A method for compressing digital data, comprising the steps of: generating an edge-map representation from an input representation; and applying a color test to the input representation based on it and the edge-map representation to determine the type of content contained in the input representation, then if the input representation contains only text, only line drawing, or only text and line drawing, applying a first photo compression algorithm to the input representation to compress it, or if the input representation contains at least one of a photo or image and at least one of text or line drawing, (i) applying a segmentation operation to the input representation based on it and the edge-map representation to separate a background portion from a foreground portion of the input representation, the foreground portion containing at least one of a text or a line drawing region, (ii) applying a bi-level compression algorithm to a mask of each text and line drawing region in the foreground portion, and (iii) applying a second photo compression algorithm to the background portion.