Skip to content
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

Merged
merged 5 commits into from Apr 11, 2023

Conversation

Kumataro
Copy link
Contributor

Fix #23416

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • 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
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • 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

@Kumataro
Copy link
Contributor Author

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.

@asmorkalov asmorkalov added this to the 4.8.0 milestone Apr 2, 2023
@asmorkalov asmorkalov self-assigned this Apr 2, 2023
modules/imgcodecs/src/grfmt_tiff.cpp Outdated Show resolved Hide resolved
modules/imgcodecs/src/grfmt_tiff.cpp Show resolved Hide resolved
modules/imgcodecs/test/test_tiff.cpp Outdated Show resolved Hide resolved
modules/imgcodecs/test/test_tiff.cpp Outdated Show resolved Hide resolved
- 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.
Copy link
Contributor

@asmorkalov asmorkalov left a 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!

@asmorkalov asmorkalov merged commit d2dbaa4 into opencv:4.x Apr 11, 2023
18 of 19 checks passed
@asmorkalov asmorkalov mentioned this pull request May 31, 2023
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

signed 32bit tiff file writing with compression
2 participants