ScanFix Xpress v9.0 for .NET - Updated
I Need to Find Which of My Images Have Color Data
User Guide > How To > Solve Problems with ScanFix Xpress > I Need to Find Which of My Images Have Color Data

Detecting Color Data

Detecting whether or not an image scanned on a color scanner actually has color data in it seems like an easy task; if there are any pixels where red, blue, and green values do not equal each other, then the image is color. However, while this is certainly a simple approach, it is unlikely to be useful in real life situations. Variations in paper and ink, scanner calibration, dirt, stray marks and a number of other factors can result in an image that is technically color, but does not have any significant color information. Even some obvious cases of color data, such as a form printed on bright yellow paper, may be treated the same as non-color documents, if that color can be dropped without loss of information in the text. 

Since the definition of a "color" document is very subjective, the DetectColor method uses a number of user-settable thresholds that separate "color" from "not color." The first of these is the saturation and brightness required for a pixel to be considered "color." Pixels darker or less saturated than the levels you choose will be ignored, and the remaining pixels will be grouped together to form objects.

Example of Color Detect:

The next step is to analyze those colored objects, and filter those by size. To be considered "color", the image will need to have a number of objects over the minimum size; this number is controlled by the sensitivity. At 100% sensitivity, a single object over the threshold will trigger a "color" response; the number needed increases with decreasing sensitivity, until thousands of objects (or an object thousands of times the minimum size, or some combination of the two) are needed for a "color" response.

In cases where it is desirable to treat an image with colored paper as a "not color" image, there is an IgnorePaperColor option that can be used. That option will detect the average hue of the image, and drop that color to white using a process similar to Virtual Bulb, but one that preserves other hues. The resulting white background image will then be processed to determine if the remaining data meets the "color" criteria.

Example of Detect Color and Ignore Paper Color:

The detect color function will return a number of parameters in addition to the yes/no value and confidence level. These parameters indicate what it found out about the image, and why it made the decision it did. These parameters will let you process a set of sample images, and choose appropriate thresholds for the different selection criteria.

Is this page helpful?
Yes No
Thanks for your feedback.