a system for determining the type of graphical data within a scanned image . the system scans an image to obtain grayscale image data , and then performs a density slice operation on the grayscale image data , using a predetermined grayscale range , to produce binary image data . the system erodes the binary image data , and counts the number of black pixels remaining within the image data . if the count of the black pixels within the image exceeds a maximum acceptable pixel count , the area is considered to be continuous tone , such as a photograph , otherwise , the region is considered to be bi - tonal , such as line art or text . the system can also perform multiple density slices and erosions , using different grayscale ranges , or the results , and then analyze the result of the or operation to determine the type of image .