Hello,
Actually, I need to save .tiff without any compression. For that, I installed libtiff, and to save without compression. The idea of my code is :
include "libtiff/tiff.h"
... std::vector<int> tags = {TIFFTAG_COMPRESSION, COMPRESSION_NONE}; cv::Mat Image_Process = cv::Mat::zeros(height, width, CV_32FC1); ... code and operation on Image_Process * ... cv::imwrite(path, Image_Process, tags);
The code worked. I launch the program to write 150 images. At the 80th images, the following message appears : TIFFAppendToStrip . Write error at scanline 652 [ WARN:0 ] global /home[...]/grfmt_tiff.cpp (954) writeLibTiff OpenCV TIFF (line 954): failed TIFFWriteScanline/tiff, buffer, y, 0) == 1 TIFFWriteDirectoryTagData: IO error writing tag data. imwrite_(path): can´t write data : OpenCV(4.1.1) /home[...]/grfmt_tiff.cpp :954: error: (-2:Unspecified error) OpenCV TIFF: failed TIFFWriteScanline(tiff, buffer, y, 0)==1 in function 'writeLibTiff' path: Error writing TIFF header
How can I solve that problem ? My code worked perfectly .. Moreother, I can save .tiff with an other exteension (CV_8UC1). Thank you ! Regards