-
-
Notifications
You must be signed in to change notification settings - Fork 55.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imwrite() to TIFF does not use COMPRESSION_SGILOG for 32FC1 (only 32FC3) #25246
Comments
Opened an issue on ImageJ's github : imagej/ImageJ#243 |
Hello, It might be better to remove forcing SGILOG compatible compression in OpenCV for float images...
|
Currently, 32FC3 will always force COMPRESSION_SGILOG. Removing it would be a breaking change I think. But indeed, it would certainly have been wiser to let it enabled through params (IMWRITE_TIFF_COMPRESSION=...). If I push my PR for 32FC1, I'll have to use that param IMWRITE_TIFF_COMPRESSION so that there is no change in the default behaviour. (the only drawback is that currently, COMPRESSION_SGILOG is a constant from libtiff that it not made available in opencv headers, so a caller of |
Thank you for your reply, I agree with you !! So I think the better way is ...
Yes, however Ref. https://gitlab.com/libtiff/libtiff/-/blob/0ef31e1f62aa7a8b1c488a59c4930775ee0046e4/libtiff/tiff.h |
I'm sorry I have been missed. OpenCV use opencv/modules/imgcodecs/src/grfmt_tiff.cpp Lines 1406 to 1411 in 52f3f5a
|
My PR is ready, I am just waiting info from ImageJ |
Related: #25325 |
Describe the feature and motivation
The TIFF library supports COMPRESSION_SGILOG for float data.
Currently, in opencv (4.9)
However, 32FC1 could be supported using COMPRESSION_SGILOG + PHOTOMETRIC_LOGL
I have already prepared a PR for that
I could submit the PR but there is one red flag
So I wonder how legal such a TIFF is. Is it expected to fail ? Is this a lack of support from other softwares ? Did I forget anything for this compression scheme ?
Additional context
No response
The text was updated successfully, but these errors were encountered: