-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
imgcodecs: OpenEXR multispectral read/write support #27485
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
base: 4.x
Are you sure you want to change the base?
Conversation
Adds capability to read and write multispectral (>4 channels) images in OpenEXR format.
solving warning C4800
const string filenameInput = root + "readwrite/test32FC7.exr"; | ||
const string filenameOutput = cv::tempfile(".exr"); | ||
#ifndef GENERATE_DATA | ||
const Mat img = cv::imread(filenameInput, IMREAD_UNCHANGED); |
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.
How will it work in case of BGR or GRAYSCALE input?
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.
I tried to open the test file without parameters and got [ERROR:0@0.020] global loadsave.cpp:515 imread_ imread_('./test32FC7.exr'): can't read data: OpenCV(4.12.0-pre) /mnt/Projects/Projects/opencv/modules/imgcodecs/src/grfmt_exr.cpp:258: error: (-215:Assertion failed) m_multispectral == multispectral in function 'readData'
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.
The message looks cryptic. I propose to use CV_CheckXXX macro and add meaningful error message.
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.
How will it work in case of BGR or GRAYSCALE input?
It leaves it on previous implementation when channels <= 4
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.
I tried to open the test file without parameters and got `[ERROR:0@0.020] ...
I will test it today and add some error messages.
OpenCV Extra: opencv/opencv_extra#1262
Adds capability to read and write multispectral (>4 channels) images in OpenEXR format.
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.