Coder Social home page Coder Social logo

Comments (11)

LibRaw avatar LibRaw commented on June 20, 2024

Also, you need color data extraction from files which provides color data (DNG, digital backs, several other formats).

BTW, LibRaw may use RawSpeed as (faster) decoder for about two years. We use this way to use RawSpeed in our apps (RawDigger, FastRawViewer) without problems (although, sometimes RawSpeed's output differs from LibRaw's, in this case I file a bug to Klaus).

from rawspeed.

pedrocr avatar pedrocr commented on June 20, 2024

you need color data extraction from files which provides color data

Isn't that already done? At least darktable doesn't seem to use libraw to get that.

from rawspeed.

LibRaw avatar LibRaw commented on June 20, 2024

As I can see, darktable uses own built-in color data (src/external/adobe_coeff.c) copypasted from dcraw

from rawspeed.

pedrocr avatar pedrocr commented on June 20, 2024

That's one source, originally from dcraw now generated from the Adobe DNG converter directly. It also has custom colors for some cameras.

Do you mean that besides fixed values for some formats you also need to extract them from the file itself? And that rawspeed isn't doing that already?

from rawspeed.

LibRaw avatar LibRaw commented on June 20, 2024

yes, for some cameras it is better to extract it from file.
I do not see some generic interface for it in RawSpeed.

from rawspeed.

LibRaw avatar LibRaw commented on June 20, 2024

BTW, you say 'generated from the Adobe DNG converter directly'.
Is there any script or something? I'm interested to extract Adobe's BaselineExposure values for all cameras....

from rawspeed.

pedrocr avatar pedrocr commented on June 20, 2024

https://github.com/darktable-org/darktable/blob/master/tools/dngmeta.sh

I'm afraid that probably doesn't do what you want. It extracts the values from a .DNG file but you'd probably want to extract them from the app data itself.

from rawspeed.

LibRaw avatar LibRaw commented on June 20, 2024

Thanks, but this script extracts data from DNG file, not from DNG convertor.
I use Exiftool, not exiv2 for it, but it is nearly the same.

The problem is there is no enough samples to extract BaselineExposure from, because this parameter may vary with ISO change (and, worse, with other camera settings, such as 'highlight preservation')

from rawspeed.

pedrocr avatar pedrocr commented on June 20, 2024

After looking at this in more detail my plan would be to extend rawspeed to extract both whitebalance and color data but not thumbnails. For thumbnails something like exiv2 should work instead. For the color data my plan would be to take the matrices currently in darktable's adobe_coeff and migrate them to rawspeed's cameras.xml. That way we would have a complete sensor definition with black/white points and color matrix all in one place.

Klaus, does this make sense to you, or would you rather keep this info out of cameras.xml?

from rawspeed.

klauspost avatar klauspost commented on June 20, 2024

I think all color convertion should be separate.

I have however thought about adding the "UniqueCameraModelRestriction" camera name from Adobes DCP to cameras.xml - that way it would be trivial to match a DCP profile with data from RawSpeed. I think these could be added automatically with a little coding efford.

If time had been more on my side, I have thought about making a simple, but separate converter frontend for RawSpeed, that used (Adobe) DCP profiles for conversion. These contain, at very least the same matrix as D.C. has extracted and included. However, there can be two matrices with different illuminants, and based on the whitebalance an intermediate can be calculated.

Here you can see the "simple" profiles, which only contain matrices:

http://rawstudio.org/svn/rawstudio/trunk/profiles/simple-src/

These xml files are "compiled" into DCP files (using a tool called dcptool), which are basically slightly modified DNG/TIFF files that only contain profile information:

http://rawstudio.org/svn/rawstudio/trunk/profiles/

More advanced profiles can contain 3d HSV-lookup tables to correct color casts and imperfections in the matrix.

from rawspeed.

LibRaw avatar LibRaw commented on June 20, 2024

Color conversion, surely, should be separate.
But raw decoding library should unpack color data from raw files (it these raw data contains color data) and pass it to calling application.
This is very useful for
a) generic DNG support (from unknown camera)
b) generic format support (from new camera from known manufacturer; for example, Sony or Olympus raws contains matrix color profile)
c) cameras with per-camera calibration (digital backs)

from rawspeed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.