|
Issue:
How to determine and interpret the Bayer Tile pixel format of a PGR camera.
Solution:
All PGR Imaging Products are capable of streaming the raw, stippled 8-bit or 16-bit-per-pixel Bayer Tile image data to the PC, which can then be color processed / interpolated to 24- or 32-bit BGR data. See the Related Articles below for further details on color processing. To configure a camera to output raw Bayer data, consult your camera's Technical Reference manual.
The actual physical arrangement of the red, green and blue "pixels" for a given camera is determined by the arrangement of the color filter arrays on the imaging sensor itself. The format (i.e. order) in which this raw color data is sent out, however, depends on the specific camera model and firmware version. This format can be queried using the BAYER_TILE_MAPPING register 0x1040 that is implemented on all PGR cameras. For more information on this register, consult the Point Grey Digital Camera Register Reference that is available on our downloads site.
Raw image data can be accessed programmatically via the pData pointer in the FlyCaptureImage structure (e.g. FlyCaptureImage.pData). In 8-bit-per-pixel modes, the first byte represents the pixel at (row 0, column 0), the second byte at (row 0, column 1), etc.
In the case of a 640x480 color Dragonfly (DRAG-COL) sending out Y8 image data in RGGB format, if we access the image data via the pData pointer we have the following:
- pData[0] = Row 0, Column 0 = red pixel (R)
- pData[1] = Row 0, Column 1 = green pixel (G)
- pData[640] = Row 1, Column 0 = green pixel (G)
- pData[641] = Row 1, Column 1 = blue pixel (B)
Related
Articles:
1.) Relationship between color processing and number of bits per pixel.
2.) How is color processing performed on my camera’s images?
3.) Which sensor is used on my camera?
4.) Understanding YUV data formats
Article
ID: |
187 |
| Published: |
3/28/2005 11:20:21 AM |
Last
Modified: |
6/3/2009 4:11:29 PM |
| Keywords: |
Bayer, Bayer format, image data format, RGGB, BGGR, BGRG, raw, stippled, pData |
Issue Type: |
Integration |
|