HDR Radiance format .. imread / imwrite (Feature #4069)


Added by Andrej XXX about 10 years ago. Updated over 9 years ago.


Status:New Start date:2014-12-17
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:highgui-images
Target version:3.0 Estimated time:2.00 hours
Difficulty:Easy Pull request:

Description

Hello, I am implementing HDR Radiance format support to my app and even if it is not documented I see that recent OpenCV 3.0 beta supports it.
This is maybe the known bug, but since I would like to see this working I decided to write a bug report.

Basically most of the HDR files I have downloaded from various websites cannot be loaded using 'imread'. There is an error message pointing out that there is new line character missing in the header.

OpenCV Error: Unspecified error (RGBE bad file format: missing blank line after FORMAT specifier) in rgbe_error, file ..\..\..\..\opencv\modules\imgcodecs\src\rgbe.cpp, line 97

I looked inside the files and there seems to be new line where it suppose to be. I did not tried to compile OpenCV and debug that. I managed to open all HDR files in XnView with no problems.

What I am using is included java library, so maybe there are some problems with binaries. I run on Windows 7 64bit system. I managed to open few smaller HDR files .. so it feels more like the code is not robust enough. I had to write my own HDR importer, yesterday I tried to write HDR using 'imwrite' which is also not documented but you mention it here on your page :

"http://docs.opencv.org/trunk/doc/tutorials/photo/hdr_imaging/hdr_imaging.html" .. so I was assuming that at least imwrite works correctly, but the files cannot be opened with any other image reader app I have, it can be opened fine with imread but I need it for exporting purposes.

I hope you can fix that, I switched to OpenCV from another system and I like it more. Keep up good work.


HDR_112_River_Road_2_Env.hdr - .. unsuccessful imread (303.4 kB) Andrej XXX, 2014-12-17 11:43 am

night_free_Env.hdr - .. successful imread (246.5 kB) Andrej XXX, 2014-12-17 11:43 am


Associated revisions

Revision 58cf11bd
Added by Vadim Pisarevsky almost 10 years ago

Merge pull request #4069 from MSOpenTech:sample-face-contrib

History

Updated by Maksim Shabunin almost 10 years ago

  • Target version changed from 3.0-beta to 3.0

Updated by Vadim Pisarevsky almost 10 years ago

  • Tracker changed from Bug to Feature

Updated by Vadim Pisarevsky almost 10 years ago

  • Category changed from highgui-gui to highgui-images

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4885

Also available in: Atom PDF