Post Reply 

Convert interactive plug in to non-interactive

Sep 11, 2012, 13:29
Post: #1
Convert interactive plug in to non-interactive
I'm working with a plugin that I need to edit the source code so it can run in NONINTERACTIVE mode. I have no problem compiling it from source - in fact have modified to suit our needs already - but cannot not grasp from GIMP documentation what modifications I need to make it run in NONINTERACTIVE mode. (We have very large images, need to batch process them ....) Any help would be appreciated.
Find all posts by this user
Quote this message in a reply
Sep 11, 2012, 14:04 (This post was last modified: Sep 11, 2012 14:48 by engineerguy.)
Post: #2
RE: Convert interactive plug in to non-interactive
Wonderful questions!

1. It is written in c.

2. It does wavelet-denoising ... very, very nice btw. It is http://registry.gimp.org/node/4235/

3. In interactive mode you move a slider for the degree of denoising. For each image it is easy & quick to use these in preview mode to get the amount of denoising required - it varies from image to image - BUT to actually process the image takes quite a while. Thus we want to move it to a batch program. (We do many of the steps in batch with imagemagick already.)

4. Imagemagick: Yeah, that was my second solution. For batch processing it is our program of choice! I am right now playing with a denoise script from Fred's Imagemagick scripts. It is running as we speak. I like wavelet denoising, but am interested in the output from this script. That said, a negative to the script is that we have to make a guess at the denoising amount, run the script and then rerun if it isn't right. The combo of interactive to get parameters and then toss the amount in a batch script is really ideal.



(Sep 11, 2012 13:38)ofnuts Wrote:  Depends a lot how the plugin is written: C, Scheme, Python? and what it does in "interactive" mode (just takes parameters in input fields in a small dialog, or has an interactive preview?).

The first type is easy, you just have to call it with the same parameters you would enter in the dialog, the latter requires some reverse-engineering to find the computational core and guess what parameters it takes form the interactive part.

So, what plugin are we talking about? And wouldn't the functionality exist in some stand-alone program such as ImageMagick?
Find all posts by this user
Quote this message in a reply
Sep 12, 2012, 00:26 (This post was last modified: Sep 12, 2012 01:57 by engineerguy.)
Post: #3
RE: Convert interactive plug in to non-interactive
As I noted: We open it in gimp and use the slider to visually decide the amount of denoising needed .. this happens very quickly in preview. The problem is that once you apply it to the image it takes several minutes to save ... minutes that you have to attend to the image (or be tethered to the computer) waiting for it to finish. Better to get the denoising for several files (10 or 15), enter them into a data file and then let the batch run while you do something else ... we have to run a batch anyway to do some other image processing. (These files are huge!)

(Sep 11, 2012 23:21)ofnuts Wrote:  3) but if you use it in batch, how will you tell the amount of denoising required?
Find all posts by this user
Quote this message in a reply
Sep 13, 2012, 14:12 (This post was last modified: Sep 13, 2012 14:13 by rich2005.)
Post: #4
RE: Convert interactive plug in to non-interactive
@engineerguy

If you can't hack the wavelet denoise plug-in

As a possibility, for a command line that would use the same parameters as a gimp plugin. Maybe have a look at G'mic. As well as the gimp plugin there is a command line version. I can't compile this in my PCLOS due to non-available devel packages but I can get a somewhat broken installation to work. Also the windoze version works fine with WINE. G'mic 1.5.1.6 or later is needed.

The filter in the Gimp G'mic plugin is Enhancements -> Smooth(wavelets).
The equivalent command line is gmic <in_image> -denoise_haar arg,arg,arg -o <out_image>
That should be easy enough to set up in a bash script to run through a directory of images.

A combined screenshot of all this http://i.imgur.com/4zYtT.jpg

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  MAC OS HELP?? Frustrated with gimp plug-ins Shamari_Rockca 10 1,875 Jul 6, 2014 10:06
Last Post: iForStyle007
  Plug-in support Highlander 12 933 May 1, 2014 17:06
Last Post: rich2005
  How to convert portrait image to landscape vames 4 1,977 Mar 13, 2014 22:17
Last Post: iForStyle007
  Convert multiple BMP into 1 Animated Gif David Bethel 11 2,701 Jan 15, 2014 14:10
Last Post: David Bethel
  can gimp do this (w or w/o plug-in) (paint shop pro had it) moltres_rider 5 1,329 Apr 25, 2013 08:16
Last Post: rich2005

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS