What is the JAI file format and how is raw image data stored?

The JAI file format (file type *.jai) contains the following information.

A header of 56 bytes, organized like this:

  • Byte 0-7 contains the 'JAI-RAW' tag with null termination = 4A 41 49 5F 52 41 57 00.
  • Byte 8-15 contains the GigE Vision Block ID, e.g. 7F 00 00 00 00 00 00 00 means 0x000000000000007F = block ID number 127.
  • Byte 16-19 contains the pixel format, e.g. 01 00 08 01 means 0x01080001, which is GenICam PFNC for Monochrome 8 bit.
  • Byte 24-27 contains the image width in pixels.
  • Byte 28-31 contains the image height in pixels.
  • Byte 32-35 contains the image X offset in pixels.
  • Byte 36-39 contains the image Y offset in pixels.
  • Byte 40-47 contains the time stamp, e.g. 80 F3 F6 D8 B1 00 00 00 = 763849274240 ticks.
  • Byte 48-51 contains the image size in bytes.
  • Byte 52-55 contains the number of missing packets.

The raw image data, also in little-endian for bit depths larger than 8.

In case of 10 bit data, the bits are stored like this (one pixel in two bytes):

[8 9 x x x x x x] [0 1 2 3 4 5 6 7], with bit 0 being the MSB and bit 9 being the LSB. The x denotes padding.

For 12 bit, it goes like this:

[8 9 A B x x x x] [0 1 2 3 4 5 6 7].

For the GenICam definitions of pixel formats, see

http://www.emva.org/ (scroll down to PFNC) or the direct link here

GenICam_PixelFormatValues.pdf

It is also possible to store image data as RAW (file type *.raw ). The data representation is the same, but without the 56 byte header.

 

Tags :  RAW/JAI image format

Products :  JAI SDK, software.

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Alan bologlu

    Can you provide header details for the go-5100mp-usb. We are trying to pull the 4 separate angles of polarization from the raw image in 12 bit mode. 

Please sign in to leave a comment.