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
imgcodecs: tiff: Support to encode for CV_32S with compression params #23433
Conversation
There was a limitation that TIFF input/output with added depth must be 1 channel.It is not documented. Indirectly cvtColor() gives an error that unsupported depth is entered. This is a confusing error for imread/imwrite users. As a related work, 3/4 channel will be supported at this fix. |
- Replaced BGR/RGB data reordering implementation from copying from SRC to DST to using mixChannel(). - Defined an enum to represent Mat types as strings(e.g. CV_8UC1, CV_32FC2, ...) instead of numbers. - (For test) Changed the success/failure judgment of imdecode from dst.empty() to the return value of function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks a lot for the patch!
imgcodecs: tiff: Support to encode for CV_32S with compression params Fix opencv#23416 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
Fix #23416
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.