Discussion:
[darktable-dev] GMIC module
Heiko Bauke
2018-09-05 05:49:26 UTC
Permalink
Hi,

in the last few weeks I integrated a few GMIC filters into darktable to
play with.

Integrating GMIC into darktabe was an idea that I had in mind for quite
some time. However, I was not sure if it would be worth the effort to
integrate GMIC filters into darktable. There is a quite nice GMIC
plugin for GIMP and everything that one might be able to do in darktable
with an integrated GMIC module could be realized with darktable & gimp,
too. After editing several images with darktable with integrated GMIC
module, however, I realized that applying GMIC filters within
darktable's non-destructive workflow is much more fun to use than gimp's
GMIC plugin.

The attached image may give you an idea of the GMIC module. If you want
to give it a try, see https://github.com/rabauke/darktable/tree/gmic
At the moment a limited number of GMIC filters is available via the UI,
more might come in the future.

I am not sure, if one should integrate this module into main. After
playing with the GMIC filters, however, I think it would be great to
(re-)implement some of the GMIC filters for darktable. In particular,
the Richardson-Lucy deconvolution sharpening filter is something that I
desperately miss in vanilla darktable.

What do you think? Any suggestions? Is the a GMIC filter that you wish
to able to use in darktable?


Heiko
--
-- Number Crunch Blog @ https://www.numbercrunch.de
-- Cluster Computing @ https://www.clustercomputing.de
-- Social Networking @ https://www.researchgate.net/profile/Heiko_Bauke
Bruce Williams
2018-09-05 05:59:15 UTC
Permalink
OK, I'll bite.
What's a GMIC filter when it's at home?
:)
Cheers,
Bruce Williams
------------------------------

audio2u.com
brucewilliamsphotography.com
shuttersincpodcast.com
sinelanguagepodcast.com

e-mail <***@audio2u.com> | Twitter <http://twitter.com/@audio2u> |
LinkedIn <http://au.linkedin.com/pub/bruce-williams/1/318/489> | Facebook
<http://www.facebook.com/audio2u> | Soundcloud
<http://www.soundcloud.com/audio2u> | Quora
<https://www.quora.com/profile/Bruce-Williams-5>
------------------------------
Post by Heiko Bauke
Hi,
in the last few weeks I integrated a few GMIC filters into darktable to
play with.
Integrating GMIC into darktabe was an idea that I had in mind for quite
some time. However, I was not sure if it would be worth the effort to
integrate GMIC filters into darktable. There is a quite nice GMIC
plugin for GIMP and everything that one might be able to do in darktable
with an integrated GMIC module could be realized with darktable & gimp,
too. After editing several images with darktable with integrated GMIC
module, however, I realized that applying GMIC filters within
darktable's non-destructive workflow is much more fun to use than gimp's
GMIC plugin.
The attached image may give you an idea of the GMIC module. If you want
to give it a try, see https://github.com/rabauke/darktable/tree/gmic
At the moment a limited number of GMIC filters is available via the UI,
more might come in the future.
I am not sure, if one should integrate this module into main. After
playing with the GMIC filters, however, I think it would be great to
(re-)implement some of the GMIC filters for darktable. In particular,
the Richardson-Lucy deconvolution sharpening filter is something that I
desperately miss in vanilla darktable.
What do you think? Any suggestions? Is the a GMIC filter that you wish
to able to use in darktable?
Heiko
--
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to
Andreas Schneider
2018-09-05 06:48:40 UTC
Permalink
Post by Heiko Bauke
Hi,
Hi Heiko,
Post by Heiko Bauke
I am not sure, if one should integrate this module into main. After
playing with the GMIC filters, however, I think it would be great to
(re-)implement some of the GMIC filters for darktable. In particular,
the Richardson-Lucy deconvolution sharpening filter is something that I
desperately miss in vanilla darktable.
What do you think? Any suggestions? Is the a GMIC filter that you wish
to able to use in darktable?
I think having a few filter available (implemented) in darktable would be
really great!

However, something else, I'm still looking forward to get the guided filter
for parametric and drawn masks, any news on that front? :-)


Andreas
--
Andreas Schneider ***@cryptomilk.org
GPG-ID: 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
Heiko Bauke
2018-09-05 18:57:51 UTC
Permalink
Hi Andreas,
Post by Andreas Schneider
However, something else, I'm still looking forward to get the guided filter
for parametric and drawn masks, any news on that front? :-)
still lacking time and sufficient knowledge in OpenCL programming to
implement this feature properly. In particular, I would need to
understand better how the OpenCL image processing pipeline works in
darktable. For example, how is it decided when data needs to be copied
from host memory to GPU? Do I need to care about explicit copying at
all? Where should I put the OpenCL kernel? Etc.


Heiko
--
-- Number Crunch Blog @ https://www.numbercrunch.de
-- Cluster Computing @ https://www.clustercomputing.de
-- Social Networking @ https://www.researchgate.net/profile/Heiko_Bauke
johannes hanika
2018-09-10 13:08:52 UTC
Permalink
hi heiko,

are you on irc at some point? my internet connection is intermittent
these days, but discussing these things sounds like an interactive
medium would be better suited.

i was traditionally looking at the easiest module (sharpen,
src/iop/sharpen.c) for reference. for the opencl kernel, you'd need to
implement process_cl() which gets passed pointers to cl_mem instead of
the regular heap pointers for input and output. that means the memory
is already on the GPU by the time your code runs. there are a few
silly shenanigans to be done to initialise the kernel once globally
instead of every time you enter darkroom mode. that's init_global().
the kernel itself is in data/kernels/something.cl and
data/kernels/programs.conf takes care to identify the kernels with
some integer that has to be used in the code to grab the compiled
kernel for you.

i'm sure there will be more things coming up as the first ten issues
will be resolved :)

cheers,
jo
Post by Heiko Bauke
Hi Andreas,
Post by Andreas Schneider
However, something else, I'm still looking forward to get the guided filter
for parametric and drawn masks, any news on that front? :-)
still lacking time and sufficient knowledge in OpenCL programming to
implement this feature properly. In particular, I would need to
understand better how the OpenCL image processing pipeline works in
darktable. For example, how is it decided when data needs to be copied
from host memory to GPU? Do I need to care about explicit copying at
all? Where should I put the OpenCL kernel? Etc.
Heiko
--
___________________________________________________________________________
darktable developer mailing list
johannes hanika
2018-09-05 10:08:10 UTC
Permalink
hi heiko!

this sounds great!

as to your question, integrate gmic or reimplement. does it make much
of a difference? can the code run on cropped regions of interest and
in floating point? does it work for preview, i.e. does a downscaled
image look similar when processed to first processing and then
downscaling? any performance concerns in the interface (need to copy
buffers etc)?

for R/L sharpening, maybe that would be a popular addition to the
current sharpen module (so it'll be easy to discover)?

cheers,
jo
Post by Heiko Bauke
Hi,
in the last few weeks I integrated a few GMIC filters into darktable to
play with.
Integrating GMIC into darktabe was an idea that I had in mind for quite
some time. However, I was not sure if it would be worth the effort to
integrate GMIC filters into darktable. There is a quite nice GMIC
plugin for GIMP and everything that one might be able to do in darktable
with an integrated GMIC module could be realized with darktable & gimp,
too. After editing several images with darktable with integrated GMIC
module, however, I realized that applying GMIC filters within
darktable's non-destructive workflow is much more fun to use than gimp's
GMIC plugin.
The attached image may give you an idea of the GMIC module. If you want
to give it a try, see https://github.com/rabauke/darktable/tree/gmic
At the moment a limited number of GMIC filters is available via the UI,
more might come in the future.
I am not sure, if one should integrate this module into main. After
playing with the GMIC filters, however, I think it would be great to
(re-)implement some of the GMIC filters for darktable. In particular,
the Richardson-Lucy deconvolution sharpening filter is something that I
desperately miss in vanilla darktable.
What do you think? Any suggestions? Is the a GMIC filter that you wish
to able to use in darktable?
Heiko
--
___________________________________________________________________________
darktable developer mailing list
Heiko Bauke
2018-09-05 19:09:57 UTC
Permalink
Hi Johannes,
Post by johannes hanika
as to your question, integrate gmic or reimplement. does it make much
of a difference?
main differences:

* using libgmic introduces an additional dependency.

* libgimic is written in C++, GMIC module needs to be implemented in C++.
Post by johannes hanika
can the code run on cropped regions of interest and
in floating point? does it work for preview, i.e. does a downscaled
image look similar when processed to first processing and then
downscaling?
For the sharpening filters: At the moment one has to scale the preview
to the scale of the intended export to get an reliable preview. Taking
into account the scaling of the preview and scaling the parameters
accordingly would be easy. However, I am unsure, if applying the
sharpening filters with scaled parameters really gives a better preview.
When it comes to sharpening, I think one always has to zoom in to
adjust the parameter appropriately. Therefore I neglected this issue so
far.
Post by johannes hanika
any performance concerns in the interface (need to copy
buffers etc)?
GMIC stores image data quite differently than darktable. Thus
additional copying steps are needed, which is not that so nice.
Post by johannes hanika
for R/L sharpening, maybe that would be a popular addition to the
current sharpen module (so it'll be easy to discover)?
Completely agree.


Heiko
--
-- Number Crunch Blog @ https://www.numbercrunch.de
-- Cluster Computing @ https://www.clustercomputing.de
-- Social Networking @ https://www.researchgate.net/profile/Heiko_Bauke
johannes hanika
2018-09-10 13:11:40 UTC
Permalink
hi,
Post by Heiko Bauke
Hi Johannes,
Post by johannes hanika
as to your question, integrate gmic or reimplement. does it make much
of a difference?
* using libgmic introduces an additional dependency.
* libgimic is written in C++, GMIC module needs to be implemented in C++.
okay those two i don't care much. this sounds more like free updates
to the algorithms. we've had a few c++ modules, so no real show
stopper.
Post by Heiko Bauke
Post by johannes hanika
can the code run on cropped regions of interest and
in floating point? does it work for preview, i.e. does a downscaled
image look similar when processed to first processing and then
downscaling?
For the sharpening filters: At the moment one has to scale the preview
to the scale of the intended export to get an reliable preview. Taking
into account the scaling of the preview and scaling the parameters
accordingly would be easy. However, I am unsure, if applying the
sharpening filters with scaled parameters really gives a better preview.
When it comes to sharpening, I think one always has to zoom in to
adjust the parameter appropriately. Therefore I neglected this issue so
far.
right. we do very similar things for denoising/sharpen inside
darktable. this is just something that has to be considered.
Post by Heiko Bauke
Post by johannes hanika
any performance concerns in the interface (need to copy
buffers etc)?
GMIC stores image data quite differently than darktable. Thus
additional copying steps are needed, which is not that so nice.
that sounds suboptimal. but how much does it cost? did you run
darktable -d perf with something very minimal just to benchmark the
cost of the buffer copy? if it's in the single digit millisecond range
maybe we shouldn't bother porting the code but just use the library..
Post by Heiko Bauke
Post by johannes hanika
for R/L sharpening, maybe that would be a popular addition to the
current sharpen module (so it'll be easy to discover)?
Completely agree.
cool!

cheers,
jo

Continue reading on narkive:
Search results for '[darktable-dev] GMIC module' (Questions and Answers)
6
replies
What war uniform would this be? (Canadian?)?
started 2012-10-30 09:56:44 UTC
genealogy
Loading...