Colour Profiles and Refine Features Pixelnetica™ Document Scanning SDK for Android

When the SDK refines a page, the colour profile decides what the result looks like: an office document reduced to crisp black and white, a photo kept in colour but cleaned of the phone camera’s cast, or the page exactly as shot. Picking the right profile is the single biggest lever on both legibility and file size, and this page shows the choices on a real document so you can pick by eye.

The Profiles, Compared

Each slider below starts from the same phone photo — skewed, unevenly lit, background visible — and wipes to what one profile makes of it after the refine pipeline crops and straightens the page. Drag the handle to compare.

Black and white (Bitonal) — the document scanning profile for text: pure black-and-white output with maximum legibility and the smallest files.

Original phone photo of a printed document before scanning: skewed page, uneven lighting, visible background The same document scanned to pure black and white with the Pixelnetica SDK's Bitonal colour profile: cropped, straightened, high-contrast text

Grayscale (Monochrome) — keeps the page’s tones in shades of grey, for documents where shading matters but colour does not.

Original phone photo of a printed document before scanning: skewed page, uneven lighting, visible background The same document scanned to grayscale with the Pixelnetica SDK's Monochrome colour profile: cropped, straightened, tones preserved without colour

Colour (Colored) — cleans the page while keeping its colours: lighting evened out, the paper reading as paper instead of a grey photo.

Original phone photo of a printed document before scanning: skewed page, uneven lighting, visible background The same document scanned in colour with the Pixelnetica SDK's Colored profile: cropped, straightened, lighting corrected, colours preserved

The before side of each slider is the photo exactly as shot, so the wipe also shows the geometric correction — the crop and straightening — alongside the colour treatment.

Choosing a Profile

  • Bitonal reduces the page to pure black and white. The right default for text documents: maximum legibility, and by far the smallest files — bitonal pages compress losslessly in PDF export. Photographs and colour-coded content do not survive it.
  • Monochrome keeps tone in shades of grey. Use it when the page has meaningful shading — stamps, pencil, photographs on a text page — but colour itself carries no information.
  • Colored cleans the page while keeping its colours: lighting is evened out and the paper reads as paper, not as a grey photo. Use it when colour matters — forms with coloured fields, illustrated pages, receipts with coloured logos.
  • Original leaves the pixels’ colours untouched. Use it when the image must stay exactly as captured, for archival or when your own processing follows.

In code, the profile is one entry in the refine call (the workflow guide shows the full pipeline):

picture.refine(
  listOf(
    RefineFeature.Rectify.WithCutout(cutout),
    RefineFeature.Profile(RefineFeature.Profile.Type.Colored),
  )
)

The Other Refine Features

The profile is one of several independent features a refine call can carry — pass at most one of each kind, and the kinds you leave out stay unchanged:

  • Rectify — how to crop: to a known outline (WithCutout), to automatically detected corners (AutoDetect), or not at all (SkipCutout).
  • Display — which way up to leave the page; Display.Normal rotates it upright.
  • Shadows — even out shadows and uneven lighting across the page before the profile applies. Worth enabling for photos taken in room light.
  • KeepColor — keep the page’s existing colour hint instead of letting processing set it; an advanced option most applications never touch.

See the RefineFeature reference for the exact contracts.

The Same Choice in the Demo

The easyScan demo application exposes exactly these options in its page menu:

The easyScan demo's profile menu: Strong Shadows, Original, Black and White, Gray, Color

The menu’s names map to the API like this: Original, Black & White, Gray, and Color are the Original, Bitonal, Monochrome, and Colored profile types, and Strong Shadows toggles the Shadows feature on top of whichever profile is chosen.

Top