Hi Tobias,

thanks for your answer and help!

Now I have even more questions :)

On Tue, Aug 14, 2018 at 2:53 PM Tobias Ellinghaus <m...@houz.org> wrote:
[..]
> > > I'm interested in writing an automatic white balance module or preset
> > > for darktable, similar to rawtherapee's AWB mode. Briefly spoken, it
> > > allows one to set a bias value for warmer / cooler tones and
> > > calculates the color temperature using all pixels in the image (like
> > > using the spot preset with a 100% area for the color picker).
> > >
> > > So far I kind of understand darktable's module interface, but I don't
> > > understand how the color picker works.
>
> Since you are using the whole image anyway there is no need for using the
> color picker. Just iterate over the image.

That's why I wanted to learn about the color picker. I looked more
closely at the `draw()` method and found that the picked color values
are in `self->picked_color`. At least now I understand how the color
picker works. :)

> > > To my understanding, the color
> > > picker can only function when in GUI mode?
>
> Yes. It's a way for the user to interact with dt.
[..]

That's a pity, because I was hoping for an easy implementation: Call
the color picker without GUI interaction with an image area of 100%,
then take the picked colors and just run it through the default
algorithm.

> > > 1) How can I get all the necessary information / color values from the
> > > picture (color picker?)?
>
> Just look at the image. If you need the data from the full image you have to
> use the preview pipe and sync the data to the other pipe. Some of the color
> transfer iops should already do something like that.

Can you give me a hint at what data structures to look at? There are
several data structures called `dt_dev_pixelpipe_..` etc. and I can't
figure out a) which one is the appropriate structure and b) how to get
the color information. Maybe I can reuse some of the color picker
code?

> > > 2) How does the algorithm for calculating the white balance using a
> > > bias look like?
>
> Maybe look at how RT is doing it.

I'll do that. :)

Cheers,

  Jochen
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Reply via email to