Relationship between color processing and number of bits per pixel

Last Revision Date: 4/25/2016

This article describes how color processing performed on the PC can affect the number of bits per pixel of the image. 

Selecting different pixel formats does not affect the programming of the sensor’s Bayer tile mapping. The Bayer tiling on the chip is fixed — setting different pixel formats simply changes the interpretation of the image pixels for color processing.

When color processing is disabled, the bits per pixel are as follows:

    • 8-bit mode delivers an 8-bit per pixel image. The memory use is calculated as 640 x 480 x 1 bytes.
    • 12-bit mode delivers a 12-bit per pixel image. The memory use is calculated as 640 x 480 x 1.5 bytes.
    • 16-bit mode delivers a 16-bit per pixel image. The memory use is calculated as 640 x 480 x 2 bytes.

To disable color processing:

    • Spinnaker, use Image Format Control to turn ISP off
    • FlyCapture2, use SetColorProcessing
    • FlyCapture1, use flycaptureSetColorTileFormat

To retrieve raw, unprocessed images:

    • Spinnaker, use GetNextImage()
    • FlyCapture2, use RetrieveBuffer
    • FlyCapture1, use flycaptureGrabImage()

The pixel format of the captured image as set by the user is retained.

To apply color processing to the captured raw images:

    • Spinnaker and FlyCapture2, use Convert. The pixel format specified in the format indicates the number of bits in the output image
    • FlyCapture1, use flycaptureConvertImage. The pixel format specified in destImage parameter indicates the number of bits in the output image.

When setting different pixel formats, both the 8-bit or 16-bit image are upsampled to 24- or 32-bits.

Related Articles