The Gimp offers non-interactive functionality though the command line. Using this functionality, procedural tasks on multiple pages are easily programmed. GiDoc plugins can be used in this way too. Usually, every procedure in the Gimp takes three parameters: a flag indicating wheter the execution is interactive or not, the image identifier, and the drawable identifier. However, GiDoc plugins often need more parameters, which can be found in the "procedure menu" of Gimp .
Scheme and Python are the two programming languages in which scripts can be created. A brief howto can be located the Gimp documentation here. GiDoc -related examples can be found in the "src/scripts/" directory of the source package.
There are a bunch of useful GiDoc tools that can only be used in non-interactive mode:
gimp -i -b '(giDoc-extract-pgm 1 10 50 0 "folder" "script-fu-gidoc-preprocess")' -b '(gimp-quit 1)'This example extracts the lines of the ".xcf" documents inside "folder", which are then preprocessed using the "script-fu-gidoc-preprocess" script. Then, extracted images are converted into PGM format and saved into a temporary directory.
gimp -i -b '(giDoc-extract-fea 1 10 50 20 "folder" "script-fu-gidoc-preprocess" "gidoc-feaextline-prhlt")' -b '(gimp-quit 1)'As above, but now feature vectors are extracted from a set of pages in a folder. Note that, in this case, the feature extraction method is the one defined in the "gidoc-feaextline-prhlt" script and the height used is 20.
giDoc Team