areaDetector / ADAravis

areaDetector driver for GenICam cameras using the Aravis library on Linux.
https://areadetector.github.io/master/ADAravis/ADAravis.html
6 stars 8 forks source link

Need support for Mono12Packed and Mono12p formats #9

Closed MarkRivers closed 3 years ago

MarkRivers commented 3 years ago

PixelFormat Mono12Packed or Mono12p allow using the full resolution of 12-bit or 10-bit cameras using only 75% of the bandwidth of Mono16. For many cameras these formats lets them run faster than with PixelFormat=Mono16. For example the FLIR Oryx ORX-10G-51S5M can do 130 frames/s with AdcBitWidth=10 and PixelFormat=Mono12Packed, but only 89 frames/s with PixelFormat=Mono16.

MarkRivers commented 3 years ago

I have now implemented support for PixelFormat=Mono12Packed and Mono12p in my EPICS ADAravis driver. https://github.com/areaDetector/ADAravis

The code to decode the Mono12Packed and Mono12p formats is less than 30 lines. It is here: https://github.com/areaDetector/ADCore/blob/master/ADApp/pluginSrc/decompressMono12.c https://github.com/areaDetector/ADCore/blob/master/ADApp/pluginSrc/decompressMono12.h

It works at 130 frames/s with the FLIR ORX-10G-51S5M camera running with AdcBitDepth=10 and PixelFormat=Mono12Packed or Mono12p. The frames are 2448 x 2048. The time to do the decompression to UInt16 is about 5 ms.

arvenums.h needs to have the following line added to support the Mono12p format:

#define ARV_PIXEL_FORMAT_MONO_12_P         ((ArvPixelFormat) 0x010c0047u)
MarkRivers commented 3 years ago

I have moved my decompressMono12* functions to a different class here: https://github.com/areaDetector/ADGenICam/blob/c227e7770efebd98bb912e839226ecc826903e99/GenICamApp/src/ADGenICam.cpp#L511

MarkRivers commented 3 years ago

This is now implemented.