I finally have something to show. You can grab the code under https://github.com/wmader/darktable the branch in called color2gray.
The iop is designed to work with multiple operators. Right now, there are two implemented. The first "lightness" simple keeps L and sets a = b = 0. The second one is called "apparent grayscale" and is more interesting. This method uses a model for the Helmholtz-Kohlrausch (HK) Effect. This effect describes the difference in the perceived brightness of an stimulus depending on its color. The model is described in [1,2]. Basically, the chromaticity of a color is measured as an angle with respect to a gray-point. This angle is the input for the HK-Effect model. There is one free parameter, the ambient luminance, which the paper says should be 20. As there is no sound reasoning for this value, I implemented a slider for it. The effect, however, is minor. I used a test image from [2] to test my implementation against the result of their published gimp-plugin. As they use d65 and we use d50, I patch relevant functions it dt to use d65 for testing. Then, I get matching results. While I implemented the HK model, [2] takes this one step further by enhancing the contrast for areas in the grayscale image where the respective contrast in the color image is larger. I had not yet time to implement this, and for family reasons, I will not have the time in the near future. Fortunately, Maximilian, also on this list, approached me, as he is also interested in the topic. He will take up the task of implementing the chromatic contrast, which is based on Laplacian pyramids. So, check out the code, give it a try. If you have any questions, please let me know, I try to answer in a timely manner. And as I already mentioned, this is my first contribution. Therefore, if the code does not live up to your expectations, let me know, and I try to fix it. Best, Wolfgang P.s.: If anyone is interested in the test images, I am happy to send. I assume, however, that this list does not accept attachments. [1] Simple Estimation Methods for the Helmholtz–Kohlrausch Effect, Y. Nayatani, CIE Journal, 5:2, 1986 [2] Apparent Greyscale: A Simple and Fast Conversion to Perceptually Accurate Images and Video, K. Smith, P. Landes, J. Thollot, K. Myszkowski, EUROGRAPHICS, 27:2, 2008 On Friday, July 1, 2016 8:18:19 PM CEST Wolfgang Mader wrote: > Hi, > > thanks for asking. I defensed my Ph.D. theses last week and overestimated > the free time I would have while preparing the defense. Therefore, I will > only find time for darktable starting with the coming week. However, I come > back to the list once there are results such that I do not have make > promises I can but live up to. > > Sorry, > Wolfgang > > On June 30, 2016 3:49:19 PM GMT+02:00, Moritz Moeller <virtualr...@gmail.com> wrote: > >Hey Wolfang, > > > >On 09/05/16 11:46, Wolfgang Mader wrote: > >> Thanks for the literature. I will have a look at is at soon as > > > >possible, and > > > >> will come back to you, once there is something do discuss. > > > >I'll have some B&W images to develop soon. Anything I could test > >already? :) > > > >.mm > > > >___________________________________________________________________________ > >darktable developer mailing list > >to unsubscribe send a mail to > >darktable-dev+unsubscr...@lists.darktable.org
signature.asc
Description: This is a digitally signed message part.