iarga
January 4, 2017, 11:37am
21
If the code for preview is removed, this filter works. (with two layers):
In G'MIC 1.7.9:
#@gimp Deconvolve : jeje_deconvolve, jeje_deconvolve
#@gimp : Iterations = int(20,1,100)
#@gimp : Algorithm = choice(0,"Richardson-Lucy","Gold-Meinel")
#@gimp : Sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate top","Duplicate left","Duplicate bottom","Duplicate right")
#@gimp : Sep = separator(), note = note{"Need two layers (top layer is the blur)<br><small>Author : <i>Jérôme Boulanger</i>. Latest update: <i>2016/22/02</i>.</small>"}
jeje_deconvolve:
-if {$2==1}
-deconvolve_goldmeinel[0] [1],$1 -n[0] 0,255
-else
-deconvolve_richardsonlucy[0] [1],$1 -n[0] 0,255
-endif
In G'MIC 1.8.0
#@gui Deconvolve : jeje_deconvolve, jeje_deconvolve
#@gui : Iterations = int(20,1,100)
#@gui : Algorithm = choice(0,"Richardson-Lucy","Gold-Meinel")
#@gui : Sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate horizontal","Duplicate vertical")
#@gui : Sep = separator(), note = note{"Need two layers (top layer is the blur)<br><small>Author : <i>Jérôme Boulanger</i>. Latest update: <i>2016/22/02</i>.</small>"}
jeje_deconvolve:
-if {$2==1}
-deconvolve_goldmeinel[0] [1],$1 -n[0] 0,255
-else
-deconvolve_richardsonlucy[0] [1],$1 -n[0] 0,255
-endif
Bottom layer must be deconvolution kernel / psf. But the algorithm takes big steps with every iteration. the image gets darker with each iteration. With goldmeinel this is worse than with richardsonlucy.
afre
(Alan)
January 5, 2017, 2:52am
22
Is code like this readily available? It would give me a rough understanding of how the other filters work.
All the code is available on github.
afre
(Alan)
January 5, 2017, 3:46am
24
Sorry for asking so many questions. If this is the wrong thread, let me know and I will make a new one.
I am still having trouble finding the filters listed in http://gmic.eu/gui_filters.txt on GitHub.
E.g., I tried searching for Artistic / Smooth abstract (command '-fx_smooth_abstract')
using the search terms smooth abstract
under dtschump/gmic-community
. The closest match I could find was gmic-community/zart/presets.xml
. Googling dtschump smooth abstract
yielded the same result.
Is there a file in the GIMP G’MIC installation that contains all of the code for these scripts?
Hello @afre ,
Actually, there are two different places where G’MIC filters are defined:
So when you are looking for the code of a particular filter, you basically have to browse these two places.
EDIT : Note that all these filters are then compiled into a single G’MIC command file, available on your drive, at $HOME/.config/gmic/update180.gmic
(on Linux) and %APPDATA/gmic/update180.gmic
(on Windows), but these files are a bit less readable, as they have been simplified in some way to save bytes (comments have been removed for instance).
1 Like
iarga
January 5, 2017, 7:36am
26
@afre
On my Windows system I find them in:
C:\Users\My_Name\AppData\Roaming\gmic
You can create a custom filter file: user.gmic (windows)
for G’MIC 1.7.9 , you can create the following:
#@gimp user
#@gimp Deconvolve : jeje_deconvolve, jeje_deconvolve
#@gimp : Iterations = int(20,1,100)
#@gimp : Algorithm = choice(0,"Richardson-Lucy","Gold-Meinel")
#@gimp : Sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate top","Duplicate left","Duplicate bottom","Duplicate right")
#@gimp : Sep = separator(), note = note{"Need two layers (top layer is the blur)<br><small>Author : <i>Jérôme Boulanger</i>. Latest update: <i>2016/22/02</i>.</small>"}
jeje_deconvolve:
-if {$2==1}
-deconvolve_goldmeinel[0] [1],$1 -n[0] 0,255
-else
-deconvolve_richardsonlucy[0] [1],$1 -n[0] 0,255
-endif
#@gimp _
For Windows, save this text file as user.gmic and place it in:
C:\Users\My_Name\AppData\Roaming
not in …\AppData\Roaming\gmic
Then you will find the directory “user” in your filter list in gmic-gimp, between Testing and Various
In Linux, locations and names are different. Maybe someone else here can help you for linux?
1 Like