darktable-org / darktable-org/rawspeed
Olympus white level
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 456
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
I think there is a problem with the white level for Olympus raws.
It gets set here https://github.com/darktable-org/rawspeed/blob/e5cbf2750893b413e82dbeb7d4cb022018fa4637/src/librawspeed/decoders/OrfDecoder.cpp#L278 which was originally added in this commit from 2011 https://github.com/darktable-org/rawspeed/commit/98420bffd3198c931085a8f9b5a00cf30cca46f0
It starts with the black and white levels from cameras.xml, replaces the black level with the values from Exif.OlympusIp.BlackLevel tag, and then adjusts the white level so that the difference between the black and white level is the same as it was in cameras.xml. The problem is that this often sets the white level greater than 4094, so for a 12 bit raw it appears to darktable as if there are no clipped pixels at all.
There is a proprietary tag Exif.OlympusIp.0x0805 which may contain the white level:
https://github.com/exiftool/exiftool/blob/5c2467fa6cdb38233793884e80cee9abf4da48e6/lib/Image/ExifTool/Olympus.pm#L2907
I haven't investigated extensively but checked some images from my E-P5 and other orfs on RPU and it always seems to have a reasonable value, never greater than 4094. The value does vary based on camera settings.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/librawspeed/decoders/OrfDecoder.cpp at the Olympus black and white level handling, then compare its cameras.xml inputs with the Exif.OlympusIp.BlackLevel and 0x0805 references in the issue. Investigate representative Olympus ORF files and establish a regression test or other verification that confirms clipped pixels are reported correctly without exceeding the raw bit depth.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100