AcademySoftwareFoundation / AcademySoftwareFoundation/rawtoaces
Incorrect cropping on some cameras
- Dominant language
- C++
- Stars
- 193
- Forks
- 65
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 6
Description
When decoding (mostly found on Canon) RAWs, I sometime see the cropping (display window) being 1 pixel smaller than expected in either or both dimensions, always odd pixels count. My understanding from looking at LibRaw (specifically around [here](https://github.com/LibRaw/LibRaw/blob/master/src/utils/open.cpp#L940-L969)) is that the cropping area is adjusted to fall on CFA grid boundaries (2x2 for non Fuji xtrans sensors). I think this can be patched before applying the crop by comparing the resulting display window versus expected dimension metadata but wonder what other people think as I'm not very familiar with sensor crops.
This should be visible with RAWs from https://www.dpreview.com/reviews/image-comparison for cameras like Canon EOS R5, Canon EOS R5 C, Canon EOS 5D, Canon EOS Rebel T7.
Contributor guide
Research direction
Start by reproducing the reported crop dimensions with RAWs from the listed Canon cameras and inspect the LibRaw adjustment around src/utils/open.cpp lines 940-969. Compare the resulting display window with the expected dimension metadata and check the behavior against the CFA grid. Done means the affected RAWs produce the expected display-window dimensions without breaking other camera crops.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100