Can not save 12-bit or 16-bit images (only 8-bit)

I am working with two Specim Hyperspectral cameras (FX17 and FX10). With Genicam browser I can see live stream and save images with mono12 pixel format. Then I am saving the configuration.
In my code I am using function: (WriteImageFile(camera.getCvbImage().get(), bitmapPath.str().c_str()) , to save images. The function is only saving the images when I set pixel format to 8-bit, otherwise it doesn’t work. Is there any option to save mono12 or perhaps 16-bit image with 4MSB as 0000?
Getting images manually from Genicam browser is not an option because I have customized GUI and stepper motor etc…
any help is appreciated :slight_smile:

Hi @Saad

I do not know with which file extension you want to save the images and which CVB Version you are using!

Considering you need more than 8 bit per pixel I would recommend to use .tif. Generally there is no problem with saving images containing more than 8 bit pixels. The image that you saved may look dark in the monitor because most of the monitors in the market are designed to display 8-bit images. To have a better view of hight-bit images you can use the “Common Vision Blox Viewer software” automatically installed with CVB installation and set the “high bit scale mode” to viewPort:


Regardless of the pixel format setting, GenICam browser always saves the images as a 8-bit format, the idea here is to save the images as they appear in the display.

1 Like

Thanks @MandanaS

.tif suggestion worked. In addition to that I set pixel format in genicam browser to ‘mono16’ and ‘mono12 packed’ for FX10 and FX17, respectively. And in driver configuration, both cameras were set to mono16

1 Like