Using EXR images in OpenCV

ε祈祈猫儿з 提交于 2019-12-01 06:42:05

问题


I'm currently working on a project with OpenEXR and I would like to implement some Blob detection algorithms. To do this I figured that I could use OpenCV as it says in the documentation that it can open OpenEXR format files.

I have all the libraries installed and working as I've been doing other things. I open a simple jpg file with openCV cvLoadImage. It works fine. But when i try to open any .exr file it doesn't seam to like it. I get a gray window where there should be the image display.

Has anyone done any tests with OpenCV and OpenEXR libraries working together? Have they worked for you? What do you think?

Thanks.


回答1:


Yes, that's done, I posted a Ticket in the OpenCV project at willowGarage and they made all needed changes, you now can use OpenEXR with OpenCV as before! Great My HDR tone mapping algorithm will work again, cool Have a nice programming now ;o) Alex




回答2:


Well Alex!

My news aren't really encouraging... I tried to use OpenEXR with OpenCV but it's not doing it's work. It says in the documentation that OpenCV 2.0 has OpenEXR support but...

I've searched the web to find some example of working EXR images in OpenCV but had no luck.

At this time I've developed myself a function to convert an image read with the OpenEXR libraries that uses Ilm::Rgba* structure to save the pixels of the image and convert it to char* that OpenCV uses with images. The IlpImage structure is the one I use. Actually I'm working with an example from OpenFrameworks and using they're Image structure...

It's a really early stage in my development because I had to start over...

I hope this can help you... but if you enter the world of OpenEXR it's a pretty dark world in terms of documentation, so all I can say is good luck!

Feel free to contact me and I'll see if I can help you!




回答3:


This question is rather old now, but I noticed whilst reading the OpenEXR manual today that it says (whilst talking about reading named channels)

If one of those channels is not present in the image file, the corresponding memory buffer for the pixels will be filled with an appropriate default value.

I'd speculate here that the grey image you are seeing is an "appropriate default value".



来源:https://stackoverflow.com/questions/2119099/using-exr-images-in-opencv

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!