Comments (13)
Please upload an APS-C crop sample (in all compression modes) to https://raw.pixls.us/
from rawspeed.
Please upload an APS-C crop sample (in all compression modes) to https://raw.pixls.us/
And please ideally rename the files before upload
to something like APSC_1[24]bit_(lossless_)?_compressed
so it's obvious what is what...
from rawspeed.
Looks like the same occurs w/ the 7CM2, which is not surprising, as they share the sensor and the processor...
We really need those APS-C samples uploaded to RPU, both lossless and uncompressed (or lossy) @koolfy
Right now it seems the crop from right for APS-C for 7M4/7CM2 should be 40 instead of 8 for the FF. (You can tweak this by hand in the raw black/white point module by enabling plugins/darkroom/rawprepare/allow_editing_crop=true
in your ~/.config/darktablerc
)
This is really unlucky, because for 7RM5 (and I guess TBC for 7CR) it was the same value for FF and APS-C. Currently we don't have a way of detecting the APS-C mode for Sony.
from rawspeed.
Thank you @koolfy
So it's confirmed the 7M4 APS-C is a bit of an exception unfortunately, and needs -40 in the lossy/uncompressed mode vs -8 for FF. This is done by comparing TIFF ImageWidth/ImageHeight for lossy/uncompressed vs "true" SonyRawImageSize active area (which is also confirmed empirically):
For the 7RM5 everything works out as the difference in FF and APS-C is identical.
Lossless is ok in any mode as we ignore XML crop and use the "true" SonyRawImageSize active area directly. Unfortunately this tag is not available in the older lossy/uncompressed file formats.
So, it looks like we either need a new hint/mode to accommodate for this, or break backwards compatibility and forget the "supplies biggest possible images" premise and just go w/ the smaller, manufacturer embedded Exif crop which seems to be always available in Sony ARWs.
Thanks Sony. 😕
from rawspeed.
Regardless of the particular solution chosen for this problem,
i'm pretty sure we should start reading crop from the metadata,
always, even if we will then override it by XML metadata.
(I.e. what #490 did for Panasonic)
from rawspeed.
Yup, not really surprised that this happens.
Given that the crop information is hardcoded
(generally, as offsets to the image size) in an XML,
that is kind-of expected.
A "fix" would be to adjust the specified crop.
A proper fix would be to read it from EXIF.
from rawspeed.
Currently we don't have a way of detecting the APS-C mode for Sony.
OK, we could possibly use the Quality
or APS-CSizeCapture
Sony MakerNotes, this is from 7RM5 samples:
With that, maybe we can add a hint for a different crop, or a new mode altogether?
Edit: Unfortunately, both of these are in parts of Sony MakerNotes rawspeed doesn't decode/decrypt yet... Quality
is the easiest to get to as part of the simple/regular/unencrypted 0x927C MakerNotes IFD rawspeed already parses, just checked that mRootIFD->getEntryRecursive(TiffTag(0x202E))
works.
from rawspeed.
I already made suitable pictures in all modes that I think are relevant, I'll upload them tomorrow during the day, sorry for the wait, busy life :)
I'll name them explicitly as well.
I don't think I found in the menus how to change color depth, I think the default is 12 or 14bits, do you think it's relevant to find how to change that and include different color depth raws as well? I don't think so but RPU seemed to suggest so.
edit: I'll have to take them again, because I didn't properly label them and it's been too long to remember the order in which I took which one and what setting I changed at what time -_-
from rawspeed.
Thank you!
I think 12bit ones were previously being written either in Bulb
mode, or in the highest shutter speed mode.
from rawspeed.
Sorry for the huge delay, I messed up my methodology several times in a row :)
I just uploaded the following set of raw files to raw.pixls.us, although they don't appear on the repo list yet:
- ILCE-7M4_DSC06673_FullFrame-Raw-Uncompressed.ARW
- ILCE-7M4_DSC06674_FullFrame-LossLess-Compressed-Large.ARW
- ILCE-7M4_DSC06675_FullFrame-LossLess-Compressed-Medium.ARW
- ILCE-7M4_DSC06676_FullFrame-LossLess-Compressed-Small.ARW
- ILCE-7M4_DSC06677_FullFrame-Raw-Compressed.ARW
- ILCE-7M4_DSC06678_APS-C-Raw-Uncompressed.ARW
- ILCE-7M4_DSC06679_APS-C-LossLess-Medium.ARW
- ILCE-7M4_DSC06680_APS-C-LossLess-Small.ARW
- ILCE-7M4_DSC06681_APS-C-Raw-Compressed.ARW
The names should be self-explanatory.
These are all the combinations possible.
Please note that the APS-C-LossLess-Large does not exist, because as I understand it, LossLess-Large/Medium/Small correspond to 33mpx/14mpx/??mpx respectively, and obviously as the APS-C sensor crop produces a 14mpx image, it can only start at 14mpx (medium) and can't come up with a 33mpx version :)
Here is a table of what I notice with each picture:
format | can be read | crop corruption on the right |
---|---|---|
FF raw uncompressed | yes | no |
FF LossLess-Large | yes | no |
FF LossLess-Medium | no | n/a |
FF LossLess-Small | no | n/a |
FF raw compressed (lossy) | yes | no |
APS-C raw uncompressed | yes | yes |
APS-C LossLess-Medium | yes | no |
APS-C LossLess-Small | no | n/a |
APS-C raw compressed (lossy) | yes | yes |
What's interesting to me is that we "correctly" crop APS-C LossLess-Medium, but incorrectly crop APS-C raw-uncompressed and raw-compressed (lossy). I know that LossLess decoding was introduced recently, so it makes sense that it would crop differently. It at least seems to be closer to the "correct" crop than the other two.
Again, "correct" may not mean "100% pixels shown", as it seems even the camera-jpg throw away some pixels around the borders.
The ideal solution would be to find a metadata field to follow and crop accordingly, the least-effort solution would probably be to find out whatever crop value we use for the LossLess-medium APS-C crop and use it for APS-C raw-uncompressed and APS-C-compressed(lossy)
It is also interesting that we support LossLess-Medium with the APS-C crop, but can't open the LossLess-Medium in FullFrame crop.
from rawspeed.
Sorry for the huge delay, I messed up my methodology several times in a row :)
I just uploaded the following set of raw files to raw.pixls.us, although they don't appear on the repo list yet:
- ILCE-7M4_DSC06673_FullFrame-Raw-Uncompressed.ARW
- ILCE-7M4_DSC06674_FullFrame-LossLess-Compressed-Large.ARW
- ILCE-7M4_DSC06675_FullFrame-LossLess-Compressed-Medium.ARW
- ILCE-7M4_DSC06676_FullFrame-LossLess-Compressed-Small.ARW
- ILCE-7M4_DSC06677_FullFrame-Raw-Compressed.ARW
- ILCE-7M4_DSC06678_APS-C-Raw-Uncompressed.ARW
- ILCE-7M4_DSC06679_APS-C-LossLess-Medium.ARW
- ILCE-7M4_DSC06680_APS-C-LossLess-Small.ARW
- ILCE-7M4_DSC06681_APS-C-Raw-Compressed.ARW
@koolfy thank you very much for the contribution! Verified uploads (replacing the existing set.)
from rawspeed.
In the meantime, is there a XML value somewhere I can edit to temporarily get a "proper" crop on those specific files?
I see https://github.com/darktable-org/rawspeed/blob/develop/data/cameras.xml#L13830 but it doesn't seem to target a specific format or compression… maybe that's what you're referring to as a new hint/mode?
I'm not in a position to have an opinion on the proper mid/longterm fix, and am simply looking for a quick hack for the pictures I'm processing in the meantime.
I'm okay with turning it into an acceptable PR too if that's helpful and within my skills.
from rawspeed.
@koolfy You basically have two workaround options for the moment, and you can choose one depending on whether you have more FF or APS-C raws (note again that these apply only to uncompressed/lossy, and for lossless you don't have to do anything):
-
(preferred IMHO) Enable crop settings (set
plugins/darkroom/rawprepare/allow_editing_crop=true
in your~/.config/darktable/darktablerc
), and then in "raw black/white point" module bump the crop right slider from 8 to 40; note that you'll have to do this for every single APS-C image (you can create a preset though), and/or -
Edit your
cameras.xml
and change the -8 to -40 in the 7M4/7CM2 section; note that you'll then have to restore to 8 by method 1 for individual FF images (and also remember to editcameras.xml
again if you update dt).
from rawspeed.
Related Issues (20)
- Website died
- src/librawspeed/README.md is out of date HOT 4
- Looking for bits per sample HOT 12
- Using the ColorFilterArray API to get the filter color for a row/col HOT 4
- DNG opcode level 2 support HOT 8
- Support for the new Sony A6700 (ILCE-6700) please :) HOT 9
- Support JPEG XL compression in DNG HOT 6
- On the use of dithering when decompressing lossless NEF files HOT 1
- Required compiler too strict HOT 1
- WXS schema failed to compile HOT 2
- How to help for developing new decompressor? HOT 9
- OM SYSTEM OM1 Mark II "14-bit" raw support HOT 1
- Support for Canon Powershot S100 (.CR2) HOT 2
- [Vendors] Will a move to Rust pose an impossible issue to you? HOT 14
- question: Difference for embedded lens-correction for OM-System Mark II between DNG and ORF HOT 3
- Bad columns in left optical black area Canon EOS 2000D
- Phase One decode error HOT 1
- Support the DJI Mavic 3 Pro HOT 1
- Clang 19 compilation error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rawspeed.