After trying different things, my program always crashes while saving an image. It reads well the image and I\'m able to visualize it but I can\'t save files (it occurs in all p
BMP file saving is built-in, as is IIRC .PGM, the others are provided by 3rd party libs depending on your OS.
Did you build openCV yourself? What OS?