Jamy-L/Handheld-Multi-Frame-Super-Resolution

Different .dng tags

vvubbalubba opened this issue · 4 comments

Hi!
I'm trying to use this method for my own photos in .dng format, but i have

Traceback (most recent call last):
File "/home/jovyan/fominaav/Multi-frame-SR/Handheld-Multi-Frame-Super-Resolution/run_handheld.py", line 176, in
handheld_output = process(args.impath, options, params)
File "/home/jovyan/fominaav/Multi-frame-SR/Handheld-Multi-Frame-Super-Resolution/handheld_super_resolution/super_resolution.py", line 325, in process
ref_raw, raw_comp, ISO, tags, CFA, xyz2cam, ref_path = load_dng_burst(burst_path)
File "/home/jovyan/fominaav/Multi-frame-SR/Handheld-Multi-Frame-Super-Resolution/handheld_super_resolution/utils_dng.py", line 85, in load_dng_burst
white_level = tags['Image Tag 0xC61D'].values[0] # there is only one white level
KeyError: 'Image Tag 0xC61D'

I checked the tags in your .dng-s and mine - they are different. Is there amy tool to fix it?

Jamy-L commented

Hi,

It is very likely that the camera manufacter of your .dng's has put the whitebalance tag somewhere else. If your images display properly in regular image viewers, it probably means that the error is on our side.

I have just pushed a fix in which the reading is done using rawpy, which should be more robust to that. Please let me know if the issue still persists

Thank you for replying!

I tried new version with rawpy for WhiteLevel, but same issue with BlackLevel appeared.

I changed it to
black_levels = raw.black_level_per_channel
and also there is same problem with CFAPattern

In my photos there is no CFAPattern, but I have 'EXIF CVAPattern'
I don't know exactly how it should be handled
maybe you know a way to generalize this similarly via rawpy.

Jamy-L commented

I have pushed a fix for the black level reading and the CFA. Problems may still occur for the ISO and for the noise profile, which cannot be read using rapy. Please let me know if any issue persists

Issue fixed, thanks!