imread() imshow OpenEXR example [closed]
Please share the link or give example how to load and show openEXR images in c++
Please share the link or give example how to load and show openEXR images in c++
Asked: 2015-09-11 07:31:36 -0600
Seen: 2,734 times
Last updated: Sep 11 '15
Camera is not working in OpenCV on Ubuntu 12.04 with version 2.3.1 or 2.4.2
Example 5 OpenCV for Android makes phone crash
Web camera output in dialog in C++
Strange assertion failed message when running (EXAMPLE) detector_descriptor_matcher_evaluation
File format required in the example build3dmodel.cpp
opencv_createsamples and opencv_traincascade usage example
Trivial random forest with OpenCV doesn't work and isn't the same as sklearn
unfortunately, there's no sample for this, but you can just imread() it like any other image, too.
this will ofc. only work, if exr support was compiled into opencv , so the 1st thing to do is check for that, either look for HAVE_OPENEXR in cvconfig.h, or do a
cerr << cv::getBuildInformation();
and look for OPENEXR: ON/OFFif it's not in, you'll have to rebuild opencv WITH_OPENEXR=ON
I have build opencv WITH_OPENEXR=ON.
Media I/O: ZLib: build (ver 1.2.7) JPEG: build (ver 62) PNG: build (ver 1.5.12) TIFF: build (ver 42 - 4.0. JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1)
But then I run , I get only black image
`main(){Mat image; const string name ("C:\rgb-d\img.exr"); image = imread(name); // Read the file namedWindow( "window", WINDOW_AUTOSIZE ); // Create a window for display.
sorry, i'm out of ideas.
try
const string name ("C:\\rgb-d\\img.exr");
orconst string name ("C:/rgb-d/img.exr");