Opening Nikon .NEF raw files in opencv?
I tried to open a .nef file in my opencv application. Everything worked but the image was 160x120 pixels instead of the full size. No errors.
What do it take to open raw .nef files and then use them.
I updated my issues at : http://stackoverflow.com/questions/22355491/libraw-is-making-my-images-too-bright-compared-to-nikons-own-converter
http://lclevy.free.fr/nef/index.html (the problem fits with the specs of the 160x120 extra image)
I think it should be possible to read in your raw data using the libraw. The link shows some code on how to put the data in a matrix structure.
I just tried libraw outside opencv environement and opened the ppm image it generated from the nef. It have done something to the colors. Will try your link and see if the same results will be present there. If so it must be something in libraw that is manipulating the image.
the difference from teh two images can be seen here. https://04o62a.dm1.livefilestore.com/y2p7TPrRkirmyRkqZWfcwKZCK0Htr9OwJMeXop9NfXsw7xgzbI9qaxk-r-pVoOlcc6VBrY1daOhldAXLJMFg43mMuYQ7x2ilAQm8niKFJPNHSw/libraw_d800e.png?psid=1
Aha, probably libraw reads in the images in an RGB way, where openCV functionality uses BGR configuration. You should switch the data of R and B channel, then it should be fixed.
Thats not the problem. I already tried that and also confirmed that a Red car is actual red. I found out how to tell libraw to use the camera WB, and the image is more truth to its colors, but still to light
hmmm :) no clue then, i am sorry!
Thanks anyhow. Just abit anoyed with it. We are using view NX from nikon right now which is an awesome tool but I need to automate this.