Raw2hdr for raspberry images

Hi everyone

I am trying to make HDR images from pictures taken with the raspberry pi camera module . As I would like to work with the raw data, I converted the JPEG+RAW (raspberry format) to DNG and then used raw2hdr to generate de hdr image, however I am getting the following error:

*image.tif:needs exposure calibration *
Failure generating HDR image

Does anyone know why is this appearing, or if there is another way to work with this image format?

The images I am using can be found in the next link: https://drive.google.com/drive/folders/10g4plWazgKmRjnc2PPdoyqzv51Fi_iil?usp=sharing

Thank you and best wishes.

Mariana

Somehow, your DNG files have ISO set to 0, which is an illegal value. I don’t exactly know how to correct this.

Hi Greg, thanks for the response :slight_smile:
Could you tell me how can I check the ISO value of the DNG image?, When I check it with Exiftool value appears to be 100.
screenshot1

Yes – I’m not sure what’s happening to the ISO and the F-number in dcraw. There must be some kind of bug/shortcoming when reading DNG images. The fix is to add the following to the setting of the “@exiftags” array in the raw2hdr Perl script:

-ISO -ApertureValue>FNumber

You can edit the script in a text editor. I tried it and it seems to work for your image.

Thanks a lot Greg!

It now works without problems! Thank you!

Hi @Greg,

I have the same issue with exposure calibration. I get this error that the image needs exposure calibration. This is the image link. And the ISO is set to 100.
Do you have any idea how to solve this issue?

Thanks,

Looks like your file is also missing the aperture setting. Try adding arguments to exiftool like:

-FNumber=2.6

to set it manually. What you set it to shouldn’t really matter, but ideally it would be the (fixed) camera aperture for your Raspberry Pi.

-Greg

1 Like

Hi Greg,

I suddenly found the same problem again with the missing aperture from EXIF file. It was a weird issue that happened out of blue. I tried several ways with no success. Since I need to generate multiple HDR images and it is so time-consuming to add the F-number to all images before HDR generation, I am wondering if you have any idea what could be the reason for this issue.

Thanks,

I have never used a Raspberry Pi or its camera, so I know only what people tell me, and that’s not much.

Sorry,
-Greg

Hi Greg,
After adding the F-number for the image, I still get this error: ldr_17 needs exposure calibration. Interestingly all the previous images (1-16) are fine but not the 17th one. HERE is the image for your view. I compared the EXIF file of image 17 with image 16 and all the info was similar. Do you have any idea what is the issue?

I checked my code and it rejects shutter speeds above 1/50000th of a second as out-of-range. The exposure on this frame is 1/66667 of a second.

I will change this limit for the future, but meanwhile, you will just need to either leave this exposure out of the sequence, or manually set the exposure with the -s option if you know how.

Cheers,
-Greg

Thanks for the info provided @Greg_Ward,
I do not know how to exactly apply the -s factor in this process. Would you please let me know how long would it take to be updated? If the future that you mentioned will happen soon, I can wait for it. If not, I will work on the -s option to see how should I use it to not make any mistakes in the HDR generation process.

Thanks,

“The future” in this case is probably distant, since @Andrew_McNeil1 compiled my code for the Raspberry Pi years and years ago, and I have no ability to do it myself. This is kind of a corner case, so I don’t think it’s worth trying to get it in sooner than would happen naturally, which may be never.

Setting the -s option correctly is difficult, and it would take several paragraphs with formulas to explain it. Better just to drop that exposure.

-Greg

1 Like